XM

Retrieve Single Subscription

Path:

GET /data-subscription/subscriptions/{subscriptionID}

This API helps you retrieve details of the specified subscription.

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 subscription ID.

Required: true

Sample Path

https://{baseurl}/data-subscription/subscriptions/604617f3660ec04578b10217

Sample Response

Response Code: 200

Message: OK

{
"success": true,
"responseStatus": "OK",
"message": "Request processed successfully.",
"data": {
"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"
},
"isDeleted": false,
"deletedAt": null,
"_id": "604617f3660ec04578b10217",
"planID": {
"isDeleted": false,
"deletedAt": null,
"_id": "60461602e614e445784f1ccd",
"title": "test plan",
"description": "test plan ",
"products": [
{
"_id": "60461602e614e445784f1cce",
"itemId": "1000012023",
"priceListId": "100257"
}
],
"frequency": 3,
"frequencyType": "Weekly",
"status": "ACTIVE",
"discount": 5,
"shippingCost": 2,
"merchantAccountId": "8739392294",
"merchantAccount": "5f328bf0b7c15700071233b9",
"createdAt": "2021-03-08T12:18:10.692Z",
"updatedAt": "2021-03-08T12:18:10.692Z",
"__v": 0
},
"itemID": "1000012023",
"priceListID": "100257",
"quantity": 3,
"customerID": {
"_id": "6045e4453db3e710480a4d2b",
"customerEmail": "[email protected]",
"customerReferenceId": "customerReferenceId",
"customerFullName": "test"
},
"frequency": 3,
"frequencyType": "Weekly",
"merchantAccountId": "8739392294",
"merchantAccount": "5f328bf0b7c15700071233b9",
"status": "ACTIVE",
"lastOrderReferenceId": "5082-5948-16923",
"cancellationReason": "",
"discount": 2,
"tax": 2,
"shippingCost": 2,
"paymentMethod": "pm_1ISekkETggmgrCy2b7osIpl8",
"lastPaymentDate": "2021-06-21T12:26:27.947Z",
"nextPaymentDate": "2021-03-29T12:26:27.946Z",
"createdAt": "2021-03-08T12:26:27.955Z",
"updatedAt": "2021-03-08T12:26:27.955Z",
"__v": 0
},
"subscriptionItem": [
{
"name": "Small Moroccan Velvet Boudoir Pillow Lapis",
"sku": "1566701",
"price": 21,
"currency": "USD",
"itemId": 1000012023,
"quantity": 3
}
],
"nextSubscription": [
{
"deliveryDate": "2021-03-08T12:26:32.680Z",
"paymentStatus": "PAID"
},
{
"deliveryDate": "2021-03-29T12:26:27.947Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-04-19T12:26:27.947Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-05-10T12:26:27.947Z",
"paymentStatus": "SCHEDULE"
},
{
"deliveryDate": "2021-05-31T12:26:27.947Z",
"paymentStatus": "SKIPPED"
},
{
"deliveryDate": "2021-06-21T12:26:27.947Z",
"paymentStatus": "SCHEDULE"
}
]
}
}

Response Code: 400

Message: Client Error

Response Code: 500

Message: Server Error

Changelog

  • April-2021

‚Äč