XM

Retrieve Order By Order ID

Path:

GET https://{baseurl}/api-order/orders/{orderId}

This API faciliates retrieval of order details based on the order ID. This is secured by x-api-key. When the order ID is not available, the Get Order by Email API is recommended.

Headers

Content-Type : application/json

x-api-key : d41d8cd98f00b204e9800998ecf8427e

Consumes

  • application/json

Produces

  • application/json

Parameters

Type: Path

Name: orderId

Required: true

Sample Request

https://{baseurl}/api-order/orders/3043-6911-95138

Response

Response Code: 200

Message: OK

Description: You'll see this message when the order details are successfully retrieved.

Sample

{
"_id": "5ebb73b5684a750007fb121a",
"deleted": false,
"isLoggedIn": false,
"cartId": 78,
"items": [
{
"price": {
"discount": {
"price": 0,
"promosApplied": []
},
"sale": 0,
"base": 400,
"currency": "USD"
},
"discountedQuantity": 0,
"group": [
"5ddd1a156c5a5fed1e0d91fb"
],
"createdAt": "2020-05-13T04:12:36.802Z",
"updatedAt": "2020-05-13T04:13:51.203Z",
"_id": "5ebb73b5684a750007fb121b",
"itemId": 1000000016,
"quantity": 2,
"sku": "1586729",
"taxCode": "PH060771",
"lineItemId": 1,
"totalPrice": {
"currency": "USD",
"amount": 800
},
"id": "5ebb73b5684a750007fb121b"
}
],
"allPromosApplied": [],
"createdAt": "2020-05-13T04:12:37.389Z",
"updatedAt": "2020-05-13T04:13:51.228Z",
"__v": 0,
"totalAmount": {
"currency": "USD",
"amount": 800
},
"quantity": 2,
"errors": {
"inventory": [],
"price": [],
"promo": []
}
}

Changelog

  • Last Updated - April 2021

  • First Updated - July 2020