XM

Set Bulk Price

Path:

POST /price/bulk-insert

This API facilitates you to add prices to items in bulk, instead of adding them 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-bulk-price

Description: The criteria to set bulk price.

Required: true

Sample Request

[
{
"priceListId": 100013,
"itemId": 1000012000,
"offers": [
{
"channel": 12,
"startDate": "2021-02-18T09:36:47.234Z",
"endDate": "2021-02-19T09:36:47.234Z",
"price": {
"base": 100,
"currency": "USD"
}
}
]
}
]

Response

HTTP Code: 200 Message: OK

Sample:

[
{
"isSoftDeleted": false,
"job": false,
"_id": "601aa9ab1348450007b5d059",
"priceListId": 100013,
"offers": [
{
"price": {
"sale": 0,
"cost": 0,
"base": 100,
"currency": "USD"
},
"_id": "601aa9ab1348450007b5d05a",
"channel": 12,
"startDate": "2021-02-18T09:36:00.000Z",
"endDate": "2021-02-19T09:36:00.000Z",
"offerCode": 162914
}
],
"itemId": 1000012000,
"offerId": 3029,
"createdAt": "2021-02-03T13:48:27.115Z",
"updatedAt": "2021-02-03T13:48:27.115Z"
}
]

HTTP Code: 400 Message: Client Error

HTTP Code: 500 Message: Server Error

Changelog

*Last updated - March 2021