Create a customer order
Creates a customer 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.OrderCustomer.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?|int32alreadyPaidAmount?|decimalcontractId?|int32countryId?|int32currencyId?|int32customerId?|int32deliveryAddress?string|nulldeliveryAddressId?|int32deliveryPlanId?|int32distributionWarehouseId?|int32eshopSourceId?|int32exchangeRate?|decimalexportedToParentSystem?boolean|nullincreasedOrderControl?boolean|nullisAssembly?boolean|nullisChanged?boolean|nullisEuRetail?boolean|nullisNotificationEnabled?boolean|nullisOrderBinding?boolean|nullisPaid?boolean|nullisPaidInAdvance?boolean|nullisPdp?boolean|nullisUserLocked?boolean|nullnote2?string|nullnote3?string|nullnote4?string|nullorderAppNumber?|length <= 10orderClosingDate?|date-timepackageNumbers?string|nullpaidOnDate?|date-timepassedToProduction?boolean|nullpaymentTypeId?|int32routeId?|int32sourceId?|int32specificationId?|int32stateChanges?array<>|nulltotalForeignPrice?|decimaltotalStockPrice?|decimaluserLockUserId?|int32warehouseId?|int32ediDocument?string|nullimportation?string|nullapplication/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?|int32alreadyPaidAmount?|decimalcontractId?|int32countryId?|int32currencyId?|int32customerId?|int32deliveryAddress?string|nulldeliveryAddressId?|int32deliveryPlanId?|int32distributionWarehouseId?|int32eshopSourceId?|int32exchangeRate?|decimalexportedToParentSystem?boolean|nullincreasedOrderControl?boolean|nullisAssembly?boolean|nullisChanged?boolean|nullisEuRetail?boolean|nullisNotificationEnabled?boolean|nullisOrderBinding?boolean|nullisPaid?boolean|nullisPaidInAdvance?boolean|nullisPdp?boolean|nullisUserLocked?boolean|nullnote2?string|nullnote3?string|nullnote4?string|nullorderAppNumber?|length <= 10orderClosingDate?|date-timepackageNumbers?string|nullpaidOnDate?|date-timepassedToProduction?boolean|nullpaymentTypeId?|int32routeId?|int32sourceId?|int32specificationId?|int32stateChanges?array<>|nulltotalForeignPrice?|decimaltotalStockPrice?|decimaluserLockUserId?|int32warehouseId?|int32ediDocument?string|nullimportation?string|nullcurl -X POST 'https://<your-instance>/api/documents/orders/customer' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "customerId": 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, "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"}Customers
Previous Page
Search customer orders POST
Returns one page of customer 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.OrderCustomer.View`.