Nesne Tanımları - huginsdk/tps GitHub Wiki
Bu belge, TPS API'sinde kullanılan tüm nesne türlerinin detaylı tanımlarını içerir.
GetProducts Result
Açıklama
Ürün bilgilerini içeren sonuç nesnesi.
{
"productCode": "string",
"productName": "string",
"price": "decimal",
"vatRate": "decimal",
"unit": "string",
"weighable": "string"
}
Alanlar
Alan | Tip | Açıklama |
---|---|---|
productCode | String | Ürün kodu/barkodu |
productName | String | Ürün adı |
price | Decimal | Ürün fiyatı |
vatRate | Decimal | KDV oranı |
unit | String | Birim (adet, kg, lt, vb.) |
weighable | String | Tartılabilir ürün kodu (1: Evet, 0: Hayır) |
Document
Açıklama
Temel belge nesnesi.
{
"documentType": "integer",
"documentNumber": "string",
"documentDate": "datetime",
"totalAmount": "decimal",
"vatAmount": "decimal",
"discountAmount": "decimal",
"netAmount": "decimal"
}
Alanlar
Alan | Tip | Açıklama |
---|---|---|
documentType | Integer | Belge türü (1-7) |
documentNumber | String | Belge numarası |
documentDate | DateTime | Belge tarihi |
totalAmount | Decimal | Toplam tutar |
vatAmount | Decimal | KDV tutarı |
discountAmount | Decimal | İndirim tutarı |
netAmount | Decimal | Net tutar |
SalesDocument
Açıklama
Satış belgesi nesnesi, Document'ten türetilmiştir.
{
"documentType": "integer",
"documentNumber": "string",
"documentDate": "datetime",
"totalAmount": "decimal",
"vatAmount": "decimal",
"discountAmount": "decimal",
"netAmount": "decimal",
"saleItems": [],
"payItems": [],
"customerInfo": {}
}
Ek Alanlar
Alan | Tip | Açıklama |
---|---|---|
saleItems | Array | Satış kalemleri listesi |
payItems | Array | Ödeme kalemleri listesi |
customerInfo | Object | Müşteri bilgileri |
ItemInfo
Açıklama
Satış kalemi bilgileri.
{
"productCode": "string",
"productName": "string",
"quantity": "decimal",
"unitPrice": "decimal",
"totalPrice": "decimal",
"vatRate": "decimal",
"vatAmount": "decimal",
"discountInfo": {}
}
PaymentInfo
Açıklama
Ödeme bilgileri.
{
"paymentType": "integer",
"amount": "decimal",
"issuerId": "string",
"paymentSubType": "string"
}
DiscountInfo
Açıklama
İndirim bilgileri.
{
"discountType": "integer",
"discountAmount": "decimal",
"discountRate": "decimal",
"discountReason": "string"
}
CustomerInfo
Açıklama
Müşteri bilgileri.
{
"customerName": "string",
"customerTaxNumber": "string",
"customerAddress": "string",
"customerPhone": "string"
}