WinShopAPI docs

Create a intake

Creates a intake 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.Intake.Create`.

POST
/api/documents/intakes

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.

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
cancellationInternalNumber?|
Formatint32
colorInteger?|
Formatint32
containsProductsOutsideLimit?boolean|null
createdAt?|
Formatdate-time
customerBranchId?|
Formatint32
customerId?|
Formatint32
dateOfAccountingPosting?|
Formatdate-time
dateOfCreation?|
Formatdate-time
dateOfProcessing?|
Formatdate-time
dateOfTransfer?|
Formatdate-time
destinationWarehouseId?|
Formatint32
documentStateId?|
Formatint32
documentStateUserId?|
Formatint32
foreignCurrencyId?|
Formatint32
formNumber?|
Lengthlength <= 150
guid?|
Formatguid
importation?|
Lengthlength <= 150
intrastatCountryOfOriginId?|
Formatint32
intrastatIntakeDate?|
Formatdate-time
intrastatMovementCodeId?|
Formatint32
intrastatSenderCountryId?|
Formatint32
intrastatTermsOfDeliveryId?|
Formatint32
intrastatTransactionId?|
Formatint32
intrastatTransportTypeId?|
Formatint32
isApproved?boolean|null
isButchering?boolean|null
isCancellation?boolean|null
isCommission?boolean|null
isConfirmed?boolean|null
isExported?boolean|null
isImported?boolean|null
isInternal?boolean|null
isLocked?boolean|null
isPairedWithOrderSupplier?boolean|null
isPartialCancellation?boolean|null
isPrinted?boolean|null
isProcessed?boolean|null
isProduction?boolean|null
isRepricingPrepared?boolean|null
lastModify?|
Formatdate-time
lockOwner?|
Lengthlength <= 80
note?string|null
orderCustomerInternalNumber?|
Formatint32
orderCustomerString?|
Lengthlength <= 50
orderSupplierInternalNumber?|
Formatint32
originalInternalNumber?|
Formatint32
partialCancellationInternalNumber?|
Formatint32
paymentTypeId?|
Formatint32
posId?|
Formatint32
processedByUserId?|
Formatint32
repricingInternalNumber?|
Formatint32
seasonId?|
Formatint32
sellingPriceCalculationCoefficient?|
Formatdecimal
supplierId?|
Formatint32
supplierInvoiceId?|
Formatint32
totalCosts?|
Formatdecimal
totalDiscount?|
Formatdecimal
totalForeignPrice?|
Formatdecimal
totalNumberOfItems?|
Formatint32
totalNumberOfPieces?|
Formatdecimal
totalPrice?|
Formatdecimal
totalPriceWoVat?|
Formatdecimal
totalPurchasePrice?|
Formatdecimal
totalPurchasePriceWoVat?|
Formatdecimal
transportDriverId?|
Formatint32
transportTypeId?|
Formatint32
userId?|
Formatint32
warehouseId?|
Formatint32

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
cancellationInternalNumber?|
Formatint32
colorInteger?|
Formatint32
containsProductsOutsideLimit?boolean|null
createdAt?|
Formatdate-time
customerBranchId?|
Formatint32
customerId?|
Formatint32
dateOfAccountingPosting?|
Formatdate-time
dateOfCreation?|
Formatdate-time
dateOfProcessing?|
Formatdate-time
dateOfTransfer?|
Formatdate-time
destinationWarehouseId?|
Formatint32
documentStateId?|
Formatint32
documentStateUserId?|
Formatint32
foreignCurrencyId?|
Formatint32
formNumber?|
Lengthlength <= 150
guid?|
Formatguid
importation?|
Lengthlength <= 150
intrastatCountryOfOriginId?|
Formatint32
intrastatIntakeDate?|
Formatdate-time
intrastatMovementCodeId?|
Formatint32
intrastatSenderCountryId?|
Formatint32
intrastatTermsOfDeliveryId?|
Formatint32
intrastatTransactionId?|
Formatint32
intrastatTransportTypeId?|
Formatint32
isApproved?boolean|null
isButchering?boolean|null
isCancellation?boolean|null
isCommission?boolean|null
isConfirmed?boolean|null
isExported?boolean|null
isImported?boolean|null
isInternal?boolean|null
isLocked?boolean|null
isPairedWithOrderSupplier?boolean|null
isPartialCancellation?boolean|null
isPrinted?boolean|null
isProcessed?boolean|null
isProduction?boolean|null
isRepricingPrepared?boolean|null
lastModify?|
Formatdate-time
lockOwner?|
Lengthlength <= 80
note?string|null
orderCustomerInternalNumber?|
Formatint32
orderCustomerString?|
Lengthlength <= 50
orderSupplierInternalNumber?|
Formatint32
originalInternalNumber?|
Formatint32
partialCancellationInternalNumber?|
Formatint32
paymentTypeId?|
Formatint32
posId?|
Formatint32
processedByUserId?|
Formatint32
repricingInternalNumber?|
Formatint32
seasonId?|
Formatint32
sellingPriceCalculationCoefficient?|
Formatdecimal
supplierId?|
Formatint32
supplierInvoiceId?|
Formatint32
totalCosts?|
Formatdecimal
totalDiscount?|
Formatdecimal
totalForeignPrice?|
Formatdecimal
totalNumberOfItems?|
Formatint32
totalNumberOfPieces?|
Formatdecimal
totalPrice?|
Formatdecimal
totalPriceWoVat?|
Formatdecimal
totalPurchasePrice?|
Formatdecimal
totalPurchasePriceWoVat?|
Formatdecimal
transportDriverId?|
Formatint32
transportTypeId?|
Formatint32
userId?|
Formatint32
warehouseId?|
Formatint32
curl -X POST 'https://<your-instance>/api/documents/intakes' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{  "items": [    {      "productId": 7,      "purchasePriceWoVatReceived": 60,      "quantityReceived": 10,      "unitIdReceived": 5,      "vatRate": 21    }  ],  "supplierId": 1,  "warehouseId": 2}'
{  "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}