XM
Powered By GitBook
Retrieve All Plans
Path:
1
GET /data-subscription/plans?title=title&pageNumber=1&pageSize=10
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 : header
Name : JWT Authorization
Required: true
Type : query
Name : Title, Page Number, Page Size
Required: true

Sample Path

1
https://{baseURL}/data-subscription/plans?title=title&pageNumber=1&pageSize=10
Copied!

Sample Response

Response Code: 200
Message: OK
1
{
2
"success": true,
3
"responseStatus": "OK",
4
"message": "Request processed successfully.",
5
"data": [
6
{
7
"isDeleted": false,
8
"deletedAt": null,
9
"_id": "60461602e614e445784f1ccd",
10
"title": "test plan",
11
"description": "test plan ",
12
"products": [
13
{
14
"_id": "60461602e614e445784f1cce",
15
"itemId": "1000012023",
16
"priceListId": "100257"
17
}
18
],
19
"frequency": 3,
20
"frequencyType": "Weekly",
21
"status": "ACTIVE",
22
"discount": 5,
23
"shippingCost": 2,
24
"merchantAccountId": "8739392294",
25
"merchantAccount": "5f328bf0b7c15700071233b9",
26
"createdAt": "2021-03-08T12:18:10.692Z",
27
"updatedAt": "2021-03-08T12:18:10.692Z",
28
"__v": 0
29
},
30
{
31
"isDeleted": false,
32
"deletedAt": null,
33
"_id": "6048948070587c7c08053dcc",
34
"title": "test plan",
35
"description": "test plan ",
36
"products": [
37
{
38
"_id": "6048948070587c7c08053dcd",
39
"itemId": "1000019305",
40
"priceListId": "100264"
41
}
42
],
43
"frequency": 3,
44
"frequencyType": "Weekly",
45
"status": "ACTIVE",
46
"discount": 5,
47
"shippingCost": 2,
48
"merchantAccountId": "8739392294",
49
"merchantAccount": "5f328bf0b7c15700071233b9",
50
"createdAt": "2021-03-10T09:42:24.394Z",
51
"updatedAt": "2021-03-10T09:42:24.394Z",
52
"__v": 0
53
},
54
{
55
"isDeleted": false,
56
"deletedAt": null,
57
"_id": "604f5e65eddac91f7ad5535c",
58
"title": "test plan",
59
"description": "test plan ",
60
"products": [
61
{
62
"_id": "604f5e65eddac91f7ad5535d",
63
"itemId": "1000019305",
64
"priceListId": "100266"
65
}
66
],
67
"frequency": 6,
68
"frequencyType": "weekly",
69
"status": "ACTIVE",
70
"discount": 5,
71
"shippingCost": 2,
72
"merchantAccountId": "8739392294",
73
"merchantAccount": "5f328bf0b7c15700071233b9",
74
"createdAt": "2021-03-15T13:17:25.261Z",
75
"updatedAt": "2021-03-15T13:17:25.261Z",
76
"__v": 0
77
},
78
{
79
"isDeleted": false,
80
"deletedAt": null,
81
"_id": "605082f7afc4e21f7a126692",
82
"title": "test plan",
83
"description": "test plan ",
84
"products": [
85
{
86
"_id": "605082f7afc4e21f7a126693",
87
"itemId": "1000019305",
88
"priceListId": "100267"
89
},
90
{
91
"_id": "605082f7afc4e21f7a126694",
92
"itemId": "1000012000",
93
"priceListId": "100267"
94
}
95
],
96
"frequency": 1,
97
"frequencyType": "weekly",
98
"status": "ACTIVE",
99
"discount": 5,
100
"shippingCost": 2,
101
"merchantAccountId": "8739392294",
102
"merchantAccount": "5f328bf0b7c15700071233b9",
103
"createdAt": "2021-03-16T10:05:43.266Z",
104
"updatedAt": "2021-03-16T10:05:43.266Z",
105
"__v": 0
106
},
107
{
108
"isDeleted": false,
109
"deletedAt": null,
110
"_id": "60584b5fd54c3d6ddd934c8e",
111
"title": "test plan",
112
"description": "test plan ",
113
"products": [
114
{
115
"_id": "60584b5fd54c3d6ddd934c8f",
116
"itemId": "1000019305",
117
"priceListId": "100272"
118
},
119
{
120
"_id": "60584b5fd54c3d6ddd934c90",
121
"itemId": "1000012000",
122
"priceListId": "100272"
123
}
124
],
125
"frequency": 11,
126
"frequencyType": "weekly",
127
"status": "ACTIVE",
128
"discount": 5,
129
"shippingCost": 2,
130
"merchantAccountId": "8739392294",
131
"merchantAccount": "5f328bf0b7c15700071233b9",
132
"createdAt": "2021-03-22T07:46:39.675Z",
133
"updatedAt": "2021-03-22T07:46:39.675Z",
134
"__v": 0
135
}
136
]
137
}
Copied!
Response Code: 400
Message: Client Error
Response Code: 500
Message: Server Error

Changelog

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