7. Invoices and orders

These methods read, create, revise and change the status of slips (invoices, orders, waybills). All of them are POST, with the address prefix {base_url}/api/v1/integ/invoices.

MethodAddressFunctionRequired role
getall/getallReturns not-yet-retrieved slips with their line itemsIntegration.Invoices.Get
bill/billCreates a new slipIntegration.Invoices.bill
Revise`` (prefix, no suffix)Revises existing slips (list)Integration.Invoices.Update
cancel/cancelCancels a slip by number and distributorIntegration.Invoices.Cancel
cancelbyid/cancelbyidCancels a slip by IDIntegration.Invoices.CancelByIDInv
confirmbyid/confirmbyidApproves a slipIntegration.Invoices.ConfirmByIDInv
unconfirmbyid/unconfirmbyidSets a slip to unapprovedIntegration.Invoices.UnconfirmByIDInv
getInvStatus/getInvStatusReturns the status and dates of slipsIntegration.Invoices.GetInvStatus

The Integration.Invoices role grants access to all of these methods.

Slip types (invShapes and targetSlipType; written in upper case, exactly as shown)

NameMeaningCustomer and seller code
BUYORDERPurchase order placed with headquartersNot required
BUYORDEROUTLETDETAILEDPurchase order with customer detailsRequired
ORDERCustomer sales orderRequired
VOLUMETRICORDERVolumetric orderRequired
NCORDERCentral-type orderRequired
AVAILABILITYAvailability recordRequired
SALESINVOICESales invoiceRequired
HOTSALESINVOICEHot sale (van sales) invoiceRequired
BUYINVOICEFROMHEADQUARTERPurchase invoice from headquartersNot required
BUYINVOICEPurchase invoiceRequired
SERVICEINVOICEService invoiceRequired
RETURNINVOICETOHEADQReturn invoice to headquarters (intact goods)Not required
CORRUPTRETURNINVOICETOHEADQReturn invoice to headquarters (damaged goods)Not required
NCRETURNINVOICETOHEADQCentral-type return invoice to headquartersRequired
RETURNINVOICEFROMOUTLETReturn invoice from customer (intact goods)Required
CORRUPTRETURNINVOICEFROMOUTLETReturn invoice from customer (damaged goods)Required
SALESWAYBILLSales waybillRequired
HOTSALESWAYBILLHot sale (van sales) waybillRequired
NCWAYBILLCentral-type waybillRequired
BUYWAYBILLPurchase waybillNot required
RETURNWAYBILLFROMOUTLETReturn waybill from customer (intact goods)Required
CORRUPTRETURNWAYBILLFROMOUTLETReturn waybill from customer (damaged goods)Required

Slip statuses (docStatus): Canceled = canceled, Printed = numbered/approved, Unconfirmed = unapproved, Waiting = approved, pending.

Methods in this chapter