5. Response structure
The response returns slips under data.slips; each slip contains customer information (outlets), line items (items) and each item's discounts (discounts). Amounts are in TRY; unless stated otherwise, they exclude VAT.
Example response (abbreviated, slip TST0001):
{
"success": true,
"message": "The transaction is successful.",
"info": { "company": "DBH-TEST", "country": "TR" },
"data": {
"slips": [
{
"dist_code": "D001",
"slip_type": "Normal",
"slip_id": 100001,
"slip_number": "TST0001",
"canceled_slip_value": "Printed",
"slip_date": "2026-10-19 18:05:00",
"outlet_name": "DBH TEST MÜŞTERİ",
"store_code": "91",
"pay_type_code": 3,
"gross_amount": 2376.0,
"total_discount": 1171.28,
"vat": 12.05,
"gross_total": 1216.77,
"due_date": "2026-11-09 00:00:00",
"seller_code": "175",
"outlets": { "branch": { "central_code": "C0001", "central_name": "DBH TEST MÜŞTERİ", "tax_no": "1234567890" } },
"items": [
{
"item_no": 2,
"product_code": "P0002",
"product_name": "TEST ÜRÜN B 20'li KL",
"quant": 40.0,
"product_unit_price": 17.82,
"row_price": 712.8,
"price": 361.416,
"product_real_unit_price": 9.0354,
"unit": "Koli",
"vat": 1.0,
"discounts": [
{ "item_no": 2, "code": "Cust", "sign_discount": "Customer", "type": "Percent", "discount_rate": 0.03, "discount_val": 21.384, "total_price": 712.8 },
{ "item_no": 2, "code": "EPoint", "sign_discount": "E Point", "type": "Price", "discount_rate": 0.4773, "discount_val": 330.0, "total_price": 691.416 }
]
}
]
}
],
"failedSlips": []
},
"count": 1
}
General fields
| Field | Description |
|---|---|
success | Whether the operation succeeded |
message | Result message; a warning is appended if there are unauthorized distributors or failed slips |
count | Number of slips returned |
data.slips | Slips |
data.failedSlips | Slips that could not be built: slip_id, slip_number, dist_code, error. An error in one slip does not block the others |
Slip (slips[])
| Field | Description |
|---|---|
dist_code | Distributor code |
slip_type | Slip kind (Normal, Return, etc.) |
slip_id | Unique ID of the slip in the system |
slip_number | Slip number |
canceled_slip_value | Slip status: Canceled (canceled), Printed (approved), Unconfirmed (unapproved), Waiting (pending) |
slip_date | Slip date and time |
slip_code | Alternate number of the slip (e-document number, etc.) |
outlet_name, tax_office, tax_code | Customer name, tax office, tax number |
store_code, store_name | Source warehouse |
store_code2, store_name2 | Destination warehouse (for transfers) |
pay_type_code | Payment type code |
gross_amount | Gross amount (before discounts) |
total_discount | Total discount amount |
vat | Total VAT amount |
gross_total | Total payable for the slip (after discounts, including VAT) |
due_date | Due date |
del_code, veh_code | Delivery person and vehicle code |
seller_code, seller_integ_code | Sales representative code and integration code |
slip_explanation, slip_explanation2 | Slip notes |
outlets.head, outlets.branch | Head office and branch customer information (codes, address, channel, tax details) |
Item (items[])
| Field | Description |
|---|---|
item_no | Line item sequence number |
product_code, product_name | Product code and name |
quant | Quantity, in pieces (5 cases × 12 = 60) |
unit | Unit used on the slip (Koli = case, Adet = piece) |
product_unit_price | List price per piece |
row_price | Line gross amount (quant × product_unit_price) |
price | Line net amount (after all discounts, excluding VAT) |
product_real_unit_price | Net price per piece (price / quant) |
vat | VAT rate, percent (1.0 = 1%) |
minimum_value, defined_one_value, defined_box_value, defined_package_value | The product's unit definitions |
deposit | 1 if the product carries a deposit |
discounts | Discounts applied to the item, in order of application |
Discount (discounts[])
| Field | Description |
|---|---|
code, sign_discount | Discount code and name (Cust = customer discount, EPoint = e-points discount) |
type | Percent (percentage), Price (amount), Free (free of charge) |
discount_rate | Discount rate, as a fraction (0.03 = 3%) |
discount_val | Discount amount |
total_price | Amount this discount was applied to (after previous discounts) |
Discounts are applied in sequence: in the example, the 3% customer discount deducts TRY 21.38 from 712.80, and the e-points discount deducts TRY 330.00 from the remaining 691.42; the line net amount becomes TRY 361.42.
Customer (outlets.head = head office, outlets.branch = branch)
| Field | Description |
|---|---|
integration_code1, integration_code2 | Customer's integration codes |
central_code, central_name | Customer code and name |
city, town, adress, post_code | Province, district, address (the field name is returned with this spelling), postal code |
type_code, type_name | Customer type |
channel_code, channel_name | Channel |
national_chain_outlets, national_chain_outlets_code, national_chain_outlets_name | National chain information |
telephone, fax_number | Contact details |
tax_no, tax_office | Tax number and tax office |
related_person | Contact person |
seasonal_outlet | Seasonal customer |
tax_free | 1 = tax-exempt customer |
Other item fields
| Field | Description |
|---|---|
product_type | Product type |
weight, volume | Product weight and volume (dm³) |
minimum_unit, minimum_value | Product's unit and sub-unit values |
defined_one_value, defined_box_value, defined_package_value | Piece, box and case unit names |
deposit | 0 = no deposit, 1 = product with deposit |
Legacy TXT/XML transfer codes. If you transfer data to accounting software using the legacy TXT/XML format, the field mappings are:
| JSON field | Legacy code | JSON field | Legacy code |
|---|---|---|---|
dist_code | DISTCODE | item_no | KALEMNO |
slip_type | FISTIPI | product_code | URUNKODU |
slip_id | FISID | product_name | URUNADI |
slip_number | FISNO | quant | MIKTAR |
canceled_slip_value | IPTAL | product_unit_price | BIRIMFIYAT |
slip_date | TARIH | row_price | SATIRTOPLAMI |
slip_code | MUSKODU | price | FIYAT |
outlet_name | MUSADI | unit | BIRIM |
tax_office | VERGIDAIRESI | vat | KDV |
tax_code | VERGINO | product_type | TIPI |
store_code, store_code2 | DEPOKODU, DEPOKODU2 | weight | AGIRLIK |
pay_type_code | ODEMETIPI | volume | HACIM |
gross_amount | TOPLAMBRUT | minimum_unit | UNITE |
total_discount | TOPLAMISKONTO | minimum_value | ALTBIRIM |
vat | TOPLAMKDV | defined_one_value | BIRIM0 |
gross_total | TOPLAMNET | defined_box_value | BIRIM1 |
due_date | VADETARIHI | defined_package_value | BIRIM2 |
del_code | DAGITICIKODU | deposit | DEPOZITO |
veh_code | ARACKODU | discounts[].code | KODU |
seller_code | SATISTEMSILCISIKODU | discounts[].sign_discount | ADI |
slip_explanation | FISACIKLAMA | discounts[].discount_rate | ORAN |
slip_explanation2 | FISACIKLAMA2 | discounts[].total_price | TUTAR |