Update a intake
Updates the intake header and the items sent in the body. Pass `removeItemsNotInRequest=true` to also delete the items the body leaves out. Requires `Permissions.Intake.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?|int32cancellationInternalNumber?|int32colorInteger?|int32containsProductsOutsideLimit?boolean|nullcreatedAt?|date-timecustomerBranchId?|int32customerId?|int32dateOfAccountingPosting?|date-timedateOfCreation?|date-timedateOfProcessing?|date-timedateOfTransfer?|date-timedestinationWarehouseId?|int32documentStateId?|int32documentStateUserId?|int32foreignCurrencyId?|int32formNumber?|length <= 150guid?|guidimportation?|length <= 150intrastatCountryOfOriginId?|int32intrastatIntakeDate?|date-timeintrastatMovementCodeId?|int32intrastatSenderCountryId?|int32intrastatTermsOfDeliveryId?|int32intrastatTransactionId?|int32intrastatTransportTypeId?|int32isApproved?boolean|nullisButchering?boolean|nullisCancellation?boolean|nullisCommission?boolean|nullisConfirmed?boolean|nullisExported?boolean|nullisImported?boolean|nullisInternal?boolean|nullisLocked?boolean|nullisPairedWithOrderSupplier?boolean|nullisPartialCancellation?boolean|nullisPrinted?boolean|nullisProcessed?boolean|nullisProduction?boolean|nullisRepricingPrepared?boolean|nulllastModify?|date-timelockOwner?|length <= 80note?string|nullorderCustomerInternalNumber?|int32orderCustomerString?|length <= 50orderSupplierInternalNumber?|int32originalInternalNumber?|int32partialCancellationInternalNumber?|int32paymentTypeId?|int32posId?|int32processedByUserId?|int32repricingInternalNumber?|int32seasonId?|int32sellingPriceCalculationCoefficient?|decimalsupplierId?|int32supplierInvoiceId?|int32totalCosts?|decimaltotalDiscount?|decimaltotalForeignPrice?|decimaltotalNumberOfItems?|int32totalNumberOfPieces?|decimaltotalPrice?|decimaltotalPriceWoVat?|decimaltotalPurchasePrice?|decimaltotalPurchasePriceWoVat?|decimaltransportDriverId?|int32transportTypeId?|int32userId?|int32warehouseId?|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?|int32cancellationInternalNumber?|int32colorInteger?|int32containsProductsOutsideLimit?boolean|nullcreatedAt?|date-timecustomerBranchId?|int32customerId?|int32dateOfAccountingPosting?|date-timedateOfCreation?|date-timedateOfProcessing?|date-timedateOfTransfer?|date-timedestinationWarehouseId?|int32documentStateId?|int32documentStateUserId?|int32foreignCurrencyId?|int32formNumber?|length <= 150guid?|guidimportation?|length <= 150intrastatCountryOfOriginId?|int32intrastatIntakeDate?|date-timeintrastatMovementCodeId?|int32intrastatSenderCountryId?|int32intrastatTermsOfDeliveryId?|int32intrastatTransactionId?|int32intrastatTransportTypeId?|int32isApproved?boolean|nullisButchering?boolean|nullisCancellation?boolean|nullisCommission?boolean|nullisConfirmed?boolean|nullisExported?boolean|nullisImported?boolean|nullisInternal?boolean|nullisLocked?boolean|nullisPairedWithOrderSupplier?boolean|nullisPartialCancellation?boolean|nullisPrinted?boolean|nullisProcessed?boolean|nullisProduction?boolean|nullisRepricingPrepared?boolean|nulllastModify?|date-timelockOwner?|length <= 80note?string|nullorderCustomerInternalNumber?|int32orderCustomerString?|length <= 50orderSupplierInternalNumber?|int32originalInternalNumber?|int32partialCancellationInternalNumber?|int32paymentTypeId?|int32posId?|int32processedByUserId?|int32repricingInternalNumber?|int32seasonId?|int32sellingPriceCalculationCoefficient?|decimalsupplierId?|int32supplierInvoiceId?|int32totalCosts?|decimaltotalDiscount?|decimaltotalForeignPrice?|decimaltotalNumberOfItems?|int32totalNumberOfPieces?|decimaltotalPrice?|decimaltotalPriceWoVat?|decimaltotalPurchasePrice?|decimaltotalPurchasePriceWoVat?|decimaltransportDriverId?|int32transportTypeId?|int32userId?|int32warehouseId?|int32curl -X PUT 'https://<your-instance>/api/documents/intakes/0' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "note": "Updated delivery notes"}'{ "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, "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 } ], "branchId": 0, "cancellationInternalNumber": 0, "colorInteger": 0, "containsProductsOutsideLimit": true, "createdAt": "2019-08-24T14:15:22Z", "customerBranchId": 0, "customerId": 0, "dateOfAccountingPosting": "2019-08-24T14:15:22Z", "dateOfCreation": "2019-08-24T14:15:22Z", "dateOfProcessing": "2019-08-24T14:15:22Z", "dateOfTransfer": "2019-08-24T14:15:22Z", "destinationWarehouseId": 0, "documentStateId": 0, "documentStateUserId": 0, "foreignCurrencyId": 0, "formNumber": "string", "guid": "string", "importation": "string", "intrastatCountryOfOriginId": 0, "intrastatIntakeDate": "2019-08-24T14:15:22Z", "intrastatMovementCodeId": 0, "intrastatSenderCountryId": 0, "intrastatTermsOfDeliveryId": 0, "intrastatTransactionId": 0, "intrastatTransportTypeId": 0, "isApproved": true, "isButchering": true, "isCancellation": true, "isCommission": true, "isConfirmed": true, "isExported": true, "isImported": true, "isInternal": true, "isLocked": true, "isPairedWithOrderSupplier": true, "isPartialCancellation": true, "isPrinted": true, "isProcessed": true, "isProduction": true, "isRepricingPrepared": true, "lastModify": "2019-08-24T14:15:22Z", "lockOwner": "string", "note": "string", "orderCustomerInternalNumber": 0, "orderCustomerString": "string", "orderSupplierInternalNumber": 0, "originalInternalNumber": 0, "partialCancellationInternalNumber": 0, "paymentTypeId": 0, "posId": 0, "processedByUserId": 0, "repricingInternalNumber": 0, "seasonId": 0, "sellingPriceCalculationCoefficient": 0, "supplierId": 0, "supplierInvoiceId": 0, "totalCosts": 0, "totalDiscount": 0, "totalForeignPrice": 0, "totalNumberOfItems": 0, "totalNumberOfPieces": 0, "totalPrice": 0, "totalPriceWoVat": 0, "totalPurchasePrice": 0, "totalPurchasePriceWoVat": 0, "transportDriverId": 0, "transportTypeId": 0, "userId": 0, "warehouseId": 0}Delete a intake DELETE
Deletes the intake 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.Intake.Delete`.
Cancel an intake POST
Reverses a processed intake: creates a copy with negated quantities, processes it so the stock movement is undone, marks the original as cancelled, and returns the reversing document. Requires `Permissions.Intake.Update`.