> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/docs/developers/api-documentation/order-delivery.md).

# Order Delivery

OrderDelivery

## List deliveries for an order

> List all deliveries for a specific order

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"parameters":{"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}},"schemas":{"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"},"OrderDeliveryResponseSchema":{"title":"OrderDeliveryResponseSchema","type":"object","required":["createdAt","createdBy","deliveryUid","lastModifiedAt","lastModifiedBy","signature","note","deliveryAddress","deliveryState","deliveryDate","externalDeliveryReference","trackingNumber","deliveryProviderUid","deliveryProviderMethodUid","items","orderItems","freightOrderItemUid","deliveryProviderMethodTimeslotUid","timeslot","shipping"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryUid":{"$ref":"#/components/schemas/UID"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"signature":{"type":"string"},"note":{"type":"string"},"deliveryAddress":{"$ref":"#/components/schemas/DeprecatedDeliveryAddressResponseSchema"},"deliveryState":{"$ref":"#/components/schemas/DeliveryStateENUM"},"deliveryDate":{"type":"string","format":"date","nullable":true},"externalDeliveryReference":{"type":"string"},"trackingNumber":{"deprecated":true,"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"warehouseUid":{"$ref":"#/components/schemas/DeprecatedUID"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemDeliverResponseSchema"}},"orderItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"freightOrderItemUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"timeslotName":{"type":"string","deprecated":true},"timeslot":{"$ref":"#/components/schemas/DeprecatedOrderDeliveryTimeslotResponseSchema"},"shipping":{"$ref":"#/components/schemas/OrderDeliveryShippingResponseSchema"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"DeprecatedDeliveryAddressResponseSchema":{"deprecated":true,"title":"DeprecatedDeliveryAddressResponseSchema","allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"required":["displayName","customerAddressUid","address","city","companyName","countryCode","email","mobile","firstname","lastname","postalCode"],"properties":{"displayName":{"type":"string"},"customerAddressUid":{"$ref":"#/components/schemas/OptionalUID"}}}],"type":"object"},"BaseAddressSchema":{"title":"BaseAddressSchema","type":"object","properties":{"address":{"type":"string"},"city":{"type":"string"},"companyName":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"mobile":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"postalCode":{"type":"string"}}},"EmailTYPE":{"title":"Email","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeliveryStateENUM":{"enum":["NOT_DELIVERED","IN_TRANSIT","DELIVERED","NEW","STARTED"],"title":"DeliveryStateENUM","type":"string"},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedUID":{"title":"DeprecatedUID","type":"string","pattern":"^[A-Za-z0-9-_]+","deprecated":true},"OrderItemDeliverResponseSchema":{"title":"OrderItemDeliverResponseSchema","type":"object","required":["deliveryItemUid","quantityDelivered","warehouseUid","warehouseName","tenantUserUid","tenantUserDisplayName"],"properties":{"deliveryItemUid":{"$ref":"#/components/schemas/UID"},"quantityDelivered":{"type":"integer"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string"}},"description":"tenantUserUid and tenantUserDisplayName contains the user that delivered the items"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"DeprecatedOrderDeliveryTimeslotResponseSchema":{"deprecated":true,"title":"DeprecatedOrderDeliveryTimeslotResponseSchema","type":"object","required":["name","fromTime","toTime"],"properties":{"name":{"type":"string"},"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}},"OrderDeliveryShippingResponseSchema":{"title":"OrderDeliveryShippingResponseSchema","type":"object","required":["deliveryCustomerAddressUid","deliveryAddress","pickupPoint","trackingNumber","deliveryProviderUid","deliveryProviderMethodUid","deliveryProviderMethodTimeslotUid","timeslot","deliveryProviderProcessIndicator","freightOrderItemUid"],"properties":{"deliveryCustomerAddressUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddressResponseSchema"},"pickupPoint":{"$ref":"#/components/schemas/OrderDeliveryPickupPointResponseSchema"},"trackingNumber":{"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/OptionalUID"},"timeslot":{"$ref":"#/components/schemas/OrderDeliveryTimeslotResponseSchema"},"deliveryProviderProcessIndicator":{"type":"string"},"freightOrderItemUid":{"$ref":"#/components/schemas/OptionalUID"},"shippingId":{"type":"integer","format":"int64"}}},"DeliveryAddressResponseSchema":{"title":"DeliveryAddressResponseSchema","allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"required":["displayName","customerAddressUid","address","city","companyName","countryCode","email","mobile","firstname","lastname","postalCode"],"properties":{"displayName":{"type":"string"},"customerAddressUid":{"$ref":"#/components/schemas/OptionalUID"}}}],"type":"object"},"OrderDeliveryPickupPointResponseSchema":{"title":"OrderDeliveryPickupPointResponseSchema","type":"object","required":["pickupPointId","pickupPointType","name","address","postalCode","city","countryCode"],"properties":{"pickupPointId":{"type":"string"},"pickupPointType":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"}}},"OrderDeliveryTimeslotResponseSchema":{"title":"OrderDeliveryTimeslotResponseSchema","type":"object","required":["name","fromTime","toTime"],"properties":{"name":{"type":"string"},"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"}},"responses":{"OrderDeliveryListResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrderDeliveryResponseSchema"},"type":"array"},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"],"type":"object"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/deliveries":{"get":{"description":"List all deliveries for a specific order","operationId":"get-tenants-stores-orders-deliveries","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"responses":{"200":{"$ref":"#/components/responses/OrderDeliveryListResponse"}},"summary":"List deliveries for an order","tags":["OrderDelivery"]}}}}
```

## Create a new delivery for an order

> Create a new delivery for an order\
> \
> Required permissions: DELIVERY

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"OrderDeliveryResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDeliveryResponseSchema"}}},"description":"Example response"}},"schemas":{"OrderDeliveryResponseSchema":{"title":"OrderDeliveryResponseSchema","type":"object","required":["createdAt","createdBy","deliveryUid","lastModifiedAt","lastModifiedBy","signature","note","deliveryAddress","deliveryState","deliveryDate","externalDeliveryReference","trackingNumber","deliveryProviderUid","deliveryProviderMethodUid","items","orderItems","freightOrderItemUid","deliveryProviderMethodTimeslotUid","timeslot","shipping"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryUid":{"$ref":"#/components/schemas/UID"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"signature":{"type":"string"},"note":{"type":"string"},"deliveryAddress":{"$ref":"#/components/schemas/DeprecatedDeliveryAddressResponseSchema"},"deliveryState":{"$ref":"#/components/schemas/DeliveryStateENUM"},"deliveryDate":{"type":"string","format":"date","nullable":true},"externalDeliveryReference":{"type":"string"},"trackingNumber":{"deprecated":true,"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"warehouseUid":{"$ref":"#/components/schemas/DeprecatedUID"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemDeliverResponseSchema"}},"orderItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"freightOrderItemUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"timeslotName":{"type":"string","deprecated":true},"timeslot":{"$ref":"#/components/schemas/DeprecatedOrderDeliveryTimeslotResponseSchema"},"shipping":{"$ref":"#/components/schemas/OrderDeliveryShippingResponseSchema"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"DeprecatedDeliveryAddressResponseSchema":{"deprecated":true,"title":"DeprecatedDeliveryAddressResponseSchema","allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"required":["displayName","customerAddressUid","address","city","companyName","countryCode","email","mobile","firstname","lastname","postalCode"],"properties":{"displayName":{"type":"string"},"customerAddressUid":{"$ref":"#/components/schemas/OptionalUID"}}}],"type":"object"},"BaseAddressSchema":{"title":"BaseAddressSchema","type":"object","properties":{"address":{"type":"string"},"city":{"type":"string"},"companyName":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"mobile":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"postalCode":{"type":"string"}}},"EmailTYPE":{"title":"Email","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeliveryStateENUM":{"enum":["NOT_DELIVERED","IN_TRANSIT","DELIVERED","NEW","STARTED"],"title":"DeliveryStateENUM","type":"string"},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedUID":{"title":"DeprecatedUID","type":"string","pattern":"^[A-Za-z0-9-_]+","deprecated":true},"OrderItemDeliverResponseSchema":{"title":"OrderItemDeliverResponseSchema","type":"object","required":["deliveryItemUid","quantityDelivered","warehouseUid","warehouseName","tenantUserUid","tenantUserDisplayName"],"properties":{"deliveryItemUid":{"$ref":"#/components/schemas/UID"},"quantityDelivered":{"type":"integer"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string"}},"description":"tenantUserUid and tenantUserDisplayName contains the user that delivered the items"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"DeprecatedOrderDeliveryTimeslotResponseSchema":{"deprecated":true,"title":"DeprecatedOrderDeliveryTimeslotResponseSchema","type":"object","required":["name","fromTime","toTime"],"properties":{"name":{"type":"string"},"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}},"OrderDeliveryShippingResponseSchema":{"title":"OrderDeliveryShippingResponseSchema","type":"object","required":["deliveryCustomerAddressUid","deliveryAddress","pickupPoint","trackingNumber","deliveryProviderUid","deliveryProviderMethodUid","deliveryProviderMethodTimeslotUid","timeslot","deliveryProviderProcessIndicator","freightOrderItemUid"],"properties":{"deliveryCustomerAddressUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddressResponseSchema"},"pickupPoint":{"$ref":"#/components/schemas/OrderDeliveryPickupPointResponseSchema"},"trackingNumber":{"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/OptionalUID"},"timeslot":{"$ref":"#/components/schemas/OrderDeliveryTimeslotResponseSchema"},"deliveryProviderProcessIndicator":{"type":"string"},"freightOrderItemUid":{"$ref":"#/components/schemas/OptionalUID"},"shippingId":{"type":"integer","format":"int64"}}},"DeliveryAddressResponseSchema":{"title":"DeliveryAddressResponseSchema","allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"required":["displayName","customerAddressUid","address","city","companyName","countryCode","email","mobile","firstname","lastname","postalCode"],"properties":{"displayName":{"type":"string"},"customerAddressUid":{"$ref":"#/components/schemas/OptionalUID"}}}],"type":"object"},"OrderDeliveryPickupPointResponseSchema":{"title":"OrderDeliveryPickupPointResponseSchema","type":"object","required":["pickupPointId","pickupPointType","name","address","postalCode","city","countryCode"],"properties":{"pickupPointId":{"type":"string"},"pickupPointType":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"}}},"OrderDeliveryTimeslotResponseSchema":{"title":"OrderDeliveryTimeslotResponseSchema","type":"object","required":["name","fromTime","toTime"],"properties":{"name":{"type":"string"},"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}},"OrderDeliveryCreateRequestSchema":{"title":"OrderDeliveryCreateRequestSchema","type":"object","properties":{"deliveryCustomerAddressUid":{"$ref":"#/components/schemas/DeprecatedUID"},"deliveryAddress":{"$ref":"#/components/schemas/DeprecatedDeliveryAddressRequestSchema"},"deliveryState":{"$ref":"#/components/schemas/DeliveryStateENUM"},"deliveryDate":{"type":"string","format":"date","nullable":true},"externalDeliveryReference":{"type":"string"},"note":{"type":"string"},"trackingNumber":{"deprecated":true,"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/DeprecatedUID"},"deliveryUid":{"$ref":"#/components/schemas/UID"},"autoPrint":{"type":"boolean","description":"Used for Profrakt consignment auto print"},"timeslot":{"$ref":"#/components/schemas/DeprecatedOrderDeliveryTimeslotRequestSchema"},"shipping":{"$ref":"#/components/schemas/OrderDeliveryShippingRequestSchema"}}},"DeprecatedDeliveryAddressRequestSchema":{"deprecated":true,"allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"}],"title":"DeliveryAddressRequestSchema","type":"object"},"DeprecatedOrderDeliveryTimeslotRequestSchema":{"deprecated":true,"title":"OrderDeliveryTimeslotRequestSchema","type":"object","nullable":true,"required":["fromTime","toTime"],"properties":{"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}},"OrderDeliveryShippingRequestSchema":{"title":"OrderDeliveryShippingRequestSchema","type":"object","properties":{"deliveryCustomerAddressUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddressRequestSchema"},"pickupPoint":{"$ref":"#/components/schemas/OrderDeliveryPickupPointRequestSchema"},"trackingNumber":{"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/OptionalUID"},"timeslot":{"$ref":"#/components/schemas/OrderDeliveryTimeslotRequestSchema"},"deliveryProviderProcessIndicator":{"type":"string"},"freightProductUid":{"$ref":"#/components/schemas/OptionalUID"},"freightPrice":{"type":"integer"}}},"DeliveryAddressRequestSchema":{"allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"}],"title":"DeliveryAddressRequestSchema","type":"object"},"OrderDeliveryPickupPointRequestSchema":{"title":"OrderDeliveryPickupPointRequestSchema","type":"object","properties":{"pickupPointId":{"type":"string"},"pickupPointType":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"}}},"OrderDeliveryTimeslotRequestSchema":{"title":"OrderDeliveryTimeslotRequestSchema","type":"object","nullable":true,"required":["fromTime","toTime"],"properties":{"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}}},"requestBodies":{"OrderDeliveryCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDeliveryCreateRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/deliveries":{"post":{"description":"Create a new delivery for an order\n\nRequired permissions: DELIVERY","operationId":"post-tenants-stores-orders-deliveries","responses":{"201":{"$ref":"#/components/responses/OrderDeliveryResponse"}},"summary":"Create a new delivery for an order","tags":["OrderDelivery"],"requestBody":{"$ref":"#/components/requestBodies/OrderDeliveryCreateRequest"}}}}}
```

## Fetch delivery sources for an order

> Fetch delivery sources for an order\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"DeliverySourcingResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverySourcingResponseSchema"}}}}},"schemas":{"DeliverySourcingResponseSchema":{"title":"DeliverySourcingResponseSchema","type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DeliverySourcingItemResponse"}}}},"DeliverySourcingItemResponse":{"title":"DeliverySourcingItemResponse","type":"object","required":["productUid","sourceId"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"sourceId":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"DeliverySourcingRequestSchema":{"title":"DeliverySourcingRequestSchema","type":"object","required":["productUids"],"properties":{"productUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}}},"requestBodies":{"DeliverySourcingRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverySourcingRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/delivery-sources":{"post":{"description":"Fetch delivery sources for an order\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"post-tenants-stores-orders-delivery-sources","responses":{"200":{"$ref":"#/components/responses/DeliverySourcingResponse"}},"summary":"Fetch delivery sources for an order","tags":["OrderDelivery"],"requestBody":{"$ref":"#/components/requestBodies/DeliverySourcingRequest"}}}}}
```

## Search for deliveries

> Search for order deliveries.\
> \
> fromDateTime and toDateTime can be set to null.\
> If both fields have value null, only order deliveries with no deliveryDate is fetched.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"DeliverySearchListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","required":["items","paging"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DeliverySearchResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}}}}}}},"schemas":{"DeliverySearchResponseSchema":{"title":"DeliverySearchResponseSchema","type":"object","required":["createdAt","createdBy","deliveryUid","lastModifiedAt","lastModifiedBy","signature","note","deliveryAddress","deliveryState","deliveryDate","externalDeliveryReference","trackingNumber","deliveryProviderUid","deliveryProviderMethodUid","items","order","timeslot"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryUid":{"$ref":"#/components/schemas/UID"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"signature":{"type":"string"},"note":{"type":"string"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddressResponseSchema"},"deliveryState":{"$ref":"#/components/schemas/DeliveryStateENUM"},"deliveryDate":{"type":"string","format":"date","nullable":true},"externalDeliveryReference":{"type":"string"},"trackingNumber":{"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/OptionalUID"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemDeliverResponseSchema"}},"order":{"$ref":"#/components/schemas/AssociatedOrderSchema"},"timeslot":{"$ref":"#/components/schemas/AssociatedTimeslotSchema"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"DeliveryAddressResponseSchema":{"title":"DeliveryAddressResponseSchema","allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"required":["displayName","customerAddressUid","address","city","companyName","countryCode","email","mobile","firstname","lastname","postalCode"],"properties":{"displayName":{"type":"string"},"customerAddressUid":{"$ref":"#/components/schemas/OptionalUID"}}}],"type":"object"},"BaseAddressSchema":{"title":"BaseAddressSchema","type":"object","properties":{"address":{"type":"string"},"city":{"type":"string"},"companyName":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"mobile":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"postalCode":{"type":"string"}}},"EmailTYPE":{"title":"Email","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeliveryStateENUM":{"enum":["NOT_DELIVERED","IN_TRANSIT","DELIVERED","NEW","STARTED"],"title":"DeliveryStateENUM","type":"string"},"OrderItemDeliverResponseSchema":{"title":"OrderItemDeliverResponseSchema","type":"object","required":["deliveryItemUid","quantityDelivered","warehouseUid","warehouseName","tenantUserUid","tenantUserDisplayName"],"properties":{"deliveryItemUid":{"$ref":"#/components/schemas/UID"},"quantityDelivered":{"type":"integer"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string"}},"description":"tenantUserUid and tenantUserDisplayName contains the user that delivered the items"},"AssociatedOrderSchema":{"title":"AssociatedOrderSchema","type":"object","required":["orderUid","orderNumber","settleState","voucherNumber","storeUid","storeName","orderItems"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"settleState":{"$ref":"#/components/schemas/OrderSettleStateENUM"},"voucherNumber":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"orderItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}}}},"OrderSettleStateENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | Settlement not started|\n| IN_PROGRESS | Settlement is in progress and the order cannot be changed|\n| COMPLETE | Settlement is complete|","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"OrderSettleStateENUM","type":"string"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"AssociatedTimeslotSchema":{"title":"AssociatedTimeslotSchema","type":"object","required":["deliveryProviderMethodTimeslotUid","name"],"properties":{"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"}}},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"},"DeliverySearchRequestSchema":{"title":"DeliverySearchRequestSchema","type":"object","required":["storeUids"],"properties":{"fromDateTime":{"type":"string","format":"date-time","nullable":true},"toDateTime":{"type":"string","format":"date-time","nullable":true},"deliveryStates":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryStateENUM"}},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"query":{"type":"string"},"deliveryProviders":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryProviderSearchSchema"}},"orderSettleStates":{"type":"array","items":{"$ref":"#/components/schemas/OrderSettleStateENUM"}},"orderOrderStates":{"type":"array","items":{"$ref":"#/components/schemas/OrderOrderStateENUM"}}}},"DeliveryProviderSearchSchema":{"title":"DeliveryProviderSearchSchema","type":"object","required":["uid"],"properties":{"uid":{"$ref":"#/components/schemas/UID"},"deliveryProviderMethodUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}},"OrderOrderStateENUM":{"description":"|ENUM | Description |\n| --- | --- |\n| OPEN | Order is open and beeing edited by someone|\n| PARKED | Order is parked|\n| CANCELED | Order is canceled/deleted|\n| COMPLETE | Order is complete|\n| CONFIRMED | Order is confirmed|\n","enum":["OPEN","PARKED","CANCELED","COMPLETE","CONFIRMED"],"title":"OrderOrderStateENUM","type":"string"},"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"}},"requestBodies":{"DeliverySearchRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverySearchRequestSchema"}}}}},"parameters":{"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}}},"paths":{"/tenants/{tenantUid}/deliveries/search":{"post":{"description":"Search for order deliveries.\n\nfromDateTime and toDateTime can be set to null.\nIf both fields have value null, only order deliveries with no deliveryDate is fetched.","operationId":"post-tenant-deliveries-search","responses":{"200":{"$ref":"#/components/responses/DeliverySearchListResponse"}},"summary":"Search for deliveries","tags":["OrderDelivery"],"requestBody":{"$ref":"#/components/requestBodies/DeliverySearchRequest"},"parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}]}}}}
```

## Create Profrakt delivery for an order

> Create Profrakt delivery for an order\
> \
> Required permissions: DELIVERY

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"},{"name":"Profrakt","description":"Profrakt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"OrderDeliveryResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDeliveryResponseSchema"}}},"description":"Example response"}},"schemas":{"OrderDeliveryResponseSchema":{"title":"OrderDeliveryResponseSchema","type":"object","required":["createdAt","createdBy","deliveryUid","lastModifiedAt","lastModifiedBy","signature","note","deliveryAddress","deliveryState","deliveryDate","externalDeliveryReference","trackingNumber","deliveryProviderUid","deliveryProviderMethodUid","items","orderItems","freightOrderItemUid","deliveryProviderMethodTimeslotUid","timeslot","shipping"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryUid":{"$ref":"#/components/schemas/UID"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"signature":{"type":"string"},"note":{"type":"string"},"deliveryAddress":{"$ref":"#/components/schemas/DeprecatedDeliveryAddressResponseSchema"},"deliveryState":{"$ref":"#/components/schemas/DeliveryStateENUM"},"deliveryDate":{"type":"string","format":"date","nullable":true},"externalDeliveryReference":{"type":"string"},"trackingNumber":{"deprecated":true,"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"warehouseUid":{"$ref":"#/components/schemas/DeprecatedUID"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemDeliverResponseSchema"}},"orderItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"freightOrderItemUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"timeslotName":{"type":"string","deprecated":true},"timeslot":{"$ref":"#/components/schemas/DeprecatedOrderDeliveryTimeslotResponseSchema"},"shipping":{"$ref":"#/components/schemas/OrderDeliveryShippingResponseSchema"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"DeprecatedDeliveryAddressResponseSchema":{"deprecated":true,"title":"DeprecatedDeliveryAddressResponseSchema","allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"required":["displayName","customerAddressUid","address","city","companyName","countryCode","email","mobile","firstname","lastname","postalCode"],"properties":{"displayName":{"type":"string"},"customerAddressUid":{"$ref":"#/components/schemas/OptionalUID"}}}],"type":"object"},"BaseAddressSchema":{"title":"BaseAddressSchema","type":"object","properties":{"address":{"type":"string"},"city":{"type":"string"},"companyName":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"mobile":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"postalCode":{"type":"string"}}},"EmailTYPE":{"title":"Email","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeliveryStateENUM":{"enum":["NOT_DELIVERED","IN_TRANSIT","DELIVERED","NEW","STARTED"],"title":"DeliveryStateENUM","type":"string"},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedUID":{"title":"DeprecatedUID","type":"string","pattern":"^[A-Za-z0-9-_]+","deprecated":true},"OrderItemDeliverResponseSchema":{"title":"OrderItemDeliverResponseSchema","type":"object","required":["deliveryItemUid","quantityDelivered","warehouseUid","warehouseName","tenantUserUid","tenantUserDisplayName"],"properties":{"deliveryItemUid":{"$ref":"#/components/schemas/UID"},"quantityDelivered":{"type":"integer"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string"}},"description":"tenantUserUid and tenantUserDisplayName contains the user that delivered the items"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"DeprecatedOrderDeliveryTimeslotResponseSchema":{"deprecated":true,"title":"DeprecatedOrderDeliveryTimeslotResponseSchema","type":"object","required":["name","fromTime","toTime"],"properties":{"name":{"type":"string"},"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}},"OrderDeliveryShippingResponseSchema":{"title":"OrderDeliveryShippingResponseSchema","type":"object","required":["deliveryCustomerAddressUid","deliveryAddress","pickupPoint","trackingNumber","deliveryProviderUid","deliveryProviderMethodUid","deliveryProviderMethodTimeslotUid","timeslot","deliveryProviderProcessIndicator","freightOrderItemUid"],"properties":{"deliveryCustomerAddressUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddressResponseSchema"},"pickupPoint":{"$ref":"#/components/schemas/OrderDeliveryPickupPointResponseSchema"},"trackingNumber":{"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/OptionalUID"},"timeslot":{"$ref":"#/components/schemas/OrderDeliveryTimeslotResponseSchema"},"deliveryProviderProcessIndicator":{"type":"string"},"freightOrderItemUid":{"$ref":"#/components/schemas/OptionalUID"},"shippingId":{"type":"integer","format":"int64"}}},"DeliveryAddressResponseSchema":{"title":"DeliveryAddressResponseSchema","allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"required":["displayName","customerAddressUid","address","city","companyName","countryCode","email","mobile","firstname","lastname","postalCode"],"properties":{"displayName":{"type":"string"},"customerAddressUid":{"$ref":"#/components/schemas/OptionalUID"}}}],"type":"object"},"OrderDeliveryPickupPointResponseSchema":{"title":"OrderDeliveryPickupPointResponseSchema","type":"object","required":["pickupPointId","pickupPointType","name","address","postalCode","city","countryCode"],"properties":{"pickupPointId":{"type":"string"},"pickupPointType":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"}}},"OrderDeliveryTimeslotResponseSchema":{"title":"OrderDeliveryTimeslotResponseSchema","type":"object","required":["name","fromTime","toTime"],"properties":{"name":{"type":"string"},"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}},"OrderProfraktDeliveryRequestSchema":{"title":"OrderProfraktDeliveryRequestSchema","type":"object","properties":{"autoPrint":{"type":"boolean"}}}},"requestBodies":{"OrderProfraktDeliveryRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderProfraktDeliveryRequestSchema"}}},"description":"Profrakt delivery created for order"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/deliveries/{deliveryUid}/profrakt":{"post":{"description":"Create Profrakt delivery for an order\n\nRequired permissions: DELIVERY","operationId":"post-tenants-stores-orders-deliveries-profrakt","responses":{"201":{"$ref":"#/components/responses/OrderDeliveryResponse","description":"Profrakt delivery created for order"}},"summary":"Create Profrakt delivery for an order","tags":["OrderDelivery","Profrakt"],"requestBody":{"$ref":"#/components/requestBodies/OrderProfraktDeliveryRequest"}}}}}
```

## Print shipping label for Profrakt order delivery

> Print shipping label for Profrakt order delivery

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"},{"name":"Print","description":"Print"},{"name":"Profrakt","description":"Profrakt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/deliveries/{deliveryUid}/profrakt/print-label":{"post":{"description":"Print shipping label for Profrakt order delivery","operationId":"print-tenants-stores-orders-deliveries-profrakt","responses":{"202":{"description":"Accepted"}},"summary":"Print shipping label for Profrakt order delivery","tags":["OrderDelivery","Print","Profrakt"]}}}}
```

## Get order delivery information

> Get information, like signature, about a specific delivery

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"OrderDeliveryResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDeliveryResponseSchema"}}},"description":"Example response"}},"schemas":{"OrderDeliveryResponseSchema":{"title":"OrderDeliveryResponseSchema","type":"object","required":["createdAt","createdBy","deliveryUid","lastModifiedAt","lastModifiedBy","signature","note","deliveryAddress","deliveryState","deliveryDate","externalDeliveryReference","trackingNumber","deliveryProviderUid","deliveryProviderMethodUid","items","orderItems","freightOrderItemUid","deliveryProviderMethodTimeslotUid","timeslot","shipping"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryUid":{"$ref":"#/components/schemas/UID"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"signature":{"type":"string"},"note":{"type":"string"},"deliveryAddress":{"$ref":"#/components/schemas/DeprecatedDeliveryAddressResponseSchema"},"deliveryState":{"$ref":"#/components/schemas/DeliveryStateENUM"},"deliveryDate":{"type":"string","format":"date","nullable":true},"externalDeliveryReference":{"type":"string"},"trackingNumber":{"deprecated":true,"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"warehouseUid":{"$ref":"#/components/schemas/DeprecatedUID"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemDeliverResponseSchema"}},"orderItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"freightOrderItemUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"timeslotName":{"type":"string","deprecated":true},"timeslot":{"$ref":"#/components/schemas/DeprecatedOrderDeliveryTimeslotResponseSchema"},"shipping":{"$ref":"#/components/schemas/OrderDeliveryShippingResponseSchema"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"DeprecatedDeliveryAddressResponseSchema":{"deprecated":true,"title":"DeprecatedDeliveryAddressResponseSchema","allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"required":["displayName","customerAddressUid","address","city","companyName","countryCode","email","mobile","firstname","lastname","postalCode"],"properties":{"displayName":{"type":"string"},"customerAddressUid":{"$ref":"#/components/schemas/OptionalUID"}}}],"type":"object"},"BaseAddressSchema":{"title":"BaseAddressSchema","type":"object","properties":{"address":{"type":"string"},"city":{"type":"string"},"companyName":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"mobile":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"postalCode":{"type":"string"}}},"EmailTYPE":{"title":"Email","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeliveryStateENUM":{"enum":["NOT_DELIVERED","IN_TRANSIT","DELIVERED","NEW","STARTED"],"title":"DeliveryStateENUM","type":"string"},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedUID":{"title":"DeprecatedUID","type":"string","pattern":"^[A-Za-z0-9-_]+","deprecated":true},"OrderItemDeliverResponseSchema":{"title":"OrderItemDeliverResponseSchema","type":"object","required":["deliveryItemUid","quantityDelivered","warehouseUid","warehouseName","tenantUserUid","tenantUserDisplayName"],"properties":{"deliveryItemUid":{"$ref":"#/components/schemas/UID"},"quantityDelivered":{"type":"integer"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string"}},"description":"tenantUserUid and tenantUserDisplayName contains the user that delivered the items"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"DeprecatedOrderDeliveryTimeslotResponseSchema":{"deprecated":true,"title":"DeprecatedOrderDeliveryTimeslotResponseSchema","type":"object","required":["name","fromTime","toTime"],"properties":{"name":{"type":"string"},"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}},"OrderDeliveryShippingResponseSchema":{"title":"OrderDeliveryShippingResponseSchema","type":"object","required":["deliveryCustomerAddressUid","deliveryAddress","pickupPoint","trackingNumber","deliveryProviderUid","deliveryProviderMethodUid","deliveryProviderMethodTimeslotUid","timeslot","deliveryProviderProcessIndicator","freightOrderItemUid"],"properties":{"deliveryCustomerAddressUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddressResponseSchema"},"pickupPoint":{"$ref":"#/components/schemas/OrderDeliveryPickupPointResponseSchema"},"trackingNumber":{"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/OptionalUID"},"timeslot":{"$ref":"#/components/schemas/OrderDeliveryTimeslotResponseSchema"},"deliveryProviderProcessIndicator":{"type":"string"},"freightOrderItemUid":{"$ref":"#/components/schemas/OptionalUID"},"shippingId":{"type":"integer","format":"int64"}}},"DeliveryAddressResponseSchema":{"title":"DeliveryAddressResponseSchema","allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"required":["displayName","customerAddressUid","address","city","companyName","countryCode","email","mobile","firstname","lastname","postalCode"],"properties":{"displayName":{"type":"string"},"customerAddressUid":{"$ref":"#/components/schemas/OptionalUID"}}}],"type":"object"},"OrderDeliveryPickupPointResponseSchema":{"title":"OrderDeliveryPickupPointResponseSchema","type":"object","required":["pickupPointId","pickupPointType","name","address","postalCode","city","countryCode"],"properties":{"pickupPointId":{"type":"string"},"pickupPointType":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"}}},"OrderDeliveryTimeslotResponseSchema":{"title":"OrderDeliveryTimeslotResponseSchema","type":"object","required":["name","fromTime","toTime"],"properties":{"name":{"type":"string"},"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/deliveries/{deliveryUid}":{"get":{"description":"Get information, like signature, about a specific delivery","operationId":"get-tenants-stores-orders-deliveries-details","responses":{"200":{"$ref":"#/components/responses/OrderDeliveryResponse"}},"summary":"Get order delivery information","tags":["OrderDelivery"]}}}}
```

## Update delivery

> Update a delivery with signature\
> \
> Required permissions: DELIVERY

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"OrderDeliveryUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDeliveryUpdateRequestSchema"}}}}},"schemas":{"OrderDeliveryUpdateRequestSchema":{"title":"OrderDeliveryUpdateRequestSchema","type":"object","properties":{"signature":{"description":"base64 encoded png formatted binary data","type":"string"},"deliveryCustomerAddressUid":{"$ref":"#/components/schemas/DeprecatedUID"},"deliveryAddress":{"$ref":"#/components/schemas/DeprecatedDeliveryAddressRequestSchema"},"deliveryState":{"$ref":"#/components/schemas/DeliveryStateENUM"},"deliveryDate":{"type":"string","format":"date","nullable":true},"externalDeliveryReference":{"type":"string"},"note":{"type":"string"},"trackingNumber":{"deprecated":true,"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"timeslot":{"$ref":"#/components/schemas/DeprecatedOrderDeliveryTimeslotRequestSchema"},"shipping":{"$ref":"#/components/schemas/OrderDeliveryShippingRequestSchema"}}},"DeprecatedUID":{"title":"DeprecatedUID","type":"string","pattern":"^[A-Za-z0-9-_]+","deprecated":true},"DeprecatedDeliveryAddressRequestSchema":{"deprecated":true,"allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"}],"title":"DeliveryAddressRequestSchema","type":"object"},"BaseAddressSchema":{"title":"BaseAddressSchema","type":"object","properties":{"address":{"type":"string"},"city":{"type":"string"},"companyName":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"mobile":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"postalCode":{"type":"string"}}},"EmailTYPE":{"title":"Email","type":"string"},"DeliveryStateENUM":{"enum":["NOT_DELIVERED","IN_TRANSIT","DELIVERED","NEW","STARTED"],"title":"DeliveryStateENUM","type":"string"},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderDeliveryTimeslotRequestSchema":{"deprecated":true,"title":"OrderDeliveryTimeslotRequestSchema","type":"object","nullable":true,"required":["fromTime","toTime"],"properties":{"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}},"OrderDeliveryShippingRequestSchema":{"title":"OrderDeliveryShippingRequestSchema","type":"object","properties":{"deliveryCustomerAddressUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddressRequestSchema"},"pickupPoint":{"$ref":"#/components/schemas/OrderDeliveryPickupPointRequestSchema"},"trackingNumber":{"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/OptionalUID"},"timeslot":{"$ref":"#/components/schemas/OrderDeliveryTimeslotRequestSchema"},"deliveryProviderProcessIndicator":{"type":"string"},"freightProductUid":{"$ref":"#/components/schemas/OptionalUID"},"freightPrice":{"type":"integer"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeliveryAddressRequestSchema":{"allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"}],"title":"DeliveryAddressRequestSchema","type":"object"},"OrderDeliveryPickupPointRequestSchema":{"title":"OrderDeliveryPickupPointRequestSchema","type":"object","properties":{"pickupPointId":{"type":"string"},"pickupPointType":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"}}},"OrderDeliveryTimeslotRequestSchema":{"title":"OrderDeliveryTimeslotRequestSchema","type":"object","nullable":true,"required":["fromTime","toTime"],"properties":{"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}},"OrderDeliveryResponseSchema":{"title":"OrderDeliveryResponseSchema","type":"object","required":["createdAt","createdBy","deliveryUid","lastModifiedAt","lastModifiedBy","signature","note","deliveryAddress","deliveryState","deliveryDate","externalDeliveryReference","trackingNumber","deliveryProviderUid","deliveryProviderMethodUid","items","orderItems","freightOrderItemUid","deliveryProviderMethodTimeslotUid","timeslot","shipping"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryUid":{"$ref":"#/components/schemas/UID"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"signature":{"type":"string"},"note":{"type":"string"},"deliveryAddress":{"$ref":"#/components/schemas/DeprecatedDeliveryAddressResponseSchema"},"deliveryState":{"$ref":"#/components/schemas/DeliveryStateENUM"},"deliveryDate":{"type":"string","format":"date","nullable":true},"externalDeliveryReference":{"type":"string"},"trackingNumber":{"deprecated":true,"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"warehouseUid":{"$ref":"#/components/schemas/DeprecatedUID"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemDeliverResponseSchema"}},"orderItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"freightOrderItemUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"timeslotName":{"type":"string","deprecated":true},"timeslot":{"$ref":"#/components/schemas/DeprecatedOrderDeliveryTimeslotResponseSchema"},"shipping":{"$ref":"#/components/schemas/OrderDeliveryShippingResponseSchema"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"DeprecatedDeliveryAddressResponseSchema":{"deprecated":true,"title":"DeprecatedDeliveryAddressResponseSchema","allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"required":["displayName","customerAddressUid","address","city","companyName","countryCode","email","mobile","firstname","lastname","postalCode"],"properties":{"displayName":{"type":"string"},"customerAddressUid":{"$ref":"#/components/schemas/OptionalUID"}}}],"type":"object"},"OrderItemDeliverResponseSchema":{"title":"OrderItemDeliverResponseSchema","type":"object","required":["deliveryItemUid","quantityDelivered","warehouseUid","warehouseName","tenantUserUid","tenantUserDisplayName"],"properties":{"deliveryItemUid":{"$ref":"#/components/schemas/UID"},"quantityDelivered":{"type":"integer"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string"}},"description":"tenantUserUid and tenantUserDisplayName contains the user that delivered the items"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"DeprecatedOrderDeliveryTimeslotResponseSchema":{"deprecated":true,"title":"DeprecatedOrderDeliveryTimeslotResponseSchema","type":"object","required":["name","fromTime","toTime"],"properties":{"name":{"type":"string"},"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}},"OrderDeliveryShippingResponseSchema":{"title":"OrderDeliveryShippingResponseSchema","type":"object","required":["deliveryCustomerAddressUid","deliveryAddress","pickupPoint","trackingNumber","deliveryProviderUid","deliveryProviderMethodUid","deliveryProviderMethodTimeslotUid","timeslot","deliveryProviderProcessIndicator","freightOrderItemUid"],"properties":{"deliveryCustomerAddressUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddressResponseSchema"},"pickupPoint":{"$ref":"#/components/schemas/OrderDeliveryPickupPointResponseSchema"},"trackingNumber":{"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/OptionalUID"},"deliveryProviderMethodTimeslotUid":{"$ref":"#/components/schemas/OptionalUID"},"timeslot":{"$ref":"#/components/schemas/OrderDeliveryTimeslotResponseSchema"},"deliveryProviderProcessIndicator":{"type":"string"},"freightOrderItemUid":{"$ref":"#/components/schemas/OptionalUID"},"shippingId":{"type":"integer","format":"int64"}}},"DeliveryAddressResponseSchema":{"title":"DeliveryAddressResponseSchema","allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"required":["displayName","customerAddressUid","address","city","companyName","countryCode","email","mobile","firstname","lastname","postalCode"],"properties":{"displayName":{"type":"string"},"customerAddressUid":{"$ref":"#/components/schemas/OptionalUID"}}}],"type":"object"},"OrderDeliveryPickupPointResponseSchema":{"title":"OrderDeliveryPickupPointResponseSchema","type":"object","required":["pickupPointId","pickupPointType","name","address","postalCode","city","countryCode"],"properties":{"pickupPointId":{"type":"string"},"pickupPointType":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"}}},"OrderDeliveryTimeslotResponseSchema":{"title":"OrderDeliveryTimeslotResponseSchema","type":"object","required":["name","fromTime","toTime"],"properties":{"name":{"type":"string"},"fromTime":{"type":"string","format":"time"},"toTime":{"type":"string","format":"time"}}}},"responses":{"OrderDeliveryResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDeliveryResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/deliveries/{deliveryUid}":{"put":{"description":"Update a delivery with signature\n\nRequired permissions: DELIVERY","operationId":"put-tenants-stores-orders-deliveries-details","requestBody":{"$ref":"#/components/requestBodies/OrderDeliveryUpdateRequest"},"responses":{"200":{"$ref":"#/components/responses/OrderDeliveryResponse"}},"summary":"Update delivery","tags":["OrderDelivery"]}}}}
```

## Delete order delivery

> Delete an order delivery. Note that this can only be done while the delivery state is "not delivered".\
> \
> Required permissions: DELIVERY

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/deliveries/{deliveryUid}":{"delete":{"summary":"Delete order delivery","description":"Delete an order delivery. Note that this can only be done while the delivery state is \"not delivered\".\n\nRequired permissions: DELIVERY","operationId":"delete-orders-deliveries","responses":{"204":{"description":"No Content"}},"tags":["OrderDelivery"]}}}}
```

## Deliver on an order item

> Deliver on an orderitem.\
> \
> Required permissions: DELIVERY

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"OrderItemDeliverRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderItemDeliverRequestSchema"}}}}},"schemas":{"OrderItemDeliverRequestSchema":{"title":"OrderItemDeliverRequestSchema","type":"object","properties":{"deliveryUid":{"$ref":"#/components/schemas/UID"},"quantityDelivered":{"type":"integer"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"deliveryItemUid":{"$ref":"#/components/schemas/UID"}},"required":["deliveryUid","quantityDelivered","warehouseUid"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OrderResponseSchema":{"description":"Use invoiceAddress only if an order has a different invoice  than orderAddress.","title":"OrderResponseSchema","type":"object","required":["createdAt","customerAddress","customerUid","customerContact","deliveryState","externalOrderNumber","externalVoucherNumber","invoiceAddress","items","lastModifiedAt","note","internalNote","orderUid","orderNumber","orderDate","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy","allowedActions"],"properties":{"createdAt":{"format":"date-time","type":"string"},"customerAddress":{"$ref":"#/components/schemas/OrderAddressResponseSchema"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"customerContact":{"$ref":"#/components/schemas/OrderCustomerContactResponseSchema"},"deliveryState":{"$ref":"#/components/schemas/OrderDeliveryStateENUM"},"externalOrderNumber":{"type":"string","deprecated":true},"externalVoucherNumber":{"type":"string","deprecated":true},"externalIds":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdSchema"}},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/InterStorePurchaseOrderResponseSchema"},"note":{"description":"Note visible on the receipt.","type":"string"},"internalNote":{"type":"string","description":"Internal note, not visible on the receipt."},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"orderDate":{"type":"string","format":"date-time","description":"This field has value if type == `ORDER`","nullable":true},"orderState":{"$ref":"#/components/schemas/OrderOrderStateENUM"},"orderTotals":{"$ref":"#/components/schemas/OrderTotalsResponseSchema"},"orderhandlingState":{"$ref":"#/components/schemas/HandlingStateENUM"},"orderhandlings":{"type":"array","items":{"$ref":"#/components/schemas/OrderHandlingResponseSchema"}},"settleState":{"$ref":"#/components/schemas/OrderSettleStateENUM"},"settledAt":{"description":"When the settleState is set COMPLETE.","format":"date-time","type":"string","nullable":true},"settlementTotals":{"$ref":"#/components/schemas/OrderSettlementTotalsSchema"},"settlements":{"type":"array","items":{"$ref":"#/components/schemas/SettlementResponseSchema"}},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"systemOrigin":{"type":"string"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"tillUid":{"$ref":"#/components/schemas/OptionalUID"},"type":{"$ref":"#/components/schemas/OrderTypeENUM"},"validUntil":{"format":"date-time","type":"string","nullable":true},"vatFree":{"type":"boolean"},"vatPrint":{"$ref":"#/components/schemas/VatPrintENUM"},"voucherNumber":{"description":"A reference to a fully settled order.","type":"string"},"deliveryDate":{"type":"string","format":"date"},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/OrderDiscountResponseSchema"}},"compensationReasonUid":{"$ref":"#/components/schemas/OptionalUID"},"lastModifiedBy":{"type":"string"},"allowedActions":{"type":"array","items":{"$ref":"#/components/schemas/AllowedOrderActionENUM"}}}},"OrderAddressResponseSchema":{"title":"OrderAddressResponseSchema","type":"object","required":["address","city","companyName","countryCode","email","firstname","lastname","mobile","postalCode","displayName"],"properties":{"address":{"type":"string"},"city":{"type":"string"},"companyName":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"firstname":{"type":"string"},"lastname":{"type":"string"},"mobile":{"type":"string"},"postalCode":{"type":"string"},"vatNumber":{"$ref":"#/components/schemas/VatNumberTYPE"},"displayName":{"type":"string"}},"description":""},"EmailTYPE":{"title":"Email","type":"string"},"VatNumberTYPE":{"description":"VAT identification number for value added tax reporting purposes.","title":"VatNumber","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"OrderCustomerContactResponseSchema":{"type":"object","title":"OrderCustomerContactResponseSchema","required":["customerContactUid","firstname","lastname","email","mobile","displayName"],"properties":{"customerContactUid":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"mobile":{"type":"string"},"displayName":{"type":"string"}}},"OrderDeliveryStateENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | Delivery not started|\n| IN_PROGRESS | Delivery is in progress. Some order lines are still reserved|\n| COMPLETE | Delivery is complete. All order lines are delivered|","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"OrderDeliveryStateENUM","type":"string"},"ExternalIdSchema":{"type":"object","title":"ExternalIdSchema","required":["key","value","visibility"],"properties":{"key":{"type":"string","description":"Stable identifier, e.g. sap_order_number"},"label":{"type":"string","description":"Display label, e.g. SAP ordrenummer"},"value":{"type":"string"},"visibility":{"$ref":"#/components/schemas/ExternalIdVisibilityENUM"}}},"ExternalIdVisibilityENUM":{"type":"string","enum":["INTERNAL","EXTERNAL"],"title":"ExternalIdVisibilityENUM"},"InvoiceAddressResponseSchema":{"title":"InvoiceAddressResponseSchema","allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"required":["displayName","customerAddressUid","address","city","companyName","countryCode","email","mobile","firstname","lastname","postalCode"],"properties":{"displayName":{"type":"string"},"customerAddressUid":{"$ref":"#/components/schemas/OptionalUID"}}}],"type":"object"},"BaseAddressSchema":{"title":"BaseAddressSchema","type":"object","properties":{"address":{"type":"string"},"city":{"type":"string"},"companyName":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"mobile":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"postalCode":{"type":"string"}}},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"InterStorePurchaseOrderResponseSchema":{"title":"InterStorePurchaseOrderResponseSchema","type":"object","description":"The buyer store's purchase order this sales order is coupled 1:1 to in inter-store\ntrade. Only present on the seller store's auto-created sales order.","required":["purchaseOrderUid","purchaseNumber","storeUid","storeName"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseNumber":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"}}},"OrderOrderStateENUM":{"description":"|ENUM | Description |\n| --- | --- |\n| OPEN | Order is open and beeing edited by someone|\n| PARKED | Order is parked|\n| CANCELED | Order is canceled/deleted|\n| COMPLETE | Order is complete|\n| CONFIRMED | Order is confirmed|\n","enum":["OPEN","PARKED","CANCELED","COMPLETE","CONFIRMED"],"title":"OrderOrderStateENUM","type":"string"},"OrderTotalsResponseSchema":{"description":"","properties":{"costTotal":{"type":"integer"},"grandTotal":{"type":"integer"},"grossProfitAmount":{"description":"Sum of all totalGrossProfitAmount on each product item.","type":"integer"},"grossProfitPercentage":{"description":"","type":"integer"},"specifiedVat":{"items":{"$ref":"#/components/schemas/OrderTotalsVatSpecificationSchema"},"type":"array"},"subtotal":{"type":"integer"},"totalDiscount":{"type":"integer"},"totalVat":{"type":"integer"}},"required":["subtotal","totalDiscount","specifiedVat","totalVat","grandTotal","grossProfitAmount","grossProfitPercentage","costTotal"],"title":"OrderTotals","type":"object"},"OrderTotalsVatSpecificationSchema":{"description":"","properties":{"vatAmount":{"description":"Total amount with this vatRate.","type":"integer"},"vatDescription":{"description":"Description of vat rate.","type":"string"},"vatRate":{"description":"VatRate in percentage.","type":"integer"}},"required":["vatRate","vatAmount","vatDescription"],"title":"OrderTotalsVatSpecificationSchema","type":"object"},"HandlingStateENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | Handling has not been started. |\n| IN_PROGRESS | Handling is in progress. |\n| ON_HOLD | Handling is paused (on hold). |\n| COMPLETE | Handling is complete. |","enum":["NOT_STARTED","IN_PROGRESS","ON_HOLD","COMPLETE"],"title":"HandlingStateENUM","type":"string"},"OrderHandlingResponseSchema":{"properties":{"active":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"description":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"name":{"maxLength":20,"type":"string"},"orderHandlingUid":{"$ref":"#/components/schemas/UID"},"state":{"$ref":"#/components/schemas/HandlingStateENUM"}},"required":["orderHandlingUid","handlingUid","active","description","name","state","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderHandlingResponseSchema","type":"object"},"OrderSettleStateENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | Settlement not started|\n| IN_PROGRESS | Settlement is in progress and the order cannot be changed|\n| COMPLETE | Settlement is complete|","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"OrderSettleStateENUM","type":"string"},"OrderSettlementTotalsSchema":{"title":"OrderSettlementTotalsSchema","type":"object","required":["change","remaining","remainingRounded","totals","remainingPrePayment","remainingAuthorizedAmount"],"properties":{"change":{"description":"Total change amount returned to customer.","type":"integer"},"remaining":{"type":"integer","description":"Remaining amount to be paid "},"remainingRounded":{"description":"Rounded value of remaining amount. For use with CASH","type":"integer"},"totals":{"type":"integer","description":"Sum of all approved settlements"},"remainingPrePayment":{"type":"integer"},"remainingAuthorizedAmount":{"type":"integer","description":"Authorized amount available for capture."}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","storeUid","storeName","orderReceiptUid","transactions","receiptText","allowedActions"],"properties":{"amount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"displayMessages":{"type":"array","items":{"$ref":"#/components/schemas/SettlementDisplayMessageSchema"}},"externalId":{"type":"string"},"externalPaymentReference":{"type":"string","description":"The external payment reference for this settlement.\nFor invoices, this could contain the KID"},"idMethod":{"$ref":"#/components/schemas/SettlementIdMethodENUM"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"ledgerType":{"$ref":"#/components/schemas/LedgerTypeENUM"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/SettlementParameterResponseSchema"}},"settledAt":{"format":"date-time","type":"string"},"settlementCode":{"type":"string"},"settlementUid":{"$ref":"#/components/schemas/UID"},"settlementName":{"type":"string"},"state":{"$ref":"#/components/schemas/SettlementStateENUM"},"status":{"$ref":"#/components/schemas/SettlementStatusENUM"},"storeSettlementIssuer":{"$ref":"#/components/schemas/storeSettlementIssuerSchema"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storePaymentMethodUid":{"$ref":"#/components/schemas/UID"},"currency":{"$ref":"#/components/schemas/SettlementCurrencySchema"},"additionalDetails":{"type":"array","items":{"$ref":"#/components/schemas/SettlementAdditionalDetailsSchema"}},"creditCount":{"type":"integer","description":"Number of credits on this settlement. Only applicable for invoice"},"creditAmount":{"type":"integer","description":"The total amount credited. Only applicable for invoice"},"paymentCount":{"type":"integer","description":"Number of payments on this settlement. Only applicable for invoice"},"paymentAmount":{"type":"integer","description":"The total amount of payments. Only applicable for invoice"},"tillUid":{"$ref":"#/components/schemas/OptionalUID"},"tillName":{"type":"string","description":"Display name of the till where the payment was registered."},"tillNumber":{"type":"integer","description":"Till register number where the payment was registered."},"storeUid":{"$ref":"#/components/schemas/OptionalUID"},"storeName":{"type":"string","description":"Display name of the store where the payment was registered."},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"authorizedAmount":{"type":"integer","description":"The total authorized amount on this settlement, calculated from authorize transactions."},"capturedAmount":{"type":"integer","description":"The total captured amount on this settlement, calculated from capture transactions."},"refundedAmount":{"type":"integer","description":"The total refunded amount on this settlement, calculated from refund transactions."},"receiptText":{"type":"string","maxLength":500,"description":"Text printed on the receipt for this payment method when configured on the tenant payment method. Empty when not set, when suppressed for this settlement type (e.g. store credit, gift cards), or when cleared."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SettlementTransactionSchema"}},"allowedActions":{"description":"What can be done with this settlement. Judged from the settlement alone, so a cancellation offered here can still be turned down by the rules on the order or the receipt.","type":"array","items":{"$ref":"#/components/schemas/AllowedSettlementActionENUM"}}}},"SettlementDisplayMessageSchema":{"description":"Settlement display messages","properties":{"key":{"type":"string"},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["key","message","timestamp"],"title":"SettlementDisplayMessageSchema","type":"object"},"SettlementIdMethodENUM":{"enum":["NO_CVM_RULE_PERFORMED","SIGNATURE","PIN_ONLINE","PIN_OFFLINE","PIN_ONLINE_AND_SIGNATURE","PIN_OFFLINE_AND_SIGNATURE","NO_CVM","FAILED","ON_DEVICE","REFUND"],"title":"SettlementIdMethodENUM","type":"string"},"LedgerTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n|LEDGER | Ledger |\n|GENERAL_LEDGER | General ledger |\n|CUSTOMER_LEDGER | Customer ledger |","enum":["LEDGER","GENERAL_LEDGER","CUSTOMER_LEDGER"],"title":"LedgerTypeENUM","type":"string"},"SettlementParameterResponseSchema":{"description":"settlement parameters response","title":"SettlementParameterResponseSchema","type":"object","required":["key","value","name","type"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/TenantPaymentMethodParameterTypeENUM"}}},"TenantPaymentMethodParameterTypeENUM":{"title":"TenantPaymentMethodParameterTypeENUM","type":"string","enum":["TEXT","INTEGER","NUMERIC","DATE","MOBILE","MODULUS10","MODULUS11"]},"SettlementStateENUM":{"enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","TERMINATED"],"title":"SettlementCodeENUM","type":"string"},"SettlementStatusENUM":{"enum":["NEW","PROCESSING","AUTHORIZED","CAPTURED","REFUNDED","PARTIALLY_REFUNDED","PENDING_REFUND","FAILED","CANCELLED_BY_MERCHANT","CANCELLED_BY_USER","CANCELLED_FORCE","DELETED","DENIED","REJECTED"],"title":"SettlementCodeENUM","type":"string"},"storeSettlementIssuerSchema":{"title":"storeSettlementIssuerSchema","type":"object","description":"Settlement issuer information","required":["storeSettlementIssuerUid","name","code"],"properties":{"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string","description":"The name of the settlement issuer"},"code":{"type":"string","description":"The code of the settlement issuer"}}},"SettlementCurrencySchema":{"title":"SettlementCurrencySchema","type":"object","required":["amount","code","exchangeRate"],"properties":{"amount":{"type":"integer"},"code":{"type":"string"},"exchangeRate":{"type":"integer"}}},"SettlementAdditionalDetailsSchema":{"title":"SettlementAdditionalDetailsSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"SettlementTransactionSchema":{"title":"SettlementTransactionSchema","type":"object","required":["transactionType","transactionAmount","orderReceiptUid"],"properties":{"transactionType":{"type":"string"},"pspTransactionId":{"type":"string"},"transactionAmount":{"type":"integer"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AllowedSettlementActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| CANCEL | Settlement can be cancelled|","enum":["CANCEL"],"title":"AllowedSettlementActionENUM","type":"string"},"OrderTypeENUM":{"enum":["OFFER","ORDER","PAYMENT"],"title":"OrderTypeENUM","type":"string"},"VatPrintENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n|SUM| Print as a part of orderlines.|\n|SEPARATE| Print as a separate field.|\n","enum":["SUM","SEPARATE"],"title":"vatPrintENUM","type":"string"},"OrderDiscountResponseSchema":{"title":"OrderDiscountResponseSchema","type":"object","required":["orderDiscountUid","discountCode","type","amount","name","origin","validTo","maxUsage","productSkus","orderItemUids","externalTransactionId","scope","discountReasonCode","discountReference","createdAt","createdBy","lastModifiedAt","lastModifiedBy","campaignUid"],"properties":{"orderDiscountUid":{"$ref":"#/components/schemas/UID"},"discountCode":{"type":"string"},"type":{"$ref":"#/components/schemas/DiscountTypeENUM"},"amount":{"type":"integer"},"name":{"type":"string"},"origin":{"$ref":"#/components/schemas/DiscountOriginENUM"},"validTo":{"type":"string","format":"date-time"},"maxUsage":{"type":"integer"},"productSkus":{"type":"array","items":{"type":"string"}},"orderItemUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"externalTransactionId":{"type":"string"},"scope":{"$ref":"#/components/schemas/DiscountScopeENUM"},"discountReasonCode":{"type":"string"},"discountReference":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"campaignUid":{"$ref":"#/components/schemas/OptionalUID"}}},"DiscountTypeENUM":{"title":"DiscountTypeENUM","type":"string","enum":["PERCENTAGE","AMOUNT"]},"DiscountOriginENUM":{"title":"DiscountOriginENUM","type":"string","enum":["LOYALTY","MANUAL","PRICEREDUCTION","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]},"AllowedOrderActionENUM":{"enum":["DELETE","OFFER","LOYALTY_POINTS"],"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| DELETE | Order can be deleted|\n| OFFER | Order can be changed to an offer|\n| LOYALTY_POINTS | Order has loyalty points|"}},"responses":{"OrderResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/items/{orderItemUid}/deliveries":{"post":{"description":"Deliver on an orderitem.\n\nRequired permissions: DELIVERY","operationId":"post-tenants-stores-orders-items-details-deliveries","requestBody":{"$ref":"#/components/requestBodies/OrderItemDeliverRequest"},"responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"summary":"Deliver on an order item","tags":["OrderDelivery"]}}}}
```

## Download packing list for a delivery

> Print packing list for an order delivery.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"FileResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Base64EncodedFileContentSchema"}},"application/pdf":{"schema":{"format":"binary","type":"string"}},"text/html":{"schema":{"type":"string"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"description":"Based on the Accept header the response will be base64 json encoded or a raw file.\napplication/octet-stream will return a binary file\napplication/json will return a json with the file content base64 encoded."}},"schemas":{"Base64EncodedFileContentSchema":{"title":"Base64EncodedFileContentSchema","type":"object","properties":{"content":{"type":"string","description":" base64 encoded"},"contentType":{"description":"mime type","type":"string"},"filename":{"type":"string"}},"required":["content","contentType","filename"]}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/deliveries/{deliveryUid}/download":{"get":{"summary":"Download packing list for a delivery","tags":["OrderDelivery"],"responses":{"200":{"$ref":"#/components/responses/FileResponse"}},"operationId":"get-orders-deliveries-download","description":"Print packing list for an order delivery."}}}}
```

## Download picking list for several deliveries

> Download picking list for several deliveries

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"FileResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Base64EncodedFileContentSchema"}},"application/pdf":{"schema":{"format":"binary","type":"string"}},"text/html":{"schema":{"type":"string"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"description":"Based on the Accept header the response will be base64 json encoded or a raw file.\napplication/octet-stream will return a binary file\napplication/json will return a json with the file content base64 encoded."}},"schemas":{"Base64EncodedFileContentSchema":{"title":"Base64EncodedFileContentSchema","type":"object","properties":{"content":{"type":"string","description":" base64 encoded"},"contentType":{"description":"mime type","type":"string"},"filename":{"type":"string"}},"required":["content","contentType","filename"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"}},"requestBodies":{"PostRequestCombinedDeliveriesPackingList":{"content":{"application/json":{"schema":{"type":"object","required":["deliveryUids"],"properties":{"deliveryUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}}}},"description":"List of deliveryUid used in generating the combined delivery packing list "}}},"paths":{"/tenants/{tenantUid}/deliveries/download":{"post":{"summary":"Download picking list for several deliveries","tags":["OrderDelivery"],"responses":{"200":{"$ref":"#/components/responses/FileResponse"}},"operationId":"download-orders-deliveries-bulk-picking-list","description":"Download picking list for several deliveries","requestBody":{"$ref":"#/components/requestBodies/PostRequestCombinedDeliveriesPackingList"}}}}}
```

## List all available shipping options for an order

> List all available shipping options for an order\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"integrationToken":[]},{"authToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"}},"responses":{"DeliveryOptionResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOptionResponseSchema"}}}}},"schemas":{"DeliveryOptionResponseSchema":{"title":"DeliveryOptionResponseSchema","type":"object","required":["deliveryOptions","information","errors"],"properties":{"deliveryOptions":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryOptionSchema"}},"information":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","description":"Errors which causes the delivery to not be available","items":{"type":"string"}}}},"DeliveryOptionSchema":{"title":"DeliveryOptionSchema","type":"object","required":["freightProductUid","freightProductName","deliveryProviderProcessIndicator","pickupDelivery","addressDelivery","parcelDelivery"],"properties":{"freightProductUid":{"$ref":"#/components/schemas/UID"},"freightProductName":{"type":"string"},"deliveryProviderProcessIndicator":{"type":"string","description":"This field can contain a special code that needs to be saved on the delivery"},"pickupDelivery":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryOptionPickupPointSchema"}},"addressDelivery":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryOptionAddressSchema"}},"parcelDelivery":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryOptionParcelSchema"}}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"DeliveryOptionPickupPointSchema":{"title":"DeliveryOptionPickupPointSchema","type":"object","required":["pickupPointType","pickupPointId","name","latitude","longitude","address","postalCode","city","countryCode","description","price","deliveryDate"],"properties":{"pickupPointType":{"type":"string"},"pickupPointId":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"},"description":{"type":"string"},"price":{"type":"integer"},"deliveryDate":{"type":"string","format":"date","description":"Estimated arrival date"}}},"DeliveryOptionAddressSchema":{"title":"DeliveryOptionAddressSchema","type":"object","required":["deliveryDate","startTime","endTime","price"],"properties":{"deliveryDate":{"type":"string","format":"date","description":"Estimated arrival date"},"startTime":{"type":"string"},"endTime":{"type":"string"},"price":{"type":"integer"}}},"DeliveryOptionParcelSchema":{"title":"DeliveryOptionParcelSchema","type":"object","required":["deliveryDate","price"],"properties":{"deliveryDate":{"type":"string","format":"date","description":"Estimated arrival date"},"price":{"type":"integer"}}},"DeliveryOptionRequestSchema":{"title":"DeliveryOptionRequestSchema","type":"object","required":["startDate","endDate","postalCode","products"],"properties":{"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"postalCode":{"type":"string"},"products":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryOptionProductSchema"}}}},"DeliveryOptionProductSchema":{"title":"DeliveryOptionProductSchema","type":"object","required":["productUid","quantity"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"quantity":{"type":"integer"},"freightServiceProductUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"serviceProductUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}}},"requestBodies":{"DeliveryOptionRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOptionRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/delivery-options":{"post":{"summary":"List all available shipping options for an order","tags":["OrderDelivery"],"responses":{"200":{"$ref":"#/components/responses/DeliveryOptionResponse"}},"operationId":"post-delivery-options","description":"List all available shipping options for an order\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","requestBody":{"$ref":"#/components/requestBodies/DeliveryOptionRequest"}}}}}
```

## List all available service products for an order

> List all available service products for an order\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"OrderDelivery","description":"OrderDelivery"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"integrationToken":[]},{"authToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"}},"responses":{"DeliveryServiceListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","required":["items","information","errors"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryServiceResponseSchema"}},"information":{"type":"array","description":"Additional information about the services products that should be shown to the seller","items":{"type":"string"}},"errors":{"type":"array","description":"Errors which causes the delivery to not be available","items":{"type":"string"}}}}}}}},"schemas":{"DeliveryServiceResponseSchema":{"title":"DeliveryServiceProductResponseSchema","type":"object","required":["productUid","serviceProducts","freightServiceProducts"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"serviceProducts":{"type":"array","items":{"$ref":"#/components/schemas/StoreProductResponseSchema"}},"freightServiceProducts":{"type":"array","items":{"$ref":"#/components/schemas/StoreProductResponseSchema"}}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"StoreProductResponseSchema":{"allOf":[{"type":"object","properties":{"storeProductDetails":{"$ref":"#/components/schemas/StoreProductDetailsSchema"}},"required":["costPrice","grossProfitAmount","grossProfitPercentage","price","quantityReserved","quantityStock","storeProductDetails"]},{"$ref":"#/components/schemas/ProductResponseSchema"}],"description":"StoreProductResponseSchema"},"StoreProductDetailsSchema":{"description":"StoreProductDetailsSchema","type":"object","title":"StoreProductDetailsSchema","required":["grossProfitAmount","grossProfitPercentage","costPrice","price","campaignPrice","campaignName","quantityReserved","quantityStock","quantityOrdered","warehouseStockDetails","soaAmounts"],"properties":{"grossProfitAmount":{"type":"integer"},"grossProfitPercentage":{"type":"integer"},"costPrice":{"type":"integer"},"price":{"type":"integer"},"campaignPrice":{"type":"integer","description":"Lowest price found in an active campaign"},"campaignName":{"type":"string","description":"Name of campaign for campaignPrice"},"quantityReserved":{"type":"integer","description":"Total reserved quantity on salesorders"},"quantityStock":{"type":"integer","description":"Total quantity in stock"},"quantityOrdered":{"type":"integer","description":"Total Quantity in purchase orders that is not received yet."},"warehouseStockDetails":{"type":"array","items":{"$ref":"#/components/schemas/StoreProductWarehouseStockDetailsSchema"}},"soaAmounts":{"type":"array","items":{"$ref":"#/components/schemas/StoreProductSOADetailsSchema"}}}},"StoreProductWarehouseStockDetailsSchema":{"title":"StoreProductWarehouseStockDetailsSchema","type":"object","required":["grossProfitAmount","grossProfitPercentage","costPrice","quantityReserved","quantityStock","locationLabel","storeUid","storeName","warehouseUid","warehouseName"],"properties":{"grossProfitAmount":{"type":"integer"},"grossProfitPercentage":{"type":"integer"},"costPrice":{"type":"integer"},"quantityReserved":{"type":"integer"},"quantityStock":{"type":"integer"},"locationLabel":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"}}},"StoreProductSOADetailsSchema":{"title":"StoreProductSOADetailsSchema","type":"object","required":["soaUid","soaName","amount","fromDateTime","toDateTime","soaAmountUid"],"properties":{"soaUid":{"$ref":"#/components/schemas/UID"},"soaName":{"type":"string"},"amount":{"type":"integer"},"fromDateTime":{"type":"string","format":"date-time"},"toDateTime":{"type":"string","format":"date-time"},"soaAmountUid":{"$ref":"#/components/schemas/UID"}}},"ProductResponseSchema":{"title":"ProductResponseSchema","type":"object","required":["allowAddon","allowCredit","allowNegativePrice","allowPurchase","allowQuantity","allowSale","allowSaleDate","allowDelivery","allowDeliveryDate","allowOrderSpecificCost","allowOrderSpecificName","allowDiscount","availableForWeb","brandUid","brandName","calculationFactor","categoryUids","createdAt","customerAgeRestriction","description","discontinuedFrom","externalId","externalInfo","externalUrl","gtins","height","internalInfo","lastModifiedAt","ledgerNumber","length","name","optionProperties","priceOverride","productGroupUid","productGroupPath","productUid","productType","recommendedRetailPrice","requiredVariantPropertyUids","serialNoRequired","sellOnlyAsAddon","shortDescription","sku","manufacturerSku","suppliers","textProperties","unitLabel","variantProductUids","variantParentProductUid","variants","vatCodeUid","weight","width","links","parents","requirements","coverImage","imageCount","relevance","visibility","commission","productWarrantyUid","excludeFromStatistics","purchasePrice","numberOfPieces","limitToStoreUids","tradeUnit","usesVatMarginScheme"],"properties":{"allowAddon":{"type":"boolean","description":"This product has addons"},"allowCredit":{"type":"boolean","description":"The product is allowed to credit"},"allowNegativePrice":{"type":"boolean","description":"There can be set a negative price"},"allowPurchase":{"type":"boolean","description":"The product is allowed to be purchased from a supplier"},"allowQuantity":{"type":"boolean","description":"It is allowed to change quantity"},"allowSale":{"$ref":"#/components/schemas/AllowSaleENUM"},"allowSaleDate":{"format":"date-time","type":"string"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryDate":{"format":"date-time","type":"string"},"allowOrderSpecificCost":{"type":"boolean","description":"Allow to set costPrice on product when adding or updating the product to an order"},"allowOrderSpecificName":{"type":"boolean","description":"Allow to set name on product when adding or updating the product to an order"},"allowDiscount":{"type":"boolean","description":"Allow to add discount to this product."},"availableForWeb":{"type":"boolean","description":"The product is available for web sale"},"brandUid":{"$ref":"#/components/schemas/UID"},"brandName":{"type":"string"},"calculationFactor":{"type":"integer"},"categoryUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"createdAt":{"format":"date-time","type":"string"},"customerAgeRestriction":{"type":"integer","description":"Age restriction for the customer. 0 = no restriction"},"description":{"type":"string"},"discontinuedFrom":{"type":"string","format":"date-time","nullable":true},"externalId":{"type":"string"},"externalInfo":{"type":"string"},"externalUrl":{"type":"string"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinResponseSchema"}},"height":{"type":"integer"},"internalInfo":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"length":{"type":"integer"},"name":{"type":"string"},"optionProperties":{"description":"A list or propertyUids that extends the product with new properties.","type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"priceOverride":{"type":"boolean","description":"Allow to override the price without setting a discount."},"productGroupUid":{"$ref":"#/components/schemas/UID"},"productGroupPath":{"type":"array","items":{"$ref":"#/components/schemas/ProductGroupPathSchema"}},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"recommendedRetailPrice":{"type":"integer"},"requiredVariantPropertyUids":{"description":"A list of propertyUids that are required for each variant of this product.","type":"array","items":{"type":"string"}},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"},"sellOnlyAsAddon":{"type":"boolean","description":"Can only be sold as an addon product"},"shortDescription":{"type":"string"},"sku":{"type":"string"},"manufacturerSku":{"type":"string"},"suppliers":{"type":"array","items":{"$ref":"#/components/schemas/ProductSupplierResponseSchema"}},"textProperties":{"description":"A list or propertyUids that extends the product with new properties.","type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"unitLabel":{"type":"string"},"variantProductUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"variantParentProductUid":{"$ref":"#/components/schemas/UID"},"variants":{"description":"A list of productUids that make up variants of this product.","type":"array","deprecated":true,"items":{"type":"string"}},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."},"weight":{"type":"integer"},"width":{"type":"integer"},"links":{"type":"array","description":"List of links owned by this product","items":{"$ref":"#/components/schemas/ProductLinkResponseSchema"}},"parents":{"type":"array","description":"List of parents to this product","items":{"$ref":"#/components/schemas/ProductLinkResponseSchema"}},"requirements":{"$ref":"#/components/schemas/ProductRequirementResponseSchema"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"imageCount":{"type":"integer"},"relevance":{"type":"number"},"visibility":{"$ref":"#/components/schemas/ProductVisibilityENUM"},"commission":{"type":"integer","description":"A commission to be paid to the supplier after delivery."},"productWarrantyUid":{"$ref":"#/components/schemas/UID"},"excludeFromStatistics":{"type":"boolean"},"purchasePrice":{"type":"integer"},"numberOfPieces":{"type":"integer","description":"Indicates how many packages/parts the product consists of."},"limitToStoreUids":{"$ref":"#/components/schemas/LimitToStoreUidsSchema"},"tradeUnit":{"type":"integer"}}},"AllowSaleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be sold|\n| NO | Do not allow the product to be sold|\n| NOT_BEFORE_DATE | Do not allow the product to be sold before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowSaleENUM","type":"string"},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"ProductGtinResponseSchema":{"title":"ProductGtinResponseSchema","type":"object","required":["gtin","primary","type"],"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}}},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"ProductGroupPathSchema":{"title":"ProductGroupPathSchema","type":"object","properties":{"name":{"type":"string"},"parentUid":{"$ref":"#/components/schemas/UID"},"productGroupUid":{"$ref":"#/components/schemas/UID"}},"required":["name","parentUid","productGroupUid"]},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"SerialNoRequiredENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NO | No Serial number required|\n| ON_SALE | Can register serial number when selling a product (Serial number is optional)|\n| ON_RECEIVE | Must register serial number when receiving and selling product (Serial number is required)|","enum":["NO","ON_SALE","ON_RECEIVE"],"title":"SerialNoRequiredENUM","type":"string"},"ProductSupplierResponseSchema":{"title":"ProductSupplierResponseSchema","type":"object","required":["name","supplierUid","supplierProductUid","purchasePrice","currency","supplierSku"],"properties":{"name":{"type":"string"},"supplierUid":{"$ref":"#/components/schemas/UID"},"supplierProductUid":{"$ref":"#/components/schemas/UID"},"purchasePrice":{"type":"integer"},"currency":{"type":"string","description":"ISO 4217 code"},"supplierSku":{"type":"string"}}},"ProductLinkResponseSchema":{"title":"ProductLinkResponseSchema","allOf":[{"properties":{"productLinkUid":{"$ref":"#/components/schemas/UID"}},"required":["productLinkUid"],"type":"object"},{"$ref":"#/components/schemas/ProductLinkRequestSchema"}]},"ProductLinkRequestSchema":{"title":"ProductLinkRequestSchema","type":"object","properties":{"linkType":{"$ref":"#/components/schemas/ProductLinkTypeENUM"},"productUid":{"$ref":"#/components/schemas/UID"},"productLinkUid":{"$ref":"#/components/schemas/UID"}},"required":["linkType","productUid"]},"ProductLinkTypeENUM":{"enum":["INSURANCE","ALTERNATIVE","ACCESSORY","SPARE_PART","SERVICE","AUTO_ADD","FREIGHT_SERVICE"],"title":"ProductLinkTypeENUM","type":"string","description":"| ENUM | Description |\n|-------|-------------|\n| INSURANCE | Insurance products allowed to be added to the product |\n| ALTERNATIVE | Alternative products if the main product is not available |\n| ACCESSORY | Accessory products for the main product |\n| SPARE_PART | Spare part that can be used to repair the product |\n| SERVICE | Service products. |\n| FREIGHT_SERVICE | Freight service products. |\n| AUTO_ADD | The products will be auto added to the order and can not be removed without removing the main product. |"},"ProductRequirementResponseSchema":{"title":"ProductRequirementResponseSchema","type":"object","description":"ProductRequirementResponseSchema","required":["requireCustomer","requireCustomerMobile","requireCustomerEmail","requireCustomerDeliveryAddress","orderItemReference"],"properties":{"requireCustomer":{"type":"boolean"},"requireCustomerMobile":{"type":"boolean"},"requireCustomerEmail":{"type":"boolean"},"requireCustomerDeliveryAddress":{"type":"boolean"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."}}},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"ProductVisibilityENUM":{"type":"string","title":"ProductVisibilityENUM","enum":["ALWAYS_VISIBLE","NOT_VISIBLE"]},"LimitToStoreUidsSchema":{"title":"LimitToStoreUidsSchema","type":"array","description":"Limit the product to be used for a list of storeUids.","items":{"$ref":"#/components/schemas/UID"}},"DeliveryServiceRequestSchema":{"title":"DeliveryServiceRequestSchema","type":"object","required":["postalCode","productUids"],"properties":{"postalCode":{"type":"string"},"productUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}}},"requestBodies":{"DeliveryServiceRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryServiceRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/delivery-services":{"post":{"summary":"List all available service products for an order","tags":["OrderDelivery"],"responses":{"200":{"$ref":"#/components/responses/DeliveryServiceListResponse"}},"operationId":"post-delivery-services","description":"List all available service products for an order\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","requestBody":{"$ref":"#/components/requestBodies/DeliveryServiceRequest"}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/order-delivery.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
