WinShopAPI docs
ReferenceDocumentsExpeditionWrite offs

Update a write-off item

Replaces one item of the write-off, identified by `itemId`, and recalculates the document totals. Requires `Permissions.WriteOffs.Update`.

PUT
/api/documents/expedition/write-offs/{documentId}/items/{itemId}

Authorization

Bearer
headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.

Path Parameters

documentId*integer
Formatint32
itemId*integer
Formatint32

Request Body

application/json
  1. body
id?|

Row id of the item. Read-only; the server assigns it.

Formatint32
internalNumber?|

Internal number of the document this item belongs to. Read-only.

Formatint32
item?|
Formatint32
productId?|

Id of the product this item sells or moves. Required.

Formatint32
variants?array<>|

The item's size/colour breakdown. Null when the item has none.

barcode?|
Lengthlength <= 50
batchId?|
Formatint32
createdAt?|
Formatdate-time
discount?|
Formatdecimal
exchangeRate?|
Formatdecimal
foreignCurrency?|
Lengthlength <= 3
foreignCurrencyId?|
Formatint32
guid?|
Formatguid
isCancellation?boolean|null
isPartialCancellation?boolean|null
lastModify?|
Formatdate-time
locationId?|
Formatint32
note?string|null
orderInternalNumber?|
Formatint32
orderInternetItemId?|
Formatint32
orderItemId?|
Formatint32
packageId?|
Formatint32
packagePrice?|
Formatdecimal
price?|
Formatdecimal
priceWoVat?|
Formatdecimal
priceWoVatIssued?|
Formatdecimal
promotionId?|
Formatint32
quantity?|
Formatdecimal
quantityCoefficient?|
Formatdecimal
quantityIssued?|
Formatdecimal
recyclingFee?|
Formatdecimal
recyclingFeeId?|
Formatint32
referencePrice?|
Formatdecimal
reservationItemId?|
Formatint32
retailPrice?|
Formatdecimal
royalty?|
Formatdecimal
royaltyId?|
Formatint32
setPrice?|
Formatdecimal
stockPrice?|
Formatdecimal
totalForeignPrice?|
Formatdecimal
unitId?|
Formatint32
unitIdIssued?|
Formatint32
userId?|
Formatint32
variantId?|
Formatint32
vatRate?|
Formatdecimal
warehouseSellingPrice?|
Formatdecimal
weight?|
Formatdecimal
cashRegisterId?|
Formatint32
reasonForIssuanceOfGoodsId?|
Formatint32

Response Body

response?unknownapplication/octet-stream
curl -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}'
null