Updates the price list itself, not the prices in it. For those use PATCH /api/price-lists/{id}/prices.
Every field is optional and send only what changes; a field left out is left as it is. The response is the whole entity, in the same shape GET returns it. At least one field is required, so a request with no body, or one whose data is empty, answers 422 invalid-request-data.
currency records which currency the price list is kept in. It does not convert or recalculate any price. Each price row carries its own currencyCode; the two are independent and setting one does not change the other. Send null to clear it, after which the e-shop default currency applies. Nothing in the e-shop reads this value yet.
salesChannels replaces the current assignment rather than adding to it, so send the full list; an empty array detaches the price list from every channel. isPrimary can only be set, not cleared: to stop a price list being a channel's primary one, make another price list primary for that channel.
A price list can be assigned to channels of type online_store, in_store and marketplace. A system channel is an integration such as Heureka or Aukro and answers 422 sales-channel-type-invalid, which is distinct from a guid the e-shop does not have at all.
An unknown price list answers 404 pricelist-not-found. A currency or a sales channel guid the e-shop does not have answers 422 invalid-request-data with instance naming the field, and a name another price list already uses 409 pricelist-name-duplicated. A request answered with any of those leaves the price list exactly as it was; the fields of one request are never applied in part.
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/price-lists/{id}
- https://api.myshoptet.comhttps://api.myshoptet.com/api/price-lists/{id}
curl -i -X PATCH \
https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/price-lists/1 \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
-d '{
"data": {
"name": "Velkoobchod",
"currency": "CZK",
"salesChannels": [
{
"guid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
"isPrimary": true
}
]
}
}'{ "data": { "priceList": { … } }, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }