Order Numbers

Service End Point -orderNumbers

This API endpoint is used to securely retrieve a list of order numbers that were completed via the Zonos Checkout™. Normally used for order reconciliation to ensure all orders have been imported since a date or orderId as well as orders between a date range.

HTTPS Request

HTTP Method POST
End Point URL https://api.iglobalstores.com/v1/orderNumbers
Protocol HTTPS
Message Format JSON
Accept HTTP Header Accept: application/json
Content-Type HTTP Header Content-Type: application/json

Request Parameters

Message Format JSON

Example request sinceOrderId

{
  "store": "999",
  "secret": "f5bde245-f55e-414d-b722-80b25161c12c",
  "sinceOrderId": "999-99999"
}

Example request sinceDate

{
  "store": "999",
  "secret": "f5bde245-f55e-414d-b722-80b25161c12c",
  "sinceDate": "20150101"
}

Example request sinceDate,throughDate

{
  "store": "999",
  "secret": "f5bde245-f55e-414d-b722-80b25161c12c",
  "sinceDate": "20150101",
  "throughDate": "20150601"
}

Example request missingMerchantOrderId

{
  "store": "999",
  "secret": "f5bde245-f55e-414d-b722-80b25161c12c",
  "missingMerchantOrderId": true
}

Example request statuses

{
  "store": "999",
  "secret": "f5bde245-f55e-414d-b722-80b25161c12c",
  "sinceDate": "20150101",
  "statuses": true
}

Request JSON Definitions

store

Store id provided by Zonos. Integer Required

secret

API secret GUID provided by Zonos. String Required

sinceOrderId

Optional if passing sinceDate / throughDate parameter.

The iGlobal 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 iGlobal order. Cannot send both sinceOrderId and sinceDate.

Integer / String

sinceDate

Optional if passing sinceOrderId parameter.

This parameter is used to query a set of orders after a particular date. Cannot send both sinceDate and sinceOrderId.

String Date UTC/GMT. Format: yyyymmdd

throughDate

Optional. Must be passed along with sinceDate parameter.

This parameter is used to query a set of orders between a particular date range.

String Date UTC/GMT. Format: yyyymmdd

missingMerchantOrderId

Optional. If passing another parameter option.

This parameter is used to query a set of 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

statuses

Optional.

This parameter is used to include the current order status and merchantOrderId in the response. If it is present on the request regardless of value it will include the statuses

boolean: true

HTTPS Response

Message Format JSON

Example Success Response

{
    "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

{
  "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

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

Error HTTP Responses

HTTP Response Codes Response Body Example/Description
406 - Not Acceptable HTML Entity. HTTP “Accept” header is invalid.
415 - Unsupported media type HTML 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

error

This parameter will only be present in the response when an error has occurred and will contain a description of the cause.

String

totalCount

The total count of both live and test orders retrieved.

Integer

orderCount

The total count of live orders retrieved.

Integer

order.testOrderCount

The total count of test orders retrieved.

Integer

orders

A list of order maps.

JSON String

orders[index].testOrder

Indicates if the order was a “test order” or “live order”.

boolean

orders[index].id

The full iGlobal Order Id including store id and dash.

String

orders[index].timestamp

The timestamp representing when the order was placed in UTC/GMT.

TimeStamp

orders[index].merchantOrderId

MerchantOrderId associated with the order through the updateMerchantOrderId API service endpoint.

String

orders[index].orderStatus

The Current Order Status for possible values see “Update Vendor Order Status”

String

orders[index].orderStatusDate

The epoch representing when the status was last updated.

Integer

orders[index].orderStatusDateString

The timestamp representing when the status was last updated in UTC/GMT.

TimeStamp