Retrieve orders from integrations
GET {{baseUrl}}/orders?integration=<integer>&order_number=<string>&order_id=<string>&status=<string>&order_created_at=<date>&order_created_at_min=<date>&order_created_at_max=<date>&order_updated_at=<date>&order_updated_at_min=<date>&order_updated_at_max=<date>&sort=<string>&page_size=100&cursor=<string>
Note that this section describes a beta version of the Orders API. Currently only Sendcloud API integrations are supported. You can get the list of orders via the API the same way you can find it on the Incoming Orders panel. The endpoint is paginated, you can navigate through the results by using the URLs of the next
and prev
fields in the Link response header.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
integration | string | Filter orders by integration ID or IDs. Use comma separated list, for example "/?integration=41,68,419". To obtain the integration IDs, you can utilize the integration endpoint listings. | |
order_number | string | Filter orders by a specific order number. For example "/?order_number=ORDER_284565". The filter handles capital letters the same as lowercase letters. The field used is order_number within the Order model | |
order_id | string | Filter orders by a specific order id. For example "/?order_id=1896e94b-c01b-4e73-a9e7-57f51c8a4c77". The filter handles capital letters the same as lowercase letters. The field used is order_id within the Order model | |
status | string | Filter orders based on their status. For example "/?status=unshipped". The filter handles capital letters the same as lowercase letters. The field used is order_details -> status within the Order model | |
order_created_at | string | Filter orders based on a specific date. For example "/?order_created_at=2023-04-28". The field used is order_details -> order_created_at within the Order model | |
order_created_at_min | string | Filter orders that are created at or after a specific date. For example "/?order_created_at_min=2023-04-28". The field used is order_details -> order_created_at within the Order model | |
order_created_at_max | string | Filter orders that are created at or before a specific date. For example "/?order_created_at_max=2023-04-28". The field used is order_details -> order_created_at within the Order model | |
order_updated_at | string | Filter orders based on a specific date. For example "/?order_updated_at=2023-04-28". The field used is order_details -> order_updated_at within the Order model | |
order_updated_at_min | string | Filter orders that are created at or after a specific date. For example "/?order_updated_at_min=2023-04-28". The field used is order_details -> order_updated_at within the Order model | |
order_updated_at_max | string | Filter orders that are created at or before a specific date. For example "/?order_updated_at_max=2023-04-28". The field used is order_details -> order_updated_at within the Order model | |
sort | string | Sort the retrieved orders on attributes of the Order model by setting the sort query. | |
The attributes below can be used to sort the orders in the response: |
integration
: Sort by the integration ID of the retrieved orders; to sort in descending order, use-integration
order_number
: Sort by the order number of the retrieved orders; to sort in descending order, use-order_number
.order_created_at
: Sort by the date of an order creation of the retrieved orders; to sort in descending order, use-order_created_at
order_updated_at
: Sort by the date of an order update of the retrieved orders; to sort in descending order, use-order_updated_at
pk
: Sort by the ID (autogenerated internal ID) of the retrieved orders; to sort in descending order, use-pk
Additional information about this query:- Any valid combination of all these supported values is supported, eg.,
/?sort="integration,-order_created_at"
. - In case of conflicting
sort
values eg.,/?sort="integration,-integration"
, the conflicting value will be ignored. - If the
sort
query parameter is not set, the sorting of the retrieved orders will be defaulted to-pk
. - In case where an unsupported
sort
value is provided, the results will be sorted by the default (-pk
). | |page_size
| number | | The maximum number of results to be returned per page | |cursor
| string | | The cursor query string will be used as the pivot value to filter results. If no value is provided, the service must return the first page. The value is Base64 encoded GET parameters. example: For a cursor string there are 3 possible parameters to encode:- o: Offset
- r: Reverse
- p: Position Combine into GET parameters. Example: r=1&p=300 Base 64 encoded it would become: cj0xJnA9MzAw GET parameter in url would be https://some.url.com/api/endpoint/?cursor=cj0xJnA9MzAw |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"data":[{"order_id":"\u003cstring\u003e","order_number":"\u003cstring\u003e","order_details":{"integration":{"id":"\u003cinteger\u003e"},"status":{"code":"\u003cstring\u003e","message":"\u003cstring\u003e"},"order_created_at":"\u003cdateTime\u003e","order_items":[{"name":"\u003cstring\u003e","quantity":"\u003cinteger\u003e","total_price":{"value":"\u003cnumber\u003e","currency":"GBP"},"item_id":"\u003cstring\u003e","product_id":"\u003cstring\u003e","variant_id":"\u003cstring\u003e","image_url":"\u003cstring\u003e","description":"\u003cstring\u003e","sku":"\u003cstring\u003e","hs_code":"\u003cstring\u003e","country_of_origin":"\u003cstring\u003e","properties":{"dolor_e2c":"non Lorem aliquip","occaecat_51":true,"dolord8":40728303,"sed_0":"in in laborum"},"unit_price":{"value":"\u003cnumber\u003e","currency":"EUR"},"measurement":{"dimension":{"length":"\u003cnumber\u003e","width":"\u003cnumber\u003e","height":"\u003cnumber\u003e","unit":"in"},"weight":{"value":"\u003cnumber\u003e","unit":"oz"},"volume":{"value":"\u003cinteger\u003e","unit":"cm3"}},"ean":"\u003cstring\u003e","delivery_dates":{"handover_at":"\u003cdateTime\u003e"},"mid_code":"\u003cstring,null\u003e","material_content":"\u003cstring,null\u003e","intended_use":"\u003cstring,null\u003e"},{"name":"\u003cstring\u003e","quantity":"\u003cinteger\u003e","total_price":{"value":"\u003cnumber\u003e","currency":"GBP"},"item_id":"\u003cstring\u003e","product_id":"\u003cstring\u003e","variant_id":"\u003cstring\u003e","image_url":"\u003cstring\u003e","description":"\u003cstring\u003e","sku":"\u003cstring\u003e","hs_code":"\u003cstring\u003e","country_of_origin":"\u003cstring\u003e","properties":{"estc":"mollit aute aliqua"},"unit_price":{"value":"\u003cnumber\u003e","currency":"EUR"},"measurement":{"dimension":{"length":"\u003cnumber\u003e","width":"\u003cnumber\u003e","height":"\u003cnumber\u003e","unit":"m"},"weight":{"value":"\u003cnumber\u003e","unit":"lbs"},"volume":{"value":"\u003cinteger\u003e","unit":"gal"}},"ean":"\u003cstring\u003e","delivery_dates":{"handover_at":"\u003cdateTime\u003e"},"mid_code":"\u003cstring,null\u003e","material_content":"\u003cstring,null\u003e","intended_use":"\u003cstring,null\u003e"}],"order_updated_at":"\u003cdateTime\u003e","notes":"\u003cstring\u003e"},"payment_details":{"total_price":{"value":"\u003cnumber\u003e","currency":"GBP"},"status":{"code":"\u003cstring\u003e","message":"\u003cstring\u003e"},"is_cash_on_delivery":"\u003cboolean,null\u003e","subtotal_price":{"value":"\u003cnumber\u003e","currency":"GBP"},"estimated_shipping_price":{"value":"\u003cnumber\u003e","currency":"EUR"},"estimated_tax_price":{"value":"\u003cnumber\u003e","currency":"GBP"},"invoice_date":"\u003cstring,null\u003e","discount_granted":{"value":"48793.7","currency":"\u003cstring,null\u003e"},"insurance_costs":{"value":"34384936","currency":"\u003cstring,null\u003e"},"freight_costs":{"value":"579.84742335","currency":"\u003cstring,null\u003e"},"other_costs":{"value":"29","currency":"\u003cstring,null\u003e"}},"id":"\u003cstring\u003e","created_at":"\u003cdateTime\u003e","modified_at":"\u003cdateTime\u003e","customs_details":null,"customer_details":{"name":"\u003cstring\u003e","phone_number":"\u003cstring\u003e","email":"\u003cstring\u003e"},"billing_address":{"name":"\u003cstring\u003e","company_name":"\u003cstring\u003e","address_line_1":"\u003cstring\u003e","house_number":"\u003cstring\u003e","address_line_2":"\u003cstring\u003e","postal_code":"\u003cstring\u003e","city":"\u003cstring\u003e","po_box":"\u003cstring,null\u003e","state_province_code":"\u003cstring\u003e","country_code":"\u003cstring\u003e","email":"\u003cemail\u003e","phone_number":"\u003cstring\u003e"},"shipping_address":{"name":"\u003cstring\u003e","company_name":"\u003cstring\u003e","address_line_1":"\u003cstring\u003e","house_number":"\u003cstring\u003e","address_line_2":"\u003cstring\u003e","postal_code":"\u003cstring\u003e","city":"\u003cstring\u003e","po_box":"\u003cstring,null\u003e","state_province_code":"\u003cstring\u003e","country_code":"\u003cstring\u003e","email":"\u003cemail\u003e","phone_number":"\u003cstring\u003e"},"shipping_details":{"is_local_pickup":"\u003cboolean,null\u003e","delivery_indicator":"\u003cstring\u003e","measurement":{"dimension":{"length":"\u003cnumber\u003e","width":"\u003cnumber\u003e","height":"\u003cnumber\u003e","unit":"m"},"weight":{"value":"\u003cnumber\u003e","unit":"oz"},"volume":{"value":"\u003cinteger\u003e","unit":"ml"}}},"service_point_details":{"id":"\u003cstring\u003e","post_number":"\u003cstring\u003e","latitude":"\u003cstring\u003e","longitude":"\u003cstring\u003e","type":"\u003cstring\u003e","extra_data":{"nostrud7":true,"et4":18331699}}},{"order_id":"\u003cstring\u003e","order_number":"\u003cstring\u003e","order_details":{"integration":{"id":"\u003cinteger\u003e"},"status":{"code":"\u003cstring\u003e","message":"\u003cstring\u003e"},"order_created_at":"\u003cdateTime\u003e","order_items":[{"name":"\u003cstring\u003e","quantity":"\u003cinteger\u003e","total_price":{"value":"\u003cnumber\u003e","currency":"USD"},"item_id":"\u003cstring\u003e","product_id":"\u003cstring\u003e","variant_id":"\u003cstring\u003e","image_url":"\u003cstring\u003e","description":"\u003cstring\u003e","sku":"\u003cstring\u003e","hs_code":"\u003cstring\u003e","country_of_origin":"\u003cstring\u003e","properties":{"non0e":true,"exercitation25":"proident","ut2f":"mollit qui commodo pariatur"},"unit_price":{"value":"\u003cnumber\u003e","currency":"EUR"},"measurement":{"dimension":{"length":"\u003cnumber\u003e","width":"\u003cnumber\u003e","height":"\u003cnumber\u003e","unit":"mm"},"weight":{"value":"\u003cnumber\u003e","unit":"kg"},"volume":{"value":"\u003cinteger\u003e","unit":"cm3"}},"ean":"\u003cstring\u003e","delivery_dates":null,"mid_code":"\u003cstring,null\u003e","material_content":"\u003cstring,null\u003e","intended_use":"\u003cstring,null\u003e"},{"name":"\u003cstring\u003e","quantity":"\u003cinteger\u003e","total_price":{"value":"\u003cnumber\u003e","currency":"USD"},"item_id":"\u003cstring\u003e","product_id":"\u003cstring\u003e","variant_id":"\u003cstring\u003e","image_url":"\u003cstring\u003e","description":"\u003cstring\u003e","sku":"\u003cstring\u003e","hs_code":"\u003cstring\u003e","country_of_origin":"\u003cstring\u003e","properties":{"qui_e_8":false,"proident_fc":"elit voluptate","quis_a5":"exercitation magna"},"unit_price":{"value":"\u003cnumber\u003e","currency":"EUR"},"measurement":{"dimension":{"length":"\u003cnumber\u003e","width":"\u003cnumber\u003e","height":"\u003cnumber\u003e","unit":"yd"},"weight":{"value":"\u003cnumber\u003e","unit":"lbs"},"volume":{"value":"\u003cinteger\u003e","unit":"cm3"}},"ean":"\u003cstring\u003e","delivery_dates":null,"mid_code":"\u003cstring,null\u003e","material_content":"\u003cstring,null\u003e","intended_use":"\u003cstring,null\u003e"}],"order_updated_at":"\u003cdateTime\u003e","notes":"\u003cstring\u003e"},"payment_details":{"total_price":{"value":"\u003cnumber\u003e","currency":"EUR"},"status":{"code":"\u003cstring\u003e","message":"\u003cstring\u003e"},"is_cash_on_delivery":"\u003cboolean,null\u003e","subtotal_price":{"value":"\u003cnumber\u003e","currency":"EUR"},"estimated_shipping_price":{"value":"\u003cnumber\u003e","currency":"USD"},"estimated_tax_price":{"value":"\u003cnumber\u003e","currency":"GBP"},"invoice_date":"\u003cstring,null\u003e","discount_granted":{"value":"00244281332.984323","currency":"\u003cstring,null\u003e"},"insurance_costs":{"value":"740246.39654","currency":"\u003cstring,null\u003e"},"freight_costs":{"value":"2585","currency":"\u003cstring,null\u003e"},"other_costs":{"value":"8175398","currency":"\u003cstring,null\u003e"}},"id":"\u003cstring\u003e","created_at":"\u003cdateTime\u003e","modified_at":"\u003cdateTime\u003e","customs_details":null,"customer_details":{"name":"\u003cstring\u003e","phone_number":"\u003cstring\u003e","email":"\u003cstring\u003e"},"billing_address":{"name":"\u003cstring\u003e","company_name":"\u003cstring\u003e","address_line_1":"\u003cstring\u003e","house_number":"\u003cstring\u003e","address_line_2":"\u003cstring\u003e","postal_code":"\u003cstring\u003e","city":"\u003cstring\u003e","po_box":"\u003cstring,null\u003e","state_province_code":"\u003cstring\u003e","country_code":"\u003cstring\u003e","email":"\u003cemail\u003e","phone_number":"\u003cstring\u003e"},"shipping_address":{"name":"\u003cstring\u003e","company_name":"\u003cstring\u003e","address_line_1":"\u003cstring\u003e","house_number":"\u003cstring\u003e","address_line_2":"\u003cstring\u003e","postal_code":"\u003cstring\u003e","city":"\u003cstring\u003e","po_box":"\u003cstring,null\u003e","state_province_code":"\u003cstring\u003e","country_code":"\u003cstring\u003e","email":"\u003cemail\u003e","phone_number":"\u003cstring\u003e"},"shipping_details":{"is_local_pickup":"\u003cboolean,null\u003e","delivery_indicator":"\u003cstring\u003e","measurement":{"dimension":{"length":"\u003cnumber\u003e","width":"\u003cnumber\u003e","height":"\u003cnumber\u003e","unit":"in"},"weight":{"value":"\u003cnumber\u003e","unit":"oz"},"volume":{"value":"\u003cinteger\u003e","unit":"l"}}},"service_point_details":{"id":"\u003cstring\u003e","post_number":"\u003cstring\u003e","latitude":"\u003cstring\u003e","longitude":"\u003cstring\u003e","type":"\u003cstring\u003e","extra_data":{"nulla_3":false,"consectetur_ee":-83327042}}}]}