Skip to content

Update pricelist

Request

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 300 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

  • not providing a field: the field will not be changed

  • providing e. g. data.price.buyPrice: null will remove the price

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.

Security
shoptetAccessToken or shoptetPrivateApiToken
Path
idstringrequired

Pricelist id

Example:1
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataArray of objects(pricelistUpdate)required
curl -i -X PATCH \
  https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/pricelists/1 \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": [
      {
        "code": "106/BIL",
        "currencyCode": "CZK",
        "vatRate": "21.00",
        "includingVat": true,
        "orderableAmount": {
          "minimumAmount": "1.000",
          "maximumAmount": "1.000"
        },
        "sales": {
          "minPriceRatio": "0.7800",
          "freeShipping": true,
          "freeBilling": true,
          "loyaltyDiscount": true,
          "volumeDiscount": true,
          "quantityDiscount": true,
          "discountCoupon": true
        },
        "price": {
          "price": "21.00",
          "commonPrice": "21.00",
          "buyPrice": "21.00",
          "priceRatio": "0.7800",
          "actionPrice": {
            "price": "21.00",
            "fromDate": "2017-04-04",
            "toDate": "2017-04-04"
          }
        },
        "priceWithVat": {
          "price": "21.00",
          "commonPrice": "21.00",
          "buyPrice": "21.00",
          "priceRatio": "0.7800",
          "actionPrice": {
            "price": "21.00",
            "fromDate": "2017-04-04",
            "toDate": "2017-04-04"
          }
        },
        "priceWithoutVat": {
          "price": "21.00",
          "commonPrice": "21.00",
          "buyPrice": "21.00",
          "priceRatio": "0.7800",
          "actionPrice": {
            "price": "21.00",
            "fromDate": "2017-04-04",
            "toDate": "2017-04-04"
          }
        },
        "prices": {
          "purchasePrice": {
            "price": "21.00",
            "vatRate": "21.00",
            "includingVat": true
          }
        }
      }
    ]
  }'

Responses

OK

Bodyapplication/json
dataobject or null
errorsArray of objects or null(Errors)
metadataobject(Metadata)
Response
{ "data": null, "errors": [ {}, {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }