WinShopAPI docs
ReferenceDocumentsOrdersSupplier

Update a supplier order item

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

PUT
/api/documents/orders/supplier/{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
countryOfOrigin?|
Formatint32
dateOfExchangeRate?|
Formatdate-time
expirations?array<>|null
foreignPurchasePriceWoVat?|
Formatdecimal
purchasePriceWoVat?|
Formatdecimal
purchasePriceWoVatReceived?|
Formatdecimal
quantityReceived?|
Formatdecimal
stockIntakeItemId?|
Formatint32
supplierProductCode?string|null
unitIdReceived?|
Formatint32

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
countryOfOrigin?|
Formatint32
dateOfExchangeRate?|
Formatdate-time
expirations?array<>|null
foreignPurchasePriceWoVat?|
Formatdecimal
purchasePriceWoVat?|
Formatdecimal
purchasePriceWoVatReceived?|
Formatdecimal
quantityReceived?|
Formatdecimal
stockIntakeItemId?|
Formatint32
supplierProductCode?string|null
unitIdReceived?|
Formatint32
curl -X PUT 'https://<your-instance>/api/documents/orders/supplier/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,      "quantityWeighed": 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,  "countryOfOrigin": 0,  "dateOfExchangeRate": "2019-08-24T14:15:22Z",  "expirations": [    {      "expirationDate": "2019-08-24T14:15:22Z",      "id": 0,      "itemId": 0,      "quantityWeighed": 0,      "ssccText": "string"    }  ],  "foreignPurchasePriceWoVat": 0,  "purchasePriceWoVat": 0,  "purchasePriceWoVatReceived": 0,  "quantityReceived": 0,  "stockIntakeItemId": 0,  "supplierProductCode": "string",  "unitIdReceived": 0}