Update a write-off item
Replaces one item of the write-off, identified by `itemId`, and recalculates the document totals. Requires `Permissions.WriteOffs.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?|int32createdAt?|date-timediscount?|decimalexchangeRate?|decimalforeignCurrency?|length <= 3foreignCurrencyId?|int32guid?|guidisCancellation?boolean|nullisPartialCancellation?boolean|nulllastModify?|date-timelocationId?|int32note?string|nullorderInternalNumber?|int32orderInternetItemId?|int32orderItemId?|int32packageId?|int32packagePrice?|decimalprice?|decimalpriceWoVat?|decimalpriceWoVatIssued?|decimalpromotionId?|int32quantity?|decimalquantityCoefficient?|decimalquantityIssued?|decimalrecyclingFee?|decimalrecyclingFeeId?|int32referencePrice?|decimalreservationItemId?|int32retailPrice?|decimalroyalty?|decimalroyaltyId?|int32setPrice?|decimalstockPrice?|decimaltotalForeignPrice?|decimalunitId?|int32unitIdIssued?|int32userId?|int32variantId?|int32vatRate?|decimalwarehouseSellingPrice?|decimalweight?|decimalcashRegisterId?|int32reasonForIssuanceOfGoodsId?|int32response?unknownapplication/octet-streamcurl -X PUT 'https://<your-instance>/api/documents/expedition/write-offs/0/items/0' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "customerId": 1, "items": [ { "price": 302.5, "priceWoVat": 250, "productId": 5, "quantityIssued": 100, "unitIdIssued": 1, "vatRate": 21 } ], "warehouseId": 2}'nullCheck whether write-off 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.WriteOffs.Delete`.
Delete a write-off 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.WriteOffs.Delete`.