# Order payment update Endpoint: PATCH /api/orders/{code}/payment/{id} Version: 1.0.0 Security: shoptetAccessToken, shoptetPrivateApiToken ## Path parameters: - `code` (string, required) order code Example: "2018000079" - `id` (number, required) id of order item Example: "1" ## Header parameters: - `Content-Type` (string, required) ## Request fields (application/json): - `data` (object, required) - `data.guid` (string) Guid of payment method. - `data.vatRate` (string) VAT rate ( for VAT non-payers). - `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. Price including tax and price excluding tax cannot be combined. - `data.additionalField` (string,null) additional information. - `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. ## 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