Create a supplier order
Creates a supplier order from the header and any items in the body, and returns the stored document (201, `Location` header set). Reserves the next internal document number. Requires `Permissions.OrderSupplier.Create`.
BearerAuthorizationBearer <token>OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.
application/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 POST 'https://<your-instance>/api/documents/orders/supplier' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "supplierId": 2, "warehouseId": 1}'{ "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}Supplier
Previous Page
Search supplier orders POST
Returns one page of supplier orders matching the filter. Body is a `PaginationRequest` — see the *Filtering & pagination* concept in the developer docs. Sortable and limitable fields depend on the instance's data-grid view. Requires `Permissions.OrderSupplier.View`.