XPM

Retrieve Order By ID

Path:

GET /api-order/orders/{orderId}

Through this endpoint, a user's order details are retrieved for the specified orderId, and the details includes the quantity, pricing (along with tax), promos, itemID, SKUs, etc of the items in the order.

When the orderId is not available, alternatively, the Get Order by Email endpoint can be used.

Headers

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

  • July-2020 last updated