Data specification
Invoice
| Name | Read only | Data type | Maximum length | Value |
|---|---|---|---|---|
| invoice_id | ✓ | String | 10 | Twisto Invoice ID |
| parent_invoice_id | ✓ | String | 10 | Twisto Invoice ID of the invoice from which this one was created by using split invoice |
| eshop_invoice_id | ✓ | String | 10 | Eshop invoice ID. If filled, It will be used as a variable code to send a payment to your e-shop account. Only digits are allowed. |
| external_id | String | 50 | E-shop order/invoice ID. If filled, it will be returned in API responses and it will appear in XLSX Overview. | |
| customer_email | ✓ | String | 254 | Customer email |
| billing_address | ✓ | Address Billing | address | |
| delivery_address | ✓ | Address | Delivery address | |
| date_created | ✓ | String | ISO 8601 | Date and time of creating of the invoice |
| date_returned | ✓ | String | ISO 8601 | Date and time of returning of the invoice. Set only for fully returned invoice. |
| date_cancelled | ✓ | String | ISO 8601 | Date and time of cancellation of the invoice |
| date_activated | ✓ | String | ISO 8601 | Date and time of activation of the invoice |
| date_paid | ✓ | String | ISO 8601 | Date and time of invoice payment |
| date_due | ✓ | String | ISO 8601 | Current due date of the invoice |
| initial_date_due | ✓ | String | ISO 8601 | Initial due date of the invoice |
| pdf_url | ✓ | String | 255 | URL of the PDF invoice file for the customer. Appears after activating invoice (until then, the PDF invoice is not created). |
| total_price_vat | ✓ | Number | 8.2 | Total price incl. VAT. 8 digits, 2 decimal places. |
| items | Item[] | Order items | ||
| has_account | ✓ | Boolean | Customer has Twisto account | |
| margin_amount | ✓ | Number | 8.2 | Total amount of Twisto margin without VAT rounded to 2 decimal points. |
| margin_amount_vat | ✓ | Number | 8.2 | Total amount of Twisto margin with VAT rounded to 2 decimal points. |
| paid_to_merchant_amount | ✓ | Number | Paid to merchant amount. If null, not paid yet. If 0 customer has returned invoice. If more than 0, twisto has paid to merchant. |
Customer
| Name | Required | Data type | Maximum length | Value Example |
|---|---|---|---|---|
| ✓ | String | 254 | Customer email "jan.novak@example.com" | |
| name | String | 255 | Name "Jan Novák" | |
| facebook_id | String | 50 | Facebook ID "123456789" | |
| company_id | String | 15 | Company ID "12345678" | |
| vat_id | String | 15 | Tax ID number "CZ12345678" |
Order
| Name | Required | Data type | Maximum length | Value | Example |
|---|---|---|---|---|---|
| date_created | ✓ | String | ISO 8601 | Date and time of order creation | "2013-07-22T14:57:18+00:00" |
| billing_address | ✓ | Address | Billing address | ||
| delivery_address | ✓ | Address | Delivery address | ||
| total_price_vat | ✓ | Number | 8.2 | Total price including VAT | 1432.23 |
| items | ✓ | Item[] | Order items | ||
| delivery_method | Number | Delivery method type: 11 - delivery company, 12 - courier, 13 - post,14 - personal pickup, 15 - box, 16 - dispensing point, 17 - virtual goods, 10 - other | 11 | ||
| delivery_method_detail | String | 255 | Delivery method detail. Fill this for respective Delivery method type: 11 (delivery company): name, 15 (box): name and address, 16 (dispensing point): name and address, 10 (other): description | "DPD" |
Item
| Name | Required | Data type | Maximum length | Value | Example |
|---|---|---|---|---|---|
| type | ✓ | Number | Type of item: 0 - goods, 1 - shipment, 2 - payment, 4 - discount, 32 - round | 0 | |
| name | ✓ | String | 255 | Item name | "Růžový šátek s ornamenty" |
| product_id | ✓ | String | 255 | Product ID (unique per order) | "1001" |
| quantity | ✓ | Number | Quantity | 2 | |
| price_vat | ✓ | Number | Price incl. VAT | 406.07 | |
| vat | ✓ | Number | VAT rate percentage | 21 | |
| ean_code | String | 13 | EAN Code | ||
| isbn_code | String | 13 | ISBN Code | ||
| issn_code | String | 8 | ISSN Code | ||
| heureka_category | Number | Heureka categories list you can find here | 1469 | ||
| is_virtual | Boolean | Set true for virtual goods like vouchers. | false |
Item split
| Name | Required | Data type | Maximum length | Value | Example |
|---|---|---|---|---|---|
| product_id | ✓ | String | 255 | Product ID (unique per order) | "1001" |
| quantity | ✓ | Number | The number of pieces for splitting (greater than 0) | 2 |
Adress
| Name | Required | Data type | Maximum length | Value | Example |
|---|---|---|---|---|---|
| type | ✓ | Number | 1 | ||
| name | ✓ | String | 100 | Name | "Jan Novák" |
| street | ✓ | String | 100 | Street | "Wilsonova 300/8" |
| city | ✓ | String | 100 | City | "Praha" |
| zipcode | ✓ | String | 5 | Postal code | "11000" |
| phone_number | ✓ | String | 20 | Phone number | "+420733123456" |
| country | ✓ | String | 2 | Country code in ISO 3166-1 alpha-2 format | "CZ" |