# 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":"Accesstoken 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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]}}},"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":"Accesstoken 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|","enum":["OPEN","PARKED","CANCELED","READY_FOR_DELIVERY","DELIVERED","UNPAID"],"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]},"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.

```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":"Accesstoken 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"},"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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]}},"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.","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 extern 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.

```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":"Accesstoken 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","properties":{"createdAt":{"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"},"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/OrderImportDeliveryCreateRequestSchema"}}},"required":["createdAt","items","orderTotals","type","validUntil","vatFree"]},"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"}}},"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| ISURANCE | Reference to the orderline with the product to insure |\n| COMPENSATION | Reference to the orderline with the product to compensate |\n| PACKAGE | Reference to orderline with main package product |","enum":["CREDIT","INSURANCE","COMPENSATION","PACKAGE"],"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"],"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/SettlementParameterSchema"}}}},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","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"},"OrderImportDeliveryCreateRequestSchema":{"title":"OrderImportDeliveryCreateRequestSchema","type":"object","properties":{"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddressRequestSchema"},"deliveryState":{"$ref":"#/components/schemas/DeliveryStateENUM"},"deliveryDate":{"type":"string","format":"date-time"},"externalDeliveryReference":{"type":"string"},"trackingNumber":{"type":"string"},"deliveryProviderUid":{"$ref":"#/components/schemas/UID"},"deliveryProviderMethodUid":{"$ref":"#/components/schemas/UID"},"signature":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"deliveryUid":{"$ref":"#/components/schemas/UID"}},"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","description":"Remark! The NOT_DELIVERED state is deprecated."},"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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]}},"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.","operationId":"post-tenants-stores-orders-import","requestBody":{"$ref":"#/components/requestBodies/OrderCreateImportRequest"},"responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"summary":"Import new order from extern 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":"Accesstoken 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"},"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"},"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"}},"reservationTypes":{"type":"array","items":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}}}},"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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|","enum":["OPEN","PARKED","CANCELED","READY_FOR_DELIVERY","DELIVERED","UNPAID"],"title":"OrderStatusENUM","type":"string"},"OrderTypeENUM":{"enum":["OFFER","ORDER","PAYMENT"],"title":"OrderTypeENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]},"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.<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":"Accesstoken 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":["uid","reservationType","orders"],"properties":{"uid":{"description":"The uid must be warehouseUid if the reservationType is `WAREHOUSE` and purchaseOrderItemUid if it is `PURCHASEORDER`","$ref":"#/components/schemas/UID"},"reservationType":{"type":"string","enum":["WAREHOUSE","PURCHASEORDER"]},"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"}}}},"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.\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":"Accesstoken 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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]},"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"}},"reservationTypes":{"type":"array","items":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}}}},"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|","enum":["OPEN","PARKED","CANCELED","READY_FOR_DELIVERY","DELIVERED","UNPAID"],"title":"OrderStatusENUM","type":"string"}},"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.

```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":"Accesstoken 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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}":{"get":{"description":"Get order details. This will return a complete order object.","operationId":"get-tenants-stores-orders-details","responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"summary":"Get order details","tags":["Order"]}}}}
```

## Order Operations

> Order Operations

```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":"Accesstoken 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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]},"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","operationId":"post-tenants-stores-orders-details","responses":{"200":{"$ref":"#/components/responses/OrderResponse"}},"requestBody":{"$ref":"#/components/requestBodies/OrderOperationRequest"},"description":"Order Operations","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

```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":"Accesstoken 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"},"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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]}},"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","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.

```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":"Accesstoken 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.","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.

```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":"Accesstoken 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"}}},"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| ISURANCE | Reference to the orderline with the product to insure |\n| COMPENSATION | Reference to the orderline with the product to compensate |\n| PACKAGE | Reference to orderline with main package product |","enum":["CREDIT","INSURANCE","COMPENSATION","PACKAGE"],"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"],"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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]}},"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.","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

```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":"Accesstoken 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","allowAmount","name","description","parameters","paymentCode","storePaymentMethodUid","requirements","settlementCode","visibility","position"],"properties":{"allowCashback":{"type":"boolean"},"allowAmount":{"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"}}},"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"],"title":"PaymentMethodCodeENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"PaymentMethodRequirementResponseSchema":{"title":"PaymentMethodRequirementResponseSchema","type":"object","description":"PaymentMethodRequirementResponseSchema","properties":{"requireCustomer":{"type":"boolean"},"requireCustomerMobile":{"type":"boolean"},"requireCustomerEmail":{"type":"boolean"},"requireCustomerContact":{"type":"boolean"},"requireExclusiveUse":{"type":"boolean"}},"required":["requireCustomer","requireCustomerMobile","requireCustomerEmail","requireCustomerContact","requireExclusiveUse"]},"PaymentMethodVisibilityENUM":{"title":"PaymentMethodVisibilityENUM","type":"string","enum":["FEATURED","LISTED","HIDDEN"]}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/payment-methods":{"get":{"description":"Get available payment methods for an order","operationId":"get-order-payment-methods","responses":{"200":{"$ref":"#/components/responses/OrderPaymentMethodListResponse"}},"summary":"Get available payment methods for an order","tags":["Order"]}}}}
```

## 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

```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":"Accesstoken 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"},"reserveStock":{"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/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"}}},"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"],"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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]}},"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","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.

```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":"Accesstoken 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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/items/{orderItemUid}":{"delete":{"description":"Delete an item on an 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

```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":"Accesstoken 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"],"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"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ProductLinkTypeENUM":{"enum":["INSURANCE","ALTERNATIVE","ACCESSORY","SPARE_PART","SERVICE"],"title":"ProductLinkTypeENUM","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| 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","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"}},"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","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

```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":"Accesstoken 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","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.<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":"Accesstoken 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","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

```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":"Accesstoken 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","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"]}}}}
```

## Change order status

> Set status on an order. Limited to Open and Parked.

```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":"Accesstoken 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.|","enum":["PARKED","OPEN"],"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","orderUid","orderNumber","orderState","orderTotals","orderhandlingState","orderhandlings","settleState","settlementTotals","settlements","storeUid","storeName","systemOrigin","tenantUserDisplayName","tenantUserUid","tillUid","type","vatFree","vatPrint","voucherNumber","deliveryDate","discounts","compensationReasonUid","lastModifiedBy"],"properties":{"customerContactUid":{"$ref":"#/components/schemas/DeprecatedOptionalUID"},"shippingAddress":{"$ref":"#/components/schemas/DeprecatedOrderAddressResponseSchema"},"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"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"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"}}},"DeprecatedOptionalUID":{"title":"DeprecatedOptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*","deprecated":true},"DeprecatedOrderAddressResponseSchema":{"description":"This field will be removed. Use the information on the delivery instead.","allOf":[{"type":"object","deprecated":true},{"$ref":"#/components/schemas/OrderAddressResponseSchema"}]},"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","allowDeliveryFromDate","reservationType","reservationDetails"],"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"},"allowDeliveryFromDate":{"type":"string","format":"date-time","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"}}},"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 |","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"],"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","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT"],"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| 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","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"]},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"}}},"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."}}},"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","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"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","storeSettlementIssuerUid","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","paymentCount","paymentAmount","receiptUid","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/SettlementParameterSchema"}},"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"},"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"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"}},"paymentCount":{"type":"integer"},"paymentAmount":{"type":"integer"},"paymentAomunt":{"type":"integer","deprecated":true},"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"},"SettlementParameterSchema":{"description":"Create a new settlement","title":"SettlementParameterSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"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"},"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","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"},"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","CAMPAIGN"]},"DiscountScopeENUM":{"title":"DiscountScopeENUM","type":"string","enum":["WHOLE_ORDER","SPECIFIC_LINE","PRODUCT_LIST","SPECIFIC_LINE_LIST"]}},"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.","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.

```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":"Accesstoken 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.","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.

```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":"Accesstoken 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.","requestBody":{"$ref":"#/components/requestBodies/OrderAdditionalNoteCreateRequest"}}}}}
```

## Delete order additional notes

> Delete order additional notes

```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":"Accesstoken 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"}}}}
```


---

# Agent Instructions: Querying This Documentation

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

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

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

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

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