XM

Set Price

Path:

POST /price/

This API facilitates you to add price to an item, instead of adding through the Co-Pilot UI.

Headers

Content-Type : application/json

x-site-context : {"stage":"dev02","account":"5f328bf0b7c15700071233b9","date":"","channel":12}

x-api-key: Av5xCBXsWo8EDGbNTHZ2r8J5XI5txqaqIITDxTE3

Consumes

  • application/json

Produces

  • application/json

Parameters

Type: body

Name: set-price

Description: The criteria to set price.

Required: true

Sample Request

{
"priceListId": 100013,
"itemIds": [1000000686],
"offers": [
{
"channel": 12,
"startDate": "2021-02-15T09:36:47.234Z",
"endDate": "2021-02-16T09:36:47.234Z",
"price": {
"base": 100,
"currency": "USD"
}
}
]
}

Response

HTTP Code: 200 Message: OK

Sample:

[
{
"isSoftDeleted": false,
"job": false,
"_id": "601aa93f4f36490008447838",
"priceListId": 100013,
"offers": [
{
"price": {
"sale": 0,
"cost": 0,
"base": 100,
"currency": "USD"
},
"_id": "601aa93f4f36490008447839",
"channel": 12,
"startDate": "2021-02-15T09:36:00.000Z",
"endDate": "2021-02-16T09:36:00.000Z",
"offerCode": 162912
}
],
"itemId": 1000000686,
"offerId": 3028,
"createdAt": "2021-02-03T13:46:39.833Z",
"updatedAt": "2021-02-03T13:46:39.833Z"
}
]

HTTP Code: 400 Message: Client Error

HTTP Code: 500 Message: Server Error

Changelog

*Last updated - March 2021