WinShopAPI docs

Update a intake item

Replaces one item of the intake, identified by `itemId`, and recalculates the document totals. Requires `Permissions.Intake.Update`.

PUT
/api/documents/intakes/{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
costs?|
Formatdecimal
countryOfOriginId?|
Formatint32
createdAt?|
Formatdate-time
dateOfExchangeRate?|
Formatdate-time
expirationDate?|
Formatdate-time
foreignCurrencyId?|
Formatint32
foreignExchangeRate?|
Formatdecimal
foreignPurchasePriceWoVat?|
Formatdecimal
guid?|
Formatguid
isCancellation?boolean|null
isExported?boolean|null
isPartialCancellation?boolean|null
lastModify?|
Formatdate-time
locationId?|
Formatint32
minQuantity?|
Formatdecimal
note?string|null
note2?string|null
numberOfPackages?|
Formatdecimal
optQuantity?|
Formatdecimal
orderInternalNumber?|
Formatint32
orderItemId?|
Formatint32
packagePrice?|
Formatdecimal
posId?|
Formatint32
purchasePriceWoVat?|
Formatdecimal
purchasePriceWoVatReceived?|
Formatdecimal
quantity?|
Formatdecimal
quantityBeforeProcessing?|
Formatdecimal
quantityCoefficient?|
Formatdecimal
quantityReceived?|
Formatdecimal
quantityWeighed?|
Formatdecimal
recyclingFee?|
Formatdecimal
recyclingFeeId?|
Formatint32
referencePrice?|
Formatdecimal
referencePurchasePrice?|
Formatdecimal
royalty?|
Formatdecimal
royaltyId?|
Formatint32
setPrice?|
Formatdecimal
stockPrice?|
Formatdecimal
stockPriceBeforeProcessing?|
Formatdecimal
supplierProductCode?|
Lengthlength <= 50
unitId?|
Formatint32
unitIdReceived?|
Formatint32
userId?|
Formatint32
variantId?|
Formatint32
vatRate?|
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
costs?|
Formatdecimal
countryOfOriginId?|
Formatint32
createdAt?|
Formatdate-time
dateOfExchangeRate?|
Formatdate-time
expirationDate?|
Formatdate-time
foreignCurrencyId?|
Formatint32
foreignExchangeRate?|
Formatdecimal
foreignPurchasePriceWoVat?|
Formatdecimal
guid?|
Formatguid
isCancellation?boolean|null
isExported?boolean|null
isPartialCancellation?boolean|null
lastModify?|
Formatdate-time
locationId?|
Formatint32
minQuantity?|
Formatdecimal
note?string|null
note2?string|null
numberOfPackages?|
Formatdecimal
optQuantity?|
Formatdecimal
orderInternalNumber?|
Formatint32
orderItemId?|
Formatint32
packagePrice?|
Formatdecimal
posId?|
Formatint32
purchasePriceWoVat?|
Formatdecimal
purchasePriceWoVatReceived?|
Formatdecimal
quantity?|
Formatdecimal
quantityBeforeProcessing?|
Formatdecimal
quantityCoefficient?|
Formatdecimal
quantityReceived?|
Formatdecimal
quantityWeighed?|
Formatdecimal
recyclingFee?|
Formatdecimal
recyclingFeeId?|
Formatint32
referencePrice?|
Formatdecimal
referencePurchasePrice?|
Formatdecimal
royalty?|
Formatdecimal
royaltyId?|
Formatint32
setPrice?|
Formatdecimal
stockPrice?|
Formatdecimal
stockPriceBeforeProcessing?|
Formatdecimal
supplierProductCode?|
Lengthlength <= 50
unitId?|
Formatint32
unitIdReceived?|
Formatint32
userId?|
Formatint32
variantId?|
Formatint32
vatRate?|
Formatdecimal
curl -X PUT 'https://<your-instance>/api/documents/intakes/0/items/0' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{  "items": [    {      "productId": 5,      "purchasePriceWoVatReceived": 250,      "quantityReceived": 100,      "vatRate": 21    }  ],  "supplierId": 1,  "warehouseId": 2}'
{  "id": 0,  "internalNumber": 0,  "item": 0,  "productId": 0,  "variants": [    {      "colorId": 0,      "dimensionId": 0,      "id": 0,      "itemId": 0,      "lengthId": 0,      "quantity": 0,      "sizeId": 0,      "orderSupplierItemVariantId": 0,      "price": 0,      "price1": 0,      "price10": 0,      "price10WoVat": 0,      "price11": 0,      "price11WoVat": 0,      "price12": 0,      "price12WoVat": 0,      "price13": 0,      "price13WoVat": 0,      "price14": 0,      "price14WoVat": 0,      "price15": 0,      "price15WoVat": 0,      "price1WoVat": 0,      "price2": 0,      "price2WoVat": 0,      "price3": 0,      "price3WoVat": 0,      "price4": 0,      "price4WoVat": 0,      "price5": 0,      "price5WoVat": 0,      "price6": 0,      "price6WoVat": 0,      "price7": 0,      "price7WoVat": 0,      "price8": 0,      "price8WoVat": 0,      "price9": 0,      "price9WoVat": 0,      "priceWoVat": 0    }  ],  "barcode": "string",  "batchId": 0,  "costs": 0,  "countryOfOriginId": 0,  "createdAt": "2019-08-24T14:15:22Z",  "dateOfExchangeRate": "2019-08-24T14:15:22Z",  "expirationDate": "2019-08-24T14:15:22Z",  "foreignCurrencyId": 0,  "foreignExchangeRate": 0,  "foreignPurchasePriceWoVat": 0,  "guid": "string",  "isCancellation": true,  "isExported": true,  "isPartialCancellation": true,  "lastModify": "2019-08-24T14:15:22Z",  "locationId": 0,  "minQuantity": 0,  "note": "string",  "note2": "string",  "numberOfPackages": 0,  "optQuantity": 0,  "orderInternalNumber": 0,  "orderItemId": 0,  "packagePrice": 0,  "posId": 0,  "purchasePriceWoVat": 0,  "purchasePriceWoVatReceived": 0,  "quantity": 0,  "quantityBeforeProcessing": 0,  "quantityCoefficient": 0,  "quantityReceived": 0,  "quantityWeighed": 0,  "recyclingFee": 0,  "recyclingFeeId": 0,  "referencePrice": 0,  "referencePurchasePrice": 0,  "royalty": 0,  "royaltyId": 0,  "setPrice": 0,  "stockPrice": 0,  "stockPriceBeforeProcessing": 0,  "supplierProductCode": "string",  "unitId": 0,  "unitIdReceived": 0,  "userId": 0,  "variantId": 0,  "vatRate": 0}