XM
Powered By GitBook
Retrieve Single Subscription
Path:
1
GET /data-subscription/subscriptions/{subscriptionID}
Copied!
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

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

Sample Response

Response Code: 200
Message: OK
1
{
2
"success": true,
3
"responseStatus": "OK",
4
"message": "Request processed successfully.",
5
"data": {
6
"subscription": {
7
"shipTo": {
8
"name": {
9
"firstName": "test IQBAR",
10
"middleName": "",
11
"lastName": "test"
12
},
13
"streetAddress": {
14
"street1": "185-S QA Estate",
15
"street2": ""
16
},
17
"shipToId": "testShip",
18
"city": "Lahore",
19
"state": "Punjab",
20
"zipCode": "a1a1a1",
21
"country": "Pakistan"
22
},
23
"billTo": {
24
"name": {
25
"firstName": "test bill",
26
"middleName": "",
27
"lastName": "test"
28
},
29
"streetAddress": {
30
"street1": "185-S QA Estate bill",
31
"street2": ""
32
},
33
"billToId": "testBill",
34
"city": "Lahore",
35
"state": "Punjab",
36
"zipCode": "a1a1a1",
37
"country": "Pakistan"
38
},
39
"isDeleted": false,
40
"deletedAt": null,
41
"_id": "604617f3660ec04578b10217",
42
"planID": {
43
"isDeleted": false,
44
"deletedAt": null,
45
"_id": "60461602e614e445784f1ccd",
46
"title": "test plan",
47
"description": "test plan ",
48
"products": [
49
{
50
"_id": "60461602e614e445784f1cce",
51
"itemId": "1000012023",
52
"priceListId": "100257"
53
}
54
],
55
"frequency": 3,
56
"frequencyType": "Weekly",
57
"status": "ACTIVE",
58
"discount": 5,
59
"shippingCost": 2,
60
"merchantAccountId": "8739392294",
61
"merchantAccount": "5f328bf0b7c15700071233b9",
62
"createdAt": "2021-03-08T12:18:10.692Z",
63
"updatedAt": "2021-03-08T12:18:10.692Z",
64
"__v": 0
65
},
66
"itemID": "1000012023",
67
"priceListID": "100257",
68
"quantity": 3,
69
"customerID": {
70
"_id": "6045e4453db3e710480a4d2b",
71
"customerEmail": "[email protected]",
72
"customerReferenceId": "customerReferenceId",
73
"customerFullName": "test"
74
},
75
"frequency": 3,
76
"frequencyType": "Weekly",
77
"merchantAccountId": "8739392294",
78
"merchantAccount": "5f328bf0b7c15700071233b9",
79
"status": "ACTIVE",
80
"lastOrderReferenceId": "5082-5948-16923",
81
"cancellationReason": "",
82
"discount": 2,
83
"tax": 2,
84
"shippingCost": 2,
85
"paymentMethod": "pm_1ISekkETggmgrCy2b7osIpl8",
86
"lastPaymentDate": "2021-06-21T12:26:27.947Z",
87
"nextPaymentDate": "2021-03-29T12:26:27.946Z",
88
"createdAt": "2021-03-08T12:26:27.955Z",
89
"updatedAt": "2021-03-08T12:26:27.955Z",
90
"__v": 0
91
},
92
"subscriptionItem": [
93
{
94
"name": "Small Moroccan Velvet Boudoir Pillow Lapis",
95
"sku": "1566701",
96
"price": 21,
97
"currency": "USD",
98
"itemId": 1000012023,
99
"quantity": 3
100
}
101
],
102
"nextSubscription": [
103
{
104
"deliveryDate": "2021-03-08T12:26:32.680Z",
105
"paymentStatus": "PAID"
106
},
107
{
108
"deliveryDate": "2021-03-29T12:26:27.947Z",
109
"paymentStatus": "SCHEDULE"
110
},
111
{
112
"deliveryDate": "2021-04-19T12:26:27.947Z",
113
"paymentStatus": "SCHEDULE"
114
},
115
{
116
"deliveryDate": "2021-05-10T12:26:27.947Z",
117
"paymentStatus": "SCHEDULE"
118
},
119
{
120
"deliveryDate": "2021-05-31T12:26:27.947Z",
121
"paymentStatus": "SKIPPED"
122
},
123
{
124
"deliveryDate": "2021-06-21T12:26:27.947Z",
125
"paymentStatus": "SCHEDULE"
126
}
127
]
128
}
129
}
Copied!
Response Code: 400
Message: Client Error
Response Code: 500
Message: Server Error

Changelog

    April-2021
Last modified 3mo ago
Copy link
Contents
Changelog