Get Orders
Allows you to retrieve an order list with pagination support. You can use it to check the latest status of specific orders.
GET /v2/orders
​
Request​
HTTP Headers​
To use this endpoint, you must include the following headers for authentication:
Header | Type | Required | Description |
---|---|---|---|
x-api-key | String | Yes | API key assigned to your account for service access. |
Authorization | String | Yes | Bearer token to authenticate the API request. |
Query Parameters​
Use the following parameters in the query string to filter orders based on your requirements:
Parameter | Type | Required | Default Value | Description |
---|---|---|---|---|
limit | Integer | No | 10 | The number of items to be shown per page. |
page | Integer | No | 1 | Page number to retrieve. |
transactionId | String | No | None | Optional filter by transaction id for order lookups. |
clientOrderNumber | String | No | None | Optional filter by clientOrderNumber for order lookups. |
Example Request​
GET /v2/orders?limit=10&page=1&transactionId=1234&clientOrderNumber=1234 HTTP/1.1
Host: api.example.com
Content-Type: application/json
x-api-key: <API_KEY>
Authorization: Bearer <BEARER_ACCESS_TOKEN>
Response​
HTTP Status Codes​
Status Code | Description |
---|---|
200 | OK - The list of orders is returned successfully in the response body. |
400 | Bad Request - The request was invalid, often due to incorrect query parameters. |
500 | Internal Server Error - An error occurred on the server side. |
Schema​
Property | Type | Nullable | Description |
---|---|---|---|
requestId | String | No | Unique identifier assigned to each request for tracking purposes. |
data | PaginationResponse | No | Pagination response. |
PaginationResponse​
Property | Type | Nullable | Description |
---|---|---|---|
total | Integer | No | Total number of items available. |
page | Integer | No | Current page number. |
pageSize | Integer | No | Number of items per page. |
totalPage | Integer | No | Total number of pages available. |
items | OrderResponse[] | No | List of orders on the current page. |
OrderResponse​
Property | Type | Nullable | Description |
---|---|---|---|
transactionId | String | No | The transaction identifier. |
clientOrderNumber | String | No | The client's order number. |
grandTotal | MoneyResponse | No | The grand total amount and currency. |
createdAt | String | No | Timestamp of when the order was created. |
status | OrderStatus | No | The status of the order. |
products | ProductResponse[] | No | List of products in the order. |
ProductResponse​
Property | Type | Nullable | Description |
---|---|---|---|
sku | String | No | The SKU of the product. |
quantity | Integer | No | The quantity of the product. |
unitPrice | MoneyResponse | No | The unit price of the product. |
totalPrice | MoneyResponse | No | The total price of the product. |
status | OrderStatus | No | The status of the product. |
MoneyResponse​
Property | Type | Nullable | Description |
---|---|---|---|
amount | String | No | The monetary amount. |
currency | String | No | The currency of amount. |
OrderStatus​
Value | Type | Description |
---|---|---|
PROCESSING | String | The order is currently being processed. |
COMPLETED | String | The order has been completed successfully. |
CANCELLED | String | The order has been cancelled and will not be processed. |
Example 200 OK Response​
{
"requestId": "c4c7b997-79a5-4bde-9f17-47ad7eac9ed4",
"data": {
"total": 1,
"page": 1,
"pageSize": 10,
"totalPage": 1,
"items": [
{
"transactionId": "1234",
"ezOrderNumber": "1234",
"clientOrderNumber": "1234",
"grandTotal": {
"amount": "10.00",
"currency": "USD"
},
"createdAt": "2023-10-17T09:00:00Z",
"status": "COMPLETED",
"products": [
{
"sku": "8PX-UF-Y5U",
"quantity": 1,
"unitPrice": {
"amount": "10.00",
"currency": "USD"
},
"totalPrice": {
"amount": "10.00",
"currency": "USD"
},
"status": "COMPLETED"
}
]
}
]
}
}