XM

Retrieve All Scheduled Orders

Path:

GET /data-subscription/orders/get-by-customer/{customer-reference-ID}

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"

Parameters

Type : path

Name : The system-generated customer reference ID.

Required: true

Sample Path

https://{baseurl}/data-subscription/orders/get-by-customer/606efb7ec042330007b48447

Sample Response

Response Code: 200

Message: OK

{
"success": true,
"responseStatus": "OK",
"message": "Request processed successfully.",
"data": {
"scheduledSubscriptions": [
{
"subscription": {
"shipTo": {
"name": {
"firstName": "Khizer",
"middleName": "",
"lastName": "Younas"
},
"streetAddress": {
"street1": "177 HUNTINGTON AVE STE 1703",
"street2": ""
},
"shipToId": "606f79b7a084a10008fc411f",
"city": "BOSTON",
"state": "MA",
"zipCode": "02115-3153",
"country": "US"
},
"billTo": {
"name": {
"firstName": "Khizer",
"middleName": "",
"lastName": "Younas"
},
"streetAddress": {
"street1": "177 HUNTINGTON AVE STE 1703",
"street2": ""
},
"city": "BOSTON",
"state": "MA",
"zipCode": "02115-3153",
"country": "US",
"billToId": "606f79d440b47300084ad850"
},
"paymentDetails": {
"processor": "stripe"
},
"isDeleted": false,
"deletedAt": null,
"_id": "606f79d8f94b4a00090fcad7",
"planID": "606ef36a93bc6e00084fd5ca",
"itemID": "1000000058",
"priceListID": "100034",
"quantity": 1,
"customerID": "606efdc83bf07b0009bb92e7",
"frequency": 2,
"frequencyType": "Monthly",
"merchantAccountId": "5827714929",
"merchantAccount": "5fc78dfc6135050007191290",
"status": "ACTIVE",
"lastOrderReferenceId": "2865-4716-86171",
"cancellationReason": "",
"discount": 0,
"tax": 0,
"shippingCost": 0,
"paymentMethod": "pi_1Ie5gUFbKq2PvwXbhEJlJQrv",
"lastPaymentDate": "2021-04-08T21:47:04.475Z",
"nextPaymentDate": "2021-06-08T21:47:04.468Z",
"createdAt": "2021-04-08T21:47:04.481Z",
"updatedAt": "2021-04-08T21:47:04.481Z",
"__v": 0
},
"scheduled": [
{
"deliveryDate": "2021-04-08T21:47:04.778Z",
"paymentStatus": "PAID"
},
{
"deliveryDate": "2021-06-08T21:47:04.475Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-08-08T21:47:04.475Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-10-08T21:47:04.475Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-12-08T21:47:04.475Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2022-02-08T21:47:04.475Z",
"paymentStatus": "SCHEDULE"
}
]
},
{
"subscription": {
"shipTo": {
"name": {
"firstName": "Khizer",
"middleName": "",
"lastName": "Younas"
},
"streetAddress": {
"street1": "177 HUNTINGTON AVE STE 1703",
"street2": ""
},
"phone": {
"number": ""
},
"shipToId": "606f822b2d77400008841d1e",
"city": "BOSTON",
"state": "MA",
"zipCode": "02115-3153",
"country": "US"
},
"billTo": {
"name": {
"firstName": "Khizer",
"middleName": "",
"lastName": "Younas"
},
"streetAddress": {
"street1": "177 HUNTINGTON AVE STE 1703",
"street2": ""
},
"phone": {
"number": ""
},
"city": "BOSTON",
"state": "MA",
"zipCode": "02115-3153",
"country": "US",
"billToId": "606f8240d10b8600089fa55b"
},
"paymentDetails": {
"processor": "stripe"
},
"isDeleted": false,
"deletedAt": null,
"_id": "606f8243feef6c0008971e64",
"planID": "606ef36a93bc6e00084fd5ca",
"itemID": "1000000058",
"priceListID": "100034",
"quantity": 1,
"customerID": "606efdc83bf07b0009bb92e7",
"frequency": 2,
"frequencyType": "Monthly",
"merchantAccountId": "5827714929",
"merchantAccount": "5fc78dfc6135050007191290",
"status": "ACTIVE",
"lastOrderReferenceId": "8520-6752-84361",
"cancellationReason": "",
"discount": 30,
"tax": 0,
"shippingCost": 0,
"paymentMethod": "pi_1Ie6FMFbKq2PvwXb82yBlcn9",
"lastPaymentDate": "2021-04-08T22:22:59.217Z",
"nextPaymentDate": "2021-06-08T22:22:59.217Z",
"createdAt": "2021-04-08T22:22:59.228Z",
"updatedAt": "2021-04-23T14:18:03.482Z",
"__v": 0
},
"scheduled": [
{
"deliveryDate": "2021-04-08T22:22:59.579Z",
"paymentStatus": "PAID"
},
{
"deliveryDate": "2021-06-08T22:22:59.217Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-08-08T22:22:59.217Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-10-08T22:22:59.217Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-12-08T22:22:59.217Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2022-02-08T22:22:59.217Z",
"paymentStatus": "SCHEDULE"
}
]
},
{
"subscription": {
"shipTo": {
"name": {
"firstName": "Khizer",
"middleName": "",
"lastName": "Younas"
},
"streetAddress": {
"street1": "177 HUNTINGTON AVE STE 1703",
"street2": ""
},
"shipToId": "606f8414484b1500094c53bd",
"city": "boston",
"state": "MA",
"zipCode": "02115-3153",
"country": "US"
},
"billTo": {
"name": {
"firstName": "Khizer",
"middleName": "",
"lastName": "Younas"
},
"streetAddress": {
"street1": "177 HUNTINGTON AVE STE 1703",
"street2": ""
},
"city": "boston",
"state": "MA",
"zipCode": "02115-3153",
"country": "US",
"billToId": "606f8431591d4d0008f3d24a"
},
"paymentDetails": {
"processor": "stripe"
},
"isDeleted": false,
"deletedAt": null,
"_id": "606f843592d236000885797f",
"planID": "606ef369c239960008ab3d77",
"itemID": "1000000058",
"priceListID": "100033",
"quantity": 1,
"customerID": "606efdc83bf07b0009bb92e7",
"frequency": 2,
"frequencyType": "Weekly",
"merchantAccountId": "5827714929",
"merchantAccount": "5fc78dfc6135050007191290",
"status": "ACTIVE",
"lastOrderReferenceId": "1953-2671-40456",
"cancellationReason": "",
"discount": 24,
"tax": 0,
"shippingCost": 0,
"paymentMethod": "pi_1Ie6NHFbKq2PvwXbn2hx2KEr",
"lastPaymentDate": "2021-04-08T22:31:17.000Z",
"nextPaymentDate": "2021-04-22T22:31:16.989Z",
"createdAt": "2021-04-08T22:31:17.006Z",
"updatedAt": "2021-04-08T22:31:17.006Z",
"__v": 0
},
"scheduled": [
{
"deliveryDate": "2021-04-08T22:31:18.677Z",
"paymentStatus": "PAID"
},
{
"deliveryDate": "2021-04-22T22:31:17.000Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-05-06T22:31:17.000Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-05-20T22:31:17.000Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-06-03T22:31:17.000Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-06-17T22:31:17.000Z",
"paymentStatus": "SCHEDULE"
}
]
},
{
"subscription": {
"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": "6089337f982e030009d7925e",
"planID": "6069ad22b68b21000ab1b046",
"itemID": "1000000058",
"priceListID": "100024",
"quantity": 3,
"customerID": "606efdc83bf07b0009bb92e7",
"frequency": 4,
"frequencyType": "Weekly",
"merchantAccount": "5fc78dfc6135050007191290",
"status": "ACTIVE",
"lastOrderReferenceId": "5082-5948-21691",
"cancellationReason": "",
"discount": 10,
"tax": 2,
"shippingCost": 2,
"paymentMethod": "pm_1ISekkETggmgrCy2b7osIpl8",
"lastPaymentDate": "2021-04-28T10:05:51.669Z",
"nextPaymentDate": "2021-05-26T10:05:51.667Z",
"createdAt": "2021-04-28T10:05:51.683Z",
"updatedAt": "2021-04-28T10:05:51.683Z",
"__v": 0
},
"scheduled": [
{
"deliveryDate": "2021-04-28T10:05:53.626Z",
"paymentStatus": "PAID"
},
{
"deliveryDate": "2021-05-26T10:05:51.669Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-06-23T10:05:51.669Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-07-21T10:05:51.669Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-08-18T10:05:51.669Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-09-15T10:05:51.669Z",
"paymentStatus": "SCHEDULE"
}
]
}
]
}
}

Response Code: 400

Message: Client Error

Response Code: 500

Message: Server Error

Changelog

  • April-2021