XM

Retrieve Order by Order ID

Path:

GET /data-subscription/orders/{orderID}

This API helps retrive details of a subscribed order based on the specified order ID.

Headers

Content-Type : application/json

Authorization: JWT Token

x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox"

Consumes

  • application/json

Produces

  • application/json

Parameters

Type : path

Name : The system-generated Order ID.

Required: true

Sample Path

https://{baseurl}/data-subscription/orders/5082-5948-21691

Sample Response

Response Code: 200

Message: OK

{
"success": true,
"responseStatus": "OK",
"message": "Request processed successfully.",
"data": {
"order": {
"shipTo": {
"name": {
"firstName": "test IQBAR",
"middleName": "",
"lastName": "test"
},
"streetAddress": {
"street1": "185-S QA Estate",
"street2": ""
},
"shipToId": "testShip",
"city": "Lahore",
"state": "Punjab",
"zipCode": "a1a1a1",
"country": "Pakistan"
},
"billTo": {
"name": {
"firstName": "test bill",
"middleName": "",
"lastName": "test"
},
"streetAddress": {
"street1": "185-S QA Estate bill",
"street2": ""
},
"billToId": "testBill",
"city": "Lahore",
"state": "Punjab",
"zipCode": "a1a1a1",
"country": "Pakistan"
},
"paymentDetails": {
"processor": "stripe"
},
"isDeleted": false,
"deletedAt": null,
"_id": "6073f86dd2090535c2b7e90a",
"subscriptionID": "6073f86bd2090535c2b7e909",
"planID": "6073f83b93563735c21afcfd",
"itemID": "1000000050",
"itemName": "Gravity Pillow Amethyst",
"quantity": 3,
"frequency": 81,
"frequencyType": "Weekly",
"flagPreviousOrder": false,
"orderReferenceId": "5082-5948-21691",
"customerReferenceId": "ref-9423-7967",
"discount": 10,
"tax": 2,
"totalAmount": 39960,
"shippingCost": 2,
"paymentStatus": "PAID",
"paymentMethod": "pm_1ISekkETggmgrCy2b7osIpl8",
"paymentDate": "2021-04-12T07:36:13.860Z",
"createdAt": "2021-04-12T07:36:13.911Z",
"updatedAt": "2021-04-12T07:36:13.911Z",
"__v": 0
}
}
}

Response Code: 400

Message: Client Error

Response Code: 500

Message: Server Error

Changelog

  • April-2021