Update a supplier order
Updates the supplier order header and the items sent in the body. Pass `removeItemsNotInRequest=true` to also delete the items the body leaves out. Requires `Permissions.OrderSupplier.Update`.
BearerAuthorizationBearer <token>OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.
documentId*integerint32removeItemsNotInRequest?boolean|nullapplication/json- body
id?|Row id of the document. Read-only; the server assigns it.
int32internalNumber?|Internal document number, unique within the document type and reserved when the document is created. Read-only.
int32items?array<>|The document's items. Null when the document was loaded without them.
branchId?|int32createdAt?|date-timecustomDocumentStateId?|int32customDocumentStateUserId?|int32dateOfOrder?|date-timedateOfTransfer?|date-timedeliveryDate?|date-timedocumentState?|int32driverId?|int32formNumber?|length <= 150isApproved?boolean|nullisCancellation?boolean|nullisConfirmed?boolean|nullisCovered?boolean|nullisEdiImported?boolean|nullisExported?boolean|nullisImported?boolean|nullisLocked?boolean|nullisPrinted?boolean|nullisProcessed?boolean|nulllastModify?|date-timelockOwner?|length <= 80note?string|nullsectorId?|int32timeSpent?|int32totalNumberOfItems?|int32totalNumberOfPieces?|decimaltotalPrice?|decimaltotalPriceWoVat?|decimaltotalStockPriceWoVat?|decimaltransportTypeId?|int32userId?|int32customerBranchId?|int32customerId?|int32destinationWarehouseId?|int32isRemitenda?boolean|nullnumberOfPallets?|int32packageNumbers?string|nullpaymentTypeId?|int32seasonId?|int32supplierId?|int32totalForeignPrice?|decimaltotalPurchasePrice?|decimaltotalPurchasePriceWoVat?|decimalwarehouseId?|int32application/json- response
id?|Row id of the document. Read-only; the server assigns it.
int32internalNumber?|Internal document number, unique within the document type and reserved when the document is created. Read-only.
int32items?array<>|The document's items. Null when the document was loaded without them.
branchId?|int32createdAt?|date-timecustomDocumentStateId?|int32customDocumentStateUserId?|int32dateOfOrder?|date-timedateOfTransfer?|date-timedeliveryDate?|date-timedocumentState?|int32driverId?|int32formNumber?|length <= 150isApproved?boolean|nullisCancellation?boolean|nullisConfirmed?boolean|nullisCovered?boolean|nullisEdiImported?boolean|nullisExported?boolean|nullisImported?boolean|nullisLocked?boolean|nullisPrinted?boolean|nullisProcessed?boolean|nulllastModify?|date-timelockOwner?|length <= 80note?string|nullsectorId?|int32timeSpent?|int32totalNumberOfItems?|int32totalNumberOfPieces?|decimaltotalPrice?|decimaltotalPriceWoVat?|decimaltotalStockPriceWoVat?|decimaltransportTypeId?|int32userId?|int32customerBranchId?|int32customerId?|int32destinationWarehouseId?|int32isRemitenda?boolean|nullnumberOfPallets?|int32packageNumbers?string|nullpaymentTypeId?|int32seasonId?|int32supplierId?|int32totalForeignPrice?|decimaltotalPurchasePrice?|decimaltotalPurchasePriceWoVat?|decimalwarehouseId?|int32curl -X PUT 'https://<your-instance>/api/documents/orders/supplier/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, "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 } ], "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, "customerBranchId": 0, "customerId": 0, "destinationWarehouseId": 0, "isRemitenda": true, "numberOfPallets": 0, "packageNumbers": "string", "paymentTypeId": 0, "seasonId": 0, "supplierId": 0, "totalForeignPrice": 0, "totalPurchasePrice": 0, "totalPurchasePriceWoVat": 0, "warehouseId": 0}Delete a supplier order DELETE
Deletes the supplier order together with its items and item variants. Cannot be undone. Call `GET {documentId}/check-delete` first to find out whether the delete is allowed. Requires `Permissions.OrderSupplier.Delete`.
Check whether a supplier order can be deleted GET
Advisory pre-flight for `DELETE {documentId}`. `canBeDeleted` is false when `blockingReasons` holds `HEADER_BLOCKED` or `ITEMS_BLOCKED`. The delete re-checks inside its own transaction, so a positive answer here is an indication rather than a guarantee. Requires `Permissions.OrderSupplier.Delete`.