Update a customer order item
Replaces one item of the customer order, identified by `itemId`, and recalculates the document totals. Requires `Permissions.OrderCustomer.Update`.
BearerAuthorizationBearer <token>OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.
documentId*integerint32itemId*integerint32application/json- body
id?|Row id of the item. Read-only; the server assigns it.
int32internalNumber?|Internal number of the document this item belongs to. Read-only.
int32item?|int32productId?|Id of the product this item sells or moves. Required.
int32variants?array<>|The item's size/colour breakdown. Null when the item has none.
barcode?|length <= 50batchId?|int32batchTextRawMaterial?string|nullcreatedAt?|date-timeediQuantity?|decimalexpirationDate?|date-timeforeignCurrencyId?|int32foreignExchangeRate?|decimalisCancellation?boolean|nullisPartialCancellation?boolean|nulllastModify?|date-timenote?string|nullpackagePrice?|decimalprice?|decimalpriceWoVat?|decimalquantity?|decimalquantityBeingCovered?|decimalquantityCoefficient?|decimalquantityCovered?|decimalquantityWeighed?|decimalrecyclingFee?|decimalrecyclingFeeId?|int32royalty?|decimalroyaltyId?|int32setPrice?|decimalstockPrice?|decimalunitId?|int32userId?|int32variantId?|int32vatRate?|decimalcontractId?|int32deliveryDate?|date-timediscount?|decimaldontOrder?boolean|nullforeignCurrency?string|nullforeignPrice?|decimalinsuranceId?|int32insurancePrice?|decimalnumberOfPackages?|decimalorderSupplierItemId?|int32orderedQuantity?|decimalpriceWoVatIssued?|decimalquantityIssued?|decimaltakeAway?boolean|nullunitIdIssued?|int32warehouseId?|int32warehouseSellingPrice?|decimalweight?|decimalapplication/json- response
id?|Row id of the item. Read-only; the server assigns it.
int32internalNumber?|Internal number of the document this item belongs to. Read-only.
int32item?|int32productId?|Id of the product this item sells or moves. Required.
int32variants?array<>|The item's size/colour breakdown. Null when the item has none.
barcode?|length <= 50batchId?|int32batchTextRawMaterial?string|nullcreatedAt?|date-timeediQuantity?|decimalexpirationDate?|date-timeforeignCurrencyId?|int32foreignExchangeRate?|decimalisCancellation?boolean|nullisPartialCancellation?boolean|nulllastModify?|date-timenote?string|nullpackagePrice?|decimalprice?|decimalpriceWoVat?|decimalquantity?|decimalquantityBeingCovered?|decimalquantityCoefficient?|decimalquantityCovered?|decimalquantityWeighed?|decimalrecyclingFee?|decimalrecyclingFeeId?|int32royalty?|decimalroyaltyId?|int32setPrice?|decimalstockPrice?|decimalunitId?|int32userId?|int32variantId?|int32vatRate?|decimalcontractId?|int32deliveryDate?|date-timediscount?|decimaldontOrder?boolean|nullforeignCurrency?string|nullforeignPrice?|decimalinsuranceId?|int32insurancePrice?|decimalnumberOfPackages?|decimalorderSupplierItemId?|int32orderedQuantity?|decimalpriceWoVatIssued?|decimalquantityIssued?|decimaltakeAway?boolean|nullunitIdIssued?|int32warehouseId?|int32warehouseSellingPrice?|decimalweight?|decimalcurl -X PUT 'https://<your-instance>/api/documents/orders/customer/0/items/0' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "id": 1, "priceWoVatIssued": 100, "unitIdIssued": 5, "vatRate": 21}'{ "id": 0, "internalNumber": 0, "item": 0, "productId": 0, "variants": [ { "colorId": 0, "dimensionId": 0, "id": 0, "itemId": 0, "lengthId": 0, "quantity": 0, "sizeId": 0, "price": 0, "priceWoVat": 0, "quantityBeingCovered": 0, "quantityCovered": 0, "orderSupplierItemVariantId": 0, "orderedQuantity": 0 } ], "barcode": "string", "batchId": 0, "batchTextRawMaterial": "string", "createdAt": "2019-08-24T14:15:22Z", "ediQuantity": 0, "expirationDate": "2019-08-24T14:15:22Z", "foreignCurrencyId": 0, "foreignExchangeRate": 0, "isCancellation": true, "isPartialCancellation": true, "lastModify": "2019-08-24T14:15:22Z", "note": "string", "packagePrice": 0, "price": 0, "priceWoVat": 0, "quantity": 0, "quantityBeingCovered": 0, "quantityCoefficient": 0, "quantityCovered": 0, "quantityWeighed": 0, "recyclingFee": 0, "recyclingFeeId": 0, "royalty": 0, "royaltyId": 0, "setPrice": 0, "stockPrice": 0, "unitId": 0, "userId": 0, "variantId": 0, "vatRate": 0, "contractId": 0, "deliveryDate": "2019-08-24T14:15:22Z", "discount": 0, "dontOrder": true, "foreignCurrency": "string", "foreignPrice": 0, "insuranceId": 0, "insurancePrice": 0, "numberOfPackages": 0, "orderSupplierItemId": 0, "orderedQuantity": 0, "priceWoVatIssued": 0, "quantityIssued": 0, "takeAway": true, "unitIdIssued": 0, "warehouseId": 0, "warehouseSellingPrice": 0, "weight": 0}Check whether customer order items can be deleted GET
Advisory pre-flight for `DELETE {documentId}/items`. `blockingReasons` holds `ITEMS_BLOCKED` when at least one id in `itemIds` is still referenced elsewhere. At most 1000 ids per call. Requires `Permissions.OrderCustomer.Delete`.
Delete a customer order item variant DELETE
Deletes one variant row (a size/colour breakdown) of an item and recalculates the document totals. Call the matching `check-delete` endpoint first to find out whether the delete is allowed. Requires `Permissions.OrderCustomer.Delete`.