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 name | Type | Description |
---|
attributeName | String | Attribute name | attributeType | String | Attribute type | attributeValue | String | Attribute value |
|
rows |
array |
Invoice rows. Each item looks like this:
Field name | Type | Description |
---|
stableRowID | Integer | Stable ID of the invoice row. | productID | Integer | Product ID. | serviceID | Integer | Service ID. | itemName | String | Product or service name. | code | String | Product code. | vatrateID | Integer | ID of VAT rate. | amount | Decimal | Sold quantity. | price | Decimal | Net sales price per item, pre-discount. | discount | Decimal | Discount %. | finalNetPrice | Decimal | Discounted sales price per item, VAT excluded. | finalPriceWithVAT | Decimal | Discounted sales price per item, VAT included. | rowNetTotal | Decimal | | rowVAT | Decimal | | rowTotal | Decimal | |
|
payments |
array |
Invoice payments. Each item looks like this:
Field name | Type | Description |
---|
paymentID | Integer | This is already a "reporting ID" and not the payment's original ID as it was in the particular store. | customerID | Integer | ID of the customer who made the payment. | typeID | Integer | Payment type ID. | type | String(10) | Payment type code name. | date | Date | Payment date. | sum | Decimal | Paid amount. | currencyCode | String | Currency code: EUR, USD. | currencyRate | Decimal | Exchange rate of the payment currency against system's default currency. | cardHolder | String(255) | Cardholder's name (for card payments only). | cardNumber | String(255) | Last 4 digits of credit card number (for card payments only). | cardType | String(255) | Credit card type, eg. VISA, AMEX, M/C etc. (for card payments only). | authorizationCode | String(255) | Card payment authorization code. | referenceNumber | String(255) | Card payment reference number. |
|