Search

getFranchiseSalesDocuments

Retrieve confirmed sales documents from the reporting account which have the specified type and invoice number. If this account does not belong to a franchise, API returns error 1067.

Input parameters

Parameter nameDescriptionPossible valueRequired
numberSearch for a sales document by number.Integer
typesYou can specify multiple document types (INVWAYBILL, CASHINVOICE, WAYBILL, PREPAYMENT, OFFER, EXPORTINVOICE, RESERVATION, CREDITINVOICE, ORDER, or INVOICE), separated by commas.String
containingPaymentWithCardTypeIf this filter is set, API will only return those sales documents which have at least one card payment, and where the card payment has a specified card type.String
nonReturnedItemsOnlyIf a sales document has been partially credited, returns only those amounts and rows that have not been credited yet.0 or 1

Response

Field nameTypeDescription
idIntegerThis is already a "reporting ID" and not the document's original ID as it was in the particular store.
typeStringINVWAYBILL, CASHINVOICE, WAYBILL, PREPAYMENT, OFFER, EXPORTINVOICE, RESERVATION, CREDITINVOICE, ORDER or INVOICE.
currencyCodeStringCurrency code: EUR, USD.
currencyRateDecimaleg. 1.25543
Exchange rate of the invoice currency against system's default currency.
franchiseeNameStringCompany name from the account where the sales invoice comes from.
numberString
dateDateeg. 2010-01-29
clientIDIntegerCustomer ID.
clientNameStringCustomer name.
clientEmailStringCustomer e-mail address.
addressIDIntegerInvoice address ID.
paymentTypeString (10)Informative
notesStringNotes printed on the invoice.
internalNotesStringNotes to be displayed on invoice form, as a notice/reminder to other users.
netTotalDecimal, 2 places
vatTotalDecimal, 2 places
roundingDecimal, 2 places
totalDecimal, 2 places=netTotal+vatTotal+rounding
attributesArrayAdditional attributes. Each item looks like this:

Field nameTypeDescription
attributeNameStringAttribute name
attributeTypeStringAttribute type
attributeValueStringAttribute value
rowsArrayInvoice rows. Each item looks like this:
Field nameTypeDescription
productIDIntegerProduct ID.
serviceIDIntegerService ID.
itemNameStringProduct or service name.
codeStringProduct code.
vatrateIDIntegerID of VAT rate.
amountDecimalSold quantity.
priceDecimalNet sales price per item, pre-discount.
discountDecimalDiscount %.
finalNetPriceDecimalDiscounted sales price per item, VAT excluded.
finalPriceWithVATDecimalDiscounted sales price per item, VAT included.
rowNetTotalDecimal
rowVATDecimal
rowTotalDecimal
paymentsArrayInvoice payments. Each item looks like this:
Field nameTypeDescription
paymentIDIntegerThis is already a "reporting ID" and not the payment's original ID as it was in the particular store.
customerIDIntegerID of the customer who made the payment.
typeString(10)Payment type code name.
dateDatePayment date.
sumDecimalPaid amount.
currencyCodeStrinCurrency code: EUR, USD.
currencyRateDecimalExchange rate of the payment currency against system's default currency.
cardHolderString(255)Cardholder's name (for card payments only).
cardNumberString(255)Last 4 digits of credit card number (for card payments only).
cardTypeString(255)Credit card type, eg. VISA, AMEX, M/C etc. (for card payments only).
authorizationCodeString(255)Card payment authorization code.
referenceNumberString(255)Card payment reference number.