POST
get_orders
This method returns a complete order list. The date_from and date_to parameters can be used to set a date range. The limit parameter limits the number of results, with 100 as the maximum value. The offset parameters indicates the number of results to be skipped.
Query parameters
Response
application/json
error_text
null
error
integer
sma_version
string
trace_id
string
limit
integer
offset
integer
has_more_results
boolean
orders
array[object]
Error Codes
Code | Description |
---|---|
101 | Unknown action |
103 | “shop_number” not set |
110 | Merchant not found |
113 | Shop not found |
118 | Missing parameters |
123 | Following parameters of wrong type: […] |
400 | Authorization not set |
400 | Authorization not set |
401 | Authorization username invalid format |
402 | Generated authorization password invalid |
403 | Generated authorization is too old |
404 | The given OAuth2 access token is invalid |
405 | Shop has no rights to access API. Make sure your contract is valid |
999 | Unknown error |
Example
{
"error_text": null,
"error": 0,
"sma_version": "1.0",
"trace_id": "spa-4f99573d74ae1",
"limit": 100,
"offset": 0,
"has_more_results": false,
"orders": [
{
"order_number": "1012001931",
"external_order_number": null,
"external_order_id": null,
"customer_number": "100816",
"mail": "johnsmith@shopgate.com",
"phone": null,
"mobile": null,
"custom_fields": [
{
"label": "Birthday",
"internal_field_name": "dob",
"type": "date",
"value": "1981-05-26"
}
],
"external_customer_number": null,
"external_customer_id": null,
"confirm_shipping_url": "https://www.shopgate.com/clickcs/12345678/bf18fa0a2c67ced533e8c81dfa40ef85",
"created_time": "2012-04-26T16:07:54+02:00",
"payment_method": "DEBIT",
"payment_group": "DEBIT",
"is_paid": 1,
"payment_time": "2012-04-26T16:08:39+02:00",
"payment_transaction_number": null,
"payment_infos": {
"bank_account_holder": "John Smith",
"bank_account_number": "2433702",
"bank_code": "51390000",
"bank_name": "World Bank",
"iban": null,
"bic": null
},
"is_shipping_blocked": 0,
"is_shipping_completed": 1,
"shipping_completed_time": "2012-04-26T16:09:56+02:00",
"amount_items": "14.96",
"amount_shipping": "0.00",
"amount_payment": "14.96",
"amount_complete": "14.96",
"client": {
"type": "mobilesite"
}
"currency": "EUR",
"is_test": 0,
"is_storno": 0,
"invoice_address": {
"gender": null,
"first_name": "John",
"last_name": "Smith",
"birthday": null,
"company": "Test Company",
"street_1": "Main Street 10",
"street_2": null,
"city": "Berlin",
"zipcode": "10667",
"country": "DE",
"state": null,
"custom_fields": [
{
"label": "Floor",
"internal_field_name": "floor",
"type": "string",
"value": "2nd"
}
]
},
"delivery_address": {
"gender": null,
"first_name": "John",
"last_name": "Smith",
"birthday": null,
"company": "Test Company",
"street_1": "Main Street 10",
"street_2": null,
"city": "Berlin",
"zipcode": "10667",
"country": "DE",
"state": null,
"custom_fields": [
{
"label": "Floor",
"internal_field_name": "floor",
"type": "string",
"value": "2nd"
}
]
},
"shipping_group": "DPD",
"shipping_type": "MANUAL",
"shipping_infos": {
"name": "My DPD Example",
"amount": "4.99",
"amount_net": "4.59",
"amount_gross": "4.99",
"weight": 700
},
"items": [
{
"order_item_id": "1231123",
"item_number": "8",
"quantity": 1,
"name": "Undercover Blues",
"unit_amount": "12.57",
"unit_amount_with_tax": "14.96",
"tax_percent": "19.00",
"currency": "EUR",
"internal_order_info": "{\"exchange_rate\":\"1.00000000\"}",
"options": [ ],
"inputs": [ ]
}
],
"delivery_notes": [
{
"shipping_type": "DHL",
"tracking_number": "JJD1412345678901",
"shipping_time": "2012-04-26T00:00:00+02:00"
}
]
}
]
}