# Order item change Endpoint: PATCH /api/orders/{code}/item/{id} Version: 1.0.0 Security: shoptetAccessToken, shoptetPrivateApiToken ## Path parameters: - `code` (string, required) order code (number) Example: "2018000012" - `id` (string, required) order item id. Can be found in field in Order detail. (number) Example: "198" ## Query parameters: - `suppressProductGuidCheck` (boolean) suppress the product existence check per GUID Example: true ## Header parameters: - `Content-Type` (string, required) ## Request fields (application/json): - `data` (object, required) - `data.itemType` (string, required) Item type. Mandatory field; see also [Types of order items](#section/code-lists/types-of-order-items) code list. Only , , or item type is allowed. - `data.code` (string) Item code. For transportation, payment and discounts the ( and ) must remain , for the other types of items, this is mandatory. - `data.vatRate` (string) VAT rate ( for VAT non-payers). Mandatory. - `data.itemPriceWithVat` (string) Item price, including VAT. Optional. Price including tax and price excluding tax cannot be combined. - `data.itemPriceWithoutVat` (string) Item price, excluding VAT. Optional. Price including tax and price excluding tax cannot be combined. - `data.buyPriceWithVat` (string) Purchase price, including VAT. Optional. Price including tax and price excluding tax cannot be combined. This is used for profit margin calculation and statistics. - `data.buyPriceWithoutVat` (string) Purchase price, excluding VAT. Optional. Price including tax and price excluding tax cannot be combined. This is used for profit margin calculation and statistics. - `data.buyPriceVatRate` (string) VAT rate for purchase price. Optional. - `data.name` (string) Product name (optional, but usually filled in). Mandatory only for transport and payment, for other items, it is loaded according to . - `data.variantName` (string,null) Variant name. Optional. - `data.brand` (string,null) brand (manufacturer). Optional. - `data.supplierName` (string,null) supplier. Optional. - `data.productGuid` (string,null) Product GUID in item. When used with the parameter, this field has no influence. - `data.remark` (string,null) With cubicles - `data.warrantyDescription` (string,null) textual description of warranty length (can be ) - `data.amountCompleted` (string,null) quantity of completed product - `data.additionalField` (string,null) additional information. Used for transport to specify the branch. - `data.amount` (string) amount, 3 decimal places accuracy, optional, default value . - `data.amountUnit` (string) unit of quantity (optional) - `data.weight` (string) product weight in kilograms. Maximum 3 decimal places, and maximum value of 99999. - `data.priceRatio` (string) discount in the form of coefficient (0.7 = 70 % of the original price, i.e. 30 % discount). Optional, default value is - `data.recyclingFeeId` (integer,null) Product recycling fee id, replacement for - `data.statusId` (number) Order item status. Optional, if not indicated, default value is guided by the order status. If the order status was indicated and this status has the flag set, then the item will have this status. Otherwise the default status of the e-shop is used. - `data.consumptionTaxId` (integer,null) consumption tax, cannot be used together with . You can send this parameter, only if consumption tax module is enabled. - `data.consumptionTax` (object,null) consumption tax with custom value, cannot be used together with . You can send this parameter, only if consumption tax module is enabled. - `data.consumptionTax.currency` (string, required) Currency code. List of available currencies within the e-shop can be found in endpoint . - `data.consumptionTax.price` (string,null, required) consumption tax value ## Response 200 fields (application/json): - `data` (object, required) - `data.orderItem` (object, required) - `data.orderItem.productGuid` (any, required) product identifier of the item. At the time the order is created, it will be entered in this field, but when the product is deleted, the link will be lost (can be ) - `data.orderItem.code` (string,null, required) identifier of the item code (product or variant). At the time the order is created, it will be entered in this field, but when the product is deleted, the link will be lost. - `data.orderItem.ean` (string,null, required) EAN of the product variant (can be ) - `data.orderItem.itemType` (string, required) Order item type (product, service...). See also [Types of order items](#section/code-lists/types-of-order-items) code list. - `data.orderItem.productType` (string,null) Product type at the time of the order (product, product-set..). See also [Product types](#section/code-lists/product-types) code list (can be ). - `data.orderItem.name` (string, required) Product name, with possible addition () - `data.orderItem.variantName` (string,null, required) variant name (can be ) - `data.orderItem.brand` (string,null, required) product brand (or manufacturer, possibly) - `data.orderItem.remark` (string,null, required) remark - `data.orderItem.weight` (string, required) weight in kg, unpacked (can be ). 3 decimal places. Maximum value 999999. - `data.orderItem.additionalField` (string,null, required) additional field for remarks - `data.orderItem.amount` (string,null, required) product quantity - `data.orderItem.amountUnit` (string,null, required) product unit of quantity - `data.orderItem.priceRatio` (string, required) price coefficient. This also represents a discount (discount means ) - `data.orderItem.status` (object, required) - `data.orderItem.status.name` (string,null, required) order item status description (can be ) - `data.orderItem.status.id` (number, required) identifier of order item status - `data.orderItem.itemPrice` (object, required) the price of the item including the discount () and quantity (). - `data.orderItem.itemPrice.withVat` (string,null, required) price including tax - `data.orderItem.itemPrice.withoutVat` (string,null, required) price excluding tax - `data.orderItem.itemPrice.vat` (string,null, required) VAT value, two decimal places - `data.orderItem.itemPrice.vatRate` (string, required) VAT rate - `data.orderItem.displayPrices` (array) - `data.orderItem.purchasePrice` (any, required) purchase price of item, can be . - `data.orderItem.recyclingFee` (object,null, required) recycling fee including category and price (or possibly ). - `data.orderItem.recyclingFee.category` (string, required) Recycling fee category name. - `data.orderItem.recyclingFee.fee` (string,null, required) Recycling fee. - `data.orderItem.recyclingFee.unit` (any) Recycling fee unit. Enum: "pcs", "kg" - `data.orderItem.mainImage` (object,null) - `data.orderItem.mainImage.name` (string, required) image file name, also serves as an identifier for the image of the product. To assemble complete URL, it is added to the obtained from the endpoint e-shop info . - `data.orderItem.mainImage.seoName` (string, required) file name modified for SEO - a short label is attached. - `data.orderItem.mainImage.cdnName` (string, required) same as with attached hashed last image change time. , and can be entered in the URL - redirect will deliver the same image. - `data.orderItem.mainImage.priority` (number, required) the key for the sequence of images matching the sequence in administration - it's not necessarily from the first, and the series may contain gaps. (can be ). - `data.orderItem.mainImage.description` (string,null, required) description of the image (can be ). - `data.orderItem.mainImage.changeTime` (string,null, required) last image change time If you are saving images together, you can use this timestamp to indicate if you need to reload the image. (can be ). - `data.orderItem.stockLocation` (string,null) position in stock (can be ) - `data.orderItem.supplierName` (string,null) product supplier (can be ) - `data.orderItem.itemId` (number, required) order item identifier - `data.orderItem.warrantyDescription` (string,null, required) textual description of warranty length (can be ) - `data.orderItem.surchargeParameters` (array) items surcharge parameters, filled in order creation. Cannot be edited. - `data.orderItem.surchargeParameters.parameterName` (object) surcharge parameter name's information - `data.orderItem.surchargeParameters.parameterName.code` (string,null) parameters name code, can be null if already deleted - `data.orderItem.surchargeParameters.parameterName.name` (string) parameters name - `data.orderItem.surchargeParameters.parameterValue` (object) surcharge parameter value's information - `data.orderItem.surchargeParameters.parameterValue.valueIndex` (string,null) parameters value code, can be null if already deleted - `data.orderItem.surchargeParameters.parameterValue.description` (string) parameters value name - `data.orderItem.surchargeParameters.parameterValue.price` (string,null) parameters value additional price - `data.orderItem.specificSurchargeParameters` (array) list of specific surcharge parameters for order item detail, created from , but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint. - `data.orderItem.specificSurchargeParameters.relationId` (string, required) id which identifies relation between item and surcharge. Can be used to delete surcharge parameter related to item. - `data.orderItem.specificSurchargeParameters.name` (string, required) full name of surcharge parameter. - `data.orderItem.specificSurchargeParameters.price` (string,null, required) price of surcharge parameter - `data.orderItem.productFlags` (array) list of product flags - `data.orderItem.productFlags.code` (string, required) flag identifier - `data.orderItem.productFlags.title` (string, required) flag title - `data.orderItem.productFlags.system` (boolean, required) is it a system flag common for all e-shops? - `data.orderItem.consumptionTax` (object,null) consumption tax of order item - `data.orderItem.consumptionTax.currency` (string, required) Currency code. List of available currencies within the e-shop can be found in endpoint . - `data.orderItem.consumptionTax.price` (string,null, required) consumption tax value - `data.orderItem.buyPrice` (any) purchase price of the item including the discount () and quantity (). (or possibly ) - `data.orderItem.amountCompleted` (string,null, required) quantity of completed product. Deprecated - use section instead. - `data.orderItem.surchargeParametersTexts` (array) List of custom surcharge parameters names - `errors` (array,null, required) - `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 403 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 ## Response 422 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