XM

Retrieve Plan by Item ID and Price List ID

Path:

GET /data-subscription/plans/get-by/item-id/pricelist-id?priceListId={pricelistId}&itemId={itemId}

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 : Item ID and Price List ID

Required: true

Sample Path

https://{baseURL}/data-subscription/plans/get-by/item-id/pricelist-id?priceListId=100257&itemId=1000012023

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
}
]
}

Response Code: 400

Message: Client Error

Response Code: 500

Message: Server Error

Changelog

  • April-2021