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 name Description Possible value Required
number Search for a sales document by number. Integer
types You can specify multiple document types (INVWAYBILL, CASHINVOICE, WAYBILL, PREPAYMENT, OFFER, EXPORTINVOICE, RESERVATION, CREDITINVOICE, ORDER, or INVOICE), separated by commas. String
containingPaymentWithCardType If 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
nonReturnedItemsOnly If a sales document has been partially credited, returns only those amounts and rows that have not been credited yet. 0 or 1

Response

Field name Type Description
id Integer This is already a "reporting ID" and not the document's original ID as it was in the particular store.
type String INVWAYBILL, CASHINVOICE, WAYBILL, PREPAYMENT, OFFER, EXPORTINVOICE, RESERVATION, CREDITINVOICE, ORDER or INVOICE.
currencyCode String Currency code: EUR, USD.
currencyRate Decimal eg. 1.25543
Exchange rate of the invoice currency against system's default currency.
franchiseeName String Company name from the account where the sales invoice comes from.
number String
date Date eg. 2010-01-29
clientID Integer Customer ID.
clientName String Customer name.
clientEmail String Customer e-mail address.
addressID Integer Invoice address ID.
paymentType String (10) Informative; see the list of payments below instead.
notes String Notes printed on the invoice.
internalNotes String Notes to be displayed on invoice form, as a notice/reminder to other users.
netTotal Decimal, 2 places
vatTotal Decimal, 2 places
rounding Decimal, 2 places
total Decimal, 2 places =netTotal+vatTotal+rounding
attributes Array Additional attributes. Each item looks like this:

Field nameTypeDescription
attributeNameStringAttribute name
attributeTypeStringAttribute type
attributeValueStringAttribute value
rows Array Invoice 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
payments Array Invoice 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.
typeIDIntegerPayment type ID.
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.