This endpoint allows updating price fields and other attributes from a pricelist of a product (variant).
You can request multiple updates at once; the maximum is 100 updates per request.
The request must contain a product variant code code
and at least one of the price
, priceWithVat
, priceWithoutVat
, orderableAmount
or sales
objects.
Send only fields you want to change, the others will stay untouched. Be aware of the difference between
In case the request will be properly formatted, but an error occurs for one of the records, the correct records
will be updated, the response will be 200 OK
and there will be records in the errors
array for each failed
record. If all records are incorrect, the response code will be 400 BAD REQUEST
instead.
If you set includingVat
or vatRate
field, current data for product (or variant) will be recalculated. (even through untouched by your request)
Object price
directly sets price of product, without recalculating.
Object priceWithVat
sets price of product, respecting it is price with VAT and thus recalculating if needed.
Object priceWithoutVat
sets price of product, respecting it is price without VAT and thus recalculating if needed.
Note, that you can change buyPrice
only for default price list! For others price lists, value stays null
.
For non-vat payer e-shops, vatRate
and includingVat
fields are forbidden to use and fields price
, priceWithVat
and priceWithoutVat
all works the same.
In order to change the currency of the prices, you will need to have the Currencies module (Cizí měny) activated on the customer's e-shop. Note that if you change the currency code of the price list, all prices will not be recalculated to the new currency; only the currency code will be changed.