DOCS

Order numbers

/

Order numbers

Learn how the Order numbers endpoint works.

The orderNumbers endpoint is used to securely retrieve a list of order numbers completed via the Zonos Checkout. It’s normally used for order reconciliation to ensure all orders were imported as of a date or orderID as well as orders between a date range.

Endpoint 

POST | https://api.iglobalstores.com/v1/orderNumbers

HTTPS request

FieldNotes
HTTP methodPOST
Endpointhttps://api.iglobalstores.com/v1/orderNumbers
ProtocolHTTPS
Message formatJSON
Accept HTTP headerAccept: application/json
Content-Type HTTP headerContent-Type: application/json

JSON key/value in the request body

Message format: JSON

EXAMPLE REQUEST: sinceOrderId

1
2
3
4
5
{
  "store": "999",
  "secret": "f5bde245-f55e-414d-b722-80b25161c12c",
  "sinceOrderId": "999-99999"
}

EXAMPLE REQUEST: sinceDate

1
2
3
4
5
{
  "store": "999",
  "secret": "f5bde245-f55e-414d-b722-80b25161c12c",
  "sinceDate": "20150101"
}

EXAMPLE REQUEST: sinceDate, throughDate

1
2
3
4
5
6
{
  "store": "999",
  "secret": "f5bde245-f55e-414d-b722-80b25161c12c",
  "sinceDate": "20150101",
  "throughDate": "20150601"
}

EXAMPLE REQUEST: missingMerchantOrderId

1
2
3
4
5
{
  "store": "999",
  "secret": "f5bde245-f55e-414d-b722-80b25161c12c",
  "missingMerchantOrderId": true
}

EXAMPLE REQUEST: statuses

1
2
3
4
5
6
{
  "store": "999",
  "secret": "f5bde245-f55e-414d-b722-80b25161c12c",
  "sinceDate": "20150101",
  "statuses": true
}

Request JSON definitions

fieldnotes
missingMerchantOrderId OPTIONAL, if passing another parameter optionThis parameter is used to query a set or orders within the last two weeks that are missing the merchantOrderId. When the merchantOrderId is submitted via the updateMerchantOrderID API endpoint, orders will no longer show up in this query.boolean: true/false
secret REQUIREDAPI secret GUID provided by Zonos. string
sinceDate OPTIONAL, if passing sinceOrderId parameter.This parameter is used to query a set of orders after a particular date.sinceDate and sinceOrderId cannot both be sent.string - date UTC/GMT; format: yyyymmdd
sinceOrderId OPTIONAL, if passing sinceDate / throughDate parameterThe Zonos order ID, can be passed with or without your store ID and hyphen (Example: 123-45678 or 45678).Note: This parameter will be used to query a set of orders after a particular Zonos order. sinceDate and sinceOrderId cannot both be sent.integer / string
statuses OPTIONALThis parameter is used to include the current order status and merchantOrderId in the response. If it is present on the request, regardless of the value, it will include the statuses.boolean: true
store REQUIREDStore ID provided by Zonos.integer
throughDate OPTIONALThis parameter is used to query a set of orders between a particular date range.Must be passed along with sinceDate parameter.string - date UTC/GMT; format: yyyymmdd

HTTPS response

Message format: JSON

EXAMPLE SUCCESS RESPONSE

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
  "totalCount": 6,
  "orderCount": 5,
  "testOrderCount": 1,
  "orders": [
    {
      "testOrder": false,
      "id": "999-99991",
      "timestamp": "2015-01-01 00:33:14.0"
    },
    {
      "testOrder": true,
      "id": "999-99992",
      "timestamp": "2015-01-01 05:12:46.0"
    },
    {
      "testOrder": false,
      "id": "999-99993",
      "timestamp": "2015-01-01 14:50:54.0"
    },
    {
      "testOrder": false,
      "id": "999-99994",
      "timestamp": "2015-01-02 20:14:01.0"
    },
    {
      "testOrder": false,
      "id": "999-99995",
      "timestamp": "2015-01-02 20:57:47.0"
    },
    {
      "testOrder": false,
      "id": "999-99996",
      "timestamp": "2015-01-02 22:11:40.0"
    }
  ]
}

Example success response with 'statuses' parameter

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  "totalCount": 2,
  "orderCount": 1,
  "testOrderCount": 1,
  "orders": [
    {
      "testOrder": false,
      "id": "999-99991",
      "timestamp": "2015-01-01 00:33:14.0",
      "merchantOrderId": null,
      "orderStatus": "IGLOBAL_FRAUD_REVIEW",
      "orderStatusDate": 1420097594000,
      "orderStatusDateString": "2015-01-01 14:16:17.0"
    },
    {
      "testOrder": true,
      "id": "999-99992",
      "timestamp": "2015-01-01 05:12:46.0",
      "merchantOrderId": "abc123",
      "orderStatus": "IGLOBAL_ORDER_IN_PROCESS",
      "orderStatusDate": 1420097594000,
      "orderStatusDateString": "2015-01-01 14:16:17.0"
    }
  ]
}

Example error response

1
2
3
{
  "error": "Couldn't find order for sinceOrderId: 999999"
}

Error HTTP responses

ErrorMeaning
406 - Not AcceptableHTML Entity. HTTP “Accept” header is invalid.
415 - Unsupported media typeHTML Entity. HTTP “Content-Type” header is invalid.
200“error”:”could not parse input”
200“error”:”orderId: 999-99999 is not a valid orderId”
200“error”:”Parameter orderId or referenceId is required.”
200“error”:”Cannot specify both Parameters orderId and referenceId.”
200“error”:”Could not process order details.”
200“error”:”Invalid security credentials”

Response JSON definitions

fieldnotes
errorThis parameter will only be present in the response when an error has occurred and will contain a description of the cause.string
orderCountThe total count of live orders retrieved.integer
order.testOrderCountThe total count of test orders retrieved.integer
ordersA list of order maps.string
orders[index].idThe full Zonos Order Id including store id and dash.string
orders[index].merchantOrderIdMerchantOrderId associated with the order through the updateMerchantOrderId API service endpoint.string
orders[index].orderStatusThe current order status for possible values.string
orders[index].orderStatusDateThe epoch representing when the status was last updated.integer
orders[index].orderStatusDateStringThe timestamp representing when the status was last updated in UTC/GMT.timestamp
orders[index].testOrderIndicates if the order was a “test order” or “live order”.boolean
orders[index].timestampThe timestamp representing when the order was placed in UTC/GMT.timestamp
totalCountThe total count of both live and test orders retrieved.integer

Was this page helpful?