7.2 bill (creating a slip)

FieldTypeRequiredDescription
distCodetextYesDistributor code
centralCodetextYesHead office code
invoiceNumbertextYesSlip number; for non-order types it must be unique within the distributor
evDatedateYesSlip date
itemslistYesLine items (below)
targetSlipTypetextNoSlip type; default BUYINVOICEFROMHEADQUARTER
customerCode or customerIntegCodetextDepends on slip typeOne of them is required for the "Required" types in the table
sellerCode or sellerIntegCodetextDepends on slip typeSame rule as the customer code
fromStockCode, toStockCodetextNoSource and destination warehouse; default warehouse if empty
invoiceNumberOthertextNoSecond number; default invoiceNumber
docStatustextNoPrinted, Unconfirmed or Waiting; determined by type if empty
paymentTypetextNoPayment type; default cash
gross, discount, kdv, price, weight, volumenumberNoHeader amounts; written as sent, the server does not recalculate them
explanation, explanation2textNoNotes

Leave the idInv and cancelReason fields empty for a new slip; they are used for revisions. Additional header fields: custDisRat1 (customer discount, %), priceCurr (promissory note amount), rebateDis (signage discount). Weight is in grams, volume in dm³.

Line items (items[])

FieldTypeRequiredDescription
metaCodetextYesProduct code
amountnumberYesQuantity, in the idUnit unit; must be greater than 0
idUnitnumberYes*Unit: 0 piece, 1 box, 2 case; must be defined for the product
sapUnittextNoUnit short name; if filled, it is used instead of idUnit
itemNotextYesItem number; an empty string ("") may be sent
explanationtextYesLine note; an empty string ("") may be sent
unitPricenumberNoUnit price; if 0, the product's list price
realPricenumberNoNet line amount; if empty, calculated from price, quantity and discounts
unitKdvRat, unitKdvRat2numberNoVAT rates, as a fraction (0.18)
unitDisRat2–unitDisRat4numberNoAdditional user discount rates
unitTaxBase, taxnumberNoUnit tax base and tax amount; 0 if empty
firstAmountnumberNoInitially entered quantity; default amount
batchtextNoBatch; the product is looked up by the code metaCode-batch
disc[]listNoLine discounts (below)

* If sapUnit is not sent.

Line discounts (items[].disc[])

FieldTypeRequiredDescription
discCodetextYesDiscount code
discNametextYesDiscount name
discRatenumberNoDiscount rate, between 0 and 1 (0.05 = 5%)
discAmountnumberNoDiscount amount
discOrderNonumberNoOrder of application
{ "distCode": "1001", "centralCode": "C1001", "invoiceNumber": "F2026000123", "evDate": "2026-11-18 10:00:00", "targetSlipType": "ORDER", "customerCode": "M001", "sellerCode": "S01", "items": [ { "metaCode": "P100", "amount": 10, "idUnit": 2, "unitPrice": 120, "unitKdvRat": 0.18, "itemNo": "10", "disc": [ { "discCode": "D1", "discName": "Campaign", "discRate": 0.05, "discAmount": 60, "discOrderNo": 1 } ] } ] }

In the response, data.idInv is the ID of the created slip.

HTTPMessageCause
400Target slip type is not foundInvalid targetSlipType
400The <kod> Distributor Code was not found!Distributor does not exist
400Customer is not found / Seller is not foundCustomer or seller code not sent for a type that requires it
400Duplicate invoice: InvNo = X, Dist Code = Y!Slip number already used
400<kod> Product Code value/s not found!Product does not exist
400The unit of idUnit <n> of the product with code <kod> was not found!Unit is not defined for the product
400DiscRate must be between 0-1Invalid discount rate
400The DistCode field is required. etc.Required field missing