Overview
Use the Price Reindex API to update the prices of the products you specify in the request, so customers see fresh prices almost instantly.
You can change multiple product prices at the same time. For each product, provide the product ID and regular price, and optionally special prices and customer group prices. The data must follow the Athena XAI Datasource instructions.
Endpoint
| Method | Path |
|---|---|
POST | /api/v1/open-api/reindex/price |
POST | /api/v2/open-api/reindex/price |
Request body
{
"token": "{{website_token}}", //required
"data": [ //required, array of objects (product id with prices which Athena XAI has to update)
{
"entity_id": 1,
"price": 45.69,
"special_price": 32.21,
"customer_groups": {
"0": {
"regular_price": 52.99,
"customer_group_id": 0
},
"1": {
"regular_price": 45.45,
"special_price": 42.99,
"customer_group_id": 1
},
"2": {
"regular_price": 52.99,
"special_price": 42.99,
"customer_group_id": 2
}
}
},
{
"id": 2,
"price": 120,
"special_price": 86.56
}
]
}
Successful response
[
{
"id": 3,
"timestamp": "",
"time": "2021-12-21 16:17:18",
"status": 200,
"result": "updated"
},
{
"id": 8,
"timestamp": "",
"time": "2021-12-21 16:17:18",
"status": 200,
"result": "updated"
},
{
"id": 9,
"timestamp": "",
"time": "2021-12-21 16:17:18",
"status": 200,
"result": "updated"
},
{
"id": 40,
"timestamp": "",
"time": "2021-12-21 16:17:18",
"status": 422,
"result": "Fields \"id\" or \"price\" does not exist!"
},
{
"id": 123123,
"timestamp": "",
"time": "2021-12-21 16:17:18",
"status": 404,
"result": "Product not found!"
}
]