Bulk create or update product prices
Creates or updates many product-price records in a single request. The body is a JSON array of price objects; for each element, the record of the given product is updated if it exists and created otherwise.
Every element must carry a product. If individual fields within an element fail serializer validation, the request is rejected with 400 Bad Request. If the product key is missing entirely or the element is otherwise structurally malformed, the request is rejected with 406 Not Acceptable. In both cases no changes are applied.
On success the response is an empty object.
Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.
A JSON array of price objects for the bulk upsert endpoint. For each element, the record of the given product is updated if it exists and created otherwise. Every element must carry a product.
The identifier of the product this price belongs to. Required on create. On update it must match the record's current product — a different value is rejected.
The selling price. A positive decimal with up to 12 digits and 2 decimal places.
An ISO 4217 currency code accepted by the product-price endpoints.
The tax rate applied to the price. A decimal with up to 5 digits and 2 decimal places.
The original or reference retail price. Optional.
Free-form JSON for extra data. Optional.
The records were created or updated successfully. The response body is an empty object.
The request contains invalid or missing data — for example a missing product, a product that does not exist or already has a price record, or an invalid price. The response names the field the complaint belongs to.
Authentication credentials were not provided or are invalid.
The authenticated user does not have administrator privileges.
The request is well-formed but violates a business rule of the price service — the product of an existing record was changed, or a bulk upsert element was missing product or was otherwise malformed.
POST /api/v1/remote/1/product_price/bulk_upsert/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 128
[
{
"product": 3391,
"price": "199.90",
"tax_rate": "18.00"
},
{
"product": 3392,
"price": "89.90",
"currency_type": "try",
"tax_rate": "18.00"
}
]{}Last updated
Was this helpful?

