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 number 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 string Format: yyyy-mm-dd. 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
stableRowIDIntegerStable ID of the invoice row.
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.
currencyCodeStringCurrency 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.