XM

Retrieve All Plans

Path:

GET /data-subscription/plans?title=title&pageNumber=1&pageSize=10

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"

Consumes

  • application/json

Produces

  • application/json

Parameters

Type : header

Name : JWT Authorization

Required: true

Type : query

Name : Title, Page Number, Page Size

Required: true

Sample Path

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

Sample Response

Response Code: 200

Message: OK

{
"success": true,
"responseStatus": "OK",
"message": "Request processed successfully.",
"data": [
{
"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
},
{
"isDeleted": false,
"deletedAt": null,
"_id": "6048948070587c7c08053dcc",
"title": "test plan",
"description": "test plan ",
"products": [
{
"_id": "6048948070587c7c08053dcd",
"itemId": "1000019305",
"priceListId": "100264"
}
],
"frequency": 3,
"frequencyType": "Weekly",
"status": "ACTIVE",
"discount": 5,
"shippingCost": 2,
"merchantAccountId": "8739392294",
"merchantAccount": "5f328bf0b7c15700071233b9",
"createdAt": "2021-03-10T09:42:24.394Z",
"updatedAt": "2021-03-10T09:42:24.394Z",
"__v": 0
},
{
"isDeleted": false,
"deletedAt": null,
"_id": "604f5e65eddac91f7ad5535c",
"title": "test plan",
"description": "test plan ",
"products": [
{
"_id": "604f5e65eddac91f7ad5535d",
"itemId": "1000019305",
"priceListId": "100266"
}
],
"frequency": 6,
"frequencyType": "weekly",
"status": "ACTIVE",
"discount": 5,
"shippingCost": 2,
"merchantAccountId": "8739392294",
"merchantAccount": "5f328bf0b7c15700071233b9",
"createdAt": "2021-03-15T13:17:25.261Z",
"updatedAt": "2021-03-15T13:17:25.261Z",
"__v": 0
},
{
"isDeleted": false,
"deletedAt": null,
"_id": "605082f7afc4e21f7a126692",
"title": "test plan",
"description": "test plan ",
"products": [
{
"_id": "605082f7afc4e21f7a126693",
"itemId": "1000019305",
"priceListId": "100267"
},
{
"_id": "605082f7afc4e21f7a126694",
"itemId": "1000012000",
"priceListId": "100267"
}
],
"frequency": 1,
"frequencyType": "weekly",
"status": "ACTIVE",
"discount": 5,
"shippingCost": 2,
"merchantAccountId": "8739392294",
"merchantAccount": "5f328bf0b7c15700071233b9",
"createdAt": "2021-03-16T10:05:43.266Z",
"updatedAt": "2021-03-16T10:05:43.266Z",
"__v": 0
},
{
"isDeleted": false,
"deletedAt": null,
"_id": "60584b5fd54c3d6ddd934c8e",
"title": "test plan",
"description": "test plan ",
"products": [
{
"_id": "60584b5fd54c3d6ddd934c8f",
"itemId": "1000019305",
"priceListId": "100272"
},
{
"_id": "60584b5fd54c3d6ddd934c90",
"itemId": "1000012000",
"priceListId": "100272"
}
],
"frequency": 11,
"frequencyType": "weekly",
"status": "ACTIVE",
"discount": 5,
"shippingCost": 2,
"merchantAccountId": "8739392294",
"merchantAccount": "5f328bf0b7c15700071233b9",
"createdAt": "2021-03-22T07:46:39.675Z",
"updatedAt": "2021-03-22T07:46:39.675Z",
"__v": 0
}
]
}

Response Code: 400

Message: Client Error

Response Code: 500

Message: Server Error

Changelog

  • April-2021