# Order

Order

## Get Order by order uid

> Get order by order uid

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseSchema"}}},"description":"Example response"}},"schemas":{"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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"},"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","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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":{"enum":["NOT_STARTED","IN_PROGRESS","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"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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|"}}},"paths":{"/tenants/{tenantUid}/orders/{orderUid}":{"get":{"description":"Get order by order uid","operationId":"get-tenants-orders-uid","parameters":[],"responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"summary":"Get Order by order uid","tags":["Order"]}}}}
```

## List orders

> List all orders.\
> \
> The query parameter \`orderStatus\` can not be used in combination with \`orderOrderState\`, \`orderSettleState\` or \`orderDeliveryState\`.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"orderStatusesQuery":{"description":"Reference to an OrderStatus.","explode":false,"in":"query","name":"orderStatuses","schema":{"items":{"$ref":"#/components/schemas/OrderStatusENUM"},"type":"array"},"style":"form"},"orderTypesQuery":{"description":"Reference to the OrderType.","explode":false,"in":"query","name":"orderTypes","required":false,"schema":{"items":{"$ref":"#/components/schemas/OrderTypeENUM"},"type":"array"},"style":"form"},"orderExternalOrderNumberQuery":{"description":"External reference to a orderUid.","in":"query","name":"orderExternalOrderNumber","required":false,"schema":{"type":"string"}},"orderExternalVoucherNumberQuery":{"description":"External reference to a voucher id.","in":"query","name":"orderExternalVoucherNumber","required":false,"schema":{"type":"string"}},"orderCustomerUidQuery":{"description":"Reference to a Customer uid.","in":"query","name":"orderCustomerUid","required":false,"schema":{"$ref":"#/components/schemas/UID"}},"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"},"orderOrderStatesQuery":{"description":"Reference to a list of OrderStates.","explode":false,"in":"query","name":"orderOrderStates","schema":{"items":{"$ref":"#/components/schemas/OrderOrderStateENUM"},"type":"array"},"style":"form"},"orderSettleStatesQuery":{"description":"Reference to an OrderSettleState.","explode":false,"in":"query","name":"orderSettleStates","schema":{"items":{"$ref":"#/components/schemas/OrderSettleStateENUM"},"type":"array"},"style":"form"},"orderDeliveryStatesQuery":{"description":"Reference to an OrderDeliveryState.","explode":false,"in":"query","name":"orderDeliveryStates","schema":{"items":{"$ref":"#/components/schemas/OrderDeliveryStateENUM"},"type":"array"},"style":"form"},"orderHandlingUidQuery":{"description":"Reference to a handling uid.","explode":false,"in":"query","name":"orderHandlingUids","schema":{"items":{"$ref":"#/components/schemas/UID"},"type":"array"},"style":"form"},"orderHandlingStatesQuery":{"description":"Reference to an HandlingState. Use with orderHandlingUid","explode":false,"in":"query","name":"orderHandlingStates","schema":{"items":{"$ref":"#/components/schemas/HandlingStateENUM"},"type":"array"},"style":"form"},"orderSettledAtFromQuery":{"name":"orderSettledAtFrom","in":"query","schema":{"type":"string","format":"date-time"},"description":"Filter by settled at from a specific date"},"orderSettledAtToQuery":{"name":"orderSettledAtTo","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter by settled at to a specific date"},"orderCreatedAtFromQuery":{"name":"orderCreatedAtFrom","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter by created at from a specific date"},"orderCreatedAtToQuery":{"name":"orderCreatedAtTo","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter by created at to a specific date"},"orderTillUidQuery":{"description":"Reference to a till uid.","explode":false,"in":"query","name":"orderTillUid","schema":{"$ref":"#/components/schemas/UID"},"style":"form"},"orderTenantUserUidsQuery":{"description":"Reference to a tenantUserUid.","explode":false,"in":"query","name":"orderTenantUserUids","schema":{"items":{"$ref":"#/components/schemas/UID"},"type":"array"},"style":"form"}},"schemas":{"OrderStatusENUM":{"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| DELIVERED | Order is completely delivered|\n| READY_FOR_DELIVERY | Order is settled and ready to be delivered|\n| UNPAID | Order is settled with settlementCode INVOICE and is not fully paid|\n| CONFIRMED | Order is confirmed|","enum":["OPEN","PARKED","CANCELED","READY_FOR_DELIVERY","DELIVERED","UNPAID","CONFIRMED"],"title":"OrderStatusENUM","type":"string"},"OrderTypeENUM":{"enum":["OFFER","ORDER","PAYMENT"],"title":"OrderTypeENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"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"},"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"},"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"},"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"},"HandlingStateENUM":{"enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"HandlingStateENUM","type":"string"},"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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"}}},"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","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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"},"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"},"OrderSettlementTotalsSchema":{"title":"OrderSettlementTotalsSchema","type":"object","required":["change","remaining","remainingRounded","totals","remainingPrePayment"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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|"},"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":{"OrderListResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrderResponseSchema"},"type":"array"},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"],"type":"object"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders":{"get":{"description":"List all orders.\n\nThe query parameter `orderStatus` can not be used in combination with `orderOrderState`, `orderSettleState` or `orderDeliveryState`.","operationId":"get-tenants-stores-orders","parameters":[{"$ref":"#/components/parameters/orderStatusesQuery"},{"$ref":"#/components/parameters/orderTypesQuery"},{"$ref":"#/components/parameters/orderExternalOrderNumberQuery"},{"$ref":"#/components/parameters/orderExternalVoucherNumberQuery"},{"$ref":"#/components/parameters/orderCustomerUidQuery"},{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"},{"$ref":"#/components/parameters/orderOrderStatesQuery"},{"$ref":"#/components/parameters/orderSettleStatesQuery"},{"$ref":"#/components/parameters/orderDeliveryStatesQuery"},{"$ref":"#/components/parameters/orderHandlingUidQuery"},{"$ref":"#/components/parameters/orderHandlingStatesQuery"},{"$ref":"#/components/parameters/orderSettledAtFromQuery"},{"$ref":"#/components/parameters/orderSettledAtToQuery"},{"$ref":"#/components/parameters/orderCreatedAtFromQuery"},{"$ref":"#/components/parameters/orderCreatedAtToQuery"},{"$ref":"#/components/parameters/orderTillUidQuery"},{"$ref":"#/components/parameters/orderTenantUserUidsQuery"}],"responses":{"200":{"$ref":"#/components/responses/OrderListResponse"}},"summary":"List orders","tags":["Order"]}}}}
```

## Create a new order

> Create a new 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":"Order","description":"Order"}],"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":{"OrderCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreateRequestSchema"}}}}},"schemas":{"OrderCreateRequestSchema":{"allOf":[{"$ref":"#/components/schemas/OrderUpdateRequestSchema"},{"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"systemOrigin":{"type":"string"},"compensationReasonUid":{"$ref":"#/components/schemas/UID"}}}],"title":"OrderCreateRequestSchema","type":"object"},"OrderUpdateRequestSchema":{"title":"OrderUpdateRequestSchema","type":"object","properties":{"customerAddress":{"$ref":"#/components/schemas/OrderAddressSchema"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"customerContactUid":{"$ref":"#/components/schemas/OptionalUID"},"deviceIdentifier":{"type":"string"},"externalOrderNumber":{"type":"string"},"externalVoucherNumber":{"type":"string"},"invoiceCustomerAddressUid":{"$ref":"#/components/schemas/UID"},"invoiceAddress":{"$ref":"#/components/schemas/OrderAddressSchema"},"note":{"description":"Note visible on the receipt.","type":"string"},"internalNote":{"type":"string","description":"Internal note, not visible on the receipt."},"type":{"$ref":"#/components/schemas/OrderTypeENUM"},"validUntil":{"format":"date-time","type":"string"},"vatFree":{"type":"boolean"},"vatPrint":{"$ref":"#/components/schemas/VatPrintENUM"}}},"OrderAddressSchema":{"allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"properties":{"vatNumber":{"$ref":"#/components/schemas/VatNumberTYPE"}}}],"title":"OrderCreateRequestSchema","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"},"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-_]*"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"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"},"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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":""},"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"},"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"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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":{"enum":["NOT_STARTED","IN_PROGRESS","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"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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":{"post":{"description":"Create a new order.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"post-tenants-stores-orders","requestBody":{"$ref":"#/components/requestBodies/OrderCreateRequest"},"responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"summary":"Create a new order","tags":["Order"]}}}}
```

## Import new order from external source

> Import new order from extern source. Complete order with lines and possibly settlements.\
> sellerDisplayName can be set if an integrationToken is used. If no integrationToken and sellerDisplayName is set, an error is returned.\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"integrationToken":[]},{"accessToken":[]}],"components":{"securitySchemes":{"integrationToken":{"scheme":"bearer","type":"http"},"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"}},"requestBodies":{"OrderCreateImportRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreateImportSchema"}}}}},"schemas":{"OrderCreateImportSchema":{"description":"Schema for creating a complete order in one request.","title":"OrderCreateImportSchema","type":"object","required":["items","orderTotals","type","validUntil","vatFree"],"properties":{"orderDate":{"format":"date-time","type":"string","nullable":true},"customerAddress":{"$ref":"#/components/schemas/OrderAddressSchema"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"customerContactUid":{"$ref":"#/components/schemas/OptionalUID"},"externalOrderNumber":{"type":"string"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/OrderAddressSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemCreateSchema"}},"note":{"type":"string"},"internalNote":{"type":"string","description":"Internal note, not visible on the receipt."},"orderTotals":{"$ref":"#/components/schemas/OrderTotalsImportSchema"},"settlements":{"type":"array","items":{"$ref":"#/components/schemas/OrderSettlementImportSchema"}},"type":{"$ref":"#/components/schemas/OrderTypeENUM"},"systemOrigin":{"type":"string"},"validUntil":{"format":"date-time","type":"string","nullable":true},"vatFree":{"type":"boolean"},"vatPrint":{"$ref":"#/components/schemas/VatPrintENUM"},"orderUid":{"$ref":"#/components/schemas/UID"},"tenantUserDisplayName":{"type":"string"},"handlingUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"orderDeliveries":{"type":"array","items":{"$ref":"#/components/schemas/OrderImportOrderDeliveryCreateRequestSchema"}}}},"OrderAddressSchema":{"allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"properties":{"vatNumber":{"$ref":"#/components/schemas/VatNumberTYPE"}}}],"title":"OrderCreateRequestSchema","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"},"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-_]*"},"OrderItemCreateSchema":{"title":"OrderItemCreateSchema","type":"object","required":["productUid"],"properties":{"discountReasonCode":{"type":"string"},"externalId":{"description":"External reference to order line","type":"string"},"itemDiscountAmount":{"type":"integer"},"itemDiscountPercentage":{"description":"Used to calculate itemDiscountAmount.","type":"integer"},"itemPrice":{"type":"integer"},"note":{"type":"string"},"orderItemLink":{"$ref":"#/components/schemas/OrderItemLinkSchema"},"productUid":{"$ref":"#/components/schemas/UID"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}},"quantityOrdered":{"type":"integer"},"reserveStock":{"default":false,"description":"Set this to true to only resevere the stock from the warehouse when the order is settled.","type":"boolean","deprecated":true},"deliveryUid":{"$ref":"#/components/schemas/UID"},"returnReasonCode":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"description":"Product SKU","type":"string"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/OptionalUID"},"orderItemUid":{"$ref":"#/components/schemas/OptionalUID"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"sortOrder":{"type":"integer"},"itemCostPrice":{"type":"integer","description":"When a product has orderSpecificCost=true: Can set costPrice on the orderItem\nIf itemCostPrice is set and orderSpecificCost=false for the product, an error is returned"},"productName":{"type":"string","description":"When a product has orderSpecificName=true: Can set productName on the orderItem\nIf itemCostPrice is set and orderSpecificName=false for the product, an error is returned"}}},"OrderItemLinkSchema":{"description":"OrderItemLinkSchema","title":"OrderItemLinkSchema","type":"object","properties":{"linkType":{"$ref":"#/components/schemas/OrderLinkTypeRequestENUM"},"orderItemUid":{"$ref":"#/components/schemas/UID"}},"required":["linkType","orderItemUid"]},"OrderLinkTypeRequestENUM":{"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 the orderline with the product to insure |\n| COMPENSATION | Reference to the orderline with the product to compensate |\n| SERVICE | Reference to orderline with service product |\n| FREIGHT_SERVICE | Reference to orderline with freight service product |","enum":["CREDIT","INSURANCE","COMPENSATION","SERVICE","FREIGHT_SERVICE"],"title":"OrderLinkTypeRequestENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"OrderTotalsImportSchema":{"description":"","properties":{"grandTotal":{"type":"integer"},"totalDiscount":{"type":"integer"},"totalVat":{"type":"integer"}},"required":["grandTotal"],"title":"OrderTotalsImportSchema","type":"object"},"OrderSettlementImportSchema":{"description":"Create a new settlement from external source","title":"OrderSettlementImportSchema","type":"object","required":["amount","storePaymentMethodUid"],"properties":{"amount":{"description":"Amount to settle in øre","type":"integer"},"externalId":{"description":"External reference for the settlement","type":"string"},"externalPaymentReference":{"description":"Reference to payment, ex: reference to an Adyen payment id. Possible use: Refund directly from Flow Retail","type":"string"},"settlementUid":{"$ref":"#/components/schemas/UID"},"settledAt":{"format":"date-time","type":"string"},"storePaymentMethodUid":{"$ref":"#/components/schemas/UID"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/SettlementParameterRequestSchema"}}}},"SettlementParameterRequestSchema":{"description":"settlement parameters request","title":"SettlementParameterRequestSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"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"},"OrderImportOrderDeliveryCreateRequestSchema":{"title":"OrderImportOrderDeliveryCreateRequestSchema","type":"object","properties":{"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddressRequestSchema"},"deliveryState":{"$ref":"#/components/schemas/DeliveryStateENUM"},"deliveryDate":{"type":"string","format":"date-time"},"externalDeliveryReference":{"type":"string"},"trackingNumber":{"deprecated":true,"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/DeprecatedUID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/DeprecatedUID"},"signature":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"deliveryUid":{"$ref":"#/components/schemas/UID"},"shipping":{"$ref":"#/components/schemas/OrderDeliveryShippingRequestSchema"}},"required":["warehouseUid","deliveryUid"]},"DeliveryAddressRequestSchema":{"allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"}],"title":"DeliveryAddressRequestSchema","type":"object"},"DeliveryStateENUM":{"enum":["NOT_DELIVERED","IN_TRANSIT","DELIVERED","NEW","STARTED"],"title":"DeliveryStateENUM","type":"string"},"DeprecatedUID":{"title":"DeprecatedUID","type":"string","pattern":"^[A-Za-z0-9-_]+","deprecated":true},"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"}}},"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"}}},"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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":""},"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"},"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"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"},"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"},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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":{"enum":["NOT_STARTED","IN_PROGRESS","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"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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/import":{"post":{"description":"Import new order from extern source. Complete order with lines and possibly settlements.\nsellerDisplayName can be set if an integrationToken is used. If no integrationToken and sellerDisplayName is set, an error is returned.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"post-tenants-stores-orders-import","requestBody":{"$ref":"#/components/requestBodies/OrderCreateImportRequest"},"responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"summary":"Import new order from external source","tags":["Order"]}}}}
```

## Search for order

> The field \`orderStatuses\` can not be used in combination with \`orderStates\`, \`settleStates\` or \`deliveryStates\`.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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"},"OrderSearchSchema":{"description":"Search for orders. \n\nOnly one of the keys in the search object will be used in a search. \n\nIf more than one key is supplied the keys will be used in the priorty of how they appear in the object. \nExample: query will be used first if it is supplied, if it is not supplied the customer key will be used, and so on.\n\nAn empty string will be ignored, and handeled as if the key did not exist in the payload.\n\nFuzzy search means that it will try to find words that contains the query string that is supplied. \nExample: If you search for \"Ol\" you will get \"Olsen\", \"Olstad\", \"Bolset\", \"Ormebol\", etc ..","title":"OrderSearchSchema","type":"object","properties":{"customerQuery":{"description":"Search for orders containting this customer. The customer can be specific by firstname, lastname, phonenumber or email. This is a fuzzy search.","type":"string"},"customerUid":{"$ref":"#/components/schemas/UID"},"fromDateTime":{"format":"date-time","type":"string","deprecated":true},"createdAtFrom":{"format":"date-time","type":"string"},"settledAtFrom":{"format":"date-time","type":"string"},"lastModifiedAtFrom":{"format":"date-time","type":"string"},"orderNumber":{"description":"Search for an order with a specific ordernumber. This is an exact lookup","type":"string"},"productSku":{"description":"Search for orders containing the product. This must be a SKU and is an exact lookup.","type":"string"},"query":{"description":"General query string. Use to search for orders where the server decided the query conditions.\nThis is a fuzzy search.","type":"string"},"toDateTime":{"format":"date-time","type":"string","deprecated":true},"createdAtTo":{"format":"date-time","type":"string"},"settledAtTo":{"format":"date-time","type":"string"},"lastModifiedAtTo":{"format":"date-time","type":"string"},"tenantUserUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"orderHandlingStates":{"type":"array","items":{"$ref":"#/components/schemas/HandlingStateENUM"}},"orderHandlingUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"orderStates":{"type":"array","items":{"$ref":"#/components/schemas/OrderOrderStateENUM"}},"settleStates":{"type":"array","items":{"$ref":"#/components/schemas/OrderSettleStateENUM"}},"deliveryStates":{"type":"array","description":"Reference to an array of deliveryStates.","items":{"$ref":"#/components/schemas/OrderDeliveryStateENUM"}},"orderStatuses":{"type":"array","description":"Reference to a list of orderStatuses.","items":{"$ref":"#/components/schemas/OrderStatusENUM"}},"orderTypes":{"type":"array","description":"Reference to a list of orderTypes","items":{"$ref":"#/components/schemas/OrderTypeENUM"}},"productUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"tenantPaymentMethodUids":{"type":"array","description":"Search for order containing one of the specified payment methods.","items":{"$ref":"#/components/schemas/UID"}},"reservationTypes":{"type":"array","items":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}},"isCustomerOrder":{"type":"boolean","description":"If true, returns orders with orderlines that has either reservationType='REQUEST_PURCHASEORDER' or has a link to a purchaseOrder item"},"hasReservedLines":{"type":"boolean","description":"When true, the search returns only orders that include at least one order line with a reservation (reservedQuantity <> 0).\nWhen omitted or false, reservation state does not affect the results."},"amountRange":{"$ref":"#/components/schemas/AmountRangeSchema"},"orderDateFrom":{"type":"string","format":"date-time"},"orderDateTo":{"type":"string","format":"date-time"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"HandlingStateENUM":{"enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"HandlingStateENUM","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"},"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"},"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"},"OrderStatusENUM":{"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| DELIVERED | Order is completely delivered|\n| READY_FOR_DELIVERY | Order is settled and ready to be delivered|\n| UNPAID | Order is settled with settlementCode INVOICE and is not fully paid|\n| CONFIRMED | Order is confirmed|","enum":["OPEN","PARKED","CANCELED","READY_FOR_DELIVERY","DELIVERED","UNPAID","CONFIRMED"],"title":"OrderStatusENUM","type":"string"},"OrderTypeENUM":{"enum":["OFFER","ORDER","PAYMENT"],"title":"OrderTypeENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"AmountRangeSchema":{"title":"AmountRangeSchema","type":"object","description":"Search for an amount range","required":["from","to"],"properties":{"from":{"type":"integer"},"to":{"type":"integer"}}},"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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"}}},"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","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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"},"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"},"OrderSettlementTotalsSchema":{"title":"OrderSettlementTotalsSchema","type":"object","required":["change","remaining","remainingRounded","totals","remainingPrePayment"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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|"},"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"}},"requestBodies":{"OrderSearchRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderSearchSchema"}}}}},"responses":{"OrderListResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrderResponseSchema"},"type":"array"},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"],"type":"object"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/search":{"post":{"description":"The field `orderStatuses` can not be used in combination with `orderStates`, `settleStates` or `deliveryStates`.","operationId":"post-tenants-stores-orders-search","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"requestBody":{"$ref":"#/components/requestBodies/OrderSearchRequest"},"responses":{"200":{"$ref":"#/components/responses/OrderListResponse"}},"summary":"Search for order","tags":["Order"]}}}}
```

## Update sales order reservations

> Set reservationType on order items to be reserved on a warehouse or a purchaseorder.\
> Use PURCHASE\_ORDER\_CONFIRMED to mark order items as '\`Purchase order created in external system\`'\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER,PURCHASE\_ORDER<br>

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderItemsReservationUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderItemsReservationUpdateSchema"}}}}},"schemas":{"OrderItemsReservationUpdateSchema":{"title":"OrderItemsReservationUpdateSchema","type":"object","required":["reservationType","orders"],"properties":{"uid":{"description":"The uid must be warehouseUid if the reservationType is `WAREHOUSE`, purchaseOrderItemUid if it is `PURCHASEORDER` and receivementItemUid if it is `PURCHASEORDER_CONFIRMED`","$ref":"#/components/schemas/UID"},"reservationType":{"type":"string","enum":["WAREHOUSE","PURCHASEORDER","PURCHASEORDER_CONFIRMED"]},"orders":{"description":"A list of all the orders with order items that should be marked as ready for delivery","type":"array","items":{"$ref":"#/components/schemas/OrderItemUpdateReservationSchema"}}},"description":"If reservationType == WAREHOUSE, uid must have a value pointing to a legal warehouseUid.\nIf reservationType == PURCHASE, uid must have a value pointing to a legal purchase order."},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OrderItemUpdateReservationSchema":{"title":"OrderItemUpdateReservationSchema","type":"object","required":["orderUid","orderItemUid"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"}}}}},"paths":{"/tenants/{tenantUid}/orders/reservations":{"post":{"summary":"Update sales order reservations","tags":["Order"],"responses":{"204":{"description":"No Content"}},"operationId":"post-tenants-orders-reservations","description":"Set reservationType on order items to be reserved on a warehouse or a purchaseorder.\nUse PURCHASE_ORDER_CONFIRMED to mark order items as '`Purchase order created in external system`'\n\nRequired permissions: SALES_ORDER,RETURN_ORDER,PURCHASE_ORDER\n","requestBody":{"$ref":"#/components/requestBodies/OrderItemsReservationUpdateRequest"}}}}}
```

## Search for orders in all stores on tenant

> Optionally narrow down the search to order in given stores and organizatons.\
> \
> The field \`orderStatuses\` can not be used in combination with the fields \`orderStates\`, \`settleStates\` or \`deliveryStates\`.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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"},"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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"},"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","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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":{"enum":["NOT_STARTED","IN_PROGRESS","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"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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|"},"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"},"TenantOrderSearchSchema":{"description":"Search for orders in all stores on tenant. \n\nAn empty string will be ignored, and handled as if the key did not exist in the payload.\n\nFuzzy search means that it will try to find words that contains the query string that is supplied. The search is case-insensitive. \nExample: If you search for \"Ol\" you will get \"Olsen\", \"Olstad\", \"Bolset\", \"Ormebol\", kolstad@example.com, etc ..","title":"TenantOrderSearchSchema","type":"object","properties":{"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"organizationUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"customerQuery":{"description":"Search for orders containting this customer. The customer can be specific by firstname, lastname, phonenumber or email. This is a fuzzy search.","type":"string"},"customerUid":{"$ref":"#/components/schemas/UID"},"fromDateTime":{"format":"date-time","type":"string","deprecated":true},"createdAtFrom":{"format":"date-time","type":"string"},"settledAtFrom":{"format":"date-time","type":"string"},"lastModifiedAtFrom":{"format":"date-time","type":"string"},"orderNumber":{"description":"Search for an order with a specific ordernumber. This is an exact lookup","type":"string"},"externalOrderNumber":{"description":"Search for an order with a specific externalOrderNumber. This is an exact lookup","type":"string"},"externalVoucherNumber":{"description":"Search for an order with a specific externalVouchermber. This is an exact lookup","type":"string"},"productSku":{"description":"Search for orders containing the product. This must be a SKU and is an exact lookup.","type":"string"},"toDateTime":{"format":"date-time","type":"string","deprecated":true},"createdAtTo":{"format":"date-time","type":"string"},"settledAtTo":{"format":"date-time","type":"string"},"lastModifiedAtTo":{"format":"date-time","type":"string"},"tenantUserUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"orderStates":{"type":"array","description":"Reference to a list of orderStates.","items":{"$ref":"#/components/schemas/OrderOrderStateENUM"}},"settleStates":{"type":"array","description":"Reference to a list of settleStates.","items":{"$ref":"#/components/schemas/OrderSettleStateENUM"}},"deliveryStates":{"type":"array","description":"Reference to an array of deliveryStates.","items":{"$ref":"#/components/schemas/OrderDeliveryStateENUM"}},"orderStatuses":{"type":"array","description":"Reference to a list of orderStatuses.","items":{"$ref":"#/components/schemas/OrderStatusENUM"}},"orderTypes":{"type":"array","description":"Reference to a list of orderTypes","items":{"$ref":"#/components/schemas/OrderTypeENUM"}},"orderHandlingStates":{"type":"array","items":{"$ref":"#/components/schemas/HandlingStateENUM"}},"orderHandlingUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"deliverFromStoreUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"query":{"type":"string","description":"General fuzzy search."},"productUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"tenantPaymentMethodUids":{"type":"array","description":"Search for order containing one of the specified payment methods.","items":{"$ref":"#/components/schemas/UID"}},"reservationTypes":{"type":"array","items":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}},"isCustomerOrder":{"type":"boolean","description":"If true, returns orders with orderlines that has either reservationType='REQUEST_PURCHASEORDER' or has a link to a purchaseOrder item"},"hasReservedLines":{"type":"boolean","description":"When true, the search returns only orders that include at least one order line with a reservation (reservedQuantity <> 0).\nWhen omitted or false, reservation state does not affect the results."},"amountRange":{"$ref":"#/components/schemas/AmountRangeSchema"},"orderDateFrom":{"type":"string","format":"date-time"},"orderDateTo":{"type":"string","format":"date-time"}}},"OrderStatusENUM":{"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| DELIVERED | Order is completely delivered|\n| READY_FOR_DELIVERY | Order is settled and ready to be delivered|\n| UNPAID | Order is settled with settlementCode INVOICE and is not fully paid|\n| CONFIRMED | Order is confirmed|","enum":["OPEN","PARKED","CANCELED","READY_FOR_DELIVERY","DELIVERED","UNPAID","CONFIRMED"],"title":"OrderStatusENUM","type":"string"},"AmountRangeSchema":{"title":"AmountRangeSchema","type":"object","description":"Search for an amount range","required":["from","to"],"properties":{"from":{"type":"integer"},"to":{"type":"integer"}}}},"responses":{"OrderListResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrderResponseSchema"},"type":"array"},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"],"type":"object"}}},"description":"Example response"}},"requestBodies":{"TenantOrderSearchRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantOrderSearchSchema"}}}}}},"paths":{"/tenants/{tenantUid}/orders/search":{"post":{"description":"Optionally narrow down the search to order in given stores and organizatons.\n\nThe field `orderStatuses` can not be used in combination with the fields `orderStates`, `settleStates` or `deliveryStates`.","operationId":"post-tenants-orders-search","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"responses":{"200":{"$ref":"#/components/responses/OrderListResponse"}},"summary":"Search for orders in all stores on tenant","tags":["Order"],"requestBody":{"$ref":"#/components/requestBodies/TenantOrderSearchRequest"}}}}}
```

## Get order details

> Get order details. This will return a complete order object.\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseSchema"}}},"description":"Example response"}},"schemas":{"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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"},"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","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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":{"enum":["NOT_STARTED","IN_PROGRESS","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"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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|"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}":{"get":{"description":"Get order details. This will return a complete order object.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"get-tenants-stores-orders-details","responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"summary":"Get order details","tags":["Order"]}}}}
```

## Order Operations

> Order Operations\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseSchema"}}},"description":"Example response"}},"schemas":{"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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"},"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","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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":{"enum":["NOT_STARTED","IN_PROGRESS","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"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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|"},"OrderOperationRequestSchema":{"title":"OrderOperationRequestSchema","type":"object","required":["operation"],"properties":{"operation":{"$ref":"#/components/schemas/OrderOperationENUM"}}},"OrderOperationENUM":{"title":"OrderOperationENUM","type":"string","enum":["RECALCULATE_SETTLEMENTS","RECALCULATE_COSTPRICES"],"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| RECALCULATE_SETTLEMENTS | Do a sum of settlements on order and calculate the settle_state on order|\n| RECALCULATE_COSTPRICES | Retreive updated costprices on the order linse of an order. Can only be done when order state = PARKED|"}},"requestBodies":{"OrderOperationRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOperationRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}":{"post":{"summary":"Order Operations","description":"Order Operations\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"post-tenants-stores-orders-details","responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"requestBody":{"$ref":"#/components/requestBodies/OrderOperationRequest"},"tags":["Order"]}}}}
```

## Update order details

> Update order details.\
> \
> Order details can only be updated when orderState = OPEN and settleState != COMPLETE\
> \
> Exception:\
> \
> externalOrderNumber and externalVoucherNumber can be changed when orderState = COMPLETE\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderUpdateRequestSchema"}}}}},"schemas":{"OrderUpdateRequestSchema":{"title":"OrderUpdateRequestSchema","type":"object","properties":{"customerAddress":{"$ref":"#/components/schemas/OrderAddressSchema"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"customerContactUid":{"$ref":"#/components/schemas/OptionalUID"},"deviceIdentifier":{"type":"string"},"externalOrderNumber":{"type":"string"},"externalVoucherNumber":{"type":"string"},"invoiceCustomerAddressUid":{"$ref":"#/components/schemas/UID"},"invoiceAddress":{"$ref":"#/components/schemas/OrderAddressSchema"},"note":{"description":"Note visible on the receipt.","type":"string"},"internalNote":{"type":"string","description":"Internal note, not visible on the receipt."},"type":{"$ref":"#/components/schemas/OrderTypeENUM"},"validUntil":{"format":"date-time","type":"string"},"vatFree":{"type":"boolean"},"vatPrint":{"$ref":"#/components/schemas/VatPrintENUM"}}},"OrderAddressSchema":{"allOf":[{"$ref":"#/components/schemas/BaseAddressSchema"},{"properties":{"vatNumber":{"$ref":"#/components/schemas/VatNumberTYPE"}}}],"title":"OrderCreateRequestSchema","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"},"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-_]*"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"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"},"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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":""},"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"},"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"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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":{"enum":["NOT_STARTED","IN_PROGRESS","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"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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}":{"put":{"description":"Update order details.\n\nOrder details can only be updated when orderState = OPEN and settleState != COMPLETE\n\nException:\n\nexternalOrderNumber and externalVoucherNumber can be changed when orderState = COMPLETE\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"put-tenants-stores-orders-details","requestBody":{"$ref":"#/components/requestBodies/OrderUpdateRequest"},"responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"summary":"Update order details","tags":["Order"]}}}}
```

## Delete an order

> Delete 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":"Order","description":"Order"}],"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}":{"delete":{"description":"Delete an order.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"delete-tenants-stores-orders-details","responses":{"204":{"description":"No Content"}},"summary":"Delete an order","tags":["Order"]}}}}
```

## Create new order item

> Creates a new item on 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":"Order","description":"Order"}],"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":{"OrderItemCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderItemCreateSchema"}}}}},"schemas":{"OrderItemCreateSchema":{"title":"OrderItemCreateSchema","type":"object","required":["productUid"],"properties":{"discountReasonCode":{"type":"string"},"externalId":{"description":"External reference to order line","type":"string"},"itemDiscountAmount":{"type":"integer"},"itemDiscountPercentage":{"description":"Used to calculate itemDiscountAmount.","type":"integer"},"itemPrice":{"type":"integer"},"note":{"type":"string"},"orderItemLink":{"$ref":"#/components/schemas/OrderItemLinkSchema"},"productUid":{"$ref":"#/components/schemas/UID"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}},"quantityOrdered":{"type":"integer"},"reserveStock":{"default":false,"description":"Set this to true to only resevere the stock from the warehouse when the order is settled.","type":"boolean","deprecated":true},"deliveryUid":{"$ref":"#/components/schemas/UID"},"returnReasonCode":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"description":"Product SKU","type":"string"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/OptionalUID"},"orderItemUid":{"$ref":"#/components/schemas/OptionalUID"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"sortOrder":{"type":"integer"},"itemCostPrice":{"type":"integer","description":"When a product has orderSpecificCost=true: Can set costPrice on the orderItem\nIf itemCostPrice is set and orderSpecificCost=false for the product, an error is returned"},"productName":{"type":"string","description":"When a product has orderSpecificName=true: Can set productName on the orderItem\nIf itemCostPrice is set and orderSpecificName=false for the product, an error is returned"}}},"OrderItemLinkSchema":{"description":"OrderItemLinkSchema","title":"OrderItemLinkSchema","type":"object","properties":{"linkType":{"$ref":"#/components/schemas/OrderLinkTypeRequestENUM"},"orderItemUid":{"$ref":"#/components/schemas/UID"}},"required":["linkType","orderItemUid"]},"OrderLinkTypeRequestENUM":{"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 the orderline with the product to insure |\n| COMPENSATION | Reference to the orderline with the product to compensate |\n| SERVICE | Reference to orderline with service product |\n| FREIGHT_SERVICE | Reference to orderline with freight service product |","enum":["CREDIT","INSURANCE","COMPENSATION","SERVICE","FREIGHT_SERVICE"],"title":"OrderLinkTypeRequestENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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"},"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"},"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","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"},"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"},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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":{"enum":["NOT_STARTED","IN_PROGRESS","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"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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":{"post":{"description":"Creates a new item on an order.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"post-tenants-stores-orders-items","requestBody":{"$ref":"#/components/requestBodies/OrderItemCreateRequest"},"responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"summary":"Create new order item","tags":["Order"]}}}}
```

## Get available payment methods for an order

> Get available payment methods 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":"Order","description":"Order"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"}},"responses":{"OrderPaymentMethodListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderPaymentMethodResponseSchema"}}}}}}}},"schemas":{"OrderPaymentMethodResponseSchema":{"title":"OrderPaymentMethodResponseSchema","type":"object","required":["allowCashback","allowPrepayment","name","description","parameters","paymentCode","storePaymentMethodUid","requirements","settlementCode","visibility","position","minimumPaymentAmount","amountInput","useRounding"],"properties":{"allowCashback":{"type":"boolean"},"allowAmount":{"type":"boolean","deprecated":true},"allowPrepayment":{"type":"boolean"},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/AvailablePaymentMethodParametersResponseSchema"}},"paymentCode":{"$ref":"#/components/schemas/PaymentMethodCodeENUM"},"storePaymentMethodUid":{"$ref":"#/components/schemas/UID"},"requirements":{"$ref":"#/components/schemas/PaymentMethodRequirementResponseSchema"},"requireExclusiveUse":{"type":"boolean","deprecated":true},"settlementCode":{"type":"string"},"visibility":{"$ref":"#/components/schemas/PaymentMethodVisibilityENUM"},"position":{"type":"integer"},"minimumPaymentAmount":{"type":"integer"},"amountInput":{"$ref":"#/components/schemas/TenantPaymentMethodAmountInputENUM"},"useRounding":{"type":"boolean"}}},"AvailablePaymentMethodParametersResponseSchema":{"title":"AvailablePaymentMethodParametersResponseSchema","description":"AvailablePaymentMethodParametersResponseSchema","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean"},"key":{"type":"string"},"keyType":{"$ref":"#/components/schemas/TenantPaymentMethodParameterTypeENUM"},"regex":{"type":"string","description":"regular expression"}},"required":["name","description","required","key","keyType","regex"]},"TenantPaymentMethodParameterTypeENUM":{"title":"TenantPaymentMethodParameterTypeENUM","type":"string","enum":["TEXT","INTEGER","NUMERIC","DATE","MOBILE","MODULUS10","MODULUS11"]},"PaymentMethodCodeENUM":{"enum":["CASH","INVOICE","VIPPS","ADYEN_CARD","PAYEX_CARD","SANTANDER","EXTERNAL","TRANSFER_MONEY","FLOWGIFTCARD","STORE_CREDIT","STRIPE_CARD","TWO_INVOICE","NETS_CARD","VERIFONE_CARD","FOREIGN_CASH","SWISH","DINTERO_PAYMENT_LINK","BRITANNIA","PREPAYMENT","SOFTPAY_CARD","PAYMENT_GATEWAY","LOYALTY_POINTS","PAYEX_GIFTCARD"],"title":"PaymentMethodCodeENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"PaymentMethodRequirementResponseSchema":{"title":"PaymentMethodRequirementResponseSchema","type":"object","description":"PaymentMethodRequirementResponseSchema","required":["requireCustomer","requireCustomerMobile","requireCustomerEmail","requireCustomerType","requireCustomerContact","requireExclusiveUse","requireRefundToSameMethod"],"properties":{"requireCustomer":{"type":"boolean"},"requireCustomerMobile":{"type":"boolean"},"requireCustomerEmail":{"type":"boolean"},"requireCustomerType":{"$ref":"#/components/schemas/PaymentMethodCustomerTypeENUM"},"requireCustomerContact":{"type":"boolean"},"requireExclusiveUse":{"type":"boolean"},"requireRefundToSameMethod":{"type":"boolean"}}},"PaymentMethodCustomerTypeENUM":{"title":"PaymentMethodCustomerTypeENUM","type":"string","enum":["ANY","PERSON","COMPANY"]},"PaymentMethodVisibilityENUM":{"title":"PaymentMethodVisibilityENUM","type":"string","enum":["FEATURED","LISTED","HIDDEN","HIDDEN_WHEN_NOT_REQUIRED"]},"TenantPaymentMethodAmountInputENUM":{"title":"TenantPaymentMethodAmountInputENUM","type":"string","enum":["NONE","AUTOFILL_REMAINING","FORCE_REMAINING"]}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/payment-methods":{"get":{"description":"Get available payment methods for an order\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"get-order-payment-methods","responses":{"200":{"$ref":"#/components/responses/OrderPaymentMethodListResponse"}},"summary":"Get available payment methods for an order","tags":["Order"],"deprecated":true}}}}
```

## List available payment methods for order

> List available payment methods for 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":"Order","description":"Order"}],"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":{"AvailableOrderPaymentMethodListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","required":["items","messages"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AvailableOrderPaymentMethodResponseSchema"}},"messages":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemMessageSchema"}}}}}}}},"schemas":{"AvailableOrderPaymentMethodResponseSchema":{"title":"AvailableOrderPaymentMethodResponseSchema","type":"object","required":["allowCashback","allowPrepayment","name","description","parameters","paymentCode","storePaymentMethodUid","requirements","settlementCode","visibility","position","minimumPaymentAmount","amountInput","useRounding"],"properties":{"allowCashback":{"type":"boolean"},"allowPrepayment":{"type":"boolean"},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/AvailablePaymentMethodParametersResponseSchema"}},"paymentCode":{"$ref":"#/components/schemas/PaymentMethodCodeENUM"},"storePaymentMethodUid":{"$ref":"#/components/schemas/UID"},"requirements":{"$ref":"#/components/schemas/PaymentMethodRequirementResponseSchema"},"settlementCode":{"type":"string"},"visibility":{"$ref":"#/components/schemas/PaymentMethodVisibilityENUM"},"position":{"type":"integer"},"minimumPaymentAmount":{"type":"integer"},"amountInput":{"$ref":"#/components/schemas/TenantPaymentMethodAmountInputENUM"},"useRounding":{"type":"boolean"}}},"AvailablePaymentMethodParametersResponseSchema":{"title":"AvailablePaymentMethodParametersResponseSchema","description":"AvailablePaymentMethodParametersResponseSchema","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean"},"key":{"type":"string"},"keyType":{"$ref":"#/components/schemas/TenantPaymentMethodParameterTypeENUM"},"regex":{"type":"string","description":"regular expression"}},"required":["name","description","required","key","keyType","regex"]},"TenantPaymentMethodParameterTypeENUM":{"title":"TenantPaymentMethodParameterTypeENUM","type":"string","enum":["TEXT","INTEGER","NUMERIC","DATE","MOBILE","MODULUS10","MODULUS11"]},"PaymentMethodCodeENUM":{"enum":["CASH","INVOICE","VIPPS","ADYEN_CARD","PAYEX_CARD","SANTANDER","EXTERNAL","TRANSFER_MONEY","FLOWGIFTCARD","STORE_CREDIT","STRIPE_CARD","TWO_INVOICE","NETS_CARD","VERIFONE_CARD","FOREIGN_CASH","SWISH","DINTERO_PAYMENT_LINK","BRITANNIA","PREPAYMENT","SOFTPAY_CARD","PAYMENT_GATEWAY","LOYALTY_POINTS","PAYEX_GIFTCARD"],"title":"PaymentMethodCodeENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"PaymentMethodRequirementResponseSchema":{"title":"PaymentMethodRequirementResponseSchema","type":"object","description":"PaymentMethodRequirementResponseSchema","required":["requireCustomer","requireCustomerMobile","requireCustomerEmail","requireCustomerType","requireCustomerContact","requireExclusiveUse","requireRefundToSameMethod"],"properties":{"requireCustomer":{"type":"boolean"},"requireCustomerMobile":{"type":"boolean"},"requireCustomerEmail":{"type":"boolean"},"requireCustomerType":{"$ref":"#/components/schemas/PaymentMethodCustomerTypeENUM"},"requireCustomerContact":{"type":"boolean"},"requireExclusiveUse":{"type":"boolean"},"requireRefundToSameMethod":{"type":"boolean"}}},"PaymentMethodCustomerTypeENUM":{"title":"PaymentMethodCustomerTypeENUM","type":"string","enum":["ANY","PERSON","COMPANY"]},"PaymentMethodVisibilityENUM":{"title":"PaymentMethodVisibilityENUM","type":"string","enum":["FEATURED","LISTED","HIDDEN","HIDDEN_WHEN_NOT_REQUIRED"]},"TenantPaymentMethodAmountInputENUM":{"title":"TenantPaymentMethodAmountInputENUM","type":"string","enum":["NONE","AUTOFILL_REMAINING","FORCE_REMAINING"]},"OrderItemMessageSchema":{"title":"OrderItemMessageSchema","type":"object","required":["orderItemUid","message"],"properties":{"orderItemUid":{"$ref":"#/components/schemas/OptionalUID"},"message":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"}},"requestBodies":{"OrderPaymentMethodsAvailable":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderItemUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/payment-methods":{"post":{"summary":"List available payment methods for order","tags":["Order"],"responses":{"200":{"$ref":"#/components/responses/AvailableOrderPaymentMethodListResponse"}},"operationId":"post-stores-orders-payment-methods","description":"List available payment methods for order.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","requestBody":{"$ref":"#/components/requestBodies/OrderPaymentMethodsAvailable"}}}}}
```

## Get status for a customer consent on an order

> Get status for a customer consent on 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":"Order","description":"Order"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"}},"responses":{"OrderConsentListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderConsentResponseSchema"}}}}}}}},"schemas":{"OrderConsentResponseSchema":{"title":"OrderConsentResponseSchema","type":"object","required":["orderItemUid","sku","type","status"],"properties":{"orderItemUid":{"$ref":"#/components/schemas/UID"},"sku":{"type":"string"},"type":{"$ref":"#/components/schemas/OrderConsentENUM"},"status":{"$ref":"#/components/schemas/OrderConsentResponseTypeENUM"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OrderConsentENUM":{"title":"OrderConsentENUM","type":"string","enum":["SUBSCRIPTION"]},"OrderConsentResponseTypeENUM":{"title":"OrderConsentResponseTypeENUM","type":"string","enum":["ACCEPT","REJECT","PENDING"]}},"parameters":{"orderConsentType":{"name":"orderConsentType","in":"query","required":true,"description":"Reference to a orderConsent type","schema":{"$ref":"#/components/schemas/OrderConsentENUM"}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/consents":{"get":{"description":"Get status for a customer consent on an order\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"get-customer-consent-status-on-order","responses":{"200":{"$ref":"#/components/responses/OrderConsentListResponse"}},"summary":"Get status for a customer consent on an order","tags":["Order"],"parameters":[{"$ref":"#/components/parameters/orderConsentType"}]}}}}
```

## Ask customer for a consent on an order

> Ask customer for a consent on 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":"Order","description":"Order"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"}},"requestBodies":{"OrderConsentRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderConsentRequestSchema"}}}}},"schemas":{"OrderConsentRequestSchema":{"title":"OrderConsentRequestSchema","type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/OrderConsentENUM"}}},"OrderConsentENUM":{"title":"OrderConsentENUM","type":"string","enum":["SUBSCRIPTION"]}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/consents":{"post":{"description":"Ask customer for a consent on an order\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"post-consent-on-order","responses":{"204":{"description":"No Content"}},"summary":"Ask customer for a consent on an order","tags":["Order"],"requestBody":{"$ref":"#/components/requestBodies/OrderConsentRequest"}}}}}
```

## Update order item details

> Update details for an item on an order. Partial updates are allowed.\
> Order item details can only be updated when order.orderState = OPEN and order.settleState != COMPLETE\
> \
> Exception:\
> \
> externalId can be changed when orderState = COMPLETE\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderItemUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderItemUpdateSchema"}}}}},"schemas":{"OrderItemUpdateSchema":{"title":"OrderItemUpdateSchema","type":"object","properties":{"discountReasonCode":{"type":"string"},"externalId":{"description":"External reference to order line","type":"string"},"itemDiscountAmount":{"type":"integer"},"itemDiscountPercentage":{"description":"Used to calculate itemDiscountAmount.","type":"integer"},"itemPrice":{"type":"integer"},"note":{"type":"string"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}},"quantityOrdered":{"type":"integer"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"returnReasonCode":{"type":"string"},"serialnumber":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/OptionalUID"},"sortOrder":{"type":"integer"},"itemCostPrice":{"type":"integer","description":"When a product has orderSpecificCost=true: Can set costPrice on the orderItem\nIf itemCostPrice is set and orderSpecificCost=false for the product, an error is returned"},"productName":{"type":"string","description":"When a product has orderSpecificName=true: Can set productName on the orderItem\nIf itemCostPrice is set and orderSpecificName=false for the product, an error is returned"}}},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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"},"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"},"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","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"},"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"},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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":{"enum":["NOT_STARTED","IN_PROGRESS","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"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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}":{"put":{"description":"Update details for an item on an order. Partial updates are allowed.\nOrder item details can only be updated when order.orderState = OPEN and order.settleState != COMPLETE\n\nException:\n\nexternalId can be changed when orderState = COMPLETE\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"put-tenants-stores-orders-items-details","requestBody":{"$ref":"#/components/requestBodies/OrderItemUpdateRequest"},"responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"summary":"Update order item details","tags":["Order"]}}}}
```

## Delete order item

> Delete an item on 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":"Order","description":"Order"}],"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":{"OrderResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseSchema"}}},"description":"Example response"}},"schemas":{"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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"},"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","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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":{"enum":["NOT_STARTED","IN_PROGRESS","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"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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|"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/items/{orderItemUid}":{"delete":{"description":"Delete an item on an order.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"delete-tenants-stores-orders-items-details","responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"summary":"Delete order item","tags":["Order"]}}}}
```

## List addons for order item

> List addons for order item\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderItemAddonListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemAddonResponseSchema"}}}}}}}},"schemas":{"OrderItemAddonResponseSchema":{"title":"OrderItemAddonResponseSchema","type":"object","required":["productUid","productLinkType","sku","name","price","productType","serialNoRequired","allowSale","allowSaleDate","coverImage"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"productLinkType":{"$ref":"#/components/schemas/ProductLinkTypeENUM"},"sku":{"type":"string"},"name":{"type":"string"},"price":{"type":"integer"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"},"allowSale":{"$ref":"#/components/schemas/AllowSaleENUM"},"allowSaleDate":{"type":"string","format":"date-time"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"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. |"},"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"},"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"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]}},"parameters":{"productLinkTypeQuery":{"description":"Reference to a productLinkType.","explode":false,"in":"query","name":"productLinkType","schema":{"$ref":"#/components/schemas/ProductLinkTypeENUM"},"style":"form"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/items/{orderItemUid}/addons":{"get":{"description":"List addons for order item\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"get-tenants-stores-orders-item-addons","responses":{"200":{"$ref":"#/components/responses/OrderItemAddonListResponse"}},"summary":"List addons for order item","tags":["Order"],"parameters":[{"$ref":"#/components/parameters/productLinkTypeQuery"}]}}}}
```

## Print order

> Print order\
> Content and form is decided by type.\
> orderItemUids is omitted when type is RECEIPT\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderPrintRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderPrintSchema"}}}}},"schemas":{"OrderPrintSchema":{"title":"OrderPrintSchema","type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/OrderPrintTypeENUM"},"printerUid":{"description":"The printer to send the print to","$ref":"#/components/schemas/UID"},"orderItemUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"exchangenoteValidUntil":{"type":"string","description":"Only valid for type EXCHANGENOTE.\nSets a date that the exchange note is valid until.\nIf not set, exchangeNoteValidUntil is calculated from the store's exchangeNoteValidDays setting.\nStored on all orderItemUids in request, usually only one item.","format":"date"}}},"OrderPrintTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n|RECEIPT| Print sales receipt|\n|EXCHANGENOTE| Print exchange note|\n|GIFTCARD| Print giftcard barcode|\n|PICKUP| Print a pickup label/note |\n","minLength":1,"title":"OrderPrintTypeENUM","type":"string","enum":["RECEIPT","EXCHANGENOTE","GIFTCARD","PICKUP"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/print":{"post":{"description":"Print order\nContent and form is decided by type.\norderItemUids is omitted when type is RECEIPT\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"post-tenants-orders-print","requestBody":{"$ref":"#/components/requestBodies/OrderPrintRequest"},"responses":{"201":{"description":"Created"},"400":{"description":"Bad Request"}},"summary":"Print order","tags":["Order"]}}}}
```

## Create order pdf

> Create an order pdf.\
> Content and form is decided by type.\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER<br>

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderPDFRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderPDFSchema"}}}}},"schemas":{"OrderPDFSchema":{"title":"OrderPDFSchema","type":"object","properties":{"type":{"$ref":"#/components/schemas/OrderPdfTypeENUM"}},"required":["type"]},"OrderPdfTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n|RECEIPT|Make pdf file from sales receipt|\n","minLength":1,"title":"OrderPdfTypeENUM","type":"string","enum":["RECEIPT"]},"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"]}},"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."}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/pdf":{"post":{"description":"Create an order pdf.\nContent and form is decided by type.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER\n","operationId":"post-tenants-orders-pdf","requestBody":{"$ref":"#/components/requestBodies/OrderPDFRequest"},"responses":{"200":{"$ref":"#/components/responses/FileResponse"},"400":{"description":"Bad Request"}},"summary":"Create order pdf","tags":["Order"]}}}}
```

## Send order content by email

> Send order content by email.\
> \
> Content and form is decided by type.\
> orderItemUids is omitted when type is RECEIPT\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderEmailRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEmailSchema"}}}}},"schemas":{"OrderEmailSchema":{"title":"OrderEmailSchema","type":"object","properties":{"type":{"$ref":"#/components/schemas/OrderEmailTypeENUM"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"orderItemUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}},"required":["type","email"]},"OrderEmailTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| RECEIPT | Send sales receipt as email|\n| GIFTCARD | Send giftcard as email|\n","minLength":1,"title":"OrderEmailTypeENUM","type":"string","enum":["RECEIPT","GIFTCARD"]},"EmailTYPE":{"title":"Email","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/email":{"post":{"description":"Send order content by email.\n\nContent and form is decided by type.\norderItemUids is omitted when type is RECEIPT\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"post-tenants-orders-email","requestBody":{"$ref":"#/components/requestBodies/OrderEmailRequest"},"responses":{"201":{"description":"Created"},"400":{"description":"Bad Request"}},"summary":"Send order content by email","tags":["Order"]}}}}
```

## Get order status

> Use this endpoint to get status information 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":"Order","description":"Order"}],"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":{"OrderStatusResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusResponseSchema"}}}}},"schemas":{"OrderStatusResponseSchema":{"title":"OrderStatusResponseSchema","type":"object","required":["orderItems","deliveries"],"properties":{"orderItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemStatusSchema"}},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/OrderDeliveryStatusSchema"}}}},"OrderItemStatusSchema":{"title":"OrderItemStatusSchema","type":"object","required":["severity","message","orderItemUid"],"properties":{"severity":{"$ref":"#/components/schemas/SeverityENUM"},"message":{"type":"string"},"orderItemUid":{"$ref":"#/components/schemas/UID"}}},"SeverityENUM":{"title":"SeverityENUM","description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| WARNING | Warning message, not critical|\n| ERROR | Error message, action must be taken by user|","type":"string","enum":["WARNING","ERROR"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OrderDeliveryStatusSchema":{"title":"OrderDeliveryStatusSchema","type":"object","required":["severity","message","orderDeliveryUid"],"properties":{"severity":{"$ref":"#/components/schemas/SeverityENUM"},"message":{"type":"string"},"orderDeliveryUid":{"$ref":"#/components/schemas/UID"}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/status":{"get":{"summary":"Get order status","tags":["Order"],"responses":{"200":{"$ref":"#/components/responses/OrderStatusResponse"}},"operationId":"get-tenants-stores-orders-status","description":"Use this endpoint to get status information for an order.\nRequired permissions: SALES_ORDER,RETURN_ORDER"}}}}
```

## Change order status

> Set status on an order. Limited to Open and Parked.\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderStatusChangeRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusChangeSchema"}}}}},"schemas":{"OrderStatusChangeSchema":{"description":"","properties":{"status":{"$ref":"#/components/schemas/OrderChangeStatusENUM"}},"required":["status"],"title":"OrderStatusChangeSchema","type":"object"},"OrderChangeStatusENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| OPEN    | Set order in state open, to be able to edit it.|\n| PARKED  | Set order in state parked.|\n| CONFIRMED  | Set order in state confirmed.|","enum":["PARKED","OPEN","CONFIRMED"],"title":"OrderChangeStatusENUM","type":"string"},"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"},"externalVoucherNumber":{"type":"string"},"invoiceAddress":{"$ref":"#/components/schemas/InvoiceAddressResponseSchema"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"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"},"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","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","gtins"],"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"},"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"},"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"},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}}}},"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"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD"],"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"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"required":["warehouseName"],"properties":{"warehouseName":{"type":"string"}}},"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}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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":{"enum":["NOT_STARTED","IN_PROGRESS","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"],"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"}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","storeUid","storeName","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","orderReceiptUid"],"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"}}},"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"}}},"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}/status":{"put":{"description":"Set status on an order. Limited to Open and Parked.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"put-tenants-stores-orders-status","requestBody":{"$ref":"#/components/requestBodies/OrderStatusChangeRequest"},"responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"summary":"Change order status","tags":["Order"]}}}}
```

## List order additional notes

> List additional notes, or comments, on orders.\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderAdditionalNoteListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","required":["items","paging"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderAdditionalNoteResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}}}}}}},"schemas":{"OrderAdditionalNoteResponseSchema":{"title":"OrderAdditionalNoteResponseSchema","allOf":[{"required":["orderAdditionalNoteUid","note","tenantUserUid","tenantUserDisplayName","notifications"],"properties":{"orderAdditionalNoteUid":{"$ref":"#/components/schemas/UID"},"note":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"tenantUserDisplayName":{"type":"string"},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/ServiceEventNotificationResponseSchema"}}}},{"$ref":"#/components/schemas/CreatedModifiedSchema"}],"type":"object"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ServiceEventNotificationResponseSchema":{"title":"ServiceEventNotificationResponseSchema","type":"object","required":["notificationUid","type","state","recipient"],"properties":{"notificationUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/MessageTypeENUM"},"state":{"$ref":"#/components/schemas/NotificationStateENUM"},"recipient":{"type":"string"}}},"MessageTypeENUM":{"title":"MessageTypeENUM","type":"string","enum":["EMAIL","SMS"]},"NotificationStateENUM":{"title":"NotificationStateENUM","type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","FAILED"]},"CreatedModifiedSchema":{"title":"CreatedModifiedSchema","type":"object","required":["createdBy","createdAt","lastModifiedBy","lastModifiedAt"],"properties":{"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-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"},"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"}},"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}/stores/{storeUid}/orders/{orderUid}/additional-notes":{"get":{"summary":"List order additional notes","tags":["Order"],"responses":{"200":{"$ref":"#/components/responses/OrderAdditionalNoteListResponse"}},"operationId":"get-orders-additional-notes","description":"List additional notes, or comments, on orders.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}]}}}}
```

## Create order additional notes

> Create additional notes, or comments, on orders.  \
> Define wether a notification is to be sent to the customer.  \
> The notification may be on email or SMS or both.\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrderAdditionalNoteResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderAdditionalNoteResponseSchema"}}}}},"schemas":{"OrderAdditionalNoteResponseSchema":{"title":"OrderAdditionalNoteResponseSchema","allOf":[{"required":["orderAdditionalNoteUid","note","tenantUserUid","tenantUserDisplayName","notifications"],"properties":{"orderAdditionalNoteUid":{"$ref":"#/components/schemas/UID"},"note":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"tenantUserDisplayName":{"type":"string"},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/ServiceEventNotificationResponseSchema"}}}},{"$ref":"#/components/schemas/CreatedModifiedSchema"}],"type":"object"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ServiceEventNotificationResponseSchema":{"title":"ServiceEventNotificationResponseSchema","type":"object","required":["notificationUid","type","state","recipient"],"properties":{"notificationUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/MessageTypeENUM"},"state":{"$ref":"#/components/schemas/NotificationStateENUM"},"recipient":{"type":"string"}}},"MessageTypeENUM":{"title":"MessageTypeENUM","type":"string","enum":["EMAIL","SMS"]},"NotificationStateENUM":{"title":"NotificationStateENUM","type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","FAILED"]},"CreatedModifiedSchema":{"title":"CreatedModifiedSchema","type":"object","required":["createdBy","createdAt","lastModifiedBy","lastModifiedAt"],"properties":{"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"}}},"SimpleNotificationRequestSchema":{"title":"SimpleNotificationRequestSchema","type":"object","required":["recipient","type"],"properties":{"recipient":{"type":"string"},"type":{"$ref":"#/components/schemas/MessageTypeENUM"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"}},"requestBodies":{"OrderAdditionalNoteCreateRequest":{"content":{"application/json":{"schema":{"type":"object","required":["note"],"properties":{"note":{"type":"string"},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/SimpleNotificationRequestSchema"}},"orderAdditionalNoteUid":{"$ref":"#/components/schemas/OptionalUID"}}}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/additional-notes":{"post":{"summary":"Create order additional notes","tags":["Order"],"responses":{"201":{"$ref":"#/components/responses/OrderAdditionalNoteResponse"}},"operationId":"post-orders-additional-notes","description":"Create additional notes, or comments, on orders.  \nDefine wether a notification is to be sent to the customer.  \nThe notification may be on email or SMS or both.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","requestBody":{"$ref":"#/components/requestBodies/OrderAdditionalNoteCreateRequest"}}}}}
```

## Delete order additional notes

> Delete order additional notes\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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}/additional-notes/{orderAdditionalNoteUid}":{"delete":{"summary":"Delete order additional notes","tags":["Order"],"responses":{"204":{"description":"No Content"}},"operationId":"delete-orders-additional-notes","description":"Delete order additional notes\n\nRequired permissions: SALES_ORDER,RETURN_ORDER"}}}}
```

## Get counts of orders

> Get counts of orders. Required permissions: SALES\_ORDER,RETURN\_ORDER<br>

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Order","description":"Order"}],"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":{"OrdersCountResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCountResponseListSchema"}}}}},"schemas":{"OrderCountResponseListSchema":{"title":"OrderCountResponseListSchema","type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/OrderCountResponseSchema"}}}},"OrderCountResponseSchema":{"title":"OrderCountResponseSchema","type":"object","required":["queryKey","count"],"properties":{"queryKey":{"type":"string","description":"Used for correlating requests and responses. Can be any value."},"count":{"type":"integer"}}},"OrderCountRequestListSchema":{"title":"OrderCountRequestListSchema","type":"object","required":["queries"],"properties":{"queries":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/OrderCountRequestSchema"}}}},"OrderCountRequestSchema":{"title":"OrderCountRequestSchema","type":"object","required":["queryKey","query"],"properties":{"queryKey":{"type":"string","description":"Used for correlating requests and responses. Can be any value."},"query":{"$ref":"#/components/schemas/TenantOrderSearchSchema"}}},"TenantOrderSearchSchema":{"description":"Search for orders in all stores on tenant. \n\nAn empty string will be ignored, and handled as if the key did not exist in the payload.\n\nFuzzy search means that it will try to find words that contains the query string that is supplied. The search is case-insensitive. \nExample: If you search for \"Ol\" you will get \"Olsen\", \"Olstad\", \"Bolset\", \"Ormebol\", kolstad@example.com, etc ..","title":"TenantOrderSearchSchema","type":"object","properties":{"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"organizationUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"customerQuery":{"description":"Search for orders containting this customer. The customer can be specific by firstname, lastname, phonenumber or email. This is a fuzzy search.","type":"string"},"customerUid":{"$ref":"#/components/schemas/UID"},"fromDateTime":{"format":"date-time","type":"string","deprecated":true},"createdAtFrom":{"format":"date-time","type":"string"},"settledAtFrom":{"format":"date-time","type":"string"},"lastModifiedAtFrom":{"format":"date-time","type":"string"},"orderNumber":{"description":"Search for an order with a specific ordernumber. This is an exact lookup","type":"string"},"externalOrderNumber":{"description":"Search for an order with a specific externalOrderNumber. This is an exact lookup","type":"string"},"externalVoucherNumber":{"description":"Search for an order with a specific externalVouchermber. This is an exact lookup","type":"string"},"productSku":{"description":"Search for orders containing the product. This must be a SKU and is an exact lookup.","type":"string"},"toDateTime":{"format":"date-time","type":"string","deprecated":true},"createdAtTo":{"format":"date-time","type":"string"},"settledAtTo":{"format":"date-time","type":"string"},"lastModifiedAtTo":{"format":"date-time","type":"string"},"tenantUserUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"orderStates":{"type":"array","description":"Reference to a list of orderStates.","items":{"$ref":"#/components/schemas/OrderOrderStateENUM"}},"settleStates":{"type":"array","description":"Reference to a list of settleStates.","items":{"$ref":"#/components/schemas/OrderSettleStateENUM"}},"deliveryStates":{"type":"array","description":"Reference to an array of deliveryStates.","items":{"$ref":"#/components/schemas/OrderDeliveryStateENUM"}},"orderStatuses":{"type":"array","description":"Reference to a list of orderStatuses.","items":{"$ref":"#/components/schemas/OrderStatusENUM"}},"orderTypes":{"type":"array","description":"Reference to a list of orderTypes","items":{"$ref":"#/components/schemas/OrderTypeENUM"}},"orderHandlingStates":{"type":"array","items":{"$ref":"#/components/schemas/HandlingStateENUM"}},"orderHandlingUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"deliverFromStoreUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"query":{"type":"string","description":"General fuzzy search."},"productUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"tenantPaymentMethodUids":{"type":"array","description":"Search for order containing one of the specified payment methods.","items":{"$ref":"#/components/schemas/UID"}},"reservationTypes":{"type":"array","items":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}},"isCustomerOrder":{"type":"boolean","description":"If true, returns orders with orderlines that has either reservationType='REQUEST_PURCHASEORDER' or has a link to a purchaseOrder item"},"hasReservedLines":{"type":"boolean","description":"When true, the search returns only orders that include at least one order line with a reservation (reservedQuantity <> 0).\nWhen omitted or false, reservation state does not affect the results."},"amountRange":{"$ref":"#/components/schemas/AmountRangeSchema"},"orderDateFrom":{"type":"string","format":"date-time"},"orderDateTo":{"type":"string","format":"date-time"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"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"},"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"},"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"},"OrderStatusENUM":{"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| DELIVERED | Order is completely delivered|\n| READY_FOR_DELIVERY | Order is settled and ready to be delivered|\n| UNPAID | Order is settled with settlementCode INVOICE and is not fully paid|\n| CONFIRMED | Order is confirmed|","enum":["OPEN","PARKED","CANCELED","READY_FOR_DELIVERY","DELIVERED","UNPAID","CONFIRMED"],"title":"OrderStatusENUM","type":"string"},"OrderTypeENUM":{"enum":["OFFER","ORDER","PAYMENT"],"title":"OrderTypeENUM","type":"string"},"HandlingStateENUM":{"enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"HandlingStateENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"AmountRangeSchema":{"title":"AmountRangeSchema","type":"object","description":"Search for an amount range","required":["from","to"],"properties":{"from":{"type":"integer"},"to":{"type":"integer"}}}},"requestBodies":{"OrdersCountRequest":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCountRequestListSchema"}}}}}},"paths":{"/tenants/{tenantUid}/orders/search/counts":{"post":{"summary":"Get counts of orders","tags":["Order"],"responses":{"200":{"$ref":"#/components/responses/OrdersCountResponse"}},"operationId":"post-tenants-tenantUid-orders-search-counts","description":"Get counts of orders. Required permissions: SALES_ORDER,RETURN_ORDER\n","requestBody":{"$ref":"#/components/requestBodies/OrdersCountRequest"}}}}}
```

## Verify Order Status

> Use this endpoint to verify the status of an order.\
> \
> Returns status per order item and delivery (severity and message). \
> Optionally specify productLineUids to verify only selected order lines; omit or send an empty array to verify the entire 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":"Order","description":"Order"}],"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":{"OrderStatusResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusResponseSchema"}}}}},"schemas":{"OrderStatusResponseSchema":{"title":"OrderStatusResponseSchema","type":"object","required":["orderItems","deliveries"],"properties":{"orderItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemStatusSchema"}},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/OrderDeliveryStatusSchema"}}}},"OrderItemStatusSchema":{"title":"OrderItemStatusSchema","type":"object","required":["severity","message","orderItemUid"],"properties":{"severity":{"$ref":"#/components/schemas/SeverityENUM"},"message":{"type":"string"},"orderItemUid":{"$ref":"#/components/schemas/UID"}}},"SeverityENUM":{"title":"SeverityENUM","description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| WARNING | Warning message, not critical|\n| ERROR | Error message, action must be taken by user|","type":"string","enum":["WARNING","ERROR"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OrderDeliveryStatusSchema":{"title":"OrderDeliveryStatusSchema","type":"object","required":["severity","message","orderDeliveryUid"],"properties":{"severity":{"$ref":"#/components/schemas/SeverityENUM"},"message":{"type":"string"},"orderDeliveryUid":{"$ref":"#/components/schemas/UID"}}}},"requestBodies":{"VerifyOrderStatusRequest":{"content":{"application/json":{"schema":{"type":"object","properties":{"productLineUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/verify":{"post":{"summary":"Verify Order Status","tags":["Order"],"responses":{"200":{"$ref":"#/components/responses/OrderStatusResponse"}},"operationId":"post-tenants-tenantUid-stores-storeUid-orders-orderUid-verify","description":"Use this endpoint to verify the status of an order.\n\nReturns status per order item and delivery (severity and message). \nOptionally specify productLineUids to verify only selected order lines; omit or send an empty array to verify the entire order.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","requestBody":{"$ref":"#/components/requestBodies/VerifyOrderStatusRequest"}}}}}
```
