WinShopAPI docs
ReferenceDocumentsOrdersInternal

Update a internal order item

Replaces one item of the internal order, identified by `itemId`, and recalculates the document totals. Requires `Permissions.OrderInternal.Update`.

PUT
/api/documents/orders/internal/{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
batchTextRawMaterial?string|null
createdAt?|
Formatdate-time
ediQuantity?|
Formatdecimal
expirationDate?|
Formatdate-time
foreignCurrencyId?|
Formatint32
foreignExchangeRate?|
Formatdecimal
isCancellation?boolean|null
isPartialCancellation?boolean|null
lastModify?|
Formatdate-time
note?string|null
packagePrice?|
Formatdecimal
price?|
Formatdecimal
priceWoVat?|
Formatdecimal
quantity?|
Formatdecimal
quantityBeingCovered?|
Formatdecimal
quantityCoefficient?|
Formatdecimal
quantityCovered?|
Formatdecimal
quantityWeighed?|
Formatdecimal
recyclingFee?|
Formatdecimal
recyclingFeeId?|
Formatint32
royalty?|
Formatdecimal
royaltyId?|
Formatint32
setPrice?|
Formatdecimal
stockPrice?|
Formatdecimal
unitId?|
Formatint32
userId?|
Formatint32
variantId?|
Formatint32
vatRate?|
Formatdecimal
dateOfExchangeRate?|
Formatdate-time
foreignPurchasePriceWoVat?|
Formatdecimal
numberOfPackages?|
Formatdecimal
orderCustomerItemId?|
Formatint32
orderInternetItemId?|
Formatint32
orderSupplierItemId?|
Formatint32
orderedQuantity?|
Formatdecimal
purchasePriceWoVat?|
Formatdecimal
purchasePriceWoVatReceived?|
Formatdecimal
quantityReceived?|
Formatdecimal
supplierProductCode?string|null
unitIdReceived?|
Formatint32
warehouseSellingPrice?|
Formatdecimal
weight?|
Formatdecimal

Response Body

application/json
  1. response
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
batchTextRawMaterial?string|null
createdAt?|
Formatdate-time
ediQuantity?|
Formatdecimal
expirationDate?|
Formatdate-time
foreignCurrencyId?|
Formatint32
foreignExchangeRate?|
Formatdecimal
isCancellation?boolean|null
isPartialCancellation?boolean|null
lastModify?|
Formatdate-time
note?string|null
packagePrice?|
Formatdecimal
price?|
Formatdecimal
priceWoVat?|
Formatdecimal
quantity?|
Formatdecimal
quantityBeingCovered?|
Formatdecimal
quantityCoefficient?|
Formatdecimal
quantityCovered?|
Formatdecimal
quantityWeighed?|
Formatdecimal
recyclingFee?|
Formatdecimal
recyclingFeeId?|
Formatint32
royalty?|
Formatdecimal
royaltyId?|
Formatint32
setPrice?|
Formatdecimal
stockPrice?|
Formatdecimal
unitId?|
Formatint32
userId?|
Formatint32
variantId?|
Formatint32
vatRate?|
Formatdecimal
dateOfExchangeRate?|
Formatdate-time
foreignPurchasePriceWoVat?|
Formatdecimal
numberOfPackages?|
Formatdecimal
orderCustomerItemId?|
Formatint32
orderInternetItemId?|
Formatint32
orderSupplierItemId?|
Formatint32
orderedQuantity?|
Formatdecimal
purchasePriceWoVat?|
Formatdecimal
purchasePriceWoVatReceived?|
Formatdecimal
quantityReceived?|
Formatdecimal
supplierProductCode?string|null
unitIdReceived?|
Formatint32
warehouseSellingPrice?|
Formatdecimal
weight?|
Formatdecimal
curl -X PUT 'https://<your-instance>/api/documents/orders/internal/0/items/0' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{  "id": 1,  "purchasePriceWoVatReceived": 100,  "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,      "orderCustomerItemVariantId": 0,      "orderInternetItemVariantId": 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,  "dateOfExchangeRate": "2019-08-24T14:15:22Z",  "foreignPurchasePriceWoVat": 0,  "numberOfPackages": 0,  "orderCustomerItemId": 0,  "orderInternetItemId": 0,  "orderSupplierItemId": 0,  "orderedQuantity": 0,  "purchasePriceWoVat": 0,  "purchasePriceWoVatReceived": 0,  "quantityReceived": 0,  "supplierProductCode": "string",  "unitIdReceived": 0,  "warehouseSellingPrice": 0,  "weight": 0}