Orders Export API Documentation
While we do not have any official API integrations outside of Amazon, we do have the below documentation which explains the authentication schema for SoStocked's API and contains details of extracting Customer Orders, Inventory and Warehouse reports.
Note: It is not officially available as a SoStocked product or service, and we do not provide support for it, but if you have someone technical that can work with this then they can create an API connection for you to download data.
You may also be interested in our Inventory Export API documentation here.
Orders Export API Documentation
This document outlines the details for exporting orders via the API endpoint /orders/export.
Endpoint
/orders/export
Authorization
The Authorization header with a Bearer token is required for authenticating the API request. The bearer token is long-lived (1 year). The token can be extracted by inspecting the request. The Auth0Token header is not needed.
Request Details
Required Path Parameters
| Parameter | Description |
|---|---|
| client_id | Client identifier for authentication. |
| client_secret | Client secret key for authentication. |
| account_id | Account identifier for which orders are being exported. |
Required Headers
| Header | Description |
|---|---|
| Authorization | Bearer token for API authentication. Value: Bearer xxxx where xxxx is a long-lived token (1 year). The bearer token can be extracted by inspecting the request. |
Request Body
The request body must be obtained by inspecting the request made by the application. An example of the required body is provided below:
{
"apply_custom_params": 1,
"columns":
[
{
"id": "order_number",
"params": [],
"show": 1,
"text": "Order Number"
},
{
"id": "shipment_status",
"params": [],
"show": 1,
"text": "Shipment Status"
},
{
"id": "date_ordered",
"params": [],
"show": 1,
"text": "Date Ordered"
},
{
"id": "est_arrival_date",
"params": [],
"show": 1,
"text": "Est. Arrival Date"
},
{
"id": "destination",
"params": [],
"show": 1,
"text": "Destination"
},
{
"id": "units_ordered",
"params": [],
"show": 1,
"text": "Units"
},
{
"id": "product",
"params": [],
"show": 1,
"text": "Product"
},
{
"id": "units_arrived",
"params": [],
"show": 1,
"text": "Units Received"
},
{
"id": "cartons",
"params": [],
"show": 1,
"text": "Cartons"
},
{
"id": "missing_units",
"params": [],
"show": 1,
"text": "Missing Units"
},
{
"id": "asin",
"params": [],
"show": 1,
"text": "ASIN"
},
{
"id": "sku",
"params": [],
"show": 1,
"text": "SKU"
},
{
"id": "supplier",
"params": [],
"show": 1,
"text": "Supplier"
},
{
"id": "status_id",
"params": [],
"show": 1,
"text": "Status"
},
{
"id": "payments",
"params": [],
"show": 0,
"text": "Payments"
},
{
"id": "notes",
"params": [],
"show": 0,
"text": "Notes"
},
{
"id": "date_created",
"params": [],
"show": 1,
"text": "Date Created"
},
{
"id": "ship_by",
"params": [],
"show": 1,
"text": "Ship By"
},
{
"id": "date_arrived",
"params": [],
"show": 1,
"text": "Date Arrived"
},
{
"id": "shipments",
"params": [],
"show": 0,
"text": "Shipment"
},
{
"id": "shipment_id",
"params": [],
"show": 1,
"text": "Shipment ID"
},
{
"id": "shipping_price",
"params": [],
"show": 1,
"text": "Total Shipping Cost"
},
{
"id": "unit_price",
"params": [],
"show": 1,
"text": "PO Unit Cost"
},
{
"id": "workflow",
"params": [],
"show": 0,
"text": "Lead Time"
},
{
"id": "workflow_eta",
"params": [],
"show": 0,
"text": "Lead Time ETA"
},
{
"id": "marketplace",
"params": [],
"show": 1,
"text": "Marketplace"
},
{
"id": "fn_sku",
"params": [],
"show": 1,
"text": "FN SKU"
},
{
"id": "currency_code",
"params": [],
"show": 1,
"text": "Currency"
},
{
"id": "ipn_number",
"params": [],
"show": 0,
"text": "IPN"
},
{
"id": "mpn_number",
"params": [],
"show": 0,
"text": "MPN"
},
{
"id": "cbm_shipment",
"params": [],
"show": 0,
"text": "CBM"
},
{
"id": "gw_shipment",
"params": [],
"show": 0,
"text": "Gross Weight (GW)"
},
{
"id": "leaving_production_date",
"params": [],
"show": 1,
"text": "Leaving Production Date"
},
{
"id": "total_units",
"params": [],
"show": 0,
"text": "Total Units"
},
{
"id": "total_cartons",
"params": [],
"show": 0,
"text": "Total Cartons"
},
{
"id": "total_missing_units",
"params": [],
"show": 0,
"text": "Total Missing"
},
{
"id": "tracking_number",
"params": [],
"show": 0,
"text": "Tracking Number"
},
{
"id": "amount_due",
"params": [],
"show": 0,
"text": "PO Amount Due"
},
{
"id": "total_cost",
"params": [],
"show": 0,
"text": "Total PO Cost with Shipping"
},
{
"id": "total_cost_per_po",
"params": [],
"show": 1,
"text": "Total Cost per PO"
},
{
"id": "damaged_units",
"params": [],
"show": 1,
"text": "Damaged Units"
},
{
"id": "shipping_cost_per_unit_by_shipment",
"params": [],
"show": 0,
"text": "Shipping Cost per Unit by Shipment"
},
{
"id": "shipping_cost_per_unit_by_po",
"params": [],
"show": 0,
"text": "Shipping Cost per Unit by PO"
},
{
"id": "landed_cost_per_unit_per_shipment",
"params": [],
"show": 0,
"text": "Landed Cost per Unit per Shipment"
},
{
"id": "landed_cost_per_unit_per_po",
"params": [],
"show": 0,
"text": "Landed Cost per Unit per PO"
},
{
"id": "total_cost_per_shipment",
"params": [],
"show": 0,
"text": "Total Cost per Shipment"
}
],
"download_option": "current_view",
"filters":
[
{
"c": "status_id",
"o": "=",
"v": "0",
"x": "AND"
},
{
"c": "status_id",
"o": "!=",
"v": "1",
"x": "AND"
},
{
"c": "status_id",
"o": "!=",
"v": "5",
"x": "AND"
},
{
"c": "source_vendor_name",
"o": "NOT IN",
"v":
[
"193053"
],
"x": "AND"
},
{
"c": "date_ordered",
"o": "WITHINP",
"v": "400",
"x": "AND"
}
],
"group_by": "",
"order_by": "date_ordered",
"order_direction": "DESC",
"per_page": 50,
"term": "",
"type_id": 2,
"view_id": 260127
}
The request body structure as detailed above is subject to change as the API evolves. It is crucial to inspect the request made by the application to ensure the correct body format is used. However, the authentication method via the Authorization header with a Bearer token will remain consistent.