WinShopAPI docs
ReferenceDocumentsOrdersCustomers

Update a customer order

Updates the customer order header and the items sent in the body. Pass `removeItemsNotInRequest=true` to also delete the items the body leaves out. Requires `Permissions.OrderCustomer.Update`.

PUT
/api/documents/orders/customer/{documentId}

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

Query Parameters

removeItemsNotInRequest?boolean|null

Request Body

application/json
  1. body
id?|

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

Formatint32
internalNumber?|

Internal document number, unique within the document type and reserved when the document is created. Read-only.

Formatint32
items?array<>|

The document's items. Null when the document was loaded without them.

branchId?|
Formatint32
createdAt?|
Formatdate-time
customDocumentStateId?|
Formatint32
customDocumentStateUserId?|
Formatint32
dateOfOrder?|
Formatdate-time
dateOfTransfer?|
Formatdate-time
deliveryDate?|
Formatdate-time
documentState?|
Formatint32
driverId?|
Formatint32
formNumber?|
Lengthlength <= 150
isApproved?boolean|null
isCancellation?boolean|null
isConfirmed?boolean|null
isCovered?boolean|null
isEdiImported?boolean|null
isExported?boolean|null
isImported?boolean|null
isLocked?boolean|null
isPrinted?boolean|null
isProcessed?boolean|null
lastModify?|
Formatdate-time
lockOwner?|
Lengthlength <= 80
note?string|null
sectorId?|
Formatint32
timeSpent?|
Formatint32
totalNumberOfItems?|
Formatint32
totalNumberOfPieces?|
Formatdecimal
totalPrice?|
Formatdecimal
totalPriceWoVat?|
Formatdecimal
totalStockPriceWoVat?|
Formatdecimal
transportTypeId?|
Formatint32
userId?|
Formatint32
alreadyPaidAmount?|
Formatdecimal
contractId?|
Formatint32
countryId?|
Formatint32
currencyId?|
Formatint32
customerId?|
Formatint32
deliveryAddress?string|null
deliveryAddressId?|
Formatint32
deliveryPlanId?|
Formatint32
distributionWarehouseId?|
Formatint32
eshopSourceId?|
Formatint32
exchangeRate?|
Formatdecimal
exportedToParentSystem?boolean|null
increasedOrderControl?boolean|null
isAssembly?boolean|null
isChanged?boolean|null
isEuRetail?boolean|null
isNotificationEnabled?boolean|null
isOrderBinding?boolean|null
isPaid?boolean|null
isPaidInAdvance?boolean|null
isPdp?boolean|null
isUserLocked?boolean|null
note2?string|null
note3?string|null
note4?string|null
orderAppNumber?|
Lengthlength <= 10
orderClosingDate?|
Formatdate-time
packageNumbers?string|null
paidOnDate?|
Formatdate-time
passedToProduction?boolean|null
paymentTypeId?|
Formatint32
routeId?|
Formatint32
sourceId?|
Formatint32
specificationId?|
Formatint32
stateChanges?array<>|null
totalForeignPrice?|
Formatdecimal
totalStockPrice?|
Formatdecimal
userLockUserId?|
Formatint32
warehouseId?|
Formatint32
ediDocument?string|null
importation?string|null

Response Body

application/json
  1. response
id?|

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

Formatint32
internalNumber?|

Internal document number, unique within the document type and reserved when the document is created. Read-only.

Formatint32
items?array<>|

The document's items. Null when the document was loaded without them.

branchId?|
Formatint32
createdAt?|
Formatdate-time
customDocumentStateId?|
Formatint32
customDocumentStateUserId?|
Formatint32
dateOfOrder?|
Formatdate-time
dateOfTransfer?|
Formatdate-time
deliveryDate?|
Formatdate-time
documentState?|
Formatint32
driverId?|
Formatint32
formNumber?|
Lengthlength <= 150
isApproved?boolean|null
isCancellation?boolean|null
isConfirmed?boolean|null
isCovered?boolean|null
isEdiImported?boolean|null
isExported?boolean|null
isImported?boolean|null
isLocked?boolean|null
isPrinted?boolean|null
isProcessed?boolean|null
lastModify?|
Formatdate-time
lockOwner?|
Lengthlength <= 80
note?string|null
sectorId?|
Formatint32
timeSpent?|
Formatint32
totalNumberOfItems?|
Formatint32
totalNumberOfPieces?|
Formatdecimal
totalPrice?|
Formatdecimal
totalPriceWoVat?|
Formatdecimal
totalStockPriceWoVat?|
Formatdecimal
transportTypeId?|
Formatint32
userId?|
Formatint32
alreadyPaidAmount?|
Formatdecimal
contractId?|
Formatint32
countryId?|
Formatint32
currencyId?|
Formatint32
customerId?|
Formatint32
deliveryAddress?string|null
deliveryAddressId?|
Formatint32
deliveryPlanId?|
Formatint32
distributionWarehouseId?|
Formatint32
eshopSourceId?|
Formatint32
exchangeRate?|
Formatdecimal
exportedToParentSystem?boolean|null
increasedOrderControl?boolean|null
isAssembly?boolean|null
isChanged?boolean|null
isEuRetail?boolean|null
isNotificationEnabled?boolean|null
isOrderBinding?boolean|null
isPaid?boolean|null
isPaidInAdvance?boolean|null
isPdp?boolean|null
isUserLocked?boolean|null
note2?string|null
note3?string|null
note4?string|null
orderAppNumber?|
Lengthlength <= 10
orderClosingDate?|
Formatdate-time
packageNumbers?string|null
paidOnDate?|
Formatdate-time
passedToProduction?boolean|null
paymentTypeId?|
Formatint32
routeId?|
Formatint32
sourceId?|
Formatint32
specificationId?|
Formatint32
stateChanges?array<>|null
totalForeignPrice?|
Formatdecimal
totalStockPrice?|
Formatdecimal
userLockUserId?|
Formatint32
warehouseId?|
Formatint32
ediDocument?string|null
importation?string|null
curl -X PUT 'https://<your-instance>/api/documents/orders/customer/0' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{  "note": "Updated Note"}'
{  "id": 0,  "internalNumber": 0,  "items": [    {      "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,          "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,      "contractId": 0,      "deliveryDate": "2019-08-24T14:15:22Z",      "discount": 0,      "dontOrder": true,      "foreignCurrency": "string",      "foreignPrice": 0,      "insuranceId": 0,      "insurancePrice": 0,      "numberOfPackages": 0,      "orderSupplierItemId": 0,      "orderedQuantity": 0,      "priceWoVatIssued": 0,      "quantityIssued": 0,      "takeAway": true,      "unitIdIssued": 0,      "warehouseId": 0,      "warehouseSellingPrice": 0,      "weight": 0    }  ],  "branchId": 0,  "createdAt": "2019-08-24T14:15:22Z",  "customDocumentStateId": 0,  "customDocumentStateUserId": 0,  "dateOfOrder": "2019-08-24T14:15:22Z",  "dateOfTransfer": "2019-08-24T14:15:22Z",  "deliveryDate": "2019-08-24T14:15:22Z",  "documentState": 0,  "driverId": 0,  "formNumber": "string",  "isApproved": true,  "isCancellation": true,  "isConfirmed": true,  "isCovered": true,  "isEdiImported": true,  "isExported": true,  "isImported": true,  "isLocked": true,  "isPrinted": true,  "isProcessed": true,  "lastModify": "2019-08-24T14:15:22Z",  "lockOwner": "string",  "note": "string",  "sectorId": 0,  "timeSpent": 0,  "totalNumberOfItems": 0,  "totalNumberOfPieces": 0,  "totalPrice": 0,  "totalPriceWoVat": 0,  "totalStockPriceWoVat": 0,  "transportTypeId": 0,  "userId": 0,  "alreadyPaidAmount": 0,  "contractId": 0,  "countryId": 0,  "currencyId": 0,  "customerId": 0,  "deliveryAddress": "string",  "deliveryAddressId": 0,  "deliveryPlanId": 0,  "distributionWarehouseId": 0,  "eshopSourceId": 0,  "exchangeRate": 0,  "exportedToParentSystem": true,  "increasedOrderControl": true,  "isAssembly": true,  "isChanged": true,  "isEuRetail": true,  "isNotificationEnabled": true,  "isOrderBinding": true,  "isPaid": true,  "isPaidInAdvance": true,  "isPdp": true,  "isUserLocked": true,  "note2": "string",  "note3": "string",  "note4": "string",  "orderAppNumber": "string",  "orderClosingDate": "2019-08-24T14:15:22Z",  "packageNumbers": "string",  "paidOnDate": "2019-08-24T14:15:22Z",  "passedToProduction": true,  "paymentTypeId": 0,  "routeId": 0,  "sourceId": 0,  "specificationId": 0,  "stateChanges": [    {      "customDocumentStateId": 0,      "customDocumentStateUserId": 0,      "dateOfChange": "2019-08-24T14:15:22Z",      "id": 0    }  ],  "totalForeignPrice": 0,  "totalStockPrice": 0,  "userLockUserId": 0,  "warehouseId": 0,  "ediDocument": "string",  "importation": "string"}