> For the complete documentation index, see [llms.txt](https://dev.skladon.com/main/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.skladon.com/main/integration/api/receivings.md).

# Receivings

You may find descriptions of endpoints for work with receivings bellow.

## Filter receivings (grid)

> Paged receiving (ASN) search. Body: \`#/definitions/V21GridRequestGeneric\`.\
> Use \*\*receiving\*\* column names from that definition in \`columns\`, \`sorts\`, and \`filters\`.<br>

```json
{"openapi":"3.1.1","info":{"title":"GWMS API v2.1 (v21)","version":"2.1.0"},"tags":[{"name":"Receivings","description":"Receivings (ASN)"}],"servers":[{"url":"https://gw.new.skladon.net/v21"}],"security":[{"authorization":[],"XApiKey":[]}],"components":{"securitySchemes":{"authorization":{"type":"apiKey","name":"authorization","in":"header"}},"parameters":{"HeaderXApiKey":{"schema":{"type":"string"},"name":"x-api-key","in":"header","required":true,"description":"Eshop API key from onboarding"},"HeaderAuthorization":{"schema":{"type":"string"},"name":"authorization","in":"header","required":true,"description":"Bearer JWT from POST /v21/users/login"}},"schemas":{"V21GenericGridResponse":{"type":"object","description":"Grid result envelope. `data.data` is an array of row objects (shape depends on requested `columns`).\n`data.request` echoes the grid request. `data.totalCount` is the total number of matching rows (for pagination).\n","required":["statusCode","message"],"properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"data":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"request":{"type":"object"},"totalCount":{"type":"number"}}}}},"ErrorMessageResponse":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"V21GridRequestGeneric":{"type":"object","description":"Paged list / search body for all `POST …/filter` endpoints.\n\n**Top-level fields**\n- `page` (integer ≥ 1, default 1)\n- `items` (page size, 1–1000, default 10)\n- `columns` (string[]): which fields each row should include; **empty array = all columns** for that grid\n- `sorts`: array of `{ column, direction }`; `direction` is `ASC`, `DESC`, `asc`, or `desc`\n- `filters`: **OR of AND-groups**. Outer array = OR. Each inner array = AND of conditions. Each condition = `{ column, operator, value }`.\n\n**Filter operators** (unless noted for stock movements only)\n- `eq` / `neq` — equal / not equal\n- `gt` / `gte` / `lt` / `lte` — comparisons\n- `in` / `nin` — value must be an **array** of scalars in `value`\n- `like` / `nlike` — substring match / not match\n- `between` / `nbetween` — `value` must be an **array of two** endpoints\n- `null` / `notnull` — column IS NULL / IS NOT NULL\n- `empty` / `notempty` — null or empty string / neither\n- **Stock movements only** (this endpoint’s filters): `likein` is also allowed (same family as `like`).\n\n**`value` type**: string, number, boolean, array, or `null`, depending on `operator` (e.g. `in`/`nin`/`between` expect arrays as above).\n\n---\n\n**Column names for `POST /products/filter`** (also use these in `sorts[].column` and filter `column`):\n`id`, `customField1`, `customField2`, `customField3`, `description`, `ean`, `expMethod`, `guid`, `hsCode`, `isbn`, `mpn`, `name`, `note`, `price`, `productType`, `rop`, `sku`, `upc`, `active`, `scanSerialNumber`, `originCountry`, `snRegex`, `unitPrice`, `weight`, `width`, `height`, `length`, `insertToProductSkus`, `insertToCountries`, `insertType`, `insertByOrderType`, `insertPriceFrom`, `insertPriceTo`, `expirationDays`, `createdAt`, `updatedAt`, `dimensionsChangedAt`, `deletedAt`, `quantityConversion`, `isDeleted`, `ageCheck`, `batteryType`.\n\n**Column names for `POST /orders/filter`**:\n`id`, `addressId`, `allowExpedition`, `billingAddressAdditionalInfo`, `billingAddressAdditionalInfo2`, `billingAttentionName`, `billingCity`, `billingCompanyId`, `billingCompanyName`, `billingEmail`, `billingName`, `billingPhone`, `billingPostCode`, `billingProvinceCode`, `billingState`, `billingStreet`, `billingTaxId`, `codCurrency`, `codPrice`, `codRefNumber`, `currency`, `eshopOrderId`, `invoiceDate`, `invoiceNumber`, `marketplace`, `message`, `method`, `note`, `orderType`, `paid`, `partnerOrderId`, `paymentMethod`, `price`, `printFiles`, `holdByQuality`, `underSanction`, `priority`, `recipientAddressAdditionalInfo`, `recipientAddressAdditionalInfo2`, `recipientAttentionName`, `recipientCity`, `recipientCompanyId`, `recipientCompanyName`, `recipientEmail`, `recipientName`, `recipientPhone`, `recipientPostCode`, `recipientProvinceCode`, `recipientState`, `recipientStreet`, `recipientTaxId`, `shipper`, `shipperServiceCode`, `shippingPrice`, `branchId`, `status`, `timestamp`, `requiredExpeditionDate`, `trackingNumbers`, `recipientGln`, `billingGln`, `deliveredAt`, `canceledAt`, `disableShippingReorder`, `updatedAt`, `waitingForPaymentAt`, `productsNotAvailableAt`, `suspendedAt`, `releaseFromSuspendedAt`, `incorrectAt`, `waitingForShipmentAt`, `shipmentOrderedAt`, `inProcessAt`, `packedAt`, `waitingForCarrierAt`, `shippedAt`, `returningBackAt`, `returnedBackAt`, `parentOrderId`, `parentEshopOrderId`, `returnTrackingNumber`, `exchangeTrackingNumber`, `eshopNote`, `orderBoxCount`, `incorrectOrderMessage`.\n(v21 order **write** payloads do not support `recipientAddressAdditionalInfo2` / `billingAddressAdditionalInfo2`; they may still appear as **read-only** grid fields.)\n\n**Column names for `POST /receivings/filter`**:\n`eshopReceivingId`, `deliveryNoteNumber`, `deliveryType`, `description`, `driverCompany`, `driverDispatcherContact`, `driverName`, `driverPhone`, `driverTrailerLicensePlate`, `duty`, `estimatedDelivery`, `status`, `supplier`, `trackingNumber`, `unitsAmount`, `urgent`, `eshopNote`, `priority`, `containerNumber`, `announcedPalletsCount`, `receivingType`, `incoterms`, `realDelivery`, `slaSuspended`, `photoDocumentationTaken`, `deliveredPalletsCount`, `deliveredCartonsCount`, `returnedEurPalletsCount`, `deliveredStandardPalletsCount`, `returnedStandardPalletsCount`, `deliveredOtherPalletsCount`, `deliveredBrokenPalletsCount`, `skladonNote`, `unloadedAt`, `receivedAt`, `confirmedAt`, `canceledAt`.\n\n**Column names for `POST /returns/filter`**:\n`description`, `eshopReturnId`, `eshopOrderId`, `note`, `orderType`, `shipper`, `shipperServiceCode`, `status`, `trackingNumber`, `rma`, `createdAt`, `canceledAt`, `confirmedAt`, `eshopNote`.\n\n**Column names for `POST /claims/filter`**:\n`eshopClaimId`, `eshopOrderId`, `description`, `note`, `claimCause`, `claimOtherType`, `status`, `createdAt`, `resolutionText`, `resolver`, `eshopNote`.\n\n**Column names for `POST /stock-movements/filter`**:\n`count`, `createdAt`, `updatedAt`, `expirationDate`, `id`, `lot`, `sku`, `type`.\n","properties":{"page":{"type":"integer","minimum":1,"default":1},"items":{"type":"integer","minimum":1,"maximum":1000,"default":10},"columns":{"type":"array","items":{"type":"string"}},"sorts":{"type":"array","items":{"type":"object","required":["column","direction"],"properties":{"column":{"type":"string"},"direction":{"type":"string","enum":["ASC","DESC","asc","desc"]}}}},"filters":{"type":"array","description":"Outer array = OR of groups. Each inner array = AND of `{ column, operator, value }`.\nOperators and allowed `column` values are documented on `V21GridRequestGeneric`.\n","items":{"type":"array","items":{"type":"object","required":["column","operator","value"],"properties":{"column":{"type":"string"},"operator":{"type":"string","description":"Filter operator; see `V21GridRequestGeneric` for the full list.\nStock-movement filters also support `likein`.\n"},"value":{"description":"Scalar, array, or null — depends on operator (e.g. `in`/`nin`/`between` use arrays)."}}}}}}}}},"paths":{"/receivings/filter":{"post":{"tags":["Receivings"],"summary":"Filter receivings (grid)","description":"Paged receiving (ASN) search. Body: `#/definitions/V21GridRequestGeneric`.\nUse **receiving** column names from that definition in `columns`, `sorts`, and `filters`.\n","operationId":"v21_postReceivingsFilter","parameters":[{"$ref":"#/components/parameters/HeaderXApiKey"},{"$ref":"#/components/parameters/HeaderAuthorization"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V21GenericGridResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V21GridRequestGeneric"}}},"required":true}}}}}
```

## POST /receivings

> Create receiving

```json
{"openapi":"3.1.1","info":{"title":"GWMS API v2.1 (v21)","version":"2.1.0"},"tags":[{"name":"Receivings","description":"Receivings (ASN)"}],"servers":[{"url":"https://gw.new.skladon.net/v21"}],"security":[{"authorization":[],"XApiKey":[]}],"components":{"securitySchemes":{"authorization":{"type":"apiKey","name":"authorization","in":"header"}},"parameters":{"HeaderXApiKey":{"schema":{"type":"string"},"name":"x-api-key","in":"header","required":true,"description":"Eshop API key from onboarding"},"HeaderAuthorization":{"schema":{"type":"string"},"name":"authorization","in":"header","required":true,"description":"Bearer JWT from POST /v21/users/login"}},"schemas":{"V21ReceivingResponseEnvelope":{"type":"object","required":["statusCode","message"],"properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/V21ReceivingResponse"}}},"V21ReceivingResponse":{"allOf":[{"$ref":"#/components/schemas/V21ReceivingBody"},{"type":"object","properties":{"eshopReceivingId":{"type":"string"},"id":{"type":"integer"},"asn":{"type":"string"},"createdAt":{"type":"string"},"status":{"type":"string"},"slaDate":{"type":"string"},"asnLabelEmail":{"type":"string"},"realDelivery":{"type":"string"},"slaSuspended":{"type":"string"},"photoDocumentationTaken":{"type":"string"},"deliveredPalletsCount":{"type":"integer"},"deliveredCartonsCount":{"type":"integer"},"returnedEurPalletsCount":{"type":"integer"},"deliveredStandardPalletsCount":{"type":"integer"},"returnedStandardPalletsCount":{"type":"integer"},"deliveredOtherPalletsCount":{"type":"integer"},"deliveredBrokenPalletsCount":{"type":"integer"},"skladonNote":{"type":"string"},"unloadedAt":{"type":"string"},"receivedAt":{"type":"string"},"confirmedAt":{"type":"string"},"canceledAt":{"type":"string"}}}]},"V21ReceivingBody":{"type":"object","required":["estimatedDelivery","unitsAmount","products"],"properties":{"description":{"type":"string"},"trackingNumber":{"type":"string"},"supplier":{"type":"string"},"estimatedDelivery":{"type":"string","description":"ISO datetime string"},"deliveryNoteNumber":{"type":"string"},"deliveryType":{"type":"string","enum":["courier","transportCompany","truckingCompany","container"]},"duty":{"type":"boolean"},"carrierInfo":{"type":"string"},"handlingUnits":{"type":"string"},"urgent":{"type":"string"},"unitsAmount":{"type":"integer"},"driverCompany":{"type":"string","enum":["PPL","DPD","GLS","zasilkovna","CP","UPS","TNT","DHL","ALZA","WEDO","other"]},"driverCompanyOtherName":{"type":"string","description":"Required when driverCompany === other"},"driverTrailerLicensePlate":{"type":"string"},"driverName":{"type":"string"},"driverPhone":{"type":"string"},"driverDispatcherContact":{"type":"string"},"eshopNote":{"type":"string"},"priority":{"type":"integer"},"containerNumber":{"type":"string"},"announcedPalletsCount":{"type":"integer"},"receivingType":{"type":"string"},"incoterms":{"type":"string"},"products":{"type":"array","items":{"$ref":"#/components/schemas/V21ReceivingProductLine"}},"packagings":{"type":"array","items":{"$ref":"#/components/schemas/V21ReceivingPackaging"}},"files":{"type":"array","items":{"$ref":"#/components/schemas/V21ReceivingFile"}}}},"V21ReceivingProductLine":{"type":"object","required":["sku","quantity"],"properties":{"sku":{"type":"string","minLength":1},"quantity":{"type":"integer","minimum":1},"lot":{"type":"string"},"expirationDate":{"type":"string"},"productPrice":{"type":"string"},"lineState":{"type":"string"}}},"V21ReceivingPackaging":{"type":"object","required":["packagingType","quantity"],"properties":{"packagingType":{"type":"string","minLength":1},"pallet":{"type":"string"},"quantity":{"type":"integer","minimum":1}}},"V21ReceivingFile":{"type":"object","required":["type","fileName","fileType"],"properties":{"id":{"type":"integer","minimum":1},"data":{"type":"string","description":"Base64; required for new files"},"type":{"type":"string","minLength":1},"fileName":{"type":"string","minLength":1},"fileType":{"type":"string","minLength":1},"fileSize":{"type":"string"},"description":{"type":"string","maxLength":500},"creatorRole":{"type":"string","enum":["skladon_employee","client"]}}},"ErrorMessageResponse":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"V21ReceivingCreate":{"allOf":[{"$ref":"#/components/schemas/V21ReceivingBody"},{"type":"object","required":["eshopReceivingId"],"properties":{"eshopReceivingId":{"type":"string","minLength":1}}}]}}},"paths":{"/receivings":{"post":{"tags":["Receivings"],"summary":"Create receiving","operationId":"v21_postReceivings","parameters":[{"$ref":"#/components/parameters/HeaderXApiKey"},{"$ref":"#/components/parameters/HeaderAuthorization"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V21ReceivingResponseEnvelope"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V21ReceivingCreate"}}},"required":true}}}}}
```

## GET /receivings/{eshopReceivingId}

> Get receiving detail

```json
{"openapi":"3.1.1","info":{"title":"GWMS API v2.1 (v21)","version":"2.1.0"},"tags":[{"name":"Receivings","description":"Receivings (ASN)"}],"servers":[{"url":"https://gw.new.skladon.net/v21"}],"security":[{"authorization":[],"XApiKey":[]}],"components":{"securitySchemes":{"authorization":{"type":"apiKey","name":"authorization","in":"header"}},"schemas":{"V21ReceivingResponseEnvelope":{"type":"object","required":["statusCode","message"],"properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/V21ReceivingResponse"}}},"V21ReceivingResponse":{"allOf":[{"$ref":"#/components/schemas/V21ReceivingBody"},{"type":"object","properties":{"eshopReceivingId":{"type":"string"},"id":{"type":"integer"},"asn":{"type":"string"},"createdAt":{"type":"string"},"status":{"type":"string"},"slaDate":{"type":"string"},"asnLabelEmail":{"type":"string"},"realDelivery":{"type":"string"},"slaSuspended":{"type":"string"},"photoDocumentationTaken":{"type":"string"},"deliveredPalletsCount":{"type":"integer"},"deliveredCartonsCount":{"type":"integer"},"returnedEurPalletsCount":{"type":"integer"},"deliveredStandardPalletsCount":{"type":"integer"},"returnedStandardPalletsCount":{"type":"integer"},"deliveredOtherPalletsCount":{"type":"integer"},"deliveredBrokenPalletsCount":{"type":"integer"},"skladonNote":{"type":"string"},"unloadedAt":{"type":"string"},"receivedAt":{"type":"string"},"confirmedAt":{"type":"string"},"canceledAt":{"type":"string"}}}]},"V21ReceivingBody":{"type":"object","required":["estimatedDelivery","unitsAmount","products"],"properties":{"description":{"type":"string"},"trackingNumber":{"type":"string"},"supplier":{"type":"string"},"estimatedDelivery":{"type":"string","description":"ISO datetime string"},"deliveryNoteNumber":{"type":"string"},"deliveryType":{"type":"string","enum":["courier","transportCompany","truckingCompany","container"]},"duty":{"type":"boolean"},"carrierInfo":{"type":"string"},"handlingUnits":{"type":"string"},"urgent":{"type":"string"},"unitsAmount":{"type":"integer"},"driverCompany":{"type":"string","enum":["PPL","DPD","GLS","zasilkovna","CP","UPS","TNT","DHL","ALZA","WEDO","other"]},"driverCompanyOtherName":{"type":"string","description":"Required when driverCompany === other"},"driverTrailerLicensePlate":{"type":"string"},"driverName":{"type":"string"},"driverPhone":{"type":"string"},"driverDispatcherContact":{"type":"string"},"eshopNote":{"type":"string"},"priority":{"type":"integer"},"containerNumber":{"type":"string"},"announcedPalletsCount":{"type":"integer"},"receivingType":{"type":"string"},"incoterms":{"type":"string"},"products":{"type":"array","items":{"$ref":"#/components/schemas/V21ReceivingProductLine"}},"packagings":{"type":"array","items":{"$ref":"#/components/schemas/V21ReceivingPackaging"}},"files":{"type":"array","items":{"$ref":"#/components/schemas/V21ReceivingFile"}}}},"V21ReceivingProductLine":{"type":"object","required":["sku","quantity"],"properties":{"sku":{"type":"string","minLength":1},"quantity":{"type":"integer","minimum":1},"lot":{"type":"string"},"expirationDate":{"type":"string"},"productPrice":{"type":"string"},"lineState":{"type":"string"}}},"V21ReceivingPackaging":{"type":"object","required":["packagingType","quantity"],"properties":{"packagingType":{"type":"string","minLength":1},"pallet":{"type":"string"},"quantity":{"type":"integer","minimum":1}}},"V21ReceivingFile":{"type":"object","required":["type","fileName","fileType"],"properties":{"id":{"type":"integer","minimum":1},"data":{"type":"string","description":"Base64; required for new files"},"type":{"type":"string","minLength":1},"fileName":{"type":"string","minLength":1},"fileType":{"type":"string","minLength":1},"fileSize":{"type":"string"},"description":{"type":"string","maxLength":500},"creatorRole":{"type":"string","enum":["skladon_employee","client"]}}},"ErrorMessageResponse":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/receivings/{eshopReceivingId}":{"get":{"tags":["Receivings"],"summary":"Get receiving detail","operationId":"v21_getReceiving","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V21ReceivingResponseEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}}}}}}
```

## Update receiving

> \`eshopReceivingId\` v URL je autoritativní. V body je volitelný (kompatibilita s v2);\
> pokud je uveden, musí odpovídat path parametru.<br>

```json
{"openapi":"3.1.1","info":{"title":"GWMS API v2.1 (v21)","version":"2.1.0"},"tags":[{"name":"Receivings","description":"Receivings (ASN)"}],"servers":[{"url":"https://gw.new.skladon.net/v21"}],"security":[{"authorization":[],"XApiKey":[]}],"components":{"securitySchemes":{"authorization":{"type":"apiKey","name":"authorization","in":"header"}},"schemas":{"V21ReceivingResponseEnvelope":{"type":"object","required":["statusCode","message"],"properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/V21ReceivingResponse"}}},"V21ReceivingResponse":{"allOf":[{"$ref":"#/components/schemas/V21ReceivingBody"},{"type":"object","properties":{"eshopReceivingId":{"type":"string"},"id":{"type":"integer"},"asn":{"type":"string"},"createdAt":{"type":"string"},"status":{"type":"string"},"slaDate":{"type":"string"},"asnLabelEmail":{"type":"string"},"realDelivery":{"type":"string"},"slaSuspended":{"type":"string"},"photoDocumentationTaken":{"type":"string"},"deliveredPalletsCount":{"type":"integer"},"deliveredCartonsCount":{"type":"integer"},"returnedEurPalletsCount":{"type":"integer"},"deliveredStandardPalletsCount":{"type":"integer"},"returnedStandardPalletsCount":{"type":"integer"},"deliveredOtherPalletsCount":{"type":"integer"},"deliveredBrokenPalletsCount":{"type":"integer"},"skladonNote":{"type":"string"},"unloadedAt":{"type":"string"},"receivedAt":{"type":"string"},"confirmedAt":{"type":"string"},"canceledAt":{"type":"string"}}}]},"V21ReceivingBody":{"type":"object","required":["estimatedDelivery","unitsAmount","products"],"properties":{"description":{"type":"string"},"trackingNumber":{"type":"string"},"supplier":{"type":"string"},"estimatedDelivery":{"type":"string","description":"ISO datetime string"},"deliveryNoteNumber":{"type":"string"},"deliveryType":{"type":"string","enum":["courier","transportCompany","truckingCompany","container"]},"duty":{"type":"boolean"},"carrierInfo":{"type":"string"},"handlingUnits":{"type":"string"},"urgent":{"type":"string"},"unitsAmount":{"type":"integer"},"driverCompany":{"type":"string","enum":["PPL","DPD","GLS","zasilkovna","CP","UPS","TNT","DHL","ALZA","WEDO","other"]},"driverCompanyOtherName":{"type":"string","description":"Required when driverCompany === other"},"driverTrailerLicensePlate":{"type":"string"},"driverName":{"type":"string"},"driverPhone":{"type":"string"},"driverDispatcherContact":{"type":"string"},"eshopNote":{"type":"string"},"priority":{"type":"integer"},"containerNumber":{"type":"string"},"announcedPalletsCount":{"type":"integer"},"receivingType":{"type":"string"},"incoterms":{"type":"string"},"products":{"type":"array","items":{"$ref":"#/components/schemas/V21ReceivingProductLine"}},"packagings":{"type":"array","items":{"$ref":"#/components/schemas/V21ReceivingPackaging"}},"files":{"type":"array","items":{"$ref":"#/components/schemas/V21ReceivingFile"}}}},"V21ReceivingProductLine":{"type":"object","required":["sku","quantity"],"properties":{"sku":{"type":"string","minLength":1},"quantity":{"type":"integer","minimum":1},"lot":{"type":"string"},"expirationDate":{"type":"string"},"productPrice":{"type":"string"},"lineState":{"type":"string"}}},"V21ReceivingPackaging":{"type":"object","required":["packagingType","quantity"],"properties":{"packagingType":{"type":"string","minLength":1},"pallet":{"type":"string"},"quantity":{"type":"integer","minimum":1}}},"V21ReceivingFile":{"type":"object","required":["type","fileName","fileType"],"properties":{"id":{"type":"integer","minimum":1},"data":{"type":"string","description":"Base64; required for new files"},"type":{"type":"string","minLength":1},"fileName":{"type":"string","minLength":1},"fileType":{"type":"string","minLength":1},"fileSize":{"type":"string"},"description":{"type":"string","maxLength":500},"creatorRole":{"type":"string","enum":["skladon_employee","client"]}}},"ErrorMessageResponse":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"V21ReceivingUpdate":{"$ref":"#/components/schemas/V21ReceivingBody"}}},"paths":{"/receivings/{eshopReceivingId}":{"put":{"tags":["Receivings"],"summary":"Update receiving","description":"`eshopReceivingId` v URL je autoritativní. V body je volitelný (kompatibilita s v2);\npokud je uveden, musí odpovídat path parametru.\n","operationId":"v21_putReceiving","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V21ReceivingResponseEnvelope"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V21ReceivingUpdate"}}},"required":true}}}}}
```

## PATCH /receivings/{eshopReceivingId}

> Partial update receiving

```json
{"openapi":"3.1.1","info":{"title":"GWMS API v2.1 (v21)","version":"2.1.0"},"tags":[{"name":"Receivings","description":"Receivings (ASN)"}],"servers":[{"url":"https://gw.new.skladon.net/v21"}],"security":[{"authorization":[],"XApiKey":[]}],"components":{"securitySchemes":{"authorization":{"type":"apiKey","name":"authorization","in":"header"}},"schemas":{"V21ReceivingResponseEnvelope":{"type":"object","required":["statusCode","message"],"properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/V21ReceivingResponse"}}},"V21ReceivingResponse":{"allOf":[{"$ref":"#/components/schemas/V21ReceivingBody"},{"type":"object","properties":{"eshopReceivingId":{"type":"string"},"id":{"type":"integer"},"asn":{"type":"string"},"createdAt":{"type":"string"},"status":{"type":"string"},"slaDate":{"type":"string"},"asnLabelEmail":{"type":"string"},"realDelivery":{"type":"string"},"slaSuspended":{"type":"string"},"photoDocumentationTaken":{"type":"string"},"deliveredPalletsCount":{"type":"integer"},"deliveredCartonsCount":{"type":"integer"},"returnedEurPalletsCount":{"type":"integer"},"deliveredStandardPalletsCount":{"type":"integer"},"returnedStandardPalletsCount":{"type":"integer"},"deliveredOtherPalletsCount":{"type":"integer"},"deliveredBrokenPalletsCount":{"type":"integer"},"skladonNote":{"type":"string"},"unloadedAt":{"type":"string"},"receivedAt":{"type":"string"},"confirmedAt":{"type":"string"},"canceledAt":{"type":"string"}}}]},"V21ReceivingBody":{"type":"object","required":["estimatedDelivery","unitsAmount","products"],"properties":{"description":{"type":"string"},"trackingNumber":{"type":"string"},"supplier":{"type":"string"},"estimatedDelivery":{"type":"string","description":"ISO datetime string"},"deliveryNoteNumber":{"type":"string"},"deliveryType":{"type":"string","enum":["courier","transportCompany","truckingCompany","container"]},"duty":{"type":"boolean"},"carrierInfo":{"type":"string"},"handlingUnits":{"type":"string"},"urgent":{"type":"string"},"unitsAmount":{"type":"integer"},"driverCompany":{"type":"string","enum":["PPL","DPD","GLS","zasilkovna","CP","UPS","TNT","DHL","ALZA","WEDO","other"]},"driverCompanyOtherName":{"type":"string","description":"Required when driverCompany === other"},"driverTrailerLicensePlate":{"type":"string"},"driverName":{"type":"string"},"driverPhone":{"type":"string"},"driverDispatcherContact":{"type":"string"},"eshopNote":{"type":"string"},"priority":{"type":"integer"},"containerNumber":{"type":"string"},"announcedPalletsCount":{"type":"integer"},"receivingType":{"type":"string"},"incoterms":{"type":"string"},"products":{"type":"array","items":{"$ref":"#/components/schemas/V21ReceivingProductLine"}},"packagings":{"type":"array","items":{"$ref":"#/components/schemas/V21ReceivingPackaging"}},"files":{"type":"array","items":{"$ref":"#/components/schemas/V21ReceivingFile"}}}},"V21ReceivingProductLine":{"type":"object","required":["sku","quantity"],"properties":{"sku":{"type":"string","minLength":1},"quantity":{"type":"integer","minimum":1},"lot":{"type":"string"},"expirationDate":{"type":"string"},"productPrice":{"type":"string"},"lineState":{"type":"string"}}},"V21ReceivingPackaging":{"type":"object","required":["packagingType","quantity"],"properties":{"packagingType":{"type":"string","minLength":1},"pallet":{"type":"string"},"quantity":{"type":"integer","minimum":1}}},"V21ReceivingFile":{"type":"object","required":["type","fileName","fileType"],"properties":{"id":{"type":"integer","minimum":1},"data":{"type":"string","description":"Base64; required for new files"},"type":{"type":"string","minLength":1},"fileName":{"type":"string","minLength":1},"fileType":{"type":"string","minLength":1},"fileSize":{"type":"string"},"description":{"type":"string","maxLength":500},"creatorRole":{"type":"string","enum":["skladon_employee","client"]}}},"ErrorMessageResponse":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"V21ReceivingPatch":{"type":"object","minProperties":1,"additionalProperties":true,"description":"Partial V21ReceivingBody – same driverCompany / other rules as full body"}}},"paths":{"/receivings/{eshopReceivingId}":{"patch":{"tags":["Receivings"],"summary":"Partial update receiving","operationId":"v21_patchReceiving","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V21ReceivingResponseEnvelope"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V21ReceivingPatch"}}},"required":true}}}}}
```
