# Update pricelist 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 and at least one of the , , , or 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. 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 and there will be records in the array for each failed record. If all records are incorrect, the response code will be instead. If you set or field, current data for product (or variant) will be recalculated. (even through untouched by your request) Object directly sets price of product, without recalculating. Object sets price of product, respecting it is price VAT and thus recalculating if needed. Object sets price of product, respecting it is price VAT and thus recalculating if needed. Note, that you can change only for default price list! For others price lists, value stays . For non-vat payer e-shops, and fields are forbidden to use and fields , and 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. Endpoint: PATCH /api/pricelists/{id} Version: 1.0.0 Security: shoptetAccessToken, shoptetPrivateApiToken ## Path parameters: - `id` (string, required) Pricelist id Example: "1" ## Header parameters: - `Content-Type` (string, required) ## Request fields (application/json): - `data` (array, required) - `data.code` (string, required) Product variant code - `data.currencyCode` (string) Currency code. List of available currencies within the e-shop can be found in [Eshop info](#tag/eshop/geteshopinfo) endpoint. - `data.vatRate` (string,null) VatRate for prices - `data.includingVat` (boolean) Whether the product prices are saved with vat or without. - `data.orderableAmount` (object) Orderable quantity - `data.orderableAmount.minimumAmount` (string,null) Minimum orderable quantity - `data.orderableAmount.maximumAmount` (string,null) Maximum orderable quantity - `data.sales` (object) Definition of discounts - `data.sales.minPriceRatio` (string) 3 decimal places accuracy, (from to ), maximum permitted discount. - `data.sales.freeShipping` (boolean) flag, whether the product will have a free transport after it is placed in the cart. - `data.sales.freeBilling` (boolean) flag, whether the product will have a free payment after it is placed in the cart. - `data.sales.loyaltyDiscount` (boolean) flag, whether the loyalty discount should be used. - `data.sales.volumeDiscount` (boolean) flag, whether the volume discount should be used. - `data.sales.quantityDiscount` (boolean) flag, whether the volume/multibuy discount should be used. - `data.sales.discountCoupon` (boolean) flag, whether a discount coupon can be applied. - `data.price` (object) Prices - `data.price.price` (string,null) Price, at which the customer can purchase the product. It can be loaded by the special discounted price and influenced by the price ratio. (can be ) - `data.price.commonPrice` (string,null) standard price, use for information and comparison to competitors (can be ) - `data.price.buyPrice` (string,null) purchase price. - `data.price.priceRatio` (string) price ratio. The price of the product shall be calculated by multiplying the price and this coefficient. The price ratio affects only the price (), the special discounted price () is not affected by the ratio. This ratio has 3 decimal places and can be greater than 1,000 - `data.price.actionPrice` (object,null) Special discounted price - `data.price.actionPrice.price` (string,null) special discounted price. It is only used if set and if the validity date is set too, form () to (). - `data.price.actionPrice.fromDate` (string,null) special discounted price effective date - from - `data.price.actionPrice.toDate` (string,null) special discounted price effective date - up to - `data.priceWithVat` (object) Prices with VAT - `data.priceWithoutVat` (object) Prices without VAT ## Response 200 fields (application/json): - `data` (object,null) - `errors` (array,null) - `errors.errorCode` (string, required) Short text error identification - `errors.message` (string, required) Descriptive error message - `errors.instance` (string, required) Identification of the entity referenced ## Response 404 fields (application/json): - `data` (object,null) - `errors` (array,null) - `errors.errorCode` (string, required) Short text error identification - `errors.message` (string, required) Descriptive error message - `errors.instance` (string, required) Identification of the entity referenced