XM
Powered By GitBook
Retrieve All Subscriptions
Path:
1
GET /data-subscription/subscriptions
Copied!
This API facilitates easy creation of a new subscription based on the subscription details such as planId, itemId, quantity, etc. in the request body.

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 : body
Name : Subscription details
Required: true

Sample Request

1
{
2
"quantity": 2
3
}
Copied!

Sample Response

Response Code: 200
Message: OK
1
{
2
"success": true,
3
"responseStatus": "OK",
4
"message": "Request processed successfully.",
5
"data": {
6
"shipTo": {
7
"name": {
8
"firstName": "test IQBAR",
9
"middleName": "",
10
"lastName": "test"
11
},
12
"streetAddress": {
13
"street1": "185-S QA Estate",
14
"street2": ""
15
},
16
"phone": {
17
"number": ""
18
},
19
"shipToId": "testShip",
20
"city": "Lahore",
21
"state": "Punjab",
22
"zipCode": "a1a1a1",
23
"country": "Pakistan"
24
},
25
"billTo": {
26
"name": {
27
"firstName": "test bill",
28
"middleName": "",
29
"lastName": "test"
30
},
31
"streetAddress": {
32
"street1": "185-S QA Estate bill",
33
"street2": ""
34
},
35
"phone": {
36
"number": ""
37
},
38
"billToId": "testBill",
39
"city": "Lahore",
40
"state": "Punjab",
41
"zipCode": "a1a1a1",
42
"country": "Pakistan"
43
},
44
"isDeleted": true,
45
"deletedAt": "2021-03-22T09:30:47.567Z",
46
"_id": "6058511b4dd50e6ddd6d744c",
47
"planID": "604f5e65eddac91f7ad5535c",
48
"itemID": "1000019305",
49
"priceListID": "100266",
50
"quantity": 2,
51
"customerID": "6045e4453db3e710480a4d2b",
52
"frequency": 6,
53
"frequencyType": "weekly",
54
"merchantAccountId": "8739392294",
55
"merchantAccount": "5f328bf0b7c15700071233b9",
56
"status": "ACTIVE",
57
"lastOrderReferenceId": "5082-5948-16923",
58
"cancellationReason": "",
59
"discount": 2,
60
"tax": 2,
61
"shippingCost": 2,
62
"paymentMethod": "pm_1ISekkETggmgrCy2b7osIpl8",
63
"lastPaymentDate": "2021-03-22T08:11:07.219Z",
64
"nextPaymentDate": "2021-05-03T08:11:07.218Z",
65
"createdAt": "2021-03-22T08:11:07.234Z",
66
"updatedAt": "2021-03-22T09:35:12.964Z",
67
"__v": 0
68
}
69
}
Copied!
Response Code: 400
Message: Client Error
Response Code: 500
Message: Server Error

Changelog

    April-2021 last updated
    July-2020 First updated
Last modified 3mo ago
Copy link
Contents
Changelog