OrdersGet
The method provides orders list from a specific date. Enter the date and / or order number from which the list of orders should begin (at least one of these two fields must be provided). Additionally, the list of returned orders may be limited only to paid orders, if the Input parameters
Incoming as $_POST fields.
POST request:
returned data JSON:
Dane wyjściowe:
time_from | int | (optional) Date from which the orders are to be picked up. Unix time stamp format. |
id_from | int | (optional) Order ID number from which subsequent orders are to be retuned. |
only_paid | int | (optional) Flag determining whether only paid orders are to be downloaded (0/1). |
order_id | string | (optional) Only one order ID return only one Order data |
page | int | (optional) Page number when pagination occurs. |
Outgoing data
Array fields that the method should return.
list of orders | array | List of orders, the key of which is a numeric order ID in the range 1 to 2 31 , and each value is an array containing the fields listed below: |
delivery_fullname | string | Delivery address: full name |
delivery_company | string | Delivery address: company name |
delivery_address | string | Delivery address: street and home/local number |
delivery_city | string | Delivery address: city |
delivery_postcode | string | Delivery address: postcode |
delivery_state_code | string | Delivery address: State code |
delivery_country | string | Delivery address: Country name |
delivery_country_code | string | Delivery address: ISO country code (2 letters) |
invoice_fullname | string | Billing data: full name |
invoice_company | string | Billing data: company |
invoice_address | string | Billing data: street and home/local number |
invoice_city | string | Billing data: city |
invoice_state_code | string | Billing data: state code |
invoice_postcode | string | Billing data: postcode |
invoice_country | string | Billing data: |
invoice_country_code | string | Billing data: ISO country code (2 letters) |
invoice_nip | string | Billing data: Tax identifier |
delivery_point_id | string | delivery to point: code of point or machine |
delivery_point_name | string | delivery to point: name of point or machine |
delivery_point_address | string | delivery to point: street and home/local number |
delivery_point_postcode | string | delivery to point: postcode |
delivery_point_city | string | delivery to point: city |
phone | string | telephone number |
string | ||
date_add | int | date in UNIX_TIMESTAMP format |
payment_method_id | string | ID of payment method |
payment_method | string | Name of payment method |
payment_method_cod | int | flag determining whether the payment is cash on delivery (0/1) |
payment_external_id | string | (optional) External payment identifier |
payment_operator | string | (optional) Name of the payment operator |
currency | string | ISO code of the order currency, e.g. EUR, USD, PLN |
user_comments | string | customer comment |
user_comments_long | string | customer comment (as above, but without restrictions on the size of the text ) |
admin_comments | string | short note from the operator to the order |
status_id | string | ID of order status |
delivery_method_id | string | ID of delivery method |
delivery_method | string | Name of delivery method |
delivery_price | float | delivery price |
paid | int | flag determining whether the order is paid (0/1) |
paid_time | int | date in UNIX_TIMESTAMP format |
want_invoice | int | a flag specifying whether the customer wants an invoice (0/1) |
extra_field_1 | string | additional field (any data) |
extra_field_2 | string | additional field (any data) |
products | array | a list of ordered products, where each element is an array with the following fields: |
| - id | string | product ID |
| - variant_id | string | variant ID (0 when main product) |
| - name | string | full product or variant name |
| - quantity | int | number of items purchased |
| - price | float | gross price of one item |
| - weight | float | Weight expressed in kilograms |
| - tax | float | tax amount expressed as a percentage, as a number from 0-100. Without % character. |
| - ean | string | EAN - 13 digit barcode |
| - sku | string | Stock Keeping Unit |
| - location | string | Location in the warehouse |
| - attributes | array | an optional array with selectable product attributes describing the purchased variant, in which each element contains the following fields: |
|- name | string | attribute name (e.g. 'color') |
|- value | string | attribute value (e.g. 'red') |
|- price | float | price difference to the basic price |
pages | int | (optional) number of pages. We recommend 1000 results on 1 page. The limit is 1000 pages. |
Example:
Input data:Array
(
[time_from] => 1529505396
)
(
[time_from] => 1529505396
)
POST request:
time_from=1529505396
returned data JSON:
{"123":{"delivery_fullname":"Jan Kowalski","delivery_company":"Firma sp.z.o.o.","delivery_address":"ul. Kolejowa 1","delivery_city":"Warszawa","delivery_postcode":"00-000","delivery_country":"Polska","delivery_country_code":"PL","invoice_fullname":"Jan Kowalski","invoice_company":"","invoice_nip":"","invoice_address":"ul. Kolejowa 1","invoice_city":"Warszawa","invoice_postcode":"00-000","invoice_country":"Polska","invoice_country_code":"PL","phone":"1234567890","email":"example@example.com","want_invoice":0,"date_add":1529505947,"user_comments":"Proszę o wysyłkę w dniu dzisiejszym","delivery_method":"Paczka24 - Poczta Polska","payment_method":"Przelew natychmiastowy","payment_method_cod":0,"delivery_price":"8.50","currency":"PLN","status_id":"1","paid":0,"products":[{"id":"12","name":"Toster - czerwony","quantity":"1","price":"49.99","tax":"23","weight":"0","sku":"Toster123","ean":"","attributes":[]}]}}
Dane wyjściowe:
Array
(
[123] => Array
(
[delivery_fullname] => Jan Kowalski
[delivery_company] => Firma sp.z.o.o.
[delivery_address] => ul. Kolejowa 1
[delivery_city] => Warszawa
[delivery_postcode] => 00-000
[delivery_country] => Polska
[delivery_country_code] => PL
[invoice_fullname] => Jan Kowalski
[invoice_company] =>
[invoice_nip] =>
[invoice_address] => ul. Kolejowa 1
[invoice_city] => Warszawa
[invoice_postcode] => 00-000
[invoice_country] => Polska
[invoice_country_code] => PL
[phone] => 1234567890
[email] => example@example.com
[want_invoice] => 0
[date_add] => 1529505947
[user_comments] => Proszę o wysyłkę w dniu dzisiejszym
[delivery_method] => Paczka24 - Poczta Polska
[payment_method] => Przelew natychmiastowy
[payment_method_cod] => 0
[delivery_price] => 8.50
[currency] => PLN
[status_id] => 1
[paid] => 0
[products] => Array
(
[0] => Array
(
[id] => 12
[name] => Toster - czerwony
[quantity] => 1
[price] => 49.99
[tax] => 23
[weight] => 0
[sku] => Toster123
[ean] =>
[attributes] => Array
(
)
)
)
)
)
(
[123] => Array
(
[delivery_fullname] => Jan Kowalski
[delivery_company] => Firma sp.z.o.o.
[delivery_address] => ul. Kolejowa 1
[delivery_city] => Warszawa
[delivery_postcode] => 00-000
[delivery_country] => Polska
[delivery_country_code] => PL
[invoice_fullname] => Jan Kowalski
[invoice_company] =>
[invoice_nip] =>
[invoice_address] => ul. Kolejowa 1
[invoice_city] => Warszawa
[invoice_postcode] => 00-000
[invoice_country] => Polska
[invoice_country_code] => PL
[phone] => 1234567890
[email] => example@example.com
[want_invoice] => 0
[date_add] => 1529505947
[user_comments] => Proszę o wysyłkę w dniu dzisiejszym
[delivery_method] => Paczka24 - Poczta Polska
[payment_method] => Przelew natychmiastowy
[payment_method_cod] => 0
[delivery_price] => 8.50
[currency] => PLN
[status_id] => 1
[paid] => 0
[products] => Array
(
[0] => Array
(
[id] => 12
[name] => Toster - czerwony
[quantity] => 1
[price] => 49.99
[tax] => 23
[weight] => 0
[sku] => Toster123
[ean] =>
[attributes] => Array
(
)
)
)
)
)