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

# Receipt

Receipt

## Search for order receipts 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":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"parameters":{"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}},"schemas":{"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"},"ReceiptResponseSchema":{"title":"ReceiptResponseSchema","type":"object","required":["storeUid","orderUid","orderReceiptUid","settleState","orderReceiptState","voucherNumber","externalVoucherNumber","sellerDisplayName","settledAt","deliveryState","grandTotal","settlementTotals","settlements","items","address","customerUid","note"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderReceiptUid":{"$ref":"#/components/schemas/UID"},"settleState":{"$ref":"#/components/schemas/ReceiptStateENUM"},"orderReceiptState":{"$ref":"#/components/schemas/OrderReceiptStateENUM"},"tasks":{"type":"array","description":"Post-settlement tasks on the receipt in simplified form (type and status). Populated on the single-receipt details endpoint and when listing receipts on an order, not in search results.","items":{"$ref":"#/components/schemas/BasicOrderReceiptTaskSchema"}},"voucherNumber":{"type":"string"},"externalVoucherNumber":{"type":"string","deprecated":true},"externalIds":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdSchema"}},"sellerDisplayName":{"type":"string"},"settledAt":{"type":"string","format":"date-time"},"deliveryState":{"$ref":"#/components/schemas/OrderDeliveryStateENUM"},"grandTotal":{"type":"integer"},"settlementTotals":{"$ref":"#/components/schemas/OrderSettlementTotalsSchema"},"settlements":{"type":"array","items":{"$ref":"#/components/schemas/SettlementResponseSchema"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"address":{"$ref":"#/components/schemas/OrderAddressResponseSchema"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"note":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReceiptStateENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | Receipt not started. No complete settlements exists.|\n| IN_PROGRESS | Receipt is in progress. At least one settlement has been started.|\n| COMPLETE | Receipt is complete. Sum of settlements = sum of orderlines.|\n| CANCELED | Receipt is canceled. Can only be done if receiptState = NOT_STARTED. |","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"ReceiptStateENUM","type":"string"},"OrderReceiptStateENUM":{"description":"Rollup of the receipt's post-settlement tasks (gift card capture, digital\nproduct activation, loyalty, receipt printing, etc.).\n|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | No post-settlement tasks created yet.|\n| IN_PROGRESS | Tasks are still running; the receipt is not yet printable.|\n| READY | All critical tasks are done — the receipt is printable; non-critical tasks may still be running.|\n| COMPLETE | All tasks are done.|\n| FAILED | A critical task failed and needs attention.|","enum":["NOT_STARTED","IN_PROGRESS","READY","COMPLETE","FAILED"],"title":"OrderReceiptStateENUM","type":"string"},"BasicOrderReceiptTaskSchema":{"description":"A post-settlement task on a receipt in simplified form (type and status).","title":"BasicOrderReceiptTaskSchema","type":"object","required":["taskType","status"],"properties":{"taskType":{"$ref":"#/components/schemas/OrderReceiptTaskTypeENUM"},"status":{"$ref":"#/components/schemas/OrderReceiptTaskStatusENUM"}}},"OrderReceiptTaskTypeENUM":{"description":"The kind of post-settlement task. Mirrors the TaskType values in core.","enum":["LOYALTY_POINTS_SYNC","LOYALTY_POINTS_LINES","FLOWGIFTCARD_CAPTURE","FLOWGIFTCARD_DEPOSIT","BRITANNIA_GIFTCARD_CAPTURE","PAYEX_GIFTCARD_DEPOSIT","DIGITAL_PRODUCT_ACTIVATION","WAREHOUSE_STOCK_UPDATE","PRINT_RECEIPT","LOYALTY_DISCOUNT_SYNC","EHF_INVOICE_SEND"],"title":"OrderReceiptTaskTypeENUM","type":"string"},"OrderReceiptTaskStatusENUM":{"description":"Status of a single post-settlement task.","enum":["PENDING","IN_PROGRESS","COMPLETE","FAILED","SKIPPED"],"title":"OrderReceiptTaskStatusENUM","type":"string"},"ExternalIdSchema":{"type":"object","title":"ExternalIdSchema","required":["key","value","visibility"],"properties":{"key":{"type":"string","description":"Stable identifier, e.g. sap_order_number"},"label":{"type":"string","description":"Display label, e.g. SAP ordrenummer"},"value":{"type":"string"},"visibility":{"$ref":"#/components/schemas/ExternalIdVisibilityENUM"}}},"ExternalIdVisibilityENUM":{"type":"string","enum":["INTERNAL","EXTERNAL"],"title":"ExternalIdVisibilityENUM"},"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"},"OrderSettlementTotalsSchema":{"title":"OrderSettlementTotalsSchema","type":"object","required":["change","remaining","remainingRounded","totals","remainingPrePayment","remainingAuthorizedAmount"],"properties":{"change":{"description":"Total change amount returned to customer.","type":"integer"},"remaining":{"type":"integer","description":"Remaining amount to be paid "},"remainingRounded":{"description":"Rounded value of remaining amount. For use with CASH","type":"integer"},"totals":{"type":"integer","description":"Sum of all approved settlements"},"remainingPrePayment":{"type":"integer"},"remainingAuthorizedAmount":{"type":"integer","description":"Authorized amount available for capture."}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","storeUid","storeName","orderReceiptUid","transactions","receiptText","allowedActions"],"properties":{"amount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"displayMessages":{"type":"array","items":{"$ref":"#/components/schemas/SettlementDisplayMessageSchema"}},"externalId":{"type":"string"},"externalPaymentReference":{"type":"string","description":"The external payment reference for this settlement.\nFor invoices, this could contain the KID"},"idMethod":{"$ref":"#/components/schemas/SettlementIdMethodENUM"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"ledgerType":{"$ref":"#/components/schemas/LedgerTypeENUM"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/SettlementParameterResponseSchema"}},"settledAt":{"format":"date-time","type":"string"},"settlementCode":{"type":"string"},"settlementUid":{"$ref":"#/components/schemas/UID"},"settlementName":{"type":"string"},"state":{"$ref":"#/components/schemas/SettlementStateENUM"},"status":{"$ref":"#/components/schemas/SettlementStatusENUM"},"storeSettlementIssuer":{"$ref":"#/components/schemas/storeSettlementIssuerSchema"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storePaymentMethodUid":{"$ref":"#/components/schemas/UID"},"currency":{"$ref":"#/components/schemas/SettlementCurrencySchema"},"additionalDetails":{"type":"array","items":{"$ref":"#/components/schemas/SettlementAdditionalDetailsSchema"}},"creditCount":{"type":"integer","description":"Number of credits on this settlement. Only applicable for invoice"},"creditAmount":{"type":"integer","description":"The total amount credited. Only applicable for invoice"},"paymentCount":{"type":"integer","description":"Number of payments on this settlement. Only applicable for invoice"},"paymentAmount":{"type":"integer","description":"The total amount of payments. Only applicable for invoice"},"tillUid":{"$ref":"#/components/schemas/OptionalUID"},"tillName":{"type":"string","description":"Display name of the till where the payment was registered."},"tillNumber":{"type":"integer","description":"Till register number where the payment was registered."},"storeUid":{"$ref":"#/components/schemas/OptionalUID"},"storeName":{"type":"string","description":"Display name of the store where the payment was registered."},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"authorizedAmount":{"type":"integer","description":"The total authorized amount on this settlement, calculated from authorize transactions."},"capturedAmount":{"type":"integer","description":"The total captured amount on this settlement, calculated from capture transactions."},"refundedAmount":{"type":"integer","description":"The total refunded amount on this settlement, calculated from refund transactions."},"receiptText":{"type":"string","maxLength":500,"description":"Text printed on the receipt for this payment method when configured on the tenant payment method. Empty when not set, when suppressed for this settlement type (e.g. store credit, gift cards), or when cleared."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SettlementTransactionSchema"}},"allowedActions":{"description":"What can be done with this settlement. Judged from the settlement alone, so a cancellation offered here can still be turned down by the rules on the order or the receipt.","type":"array","items":{"$ref":"#/components/schemas/AllowedSettlementActionENUM"}}}},"SettlementDisplayMessageSchema":{"description":"Settlement display messages","properties":{"key":{"type":"string"},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["key","message","timestamp"],"title":"SettlementDisplayMessageSchema","type":"object"},"SettlementIdMethodENUM":{"enum":["NO_CVM_RULE_PERFORMED","SIGNATURE","PIN_ONLINE","PIN_OFFLINE","PIN_ONLINE_AND_SIGNATURE","PIN_OFFLINE_AND_SIGNATURE","NO_CVM","FAILED","ON_DEVICE","REFUND"],"title":"SettlementIdMethodENUM","type":"string"},"LedgerTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n|LEDGER | Ledger |\n|GENERAL_LEDGER | General ledger |\n|CUSTOMER_LEDGER | Customer ledger |","enum":["LEDGER","GENERAL_LEDGER","CUSTOMER_LEDGER"],"title":"LedgerTypeENUM","type":"string"},"SettlementParameterResponseSchema":{"description":"settlement parameters response","title":"SettlementParameterResponseSchema","type":"object","required":["key","value","name","type"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/TenantPaymentMethodParameterTypeENUM"}}},"TenantPaymentMethodParameterTypeENUM":{"title":"TenantPaymentMethodParameterTypeENUM","type":"string","enum":["TEXT","INTEGER","NUMERIC","DATE","MOBILE","MODULUS10","MODULUS11"]},"SettlementStateENUM":{"enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","TERMINATED"],"title":"SettlementCodeENUM","type":"string"},"SettlementStatusENUM":{"enum":["NEW","PROCESSING","AUTHORIZED","CAPTURED","REFUNDED","PARTIALLY_REFUNDED","PENDING_REFUND","FAILED","CANCELLED_BY_MERCHANT","CANCELLED_BY_USER","CANCELLED_FORCE","DELETED","DENIED","REJECTED"],"title":"SettlementCodeENUM","type":"string"},"storeSettlementIssuerSchema":{"title":"storeSettlementIssuerSchema","type":"object","description":"Settlement issuer information","required":["storeSettlementIssuerUid","name","code"],"properties":{"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string","description":"The name of the settlement issuer"},"code":{"type":"string","description":"The code of the settlement issuer"}}},"SettlementCurrencySchema":{"title":"SettlementCurrencySchema","type":"object","required":["amount","code","exchangeRate"],"properties":{"amount":{"type":"integer"},"code":{"type":"string"},"exchangeRate":{"type":"integer"}}},"SettlementAdditionalDetailsSchema":{"title":"SettlementAdditionalDetailsSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"SettlementTransactionSchema":{"title":"SettlementTransactionSchema","type":"object","required":["transactionType","transactionAmount","orderReceiptUid"],"properties":{"transactionType":{"type":"string"},"pspTransactionId":{"type":"string"},"transactionAmount":{"type":"integer"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AllowedSettlementActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| CANCEL | Settlement can be cancelled|","enum":["CANCEL"],"title":"AllowedSettlementActionENUM","type":"string"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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"},"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"},"TenantOrderReceiptSearchSchema":{"description":"Search for order receipts 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":"TenantOrderReceiptSearchSchema","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"},"customerUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"settledAtFrom":{"format":"date-time","type":"string"},"orderNumber":{"description":"Search for an order receipt on an order with a specific ordernumber. This is an exact lookup","type":"string"},"voucherNumber":{"description":"Deprecated: Use voucherNumbers instead.","type":"string","deprecated":true},"voucherNumbers":{"description":"Search for multiple order receipts by voucher numbers. This is an exact lookup","type":"array","items":{"type":"string"}},"productSkus":{"description":"Search for order receipts containing the products. These must be SKUs and is an exact lookup.","type":"array","items":{"$ref":"#/components/schemas/UID"}},"tenantPaymentMethodUids":{"description":"Search for order receipts containing one of the specified payment methods.","type":"array","items":{"$ref":"#/components/schemas/UID"}},"settledAtTo":{"format":"date-time","type":"string"},"tenantUserUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"deliveryStates":{"type":"array","description":"Reference to an array of deliveryStates.","items":{"$ref":"#/components/schemas/OrderDeliveryStateENUM"}},"orderReceiptStates":{"type":"array","description":"Filter receipts by the rollup state of their post-settlement tasks. Use FAILED to find receipts that need attention.","items":{"$ref":"#/components/schemas/OrderReceiptStateENUM"}},"query":{"type":"string","description":"General fuzzy search."},"productUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"amountRange":{"$ref":"#/components/schemas/AmountRangeSchema"},"hasUnpaidInvoices":{"type":"boolean","description":"When this is set to true, only unpaid receipts/invoices will be in the response."},"settlementExternalPaymentReferences":{"type":"array","description":"Search for receipts with settlement with the specified external payment reference.","items":{"type":"string"}}}},"AmountRangeSchema":{"title":"AmountRangeSchema","type":"object","description":"Search for an amount range","required":["from","to"],"properties":{"from":{"type":"integer"},"to":{"type":"integer"}}}},"responses":{"ReceiptListResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReceiptResponseSchema"},"type":"array"},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"],"type":"object"}}},"description":"Example response"}},"requestBodies":{"TenantOrderReceiptSearchRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantOrderReceiptSearchSchema"}}}}}},"paths":{"/tenants/{tenantUid}/receipts/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-order-receipts-search","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"responses":{"200":{"$ref":"#/components/responses/ReceiptListResponse"}},"summary":"Search for order receipts in all stores on tenant","requestBody":{"$ref":"#/components/requestBodies/TenantOrderReceiptSearchRequest"},"tags":["Receipt"]}}}}
```

## List order receipts on order

> List all order receipts for the given order across all stores on the tenant.\
> \
> Each receipt includes post-settlement tasks (type and status) in simplified form.\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ReceiptListResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReceiptResponseSchema"},"type":"array"},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"],"type":"object"}}},"description":"Example response"}},"schemas":{"ReceiptResponseSchema":{"title":"ReceiptResponseSchema","type":"object","required":["storeUid","orderUid","orderReceiptUid","settleState","orderReceiptState","voucherNumber","externalVoucherNumber","sellerDisplayName","settledAt","deliveryState","grandTotal","settlementTotals","settlements","items","address","customerUid","note"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderReceiptUid":{"$ref":"#/components/schemas/UID"},"settleState":{"$ref":"#/components/schemas/ReceiptStateENUM"},"orderReceiptState":{"$ref":"#/components/schemas/OrderReceiptStateENUM"},"tasks":{"type":"array","description":"Post-settlement tasks on the receipt in simplified form (type and status). Populated on the single-receipt details endpoint and when listing receipts on an order, not in search results.","items":{"$ref":"#/components/schemas/BasicOrderReceiptTaskSchema"}},"voucherNumber":{"type":"string"},"externalVoucherNumber":{"type":"string","deprecated":true},"externalIds":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdSchema"}},"sellerDisplayName":{"type":"string"},"settledAt":{"type":"string","format":"date-time"},"deliveryState":{"$ref":"#/components/schemas/OrderDeliveryStateENUM"},"grandTotal":{"type":"integer"},"settlementTotals":{"$ref":"#/components/schemas/OrderSettlementTotalsSchema"},"settlements":{"type":"array","items":{"$ref":"#/components/schemas/SettlementResponseSchema"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"address":{"$ref":"#/components/schemas/OrderAddressResponseSchema"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"note":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReceiptStateENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | Receipt not started. No complete settlements exists.|\n| IN_PROGRESS | Receipt is in progress. At least one settlement has been started.|\n| COMPLETE | Receipt is complete. Sum of settlements = sum of orderlines.|\n| CANCELED | Receipt is canceled. Can only be done if receiptState = NOT_STARTED. |","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"ReceiptStateENUM","type":"string"},"OrderReceiptStateENUM":{"description":"Rollup of the receipt's post-settlement tasks (gift card capture, digital\nproduct activation, loyalty, receipt printing, etc.).\n|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | No post-settlement tasks created yet.|\n| IN_PROGRESS | Tasks are still running; the receipt is not yet printable.|\n| READY | All critical tasks are done — the receipt is printable; non-critical tasks may still be running.|\n| COMPLETE | All tasks are done.|\n| FAILED | A critical task failed and needs attention.|","enum":["NOT_STARTED","IN_PROGRESS","READY","COMPLETE","FAILED"],"title":"OrderReceiptStateENUM","type":"string"},"BasicOrderReceiptTaskSchema":{"description":"A post-settlement task on a receipt in simplified form (type and status).","title":"BasicOrderReceiptTaskSchema","type":"object","required":["taskType","status"],"properties":{"taskType":{"$ref":"#/components/schemas/OrderReceiptTaskTypeENUM"},"status":{"$ref":"#/components/schemas/OrderReceiptTaskStatusENUM"}}},"OrderReceiptTaskTypeENUM":{"description":"The kind of post-settlement task. Mirrors the TaskType values in core.","enum":["LOYALTY_POINTS_SYNC","LOYALTY_POINTS_LINES","FLOWGIFTCARD_CAPTURE","FLOWGIFTCARD_DEPOSIT","BRITANNIA_GIFTCARD_CAPTURE","PAYEX_GIFTCARD_DEPOSIT","DIGITAL_PRODUCT_ACTIVATION","WAREHOUSE_STOCK_UPDATE","PRINT_RECEIPT","LOYALTY_DISCOUNT_SYNC","EHF_INVOICE_SEND"],"title":"OrderReceiptTaskTypeENUM","type":"string"},"OrderReceiptTaskStatusENUM":{"description":"Status of a single post-settlement task.","enum":["PENDING","IN_PROGRESS","COMPLETE","FAILED","SKIPPED"],"title":"OrderReceiptTaskStatusENUM","type":"string"},"ExternalIdSchema":{"type":"object","title":"ExternalIdSchema","required":["key","value","visibility"],"properties":{"key":{"type":"string","description":"Stable identifier, e.g. sap_order_number"},"label":{"type":"string","description":"Display label, e.g. SAP ordrenummer"},"value":{"type":"string"},"visibility":{"$ref":"#/components/schemas/ExternalIdVisibilityENUM"}}},"ExternalIdVisibilityENUM":{"type":"string","enum":["INTERNAL","EXTERNAL"],"title":"ExternalIdVisibilityENUM"},"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"},"OrderSettlementTotalsSchema":{"title":"OrderSettlementTotalsSchema","type":"object","required":["change","remaining","remainingRounded","totals","remainingPrePayment","remainingAuthorizedAmount"],"properties":{"change":{"description":"Total change amount returned to customer.","type":"integer"},"remaining":{"type":"integer","description":"Remaining amount to be paid "},"remainingRounded":{"description":"Rounded value of remaining amount. For use with CASH","type":"integer"},"totals":{"type":"integer","description":"Sum of all approved settlements"},"remainingPrePayment":{"type":"integer"},"remainingAuthorizedAmount":{"type":"integer","description":"Authorized amount available for capture."}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","storeUid","storeName","orderReceiptUid","transactions","receiptText","allowedActions"],"properties":{"amount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"displayMessages":{"type":"array","items":{"$ref":"#/components/schemas/SettlementDisplayMessageSchema"}},"externalId":{"type":"string"},"externalPaymentReference":{"type":"string","description":"The external payment reference for this settlement.\nFor invoices, this could contain the KID"},"idMethod":{"$ref":"#/components/schemas/SettlementIdMethodENUM"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"ledgerType":{"$ref":"#/components/schemas/LedgerTypeENUM"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/SettlementParameterResponseSchema"}},"settledAt":{"format":"date-time","type":"string"},"settlementCode":{"type":"string"},"settlementUid":{"$ref":"#/components/schemas/UID"},"settlementName":{"type":"string"},"state":{"$ref":"#/components/schemas/SettlementStateENUM"},"status":{"$ref":"#/components/schemas/SettlementStatusENUM"},"storeSettlementIssuer":{"$ref":"#/components/schemas/storeSettlementIssuerSchema"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storePaymentMethodUid":{"$ref":"#/components/schemas/UID"},"currency":{"$ref":"#/components/schemas/SettlementCurrencySchema"},"additionalDetails":{"type":"array","items":{"$ref":"#/components/schemas/SettlementAdditionalDetailsSchema"}},"creditCount":{"type":"integer","description":"Number of credits on this settlement. Only applicable for invoice"},"creditAmount":{"type":"integer","description":"The total amount credited. Only applicable for invoice"},"paymentCount":{"type":"integer","description":"Number of payments on this settlement. Only applicable for invoice"},"paymentAmount":{"type":"integer","description":"The total amount of payments. Only applicable for invoice"},"tillUid":{"$ref":"#/components/schemas/OptionalUID"},"tillName":{"type":"string","description":"Display name of the till where the payment was registered."},"tillNumber":{"type":"integer","description":"Till register number where the payment was registered."},"storeUid":{"$ref":"#/components/schemas/OptionalUID"},"storeName":{"type":"string","description":"Display name of the store where the payment was registered."},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"authorizedAmount":{"type":"integer","description":"The total authorized amount on this settlement, calculated from authorize transactions."},"capturedAmount":{"type":"integer","description":"The total captured amount on this settlement, calculated from capture transactions."},"refundedAmount":{"type":"integer","description":"The total refunded amount on this settlement, calculated from refund transactions."},"receiptText":{"type":"string","maxLength":500,"description":"Text printed on the receipt for this payment method when configured on the tenant payment method. Empty when not set, when suppressed for this settlement type (e.g. store credit, gift cards), or when cleared."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SettlementTransactionSchema"}},"allowedActions":{"description":"What can be done with this settlement. Judged from the settlement alone, so a cancellation offered here can still be turned down by the rules on the order or the receipt.","type":"array","items":{"$ref":"#/components/schemas/AllowedSettlementActionENUM"}}}},"SettlementDisplayMessageSchema":{"description":"Settlement display messages","properties":{"key":{"type":"string"},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["key","message","timestamp"],"title":"SettlementDisplayMessageSchema","type":"object"},"SettlementIdMethodENUM":{"enum":["NO_CVM_RULE_PERFORMED","SIGNATURE","PIN_ONLINE","PIN_OFFLINE","PIN_ONLINE_AND_SIGNATURE","PIN_OFFLINE_AND_SIGNATURE","NO_CVM","FAILED","ON_DEVICE","REFUND"],"title":"SettlementIdMethodENUM","type":"string"},"LedgerTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n|LEDGER | Ledger |\n|GENERAL_LEDGER | General ledger |\n|CUSTOMER_LEDGER | Customer ledger |","enum":["LEDGER","GENERAL_LEDGER","CUSTOMER_LEDGER"],"title":"LedgerTypeENUM","type":"string"},"SettlementParameterResponseSchema":{"description":"settlement parameters response","title":"SettlementParameterResponseSchema","type":"object","required":["key","value","name","type"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/TenantPaymentMethodParameterTypeENUM"}}},"TenantPaymentMethodParameterTypeENUM":{"title":"TenantPaymentMethodParameterTypeENUM","type":"string","enum":["TEXT","INTEGER","NUMERIC","DATE","MOBILE","MODULUS10","MODULUS11"]},"SettlementStateENUM":{"enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","TERMINATED"],"title":"SettlementCodeENUM","type":"string"},"SettlementStatusENUM":{"enum":["NEW","PROCESSING","AUTHORIZED","CAPTURED","REFUNDED","PARTIALLY_REFUNDED","PENDING_REFUND","FAILED","CANCELLED_BY_MERCHANT","CANCELLED_BY_USER","CANCELLED_FORCE","DELETED","DENIED","REJECTED"],"title":"SettlementCodeENUM","type":"string"},"storeSettlementIssuerSchema":{"title":"storeSettlementIssuerSchema","type":"object","description":"Settlement issuer information","required":["storeSettlementIssuerUid","name","code"],"properties":{"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string","description":"The name of the settlement issuer"},"code":{"type":"string","description":"The code of the settlement issuer"}}},"SettlementCurrencySchema":{"title":"SettlementCurrencySchema","type":"object","required":["amount","code","exchangeRate"],"properties":{"amount":{"type":"integer"},"code":{"type":"string"},"exchangeRate":{"type":"integer"}}},"SettlementAdditionalDetailsSchema":{"title":"SettlementAdditionalDetailsSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"SettlementTransactionSchema":{"title":"SettlementTransactionSchema","type":"object","required":["transactionType","transactionAmount","orderReceiptUid"],"properties":{"transactionType":{"type":"string"},"pspTransactionId":{"type":"string"},"transactionAmount":{"type":"integer"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AllowedSettlementActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| CANCEL | Settlement can be cancelled|","enum":["CANCEL"],"title":"AllowedSettlementActionENUM","type":"string"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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"},"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"}}},"paths":{"/tenants/{tenantUid}/orders/{orderUid}/receipts":{"get":{"summary":"List order receipts on order","description":"List all order receipts for the given order across all stores on the tenant.\n\nEach receipt includes post-settlement tasks (type and status) in simplified form.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","tags":["Receipt"],"responses":{"200":{"$ref":"#/components/responses/ReceiptListResponse"}},"operationId":"list-orders-receipts"}}}}
```

## Create new receipt on order

> Create new receipt on order\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ReceiptResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptResponseSchema"}}}}},"schemas":{"ReceiptResponseSchema":{"title":"ReceiptResponseSchema","type":"object","required":["storeUid","orderUid","orderReceiptUid","settleState","orderReceiptState","voucherNumber","externalVoucherNumber","sellerDisplayName","settledAt","deliveryState","grandTotal","settlementTotals","settlements","items","address","customerUid","note"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderReceiptUid":{"$ref":"#/components/schemas/UID"},"settleState":{"$ref":"#/components/schemas/ReceiptStateENUM"},"orderReceiptState":{"$ref":"#/components/schemas/OrderReceiptStateENUM"},"tasks":{"type":"array","description":"Post-settlement tasks on the receipt in simplified form (type and status). Populated on the single-receipt details endpoint and when listing receipts on an order, not in search results.","items":{"$ref":"#/components/schemas/BasicOrderReceiptTaskSchema"}},"voucherNumber":{"type":"string"},"externalVoucherNumber":{"type":"string","deprecated":true},"externalIds":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdSchema"}},"sellerDisplayName":{"type":"string"},"settledAt":{"type":"string","format":"date-time"},"deliveryState":{"$ref":"#/components/schemas/OrderDeliveryStateENUM"},"grandTotal":{"type":"integer"},"settlementTotals":{"$ref":"#/components/schemas/OrderSettlementTotalsSchema"},"settlements":{"type":"array","items":{"$ref":"#/components/schemas/SettlementResponseSchema"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"address":{"$ref":"#/components/schemas/OrderAddressResponseSchema"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"note":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReceiptStateENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | Receipt not started. No complete settlements exists.|\n| IN_PROGRESS | Receipt is in progress. At least one settlement has been started.|\n| COMPLETE | Receipt is complete. Sum of settlements = sum of orderlines.|\n| CANCELED | Receipt is canceled. Can only be done if receiptState = NOT_STARTED. |","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"ReceiptStateENUM","type":"string"},"OrderReceiptStateENUM":{"description":"Rollup of the receipt's post-settlement tasks (gift card capture, digital\nproduct activation, loyalty, receipt printing, etc.).\n|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | No post-settlement tasks created yet.|\n| IN_PROGRESS | Tasks are still running; the receipt is not yet printable.|\n| READY | All critical tasks are done — the receipt is printable; non-critical tasks may still be running.|\n| COMPLETE | All tasks are done.|\n| FAILED | A critical task failed and needs attention.|","enum":["NOT_STARTED","IN_PROGRESS","READY","COMPLETE","FAILED"],"title":"OrderReceiptStateENUM","type":"string"},"BasicOrderReceiptTaskSchema":{"description":"A post-settlement task on a receipt in simplified form (type and status).","title":"BasicOrderReceiptTaskSchema","type":"object","required":["taskType","status"],"properties":{"taskType":{"$ref":"#/components/schemas/OrderReceiptTaskTypeENUM"},"status":{"$ref":"#/components/schemas/OrderReceiptTaskStatusENUM"}}},"OrderReceiptTaskTypeENUM":{"description":"The kind of post-settlement task. Mirrors the TaskType values in core.","enum":["LOYALTY_POINTS_SYNC","LOYALTY_POINTS_LINES","FLOWGIFTCARD_CAPTURE","FLOWGIFTCARD_DEPOSIT","BRITANNIA_GIFTCARD_CAPTURE","PAYEX_GIFTCARD_DEPOSIT","DIGITAL_PRODUCT_ACTIVATION","WAREHOUSE_STOCK_UPDATE","PRINT_RECEIPT","LOYALTY_DISCOUNT_SYNC","EHF_INVOICE_SEND"],"title":"OrderReceiptTaskTypeENUM","type":"string"},"OrderReceiptTaskStatusENUM":{"description":"Status of a single post-settlement task.","enum":["PENDING","IN_PROGRESS","COMPLETE","FAILED","SKIPPED"],"title":"OrderReceiptTaskStatusENUM","type":"string"},"ExternalIdSchema":{"type":"object","title":"ExternalIdSchema","required":["key","value","visibility"],"properties":{"key":{"type":"string","description":"Stable identifier, e.g. sap_order_number"},"label":{"type":"string","description":"Display label, e.g. SAP ordrenummer"},"value":{"type":"string"},"visibility":{"$ref":"#/components/schemas/ExternalIdVisibilityENUM"}}},"ExternalIdVisibilityENUM":{"type":"string","enum":["INTERNAL","EXTERNAL"],"title":"ExternalIdVisibilityENUM"},"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"},"OrderSettlementTotalsSchema":{"title":"OrderSettlementTotalsSchema","type":"object","required":["change","remaining","remainingRounded","totals","remainingPrePayment","remainingAuthorizedAmount"],"properties":{"change":{"description":"Total change amount returned to customer.","type":"integer"},"remaining":{"type":"integer","description":"Remaining amount to be paid "},"remainingRounded":{"description":"Rounded value of remaining amount. For use with CASH","type":"integer"},"totals":{"type":"integer","description":"Sum of all approved settlements"},"remainingPrePayment":{"type":"integer"},"remainingAuthorizedAmount":{"type":"integer","description":"Authorized amount available for capture."}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","storeUid","storeName","orderReceiptUid","transactions","receiptText","allowedActions"],"properties":{"amount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"displayMessages":{"type":"array","items":{"$ref":"#/components/schemas/SettlementDisplayMessageSchema"}},"externalId":{"type":"string"},"externalPaymentReference":{"type":"string","description":"The external payment reference for this settlement.\nFor invoices, this could contain the KID"},"idMethod":{"$ref":"#/components/schemas/SettlementIdMethodENUM"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"ledgerType":{"$ref":"#/components/schemas/LedgerTypeENUM"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/SettlementParameterResponseSchema"}},"settledAt":{"format":"date-time","type":"string"},"settlementCode":{"type":"string"},"settlementUid":{"$ref":"#/components/schemas/UID"},"settlementName":{"type":"string"},"state":{"$ref":"#/components/schemas/SettlementStateENUM"},"status":{"$ref":"#/components/schemas/SettlementStatusENUM"},"storeSettlementIssuer":{"$ref":"#/components/schemas/storeSettlementIssuerSchema"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storePaymentMethodUid":{"$ref":"#/components/schemas/UID"},"currency":{"$ref":"#/components/schemas/SettlementCurrencySchema"},"additionalDetails":{"type":"array","items":{"$ref":"#/components/schemas/SettlementAdditionalDetailsSchema"}},"creditCount":{"type":"integer","description":"Number of credits on this settlement. Only applicable for invoice"},"creditAmount":{"type":"integer","description":"The total amount credited. Only applicable for invoice"},"paymentCount":{"type":"integer","description":"Number of payments on this settlement. Only applicable for invoice"},"paymentAmount":{"type":"integer","description":"The total amount of payments. Only applicable for invoice"},"tillUid":{"$ref":"#/components/schemas/OptionalUID"},"tillName":{"type":"string","description":"Display name of the till where the payment was registered."},"tillNumber":{"type":"integer","description":"Till register number where the payment was registered."},"storeUid":{"$ref":"#/components/schemas/OptionalUID"},"storeName":{"type":"string","description":"Display name of the store where the payment was registered."},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"authorizedAmount":{"type":"integer","description":"The total authorized amount on this settlement, calculated from authorize transactions."},"capturedAmount":{"type":"integer","description":"The total captured amount on this settlement, calculated from capture transactions."},"refundedAmount":{"type":"integer","description":"The total refunded amount on this settlement, calculated from refund transactions."},"receiptText":{"type":"string","maxLength":500,"description":"Text printed on the receipt for this payment method when configured on the tenant payment method. Empty when not set, when suppressed for this settlement type (e.g. store credit, gift cards), or when cleared."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SettlementTransactionSchema"}},"allowedActions":{"description":"What can be done with this settlement. Judged from the settlement alone, so a cancellation offered here can still be turned down by the rules on the order or the receipt.","type":"array","items":{"$ref":"#/components/schemas/AllowedSettlementActionENUM"}}}},"SettlementDisplayMessageSchema":{"description":"Settlement display messages","properties":{"key":{"type":"string"},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["key","message","timestamp"],"title":"SettlementDisplayMessageSchema","type":"object"},"SettlementIdMethodENUM":{"enum":["NO_CVM_RULE_PERFORMED","SIGNATURE","PIN_ONLINE","PIN_OFFLINE","PIN_ONLINE_AND_SIGNATURE","PIN_OFFLINE_AND_SIGNATURE","NO_CVM","FAILED","ON_DEVICE","REFUND"],"title":"SettlementIdMethodENUM","type":"string"},"LedgerTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n|LEDGER | Ledger |\n|GENERAL_LEDGER | General ledger |\n|CUSTOMER_LEDGER | Customer ledger |","enum":["LEDGER","GENERAL_LEDGER","CUSTOMER_LEDGER"],"title":"LedgerTypeENUM","type":"string"},"SettlementParameterResponseSchema":{"description":"settlement parameters response","title":"SettlementParameterResponseSchema","type":"object","required":["key","value","name","type"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/TenantPaymentMethodParameterTypeENUM"}}},"TenantPaymentMethodParameterTypeENUM":{"title":"TenantPaymentMethodParameterTypeENUM","type":"string","enum":["TEXT","INTEGER","NUMERIC","DATE","MOBILE","MODULUS10","MODULUS11"]},"SettlementStateENUM":{"enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","TERMINATED"],"title":"SettlementCodeENUM","type":"string"},"SettlementStatusENUM":{"enum":["NEW","PROCESSING","AUTHORIZED","CAPTURED","REFUNDED","PARTIALLY_REFUNDED","PENDING_REFUND","FAILED","CANCELLED_BY_MERCHANT","CANCELLED_BY_USER","CANCELLED_FORCE","DELETED","DENIED","REJECTED"],"title":"SettlementCodeENUM","type":"string"},"storeSettlementIssuerSchema":{"title":"storeSettlementIssuerSchema","type":"object","description":"Settlement issuer information","required":["storeSettlementIssuerUid","name","code"],"properties":{"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string","description":"The name of the settlement issuer"},"code":{"type":"string","description":"The code of the settlement issuer"}}},"SettlementCurrencySchema":{"title":"SettlementCurrencySchema","type":"object","required":["amount","code","exchangeRate"],"properties":{"amount":{"type":"integer"},"code":{"type":"string"},"exchangeRate":{"type":"integer"}}},"SettlementAdditionalDetailsSchema":{"title":"SettlementAdditionalDetailsSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"SettlementTransactionSchema":{"title":"SettlementTransactionSchema","type":"object","required":["transactionType","transactionAmount","orderReceiptUid"],"properties":{"transactionType":{"type":"string"},"pspTransactionId":{"type":"string"},"transactionAmount":{"type":"integer"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AllowedSettlementActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| CANCEL | Settlement can be cancelled|","enum":["CANCEL"],"title":"AllowedSettlementActionENUM","type":"string"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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"},"ReceiptCreateRequestSchema":{"title":"ReceiptCreateRequestSchema","type":"object","properties":{"orderItemUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"settlementUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"orderReceiptUid":{"$ref":"#/components/schemas/UID"}}}},"requestBodies":{"ReceiptCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptCreateRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts":{"post":{"summary":"Create new receipt on order","tags":["Receipt"],"responses":{"201":{"$ref":"#/components/responses/ReceiptResponse"}},"operationId":"post-new-receipt","requestBody":{"$ref":"#/components/requestBodies/ReceiptCreateRequest"},"description":"Create new receipt on order\n\nRequired permissions: SALES_ORDER,RETURN_ORDER"}}}}
```

## Get Receipt Details

> Get Receipt Details\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ReceiptResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptResponseSchema"}}}}},"schemas":{"ReceiptResponseSchema":{"title":"ReceiptResponseSchema","type":"object","required":["storeUid","orderUid","orderReceiptUid","settleState","orderReceiptState","voucherNumber","externalVoucherNumber","sellerDisplayName","settledAt","deliveryState","grandTotal","settlementTotals","settlements","items","address","customerUid","note"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderReceiptUid":{"$ref":"#/components/schemas/UID"},"settleState":{"$ref":"#/components/schemas/ReceiptStateENUM"},"orderReceiptState":{"$ref":"#/components/schemas/OrderReceiptStateENUM"},"tasks":{"type":"array","description":"Post-settlement tasks on the receipt in simplified form (type and status). Populated on the single-receipt details endpoint and when listing receipts on an order, not in search results.","items":{"$ref":"#/components/schemas/BasicOrderReceiptTaskSchema"}},"voucherNumber":{"type":"string"},"externalVoucherNumber":{"type":"string","deprecated":true},"externalIds":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdSchema"}},"sellerDisplayName":{"type":"string"},"settledAt":{"type":"string","format":"date-time"},"deliveryState":{"$ref":"#/components/schemas/OrderDeliveryStateENUM"},"grandTotal":{"type":"integer"},"settlementTotals":{"$ref":"#/components/schemas/OrderSettlementTotalsSchema"},"settlements":{"type":"array","items":{"$ref":"#/components/schemas/SettlementResponseSchema"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"address":{"$ref":"#/components/schemas/OrderAddressResponseSchema"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"note":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReceiptStateENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | Receipt not started. No complete settlements exists.|\n| IN_PROGRESS | Receipt is in progress. At least one settlement has been started.|\n| COMPLETE | Receipt is complete. Sum of settlements = sum of orderlines.|\n| CANCELED | Receipt is canceled. Can only be done if receiptState = NOT_STARTED. |","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"ReceiptStateENUM","type":"string"},"OrderReceiptStateENUM":{"description":"Rollup of the receipt's post-settlement tasks (gift card capture, digital\nproduct activation, loyalty, receipt printing, etc.).\n|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | No post-settlement tasks created yet.|\n| IN_PROGRESS | Tasks are still running; the receipt is not yet printable.|\n| READY | All critical tasks are done — the receipt is printable; non-critical tasks may still be running.|\n| COMPLETE | All tasks are done.|\n| FAILED | A critical task failed and needs attention.|","enum":["NOT_STARTED","IN_PROGRESS","READY","COMPLETE","FAILED"],"title":"OrderReceiptStateENUM","type":"string"},"BasicOrderReceiptTaskSchema":{"description":"A post-settlement task on a receipt in simplified form (type and status).","title":"BasicOrderReceiptTaskSchema","type":"object","required":["taskType","status"],"properties":{"taskType":{"$ref":"#/components/schemas/OrderReceiptTaskTypeENUM"},"status":{"$ref":"#/components/schemas/OrderReceiptTaskStatusENUM"}}},"OrderReceiptTaskTypeENUM":{"description":"The kind of post-settlement task. Mirrors the TaskType values in core.","enum":["LOYALTY_POINTS_SYNC","LOYALTY_POINTS_LINES","FLOWGIFTCARD_CAPTURE","FLOWGIFTCARD_DEPOSIT","BRITANNIA_GIFTCARD_CAPTURE","PAYEX_GIFTCARD_DEPOSIT","DIGITAL_PRODUCT_ACTIVATION","WAREHOUSE_STOCK_UPDATE","PRINT_RECEIPT","LOYALTY_DISCOUNT_SYNC","EHF_INVOICE_SEND"],"title":"OrderReceiptTaskTypeENUM","type":"string"},"OrderReceiptTaskStatusENUM":{"description":"Status of a single post-settlement task.","enum":["PENDING","IN_PROGRESS","COMPLETE","FAILED","SKIPPED"],"title":"OrderReceiptTaskStatusENUM","type":"string"},"ExternalIdSchema":{"type":"object","title":"ExternalIdSchema","required":["key","value","visibility"],"properties":{"key":{"type":"string","description":"Stable identifier, e.g. sap_order_number"},"label":{"type":"string","description":"Display label, e.g. SAP ordrenummer"},"value":{"type":"string"},"visibility":{"$ref":"#/components/schemas/ExternalIdVisibilityENUM"}}},"ExternalIdVisibilityENUM":{"type":"string","enum":["INTERNAL","EXTERNAL"],"title":"ExternalIdVisibilityENUM"},"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"},"OrderSettlementTotalsSchema":{"title":"OrderSettlementTotalsSchema","type":"object","required":["change","remaining","remainingRounded","totals","remainingPrePayment","remainingAuthorizedAmount"],"properties":{"change":{"description":"Total change amount returned to customer.","type":"integer"},"remaining":{"type":"integer","description":"Remaining amount to be paid "},"remainingRounded":{"description":"Rounded value of remaining amount. For use with CASH","type":"integer"},"totals":{"type":"integer","description":"Sum of all approved settlements"},"remainingPrePayment":{"type":"integer"},"remainingAuthorizedAmount":{"type":"integer","description":"Authorized amount available for capture."}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","storeUid","storeName","orderReceiptUid","transactions","receiptText","allowedActions"],"properties":{"amount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"displayMessages":{"type":"array","items":{"$ref":"#/components/schemas/SettlementDisplayMessageSchema"}},"externalId":{"type":"string"},"externalPaymentReference":{"type":"string","description":"The external payment reference for this settlement.\nFor invoices, this could contain the KID"},"idMethod":{"$ref":"#/components/schemas/SettlementIdMethodENUM"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"ledgerType":{"$ref":"#/components/schemas/LedgerTypeENUM"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/SettlementParameterResponseSchema"}},"settledAt":{"format":"date-time","type":"string"},"settlementCode":{"type":"string"},"settlementUid":{"$ref":"#/components/schemas/UID"},"settlementName":{"type":"string"},"state":{"$ref":"#/components/schemas/SettlementStateENUM"},"status":{"$ref":"#/components/schemas/SettlementStatusENUM"},"storeSettlementIssuer":{"$ref":"#/components/schemas/storeSettlementIssuerSchema"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storePaymentMethodUid":{"$ref":"#/components/schemas/UID"},"currency":{"$ref":"#/components/schemas/SettlementCurrencySchema"},"additionalDetails":{"type":"array","items":{"$ref":"#/components/schemas/SettlementAdditionalDetailsSchema"}},"creditCount":{"type":"integer","description":"Number of credits on this settlement. Only applicable for invoice"},"creditAmount":{"type":"integer","description":"The total amount credited. Only applicable for invoice"},"paymentCount":{"type":"integer","description":"Number of payments on this settlement. Only applicable for invoice"},"paymentAmount":{"type":"integer","description":"The total amount of payments. Only applicable for invoice"},"tillUid":{"$ref":"#/components/schemas/OptionalUID"},"tillName":{"type":"string","description":"Display name of the till where the payment was registered."},"tillNumber":{"type":"integer","description":"Till register number where the payment was registered."},"storeUid":{"$ref":"#/components/schemas/OptionalUID"},"storeName":{"type":"string","description":"Display name of the store where the payment was registered."},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"authorizedAmount":{"type":"integer","description":"The total authorized amount on this settlement, calculated from authorize transactions."},"capturedAmount":{"type":"integer","description":"The total captured amount on this settlement, calculated from capture transactions."},"refundedAmount":{"type":"integer","description":"The total refunded amount on this settlement, calculated from refund transactions."},"receiptText":{"type":"string","maxLength":500,"description":"Text printed on the receipt for this payment method when configured on the tenant payment method. Empty when not set, when suppressed for this settlement type (e.g. store credit, gift cards), or when cleared."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SettlementTransactionSchema"}},"allowedActions":{"description":"What can be done with this settlement. Judged from the settlement alone, so a cancellation offered here can still be turned down by the rules on the order or the receipt.","type":"array","items":{"$ref":"#/components/schemas/AllowedSettlementActionENUM"}}}},"SettlementDisplayMessageSchema":{"description":"Settlement display messages","properties":{"key":{"type":"string"},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["key","message","timestamp"],"title":"SettlementDisplayMessageSchema","type":"object"},"SettlementIdMethodENUM":{"enum":["NO_CVM_RULE_PERFORMED","SIGNATURE","PIN_ONLINE","PIN_OFFLINE","PIN_ONLINE_AND_SIGNATURE","PIN_OFFLINE_AND_SIGNATURE","NO_CVM","FAILED","ON_DEVICE","REFUND"],"title":"SettlementIdMethodENUM","type":"string"},"LedgerTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n|LEDGER | Ledger |\n|GENERAL_LEDGER | General ledger |\n|CUSTOMER_LEDGER | Customer ledger |","enum":["LEDGER","GENERAL_LEDGER","CUSTOMER_LEDGER"],"title":"LedgerTypeENUM","type":"string"},"SettlementParameterResponseSchema":{"description":"settlement parameters response","title":"SettlementParameterResponseSchema","type":"object","required":["key","value","name","type"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/TenantPaymentMethodParameterTypeENUM"}}},"TenantPaymentMethodParameterTypeENUM":{"title":"TenantPaymentMethodParameterTypeENUM","type":"string","enum":["TEXT","INTEGER","NUMERIC","DATE","MOBILE","MODULUS10","MODULUS11"]},"SettlementStateENUM":{"enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","TERMINATED"],"title":"SettlementCodeENUM","type":"string"},"SettlementStatusENUM":{"enum":["NEW","PROCESSING","AUTHORIZED","CAPTURED","REFUNDED","PARTIALLY_REFUNDED","PENDING_REFUND","FAILED","CANCELLED_BY_MERCHANT","CANCELLED_BY_USER","CANCELLED_FORCE","DELETED","DENIED","REJECTED"],"title":"SettlementCodeENUM","type":"string"},"storeSettlementIssuerSchema":{"title":"storeSettlementIssuerSchema","type":"object","description":"Settlement issuer information","required":["storeSettlementIssuerUid","name","code"],"properties":{"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string","description":"The name of the settlement issuer"},"code":{"type":"string","description":"The code of the settlement issuer"}}},"SettlementCurrencySchema":{"title":"SettlementCurrencySchema","type":"object","required":["amount","code","exchangeRate"],"properties":{"amount":{"type":"integer"},"code":{"type":"string"},"exchangeRate":{"type":"integer"}}},"SettlementAdditionalDetailsSchema":{"title":"SettlementAdditionalDetailsSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"SettlementTransactionSchema":{"title":"SettlementTransactionSchema","type":"object","required":["transactionType","transactionAmount","orderReceiptUid"],"properties":{"transactionType":{"type":"string"},"pspTransactionId":{"type":"string"},"transactionAmount":{"type":"integer"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AllowedSettlementActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| CANCEL | Settlement can be cancelled|","enum":["CANCEL"],"title":"AllowedSettlementActionENUM","type":"string"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}":{"get":{"summary":"Get Receipt Details","description":"Get Receipt Details\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","tags":["Receipt"],"responses":{"200":{"$ref":"#/components/responses/ReceiptResponse"}},"operationId":"get-receipt-details"}}}}
```

## Update a receipt

> Update a receipt\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ReceiptResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptResponseSchema"}}}}},"schemas":{"ReceiptResponseSchema":{"title":"ReceiptResponseSchema","type":"object","required":["storeUid","orderUid","orderReceiptUid","settleState","orderReceiptState","voucherNumber","externalVoucherNumber","sellerDisplayName","settledAt","deliveryState","grandTotal","settlementTotals","settlements","items","address","customerUid","note"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderReceiptUid":{"$ref":"#/components/schemas/UID"},"settleState":{"$ref":"#/components/schemas/ReceiptStateENUM"},"orderReceiptState":{"$ref":"#/components/schemas/OrderReceiptStateENUM"},"tasks":{"type":"array","description":"Post-settlement tasks on the receipt in simplified form (type and status). Populated on the single-receipt details endpoint and when listing receipts on an order, not in search results.","items":{"$ref":"#/components/schemas/BasicOrderReceiptTaskSchema"}},"voucherNumber":{"type":"string"},"externalVoucherNumber":{"type":"string","deprecated":true},"externalIds":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdSchema"}},"sellerDisplayName":{"type":"string"},"settledAt":{"type":"string","format":"date-time"},"deliveryState":{"$ref":"#/components/schemas/OrderDeliveryStateENUM"},"grandTotal":{"type":"integer"},"settlementTotals":{"$ref":"#/components/schemas/OrderSettlementTotalsSchema"},"settlements":{"type":"array","items":{"$ref":"#/components/schemas/SettlementResponseSchema"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"address":{"$ref":"#/components/schemas/OrderAddressResponseSchema"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"note":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReceiptStateENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | Receipt not started. No complete settlements exists.|\n| IN_PROGRESS | Receipt is in progress. At least one settlement has been started.|\n| COMPLETE | Receipt is complete. Sum of settlements = sum of orderlines.|\n| CANCELED | Receipt is canceled. Can only be done if receiptState = NOT_STARTED. |","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"ReceiptStateENUM","type":"string"},"OrderReceiptStateENUM":{"description":"Rollup of the receipt's post-settlement tasks (gift card capture, digital\nproduct activation, loyalty, receipt printing, etc.).\n|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | No post-settlement tasks created yet.|\n| IN_PROGRESS | Tasks are still running; the receipt is not yet printable.|\n| READY | All critical tasks are done — the receipt is printable; non-critical tasks may still be running.|\n| COMPLETE | All tasks are done.|\n| FAILED | A critical task failed and needs attention.|","enum":["NOT_STARTED","IN_PROGRESS","READY","COMPLETE","FAILED"],"title":"OrderReceiptStateENUM","type":"string"},"BasicOrderReceiptTaskSchema":{"description":"A post-settlement task on a receipt in simplified form (type and status).","title":"BasicOrderReceiptTaskSchema","type":"object","required":["taskType","status"],"properties":{"taskType":{"$ref":"#/components/schemas/OrderReceiptTaskTypeENUM"},"status":{"$ref":"#/components/schemas/OrderReceiptTaskStatusENUM"}}},"OrderReceiptTaskTypeENUM":{"description":"The kind of post-settlement task. Mirrors the TaskType values in core.","enum":["LOYALTY_POINTS_SYNC","LOYALTY_POINTS_LINES","FLOWGIFTCARD_CAPTURE","FLOWGIFTCARD_DEPOSIT","BRITANNIA_GIFTCARD_CAPTURE","PAYEX_GIFTCARD_DEPOSIT","DIGITAL_PRODUCT_ACTIVATION","WAREHOUSE_STOCK_UPDATE","PRINT_RECEIPT","LOYALTY_DISCOUNT_SYNC","EHF_INVOICE_SEND"],"title":"OrderReceiptTaskTypeENUM","type":"string"},"OrderReceiptTaskStatusENUM":{"description":"Status of a single post-settlement task.","enum":["PENDING","IN_PROGRESS","COMPLETE","FAILED","SKIPPED"],"title":"OrderReceiptTaskStatusENUM","type":"string"},"ExternalIdSchema":{"type":"object","title":"ExternalIdSchema","required":["key","value","visibility"],"properties":{"key":{"type":"string","description":"Stable identifier, e.g. sap_order_number"},"label":{"type":"string","description":"Display label, e.g. SAP ordrenummer"},"value":{"type":"string"},"visibility":{"$ref":"#/components/schemas/ExternalIdVisibilityENUM"}}},"ExternalIdVisibilityENUM":{"type":"string","enum":["INTERNAL","EXTERNAL"],"title":"ExternalIdVisibilityENUM"},"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"},"OrderSettlementTotalsSchema":{"title":"OrderSettlementTotalsSchema","type":"object","required":["change","remaining","remainingRounded","totals","remainingPrePayment","remainingAuthorizedAmount"],"properties":{"change":{"description":"Total change amount returned to customer.","type":"integer"},"remaining":{"type":"integer","description":"Remaining amount to be paid "},"remainingRounded":{"description":"Rounded value of remaining amount. For use with CASH","type":"integer"},"totals":{"type":"integer","description":"Sum of all approved settlements"},"remainingPrePayment":{"type":"integer"},"remainingAuthorizedAmount":{"type":"integer","description":"Authorized amount available for capture."}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","storeUid","storeName","orderReceiptUid","transactions","receiptText","allowedActions"],"properties":{"amount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"displayMessages":{"type":"array","items":{"$ref":"#/components/schemas/SettlementDisplayMessageSchema"}},"externalId":{"type":"string"},"externalPaymentReference":{"type":"string","description":"The external payment reference for this settlement.\nFor invoices, this could contain the KID"},"idMethod":{"$ref":"#/components/schemas/SettlementIdMethodENUM"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"ledgerType":{"$ref":"#/components/schemas/LedgerTypeENUM"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/SettlementParameterResponseSchema"}},"settledAt":{"format":"date-time","type":"string"},"settlementCode":{"type":"string"},"settlementUid":{"$ref":"#/components/schemas/UID"},"settlementName":{"type":"string"},"state":{"$ref":"#/components/schemas/SettlementStateENUM"},"status":{"$ref":"#/components/schemas/SettlementStatusENUM"},"storeSettlementIssuer":{"$ref":"#/components/schemas/storeSettlementIssuerSchema"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storePaymentMethodUid":{"$ref":"#/components/schemas/UID"},"currency":{"$ref":"#/components/schemas/SettlementCurrencySchema"},"additionalDetails":{"type":"array","items":{"$ref":"#/components/schemas/SettlementAdditionalDetailsSchema"}},"creditCount":{"type":"integer","description":"Number of credits on this settlement. Only applicable for invoice"},"creditAmount":{"type":"integer","description":"The total amount credited. Only applicable for invoice"},"paymentCount":{"type":"integer","description":"Number of payments on this settlement. Only applicable for invoice"},"paymentAmount":{"type":"integer","description":"The total amount of payments. Only applicable for invoice"},"tillUid":{"$ref":"#/components/schemas/OptionalUID"},"tillName":{"type":"string","description":"Display name of the till where the payment was registered."},"tillNumber":{"type":"integer","description":"Till register number where the payment was registered."},"storeUid":{"$ref":"#/components/schemas/OptionalUID"},"storeName":{"type":"string","description":"Display name of the store where the payment was registered."},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"authorizedAmount":{"type":"integer","description":"The total authorized amount on this settlement, calculated from authorize transactions."},"capturedAmount":{"type":"integer","description":"The total captured amount on this settlement, calculated from capture transactions."},"refundedAmount":{"type":"integer","description":"The total refunded amount on this settlement, calculated from refund transactions."},"receiptText":{"type":"string","maxLength":500,"description":"Text printed on the receipt for this payment method when configured on the tenant payment method. Empty when not set, when suppressed for this settlement type (e.g. store credit, gift cards), or when cleared."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SettlementTransactionSchema"}},"allowedActions":{"description":"What can be done with this settlement. Judged from the settlement alone, so a cancellation offered here can still be turned down by the rules on the order or the receipt.","type":"array","items":{"$ref":"#/components/schemas/AllowedSettlementActionENUM"}}}},"SettlementDisplayMessageSchema":{"description":"Settlement display messages","properties":{"key":{"type":"string"},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["key","message","timestamp"],"title":"SettlementDisplayMessageSchema","type":"object"},"SettlementIdMethodENUM":{"enum":["NO_CVM_RULE_PERFORMED","SIGNATURE","PIN_ONLINE","PIN_OFFLINE","PIN_ONLINE_AND_SIGNATURE","PIN_OFFLINE_AND_SIGNATURE","NO_CVM","FAILED","ON_DEVICE","REFUND"],"title":"SettlementIdMethodENUM","type":"string"},"LedgerTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n|LEDGER | Ledger |\n|GENERAL_LEDGER | General ledger |\n|CUSTOMER_LEDGER | Customer ledger |","enum":["LEDGER","GENERAL_LEDGER","CUSTOMER_LEDGER"],"title":"LedgerTypeENUM","type":"string"},"SettlementParameterResponseSchema":{"description":"settlement parameters response","title":"SettlementParameterResponseSchema","type":"object","required":["key","value","name","type"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/TenantPaymentMethodParameterTypeENUM"}}},"TenantPaymentMethodParameterTypeENUM":{"title":"TenantPaymentMethodParameterTypeENUM","type":"string","enum":["TEXT","INTEGER","NUMERIC","DATE","MOBILE","MODULUS10","MODULUS11"]},"SettlementStateENUM":{"enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","TERMINATED"],"title":"SettlementCodeENUM","type":"string"},"SettlementStatusENUM":{"enum":["NEW","PROCESSING","AUTHORIZED","CAPTURED","REFUNDED","PARTIALLY_REFUNDED","PENDING_REFUND","FAILED","CANCELLED_BY_MERCHANT","CANCELLED_BY_USER","CANCELLED_FORCE","DELETED","DENIED","REJECTED"],"title":"SettlementCodeENUM","type":"string"},"storeSettlementIssuerSchema":{"title":"storeSettlementIssuerSchema","type":"object","description":"Settlement issuer information","required":["storeSettlementIssuerUid","name","code"],"properties":{"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string","description":"The name of the settlement issuer"},"code":{"type":"string","description":"The code of the settlement issuer"}}},"SettlementCurrencySchema":{"title":"SettlementCurrencySchema","type":"object","required":["amount","code","exchangeRate"],"properties":{"amount":{"type":"integer"},"code":{"type":"string"},"exchangeRate":{"type":"integer"}}},"SettlementAdditionalDetailsSchema":{"title":"SettlementAdditionalDetailsSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"SettlementTransactionSchema":{"title":"SettlementTransactionSchema","type":"object","required":["transactionType","transactionAmount","orderReceiptUid"],"properties":{"transactionType":{"type":"string"},"pspTransactionId":{"type":"string"},"transactionAmount":{"type":"integer"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AllowedSettlementActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| CANCEL | Settlement can be cancelled|","enum":["CANCEL"],"title":"AllowedSettlementActionENUM","type":"string"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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"},"ReceiptUpdateRequestSchema":{"title":"ReceiptUpdateRequestSchema","type":"object","properties":{"externalVoucherNumber":{"type":"string"}}}},"requestBodies":{"ReceiptUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptUpdateRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}":{"put":{"summary":"Update a receipt","tags":["Receipt"],"responses":{"201":{"$ref":"#/components/responses/ReceiptResponse"}},"operationId":"put-receipt-details","requestBody":{"$ref":"#/components/requestBodies/ReceiptUpdateRequest"},"description":"Update a receipt\n\nRequired permissions: SALES_ORDER,RETURN_ORDER"}}}}
```

## Delete a receipt

> Delete a receipt\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}":{"delete":{"summary":"Delete a receipt","tags":["Receipt"],"responses":{"204":{"description":"No Content"}},"operationId":"delete-receipt","description":"Delete a receipt\n\nRequired permissions: SALES_ORDER,RETURN_ORDER"}}}}
```

## List the post-settlement tasks on a receipt

> List the post-settlement tasks on a receipt in complete form, including the\
> full attempt history. Use this to inspect why a task failed before retrying.\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"OrderReceiptTaskListResponse":{"description":"The post-settlement tasks on a receipt.","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderReceiptTaskSchema"}}}}}}}},"schemas":{"OrderReceiptTaskSchema":{"description":"A post-settlement task on a receipt in complete form, with its attempt history.","title":"OrderReceiptTaskSchema","type":"object","required":["orderReceiptTaskUid","taskType","status","attempts"],"properties":{"orderReceiptTaskUid":{"$ref":"#/components/schemas/UID"},"taskType":{"$ref":"#/components/schemas/OrderReceiptTaskTypeENUM"},"status":{"$ref":"#/components/schemas/OrderReceiptTaskStatusENUM"},"attempts":{"type":"array","items":{"$ref":"#/components/schemas/OrderReceiptTaskAttemptSchema"}},"createdAt":{"type":"string","format":"date-time"},"lastModifiedAt":{"type":"string","format":"date-time"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OrderReceiptTaskTypeENUM":{"description":"The kind of post-settlement task. Mirrors the TaskType values in core.","enum":["LOYALTY_POINTS_SYNC","LOYALTY_POINTS_LINES","FLOWGIFTCARD_CAPTURE","FLOWGIFTCARD_DEPOSIT","BRITANNIA_GIFTCARD_CAPTURE","PAYEX_GIFTCARD_DEPOSIT","DIGITAL_PRODUCT_ACTIVATION","WAREHOUSE_STOCK_UPDATE","PRINT_RECEIPT","LOYALTY_DISCOUNT_SYNC","EHF_INVOICE_SEND"],"title":"OrderReceiptTaskTypeENUM","type":"string"},"OrderReceiptTaskStatusENUM":{"description":"Status of a single post-settlement task.","enum":["PENDING","IN_PROGRESS","COMPLETE","FAILED","SKIPPED"],"title":"OrderReceiptTaskStatusENUM","type":"string"},"OrderReceiptTaskAttemptSchema":{"description":"One attempt at running a post-settlement task.","title":"OrderReceiptTaskAttemptSchema","type":"object","required":["attempt","timestamp","trigger","outcome"],"properties":{"attempt":{"type":"integer","description":"1-based attempt number."},"timestamp":{"type":"string","format":"date-time"},"triggeredBy":{"type":"string","description":"Who triggered the attempt — \"system\" on an automatic attempt, the tenant user on a manual retry."},"trigger":{"type":"string","description":"AUTO or MANUAL."},"outcome":{"type":"string","description":"COMPLETE, FAILED or SKIPPED."},"error":{"type":"string"},"response":{"type":"string","description":"Raw partner response / result summary."},"requestId":{"type":"string","description":"Correlates with flowretail.log / flow_http_client.log."}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}/tasks":{"get":{"summary":"List the post-settlement tasks on a receipt","description":"List the post-settlement tasks on a receipt in complete form, including the\nfull attempt history. Use this to inspect why a task failed before retrying.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"get-receipt-tasks","responses":{"200":{"$ref":"#/components/responses/OrderReceiptTaskListResponse"}},"tags":["Receipt"]}}}}
```

## Retry the failed post-settlement tasks on a receipt

> Re-run the receipt's failed post-settlement tasks. Returns the receipt's tasks\
> with their updated state. Tasks that are already complete are left untouched.\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"OrderReceiptTaskListResponse":{"description":"The post-settlement tasks on a receipt.","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderReceiptTaskSchema"}}}}}}}},"schemas":{"OrderReceiptTaskSchema":{"description":"A post-settlement task on a receipt in complete form, with its attempt history.","title":"OrderReceiptTaskSchema","type":"object","required":["orderReceiptTaskUid","taskType","status","attempts"],"properties":{"orderReceiptTaskUid":{"$ref":"#/components/schemas/UID"},"taskType":{"$ref":"#/components/schemas/OrderReceiptTaskTypeENUM"},"status":{"$ref":"#/components/schemas/OrderReceiptTaskStatusENUM"},"attempts":{"type":"array","items":{"$ref":"#/components/schemas/OrderReceiptTaskAttemptSchema"}},"createdAt":{"type":"string","format":"date-time"},"lastModifiedAt":{"type":"string","format":"date-time"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OrderReceiptTaskTypeENUM":{"description":"The kind of post-settlement task. Mirrors the TaskType values in core.","enum":["LOYALTY_POINTS_SYNC","LOYALTY_POINTS_LINES","FLOWGIFTCARD_CAPTURE","FLOWGIFTCARD_DEPOSIT","BRITANNIA_GIFTCARD_CAPTURE","PAYEX_GIFTCARD_DEPOSIT","DIGITAL_PRODUCT_ACTIVATION","WAREHOUSE_STOCK_UPDATE","PRINT_RECEIPT","LOYALTY_DISCOUNT_SYNC","EHF_INVOICE_SEND"],"title":"OrderReceiptTaskTypeENUM","type":"string"},"OrderReceiptTaskStatusENUM":{"description":"Status of a single post-settlement task.","enum":["PENDING","IN_PROGRESS","COMPLETE","FAILED","SKIPPED"],"title":"OrderReceiptTaskStatusENUM","type":"string"},"OrderReceiptTaskAttemptSchema":{"description":"One attempt at running a post-settlement task.","title":"OrderReceiptTaskAttemptSchema","type":"object","required":["attempt","timestamp","trigger","outcome"],"properties":{"attempt":{"type":"integer","description":"1-based attempt number."},"timestamp":{"type":"string","format":"date-time"},"triggeredBy":{"type":"string","description":"Who triggered the attempt — \"system\" on an automatic attempt, the tenant user on a manual retry."},"trigger":{"type":"string","description":"AUTO or MANUAL."},"outcome":{"type":"string","description":"COMPLETE, FAILED or SKIPPED."},"error":{"type":"string"},"response":{"type":"string","description":"Raw partner response / result summary."},"requestId":{"type":"string","description":"Correlates with flowretail.log / flow_http_client.log."}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}/tasks":{"post":{"summary":"Retry the failed post-settlement tasks on a receipt","description":"Re-run the receipt's failed post-settlement tasks. Returns the receipt's tasks\nwith their updated state. Tasks that are already complete are left untouched.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"retry-receipt-tasks","responses":{"200":{"$ref":"#/components/responses/OrderReceiptTaskListResponse"}},"tags":["Receipt"]}}}}
```

## List settlements for a receipt

> List settlements for a receipt\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"SettlementListResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SettlementResponseSchema"},"type":"array"},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"],"type":"object"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"description":"Example response"}},"schemas":{"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","storeUid","storeName","orderReceiptUid","transactions","receiptText","allowedActions"],"properties":{"amount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"displayMessages":{"type":"array","items":{"$ref":"#/components/schemas/SettlementDisplayMessageSchema"}},"externalId":{"type":"string"},"externalPaymentReference":{"type":"string","description":"The external payment reference for this settlement.\nFor invoices, this could contain the KID"},"idMethod":{"$ref":"#/components/schemas/SettlementIdMethodENUM"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"ledgerType":{"$ref":"#/components/schemas/LedgerTypeENUM"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/SettlementParameterResponseSchema"}},"settledAt":{"format":"date-time","type":"string"},"settlementCode":{"type":"string"},"settlementUid":{"$ref":"#/components/schemas/UID"},"settlementName":{"type":"string"},"state":{"$ref":"#/components/schemas/SettlementStateENUM"},"status":{"$ref":"#/components/schemas/SettlementStatusENUM"},"storeSettlementIssuer":{"$ref":"#/components/schemas/storeSettlementIssuerSchema"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storePaymentMethodUid":{"$ref":"#/components/schemas/UID"},"currency":{"$ref":"#/components/schemas/SettlementCurrencySchema"},"additionalDetails":{"type":"array","items":{"$ref":"#/components/schemas/SettlementAdditionalDetailsSchema"}},"creditCount":{"type":"integer","description":"Number of credits on this settlement. Only applicable for invoice"},"creditAmount":{"type":"integer","description":"The total amount credited. Only applicable for invoice"},"paymentCount":{"type":"integer","description":"Number of payments on this settlement. Only applicable for invoice"},"paymentAmount":{"type":"integer","description":"The total amount of payments. Only applicable for invoice"},"tillUid":{"$ref":"#/components/schemas/OptionalUID"},"tillName":{"type":"string","description":"Display name of the till where the payment was registered."},"tillNumber":{"type":"integer","description":"Till register number where the payment was registered."},"storeUid":{"$ref":"#/components/schemas/OptionalUID"},"storeName":{"type":"string","description":"Display name of the store where the payment was registered."},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"authorizedAmount":{"type":"integer","description":"The total authorized amount on this settlement, calculated from authorize transactions."},"capturedAmount":{"type":"integer","description":"The total captured amount on this settlement, calculated from capture transactions."},"refundedAmount":{"type":"integer","description":"The total refunded amount on this settlement, calculated from refund transactions."},"receiptText":{"type":"string","maxLength":500,"description":"Text printed on the receipt for this payment method when configured on the tenant payment method. Empty when not set, when suppressed for this settlement type (e.g. store credit, gift cards), or when cleared."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SettlementTransactionSchema"}},"allowedActions":{"description":"What can be done with this settlement. Judged from the settlement alone, so a cancellation offered here can still be turned down by the rules on the order or the receipt.","type":"array","items":{"$ref":"#/components/schemas/AllowedSettlementActionENUM"}}}},"SettlementDisplayMessageSchema":{"description":"Settlement display messages","properties":{"key":{"type":"string"},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["key","message","timestamp"],"title":"SettlementDisplayMessageSchema","type":"object"},"SettlementIdMethodENUM":{"enum":["NO_CVM_RULE_PERFORMED","SIGNATURE","PIN_ONLINE","PIN_OFFLINE","PIN_ONLINE_AND_SIGNATURE","PIN_OFFLINE_AND_SIGNATURE","NO_CVM","FAILED","ON_DEVICE","REFUND"],"title":"SettlementIdMethodENUM","type":"string"},"LedgerTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n|LEDGER | Ledger |\n|GENERAL_LEDGER | General ledger |\n|CUSTOMER_LEDGER | Customer ledger |","enum":["LEDGER","GENERAL_LEDGER","CUSTOMER_LEDGER"],"title":"LedgerTypeENUM","type":"string"},"SettlementParameterResponseSchema":{"description":"settlement parameters response","title":"SettlementParameterResponseSchema","type":"object","required":["key","value","name","type"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/TenantPaymentMethodParameterTypeENUM"}}},"TenantPaymentMethodParameterTypeENUM":{"title":"TenantPaymentMethodParameterTypeENUM","type":"string","enum":["TEXT","INTEGER","NUMERIC","DATE","MOBILE","MODULUS10","MODULUS11"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SettlementStateENUM":{"enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","TERMINATED"],"title":"SettlementCodeENUM","type":"string"},"SettlementStatusENUM":{"enum":["NEW","PROCESSING","AUTHORIZED","CAPTURED","REFUNDED","PARTIALLY_REFUNDED","PENDING_REFUND","FAILED","CANCELLED_BY_MERCHANT","CANCELLED_BY_USER","CANCELLED_FORCE","DELETED","DENIED","REJECTED"],"title":"SettlementCodeENUM","type":"string"},"storeSettlementIssuerSchema":{"title":"storeSettlementIssuerSchema","type":"object","description":"Settlement issuer information","required":["storeSettlementIssuerUid","name","code"],"properties":{"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string","description":"The name of the settlement issuer"},"code":{"type":"string","description":"The code of the settlement issuer"}}},"SettlementCurrencySchema":{"title":"SettlementCurrencySchema","type":"object","required":["amount","code","exchangeRate"],"properties":{"amount":{"type":"integer"},"code":{"type":"string"},"exchangeRate":{"type":"integer"}}},"SettlementAdditionalDetailsSchema":{"title":"SettlementAdditionalDetailsSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"SettlementTransactionSchema":{"title":"SettlementTransactionSchema","type":"object","required":["transactionType","transactionAmount","orderReceiptUid"],"properties":{"transactionType":{"type":"string"},"pspTransactionId":{"type":"string"},"transactionAmount":{"type":"integer"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AllowedSettlementActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| CANCEL | Settlement can be cancelled|","enum":["CANCEL"],"title":"AllowedSettlementActionENUM","type":"string"},"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}/receipts/{receiptUid}/settlements":{"get":{"summary":"List settlements for a receipt","tags":["Receipt"],"responses":{"200":{"$ref":"#/components/responses/SettlementListResponse"}},"operationId":"get-receipt-settlements","description":"List settlements for a receipt\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}]}}}}
```

## Create new settlement

> Create new settlement\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"SettlementResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementResponseSchema"}}},"description":"Example response"}},"schemas":{"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","storeUid","storeName","orderReceiptUid","transactions","receiptText","allowedActions"],"properties":{"amount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"displayMessages":{"type":"array","items":{"$ref":"#/components/schemas/SettlementDisplayMessageSchema"}},"externalId":{"type":"string"},"externalPaymentReference":{"type":"string","description":"The external payment reference for this settlement.\nFor invoices, this could contain the KID"},"idMethod":{"$ref":"#/components/schemas/SettlementIdMethodENUM"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"ledgerType":{"$ref":"#/components/schemas/LedgerTypeENUM"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/SettlementParameterResponseSchema"}},"settledAt":{"format":"date-time","type":"string"},"settlementCode":{"type":"string"},"settlementUid":{"$ref":"#/components/schemas/UID"},"settlementName":{"type":"string"},"state":{"$ref":"#/components/schemas/SettlementStateENUM"},"status":{"$ref":"#/components/schemas/SettlementStatusENUM"},"storeSettlementIssuer":{"$ref":"#/components/schemas/storeSettlementIssuerSchema"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storePaymentMethodUid":{"$ref":"#/components/schemas/UID"},"currency":{"$ref":"#/components/schemas/SettlementCurrencySchema"},"additionalDetails":{"type":"array","items":{"$ref":"#/components/schemas/SettlementAdditionalDetailsSchema"}},"creditCount":{"type":"integer","description":"Number of credits on this settlement. Only applicable for invoice"},"creditAmount":{"type":"integer","description":"The total amount credited. Only applicable for invoice"},"paymentCount":{"type":"integer","description":"Number of payments on this settlement. Only applicable for invoice"},"paymentAmount":{"type":"integer","description":"The total amount of payments. Only applicable for invoice"},"tillUid":{"$ref":"#/components/schemas/OptionalUID"},"tillName":{"type":"string","description":"Display name of the till where the payment was registered."},"tillNumber":{"type":"integer","description":"Till register number where the payment was registered."},"storeUid":{"$ref":"#/components/schemas/OptionalUID"},"storeName":{"type":"string","description":"Display name of the store where the payment was registered."},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"authorizedAmount":{"type":"integer","description":"The total authorized amount on this settlement, calculated from authorize transactions."},"capturedAmount":{"type":"integer","description":"The total captured amount on this settlement, calculated from capture transactions."},"refundedAmount":{"type":"integer","description":"The total refunded amount on this settlement, calculated from refund transactions."},"receiptText":{"type":"string","maxLength":500,"description":"Text printed on the receipt for this payment method when configured on the tenant payment method. Empty when not set, when suppressed for this settlement type (e.g. store credit, gift cards), or when cleared."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SettlementTransactionSchema"}},"allowedActions":{"description":"What can be done with this settlement. Judged from the settlement alone, so a cancellation offered here can still be turned down by the rules on the order or the receipt.","type":"array","items":{"$ref":"#/components/schemas/AllowedSettlementActionENUM"}}}},"SettlementDisplayMessageSchema":{"description":"Settlement display messages","properties":{"key":{"type":"string"},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["key","message","timestamp"],"title":"SettlementDisplayMessageSchema","type":"object"},"SettlementIdMethodENUM":{"enum":["NO_CVM_RULE_PERFORMED","SIGNATURE","PIN_ONLINE","PIN_OFFLINE","PIN_ONLINE_AND_SIGNATURE","PIN_OFFLINE_AND_SIGNATURE","NO_CVM","FAILED","ON_DEVICE","REFUND"],"title":"SettlementIdMethodENUM","type":"string"},"LedgerTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n|LEDGER | Ledger |\n|GENERAL_LEDGER | General ledger |\n|CUSTOMER_LEDGER | Customer ledger |","enum":["LEDGER","GENERAL_LEDGER","CUSTOMER_LEDGER"],"title":"LedgerTypeENUM","type":"string"},"SettlementParameterResponseSchema":{"description":"settlement parameters response","title":"SettlementParameterResponseSchema","type":"object","required":["key","value","name","type"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/TenantPaymentMethodParameterTypeENUM"}}},"TenantPaymentMethodParameterTypeENUM":{"title":"TenantPaymentMethodParameterTypeENUM","type":"string","enum":["TEXT","INTEGER","NUMERIC","DATE","MOBILE","MODULUS10","MODULUS11"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SettlementStateENUM":{"enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","TERMINATED"],"title":"SettlementCodeENUM","type":"string"},"SettlementStatusENUM":{"enum":["NEW","PROCESSING","AUTHORIZED","CAPTURED","REFUNDED","PARTIALLY_REFUNDED","PENDING_REFUND","FAILED","CANCELLED_BY_MERCHANT","CANCELLED_BY_USER","CANCELLED_FORCE","DELETED","DENIED","REJECTED"],"title":"SettlementCodeENUM","type":"string"},"storeSettlementIssuerSchema":{"title":"storeSettlementIssuerSchema","type":"object","description":"Settlement issuer information","required":["storeSettlementIssuerUid","name","code"],"properties":{"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string","description":"The name of the settlement issuer"},"code":{"type":"string","description":"The code of the settlement issuer"}}},"SettlementCurrencySchema":{"title":"SettlementCurrencySchema","type":"object","required":["amount","code","exchangeRate"],"properties":{"amount":{"type":"integer"},"code":{"type":"string"},"exchangeRate":{"type":"integer"}}},"SettlementAdditionalDetailsSchema":{"title":"SettlementAdditionalDetailsSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"SettlementTransactionSchema":{"title":"SettlementTransactionSchema","type":"object","required":["transactionType","transactionAmount","orderReceiptUid"],"properties":{"transactionType":{"type":"string"},"pspTransactionId":{"type":"string"},"transactionAmount":{"type":"integer"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AllowedSettlementActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| CANCEL | Settlement can be cancelled|","enum":["CANCEL"],"title":"AllowedSettlementActionENUM","type":"string"},"SettlementCreateRequestSchema":{"description":"Create a new settlement","title":"SettlementCreateRequestSchema","type":"object","required":["amount","settlementCode"],"properties":{"amount":{"description":"in cents, e.g. 1,50 as 150","type":"integer"},"externalId":{"description":"External reference for the settlement","type":"string"},"settlementCode":{"type":"string"},"parameters":{"description":"Refer to each payment type's options for available parameters, e.g. 'mobile' for VIPPS.","type":"array","items":{"$ref":"#/components/schemas/SettlementParameterRequestSchema"}},"settlementUid":{"$ref":"#/components/schemas/UID"}}},"SettlementParameterRequestSchema":{"description":"settlement parameters request","title":"SettlementParameterRequestSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"requestBodies":{"SettlementCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementCreateRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}/settlements":{"post":{"summary":"Create new settlement","tags":["Receipt"],"responses":{"201":{"$ref":"#/components/responses/SettlementResponse"}},"operationId":"post-receipt-settlement","description":"Create new settlement\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","requestBody":{"$ref":"#/components/requestBodies/SettlementCreateRequest"}}}}}
```

## Print receipt

> Print receipt\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Print","description":"Print"},{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"ReceiptPrintRequest":{"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"},"orderHandlingUid":{"description":"Only valid for type PICKUP, SHORTAGENOTE and PICKNOTE.\nWhen set, only the name of this order handling is shown on the note.\nWhen omitted, all order handlings on the order are shown.","$ref":"#/components/schemas/UID"}}},"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|SHORTAGENOTE| Print a missing items note (restlapp) |\n|PICKNOTE| Print a pick note (plukkelapp) |\n","minLength":1,"title":"OrderPrintTypeENUM","type":"string","enum":["RECEIPT","EXCHANGENOTE","GIFTCARD","PICKUP","SHORTAGENOTE","PICKNOTE"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}/print":{"post":{"summary":"Print receipt","tags":["Receipt","Print"],"responses":{"204":{"description":"No Content"}},"operationId":"post-receipt-print","description":"Print receipt\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","requestBody":{"$ref":"#/components/requestBodies/ReceiptPrintRequest"}}}}}
```

## Get settlement details

> Get settlement details\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ReceiptResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptResponseSchema"}}}}},"schemas":{"ReceiptResponseSchema":{"title":"ReceiptResponseSchema","type":"object","required":["storeUid","orderUid","orderReceiptUid","settleState","orderReceiptState","voucherNumber","externalVoucherNumber","sellerDisplayName","settledAt","deliveryState","grandTotal","settlementTotals","settlements","items","address","customerUid","note"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderReceiptUid":{"$ref":"#/components/schemas/UID"},"settleState":{"$ref":"#/components/schemas/ReceiptStateENUM"},"orderReceiptState":{"$ref":"#/components/schemas/OrderReceiptStateENUM"},"tasks":{"type":"array","description":"Post-settlement tasks on the receipt in simplified form (type and status). Populated on the single-receipt details endpoint and when listing receipts on an order, not in search results.","items":{"$ref":"#/components/schemas/BasicOrderReceiptTaskSchema"}},"voucherNumber":{"type":"string"},"externalVoucherNumber":{"type":"string","deprecated":true},"externalIds":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdSchema"}},"sellerDisplayName":{"type":"string"},"settledAt":{"type":"string","format":"date-time"},"deliveryState":{"$ref":"#/components/schemas/OrderDeliveryStateENUM"},"grandTotal":{"type":"integer"},"settlementTotals":{"$ref":"#/components/schemas/OrderSettlementTotalsSchema"},"settlements":{"type":"array","items":{"$ref":"#/components/schemas/SettlementResponseSchema"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseSchema"}},"address":{"$ref":"#/components/schemas/OrderAddressResponseSchema"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"note":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReceiptStateENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | Receipt not started. No complete settlements exists.|\n| IN_PROGRESS | Receipt is in progress. At least one settlement has been started.|\n| COMPLETE | Receipt is complete. Sum of settlements = sum of orderlines.|\n| CANCELED | Receipt is canceled. Can only be done if receiptState = NOT_STARTED. |","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"ReceiptStateENUM","type":"string"},"OrderReceiptStateENUM":{"description":"Rollup of the receipt's post-settlement tasks (gift card capture, digital\nproduct activation, loyalty, receipt printing, etc.).\n|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | No post-settlement tasks created yet.|\n| IN_PROGRESS | Tasks are still running; the receipt is not yet printable.|\n| READY | All critical tasks are done — the receipt is printable; non-critical tasks may still be running.|\n| COMPLETE | All tasks are done.|\n| FAILED | A critical task failed and needs attention.|","enum":["NOT_STARTED","IN_PROGRESS","READY","COMPLETE","FAILED"],"title":"OrderReceiptStateENUM","type":"string"},"BasicOrderReceiptTaskSchema":{"description":"A post-settlement task on a receipt in simplified form (type and status).","title":"BasicOrderReceiptTaskSchema","type":"object","required":["taskType","status"],"properties":{"taskType":{"$ref":"#/components/schemas/OrderReceiptTaskTypeENUM"},"status":{"$ref":"#/components/schemas/OrderReceiptTaskStatusENUM"}}},"OrderReceiptTaskTypeENUM":{"description":"The kind of post-settlement task. Mirrors the TaskType values in core.","enum":["LOYALTY_POINTS_SYNC","LOYALTY_POINTS_LINES","FLOWGIFTCARD_CAPTURE","FLOWGIFTCARD_DEPOSIT","BRITANNIA_GIFTCARD_CAPTURE","PAYEX_GIFTCARD_DEPOSIT","DIGITAL_PRODUCT_ACTIVATION","WAREHOUSE_STOCK_UPDATE","PRINT_RECEIPT","LOYALTY_DISCOUNT_SYNC","EHF_INVOICE_SEND"],"title":"OrderReceiptTaskTypeENUM","type":"string"},"OrderReceiptTaskStatusENUM":{"description":"Status of a single post-settlement task.","enum":["PENDING","IN_PROGRESS","COMPLETE","FAILED","SKIPPED"],"title":"OrderReceiptTaskStatusENUM","type":"string"},"ExternalIdSchema":{"type":"object","title":"ExternalIdSchema","required":["key","value","visibility"],"properties":{"key":{"type":"string","description":"Stable identifier, e.g. sap_order_number"},"label":{"type":"string","description":"Display label, e.g. SAP ordrenummer"},"value":{"type":"string"},"visibility":{"$ref":"#/components/schemas/ExternalIdVisibilityENUM"}}},"ExternalIdVisibilityENUM":{"type":"string","enum":["INTERNAL","EXTERNAL"],"title":"ExternalIdVisibilityENUM"},"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"},"OrderSettlementTotalsSchema":{"title":"OrderSettlementTotalsSchema","type":"object","required":["change","remaining","remainingRounded","totals","remainingPrePayment","remainingAuthorizedAmount"],"properties":{"change":{"description":"Total change amount returned to customer.","type":"integer"},"remaining":{"type":"integer","description":"Remaining amount to be paid "},"remainingRounded":{"description":"Rounded value of remaining amount. For use with CASH","type":"integer"},"totals":{"type":"integer","description":"Sum of all approved settlements"},"remainingPrePayment":{"type":"integer"},"remainingAuthorizedAmount":{"type":"integer","description":"Authorized amount available for capture."}}},"SettlementResponseSchema":{"title":"SettlementResponseSchema","type":"object","required":["amount","createdAt","displayMessages","externalId","externalPaymentReference","idMethod","lastModifiedAt","parameters","settlementCode","settlementUid","settlementName","state","status","storeSettlementIssuer","tenantUserDisplayName","tenantUserUid","storePaymentMethodUid","currency","additionalDetails","creditCount","creditAmount","paymentCount","paymentAmount","storeUid","storeName","orderReceiptUid","transactions","receiptText","allowedActions"],"properties":{"amount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"displayMessages":{"type":"array","items":{"$ref":"#/components/schemas/SettlementDisplayMessageSchema"}},"externalId":{"type":"string"},"externalPaymentReference":{"type":"string","description":"The external payment reference for this settlement.\nFor invoices, this could contain the KID"},"idMethod":{"$ref":"#/components/schemas/SettlementIdMethodENUM"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"ledgerType":{"$ref":"#/components/schemas/LedgerTypeENUM"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/SettlementParameterResponseSchema"}},"settledAt":{"format":"date-time","type":"string"},"settlementCode":{"type":"string"},"settlementUid":{"$ref":"#/components/schemas/UID"},"settlementName":{"type":"string"},"state":{"$ref":"#/components/schemas/SettlementStateENUM"},"status":{"$ref":"#/components/schemas/SettlementStatusENUM"},"storeSettlementIssuer":{"$ref":"#/components/schemas/storeSettlementIssuerSchema"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storePaymentMethodUid":{"$ref":"#/components/schemas/UID"},"currency":{"$ref":"#/components/schemas/SettlementCurrencySchema"},"additionalDetails":{"type":"array","items":{"$ref":"#/components/schemas/SettlementAdditionalDetailsSchema"}},"creditCount":{"type":"integer","description":"Number of credits on this settlement. Only applicable for invoice"},"creditAmount":{"type":"integer","description":"The total amount credited. Only applicable for invoice"},"paymentCount":{"type":"integer","description":"Number of payments on this settlement. Only applicable for invoice"},"paymentAmount":{"type":"integer","description":"The total amount of payments. Only applicable for invoice"},"tillUid":{"$ref":"#/components/schemas/OptionalUID"},"tillName":{"type":"string","description":"Display name of the till where the payment was registered."},"tillNumber":{"type":"integer","description":"Till register number where the payment was registered."},"storeUid":{"$ref":"#/components/schemas/OptionalUID"},"storeName":{"type":"string","description":"Display name of the store where the payment was registered."},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"authorizedAmount":{"type":"integer","description":"The total authorized amount on this settlement, calculated from authorize transactions."},"capturedAmount":{"type":"integer","description":"The total captured amount on this settlement, calculated from capture transactions."},"refundedAmount":{"type":"integer","description":"The total refunded amount on this settlement, calculated from refund transactions."},"receiptText":{"type":"string","maxLength":500,"description":"Text printed on the receipt for this payment method when configured on the tenant payment method. Empty when not set, when suppressed for this settlement type (e.g. store credit, gift cards), or when cleared."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SettlementTransactionSchema"}},"allowedActions":{"description":"What can be done with this settlement. Judged from the settlement alone, so a cancellation offered here can still be turned down by the rules on the order or the receipt.","type":"array","items":{"$ref":"#/components/schemas/AllowedSettlementActionENUM"}}}},"SettlementDisplayMessageSchema":{"description":"Settlement display messages","properties":{"key":{"type":"string"},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["key","message","timestamp"],"title":"SettlementDisplayMessageSchema","type":"object"},"SettlementIdMethodENUM":{"enum":["NO_CVM_RULE_PERFORMED","SIGNATURE","PIN_ONLINE","PIN_OFFLINE","PIN_ONLINE_AND_SIGNATURE","PIN_OFFLINE_AND_SIGNATURE","NO_CVM","FAILED","ON_DEVICE","REFUND"],"title":"SettlementIdMethodENUM","type":"string"},"LedgerTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n|LEDGER | Ledger |\n|GENERAL_LEDGER | General ledger |\n|CUSTOMER_LEDGER | Customer ledger |","enum":["LEDGER","GENERAL_LEDGER","CUSTOMER_LEDGER"],"title":"LedgerTypeENUM","type":"string"},"SettlementParameterResponseSchema":{"description":"settlement parameters response","title":"SettlementParameterResponseSchema","type":"object","required":["key","value","name","type"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/TenantPaymentMethodParameterTypeENUM"}}},"TenantPaymentMethodParameterTypeENUM":{"title":"TenantPaymentMethodParameterTypeENUM","type":"string","enum":["TEXT","INTEGER","NUMERIC","DATE","MOBILE","MODULUS10","MODULUS11"]},"SettlementStateENUM":{"enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","TERMINATED"],"title":"SettlementCodeENUM","type":"string"},"SettlementStatusENUM":{"enum":["NEW","PROCESSING","AUTHORIZED","CAPTURED","REFUNDED","PARTIALLY_REFUNDED","PENDING_REFUND","FAILED","CANCELLED_BY_MERCHANT","CANCELLED_BY_USER","CANCELLED_FORCE","DELETED","DENIED","REJECTED"],"title":"SettlementCodeENUM","type":"string"},"storeSettlementIssuerSchema":{"title":"storeSettlementIssuerSchema","type":"object","description":"Settlement issuer information","required":["storeSettlementIssuerUid","name","code"],"properties":{"storeSettlementIssuerUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string","description":"The name of the settlement issuer"},"code":{"type":"string","description":"The code of the settlement issuer"}}},"SettlementCurrencySchema":{"title":"SettlementCurrencySchema","type":"object","required":["amount","code","exchangeRate"],"properties":{"amount":{"type":"integer"},"code":{"type":"string"},"exchangeRate":{"type":"integer"}}},"SettlementAdditionalDetailsSchema":{"title":"SettlementAdditionalDetailsSchema","type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"SettlementTransactionSchema":{"title":"SettlementTransactionSchema","type":"object","required":["transactionType","transactionAmount","orderReceiptUid"],"properties":{"transactionType":{"type":"string"},"pspTransactionId":{"type":"string"},"transactionAmount":{"type":"integer"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AllowedSettlementActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| CANCEL | Settlement can be cancelled|","enum":["CANCEL"],"title":"AllowedSettlementActionENUM","type":"string"},"OrderItemResponseSchema":{"title":"OrderItemResponseSchema","type":"object","required":["actions","allowedActions","createdAt","discountReasonCode","externalId","itemCost","itemDiscountAmount","itemDiscountPercentage","itemGrossProfitAmount","itemGrossProfitPercentage","itemPrice","itemVatAmount","lastModifiedAt","ledgerNumber","name","note","orderItemReference","orderItemUid","originalItemPrice","productUid","productType","properties","quantityCredited","quantityDelivered","quantityOrdered","quantityReserved","returnReasonCode","serialnumber","sku","sortOrder","tenantUserDisplayName","tenantUserUid","totalCost","totalDiscountAmount","totalGrossProfitAmount","totalPrice","totalVatAmount","vatCodeUid","warehouseUid","warehouseName","internalInfo","productProperties","coverImage","deliveryUid","compensationReasonCode","orderReceiptUid","allowDelivery","allowDeliveryFromDate","reservationType","reservationDetails","interStoreOrderReservationQuantity","gtins","usesVatMarginScheme"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemActionResponseSchema"}},"allowedActions":{"description":"Indicate what fields are allowed to change or what action is allowed on an orderline","type":"array","items":{"$ref":"#/components/schemas/AllowedActionENUM"}},"createdAt":{"format":"date-time","type":"string"},"discountReasonCode":{"type":"string"},"externalId":{"type":"string"},"itemCost":{"description":"Item cost for a single product.","type":"integer"},"itemDiscountAmount":{"description":"Discount amount for a single product.","type":"integer"},"itemDiscountPercentage":{"type":"integer"},"itemGrossProfitAmount":{"description":"Profit amount for a single product.","type":"integer"},"itemGrossProfitPercentage":{"description":"Profit for a single product in percentage.","type":"integer"},"itemPrice":{"type":"integer"},"itemVatAmount":{"description":"Vat amount for a single product.","type":"integer"},"lastModifiedAt":{"format":"date-time","type":"string"},"ledgerNumber":{"description":"Ledger number must be a valid number with possible leading zeros","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"orderItemReference":{"type":"string","description":"If this field has any value, the order line must include a property with the key `ORDERITEM_REFERENCE`. The allowed values for this field are `phone`, `email`, `not_empty`, or a regular expression."},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderLinks":{"description":"List of references on the order product item.\nTypically a list of credit operations.","type":"array","items":{"$ref":"#/components/schemas/OrderLinkTypeSchema"}},"originalItemPrice":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productType":{"$ref":"#/components/schemas/ProductTypeENUM"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/OrderProductLinePropertyResponseSchema"}},"quantityCredited":{"type":"integer"},"quantityDelivered":{"type":"integer"},"quantityOrdered":{"type":"integer"},"quantityReserved":{"type":"integer"},"returnReasonCode":{"type":"string"},"returnReference":{"type":"string"},"serialnumber":{"type":"string"},"sku":{"type":"string"},"sortOrder":{"type":"integer"},"tenantUserDisplayName":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"totalCost":{"description":"Total cost for all products on this OrderItem.","type":"integer"},"totalDiscountAmount":{"description":"Discount amount for all products on this OrderItem.","type":"integer"},"totalGrossProfitAmount":{"description":"Profit amount for all products on this OrderItem.","type":"integer"},"totalPrice":{"description":"Total price for all products on this OrderItem.","type":"integer"},"totalVatAmount":{"description":"Vat amount for all products on this OrderItem.","type":"integer"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"warehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"warehouseName":{"type":"string"},"internalInfo":{"type":"string"},"productProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductPropertyResponseSchema"}},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"deliveryUid":{"$ref":"#/components/schemas/OptionalUID"},"compensationReasonCode":{"type":"string"},"orderReceiptUid":{"$ref":"#/components/schemas/OptionalUID"},"allowDelivery":{"$ref":"#/components/schemas/AllowDeliveryENUM"},"allowDeliveryFromDate":{"type":"string","format":"date-time","description":"When allowDelivery is `NOT_BEFORE_DATE` this field will contain the time for when the product is allowed to be delivered from.","nullable":true},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"},"reservationDetails":{"$ref":"#/components/schemas/SalesReservationDetailsSchema"},"interStoreOrderReservationQuantity":{"type":"integer","nullable":true,"description":"Inter-store trade, on the seller store's mirrored sales order line: how much of it is reserved by customer lines at the buying store, in hundredths (100 = 1 unit). The rest is the buyer building stock. It is the same number the buying store sees as quantityReserved on the coupled purchase order line, counted the same way — sales orders that have been cancelled are left out of both. Always sent, and null on any line that is not a mirrored seller line — so a non-null value is what marks the seller side.\nRead it on order and delivery responses. A receipt line does not carry the number: this is live reservation state, counted from the reserving lines as they stand when the line is read, and a receipt records a settled sale. On a receipt line the field is therefore always null, and says nothing about which side the line is on.\nA quantity rather than a pointer to the buyer's lines on purpose: several customer lines can share one coupled line, so there is no single line to name, only a sum."},"gtins":{"type":"array","items":{"$ref":"#/components/schemas/ProductGtinSchema"}},"usesVatMarginScheme":{"type":"boolean","description":"When true, VAT on this product is calculated under the margin scheme — on the profit margin (sales price minus purchase price) instead of the full sales price. Used for second-hand goods."}}},"OrderItemActionResponseSchema":{"properties":{"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"handlingActionUid":{"$ref":"#/components/schemas/UID"},"handlingActionName":{"type":"string"},"handlingDescription":{"type":"string"},"handlingUid":{"$ref":"#/components/schemas/UID"},"handlingName":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"orderHandlingActionUid":{"$ref":"#/components/schemas/UID"}},"required":["orderHandlingActionUid","handlingUid","handlingName","handlingActionUid","handlingActionName","comment","handlingDescription","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"title":"OrderItemActionResponseSchema","type":"object"},"AllowedActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| QUANTITY_SOLD | Can change quantity on order item|\n| PRICE_SALE | Can change price on order item|\n| DISCOUNT | Can set discount on order item|\n| SERIALNUMBER | Can set serial number on order item|\n| SERIALNUMBER_REQUIRED | MUST set serial number on order item|\n| CREDIT | Order item can be credited|\n| ADDON | Product on order item has addons|\n| CUSTOMER_REQUIRED | Order item requires customer on settlement|\n| CUSTOMER_MOBILE_REQUIRED | Order item requires customer mobile number on settlement|\n| CUSTOMER_EMAIL_REQUIRED  - Order item requires customer email on settlement|\n| DELIVERY_POSTAL_ADDRESS_REQUIRED | Order item requires delivery address on settlement|\n| INSURANCE | Order item can be insured|\n| DELETE | Order item can be deleted|   \n| DELIVER | Order item can be delivered|\n| PURCHASE | Order item can be marked as purchase from supplier |\n| COST_PRICE | Set cost price on the orderItem |\n| PRODUCT_NAME | Set name of the product on the orderItem |\n| PAYABLE | order item is payable |\n| NEGATIVE_PRICE| Can have negative price |","enum":["QUANTITY_SOLD","PRICE_SALE","DISCOUNT","SERIALNUMBER","SERIALNUMBER_REQUIRED","CREDIT","ADDON","CUSTOMER_REQUIRED","INSURANCE","CUSTOMER_MOBILE_REQUIRED","CUSTOMER_EMAIL_REQUIRED","DELIVERY_POSTAL_ADDRESS_REQUIRED","DELETE","DELIVER","PURCHASE","COST_PRICE","PRODUCT_NAME","PAYABLE","NEGATIVE_PRICE"],"title":"AllowedActionENUM","type":"string"},"OrderLinkTypeSchema":{"description":"Order reference for an order product item","properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"description":"Order number for the order","type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"type":{"$ref":"#/components/schemas/OrderLinkTypeResponseENUM"}},"required":["storeUid","orderUid","orderNumber","orderItemUid","type"],"title":"OrderLinkTypeSchema","type":"object"},"OrderLinkTypeResponseENUM":{"description":"Describes the type of link on an order product item\n\n|ENUM | Description |\n| --- | --- |\n| CREDIT | Reference is a credit link|\n| INSURANCE | Reference to orderline with product to insure|\n| INSURED | Reference to orderline with insurance |\n| COMPENSATION | Reference to orderline with product to compensate|\n| COMPENSATED | Reference to orderline with compensation |\n| PACKAGE | Reference to orderline with main package product |\n| PACKAGE_COMPONENT | Reference to orderline with package component product |\n| SERVICE | Reference to orderline that is a service product |\n| HAS_SERVICE | Reference to orderline that points to a service product |\n| FREIGHT_SERVICE | Reference to orderline that is a freight service product |\n| HAS_FREIGHT_SERVICE | Reference to orderline that points to a freight service product |\n| AUTO_ADD | Reference to orderline that has been automatically added |\n| AUTO_ADDED | Reference to orderline that points to an automatically added product |\n","enum":["CREDIT","INSURANCE","INSURED","COMPENSATION","COMPENSATED","PACKAGE","PACKAGE_COMPONENT","SERVICE","HAS_SERVICE","FREIGHT_SERVICE","HAS_FREIGHT_SERVICE","AUTO_ADD","AUTO_ADDED"],"title":"OrderLinkTypeResponseENUM","type":"string"},"ProductTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| STOCK | Price*quantity|\n| NO_STOCK | No quantity|\n| CONFIGURABLE | Master configurable product|\n| FLOWGIFTCARD | Flow Giftcard product|\n| PAYEX_GIFTCARD | Payex Giftcard product|\n| NON_PHYSICAL | Non physical product|\n| PACKAGE_FIXED | Packaged product with fixed content|\n| PACKAGE_DYNAMIC | Packaged product with dynamic content|","enum":["STOCK","NO_STOCK","CONFIGURABLE","FLOWGIFTCARD","PAYEX_GIFTCARD","NON_PHYSICAL","PACKAGE_FIXED","PACKAGE_DYNAMIC"],"minLength":1,"title":"ProductTypeENUM","type":"string"},"OrderProductLinePropertyResponseSchema":{"allOf":[{"properties":{"uid":{"$ref":"#/components/schemas/UID"}},"required":["uid"],"type":"object"},{"$ref":"#/components/schemas/OrderProductLinePropertySchema"}],"title":"OrderProductLinePropertyResponseSchema"},"OrderProductLinePropertySchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"OrderProductLinePropertySchema","type":"object"},"ProductPropertyResponseSchema":{"title":"ProductPropertyResponseSchema","type":"object","required":["productPropertyUid","propertyName","propertyOptionName","propertyType","propertyUid","propertyOptionUid","required"],"properties":{"productPropertyUid":{"$ref":"#/components/schemas/UID"},"propertyName":{"type":"string"},"propertyOptionName":{"type":"string"},"propertyType":{"$ref":"#/components/schemas/PropertyTypeENUM"},"propertyText":{"type":"string","description":"Only in use with TEXT properties."},"propertyUid":{"$ref":"#/components/schemas/UID"},"propertyOptionUid":{"$ref":"#/components/schemas/UID"},"required":{"type":"boolean"}}},"PropertyTypeENUM":{"description":"Describes the type of property a product can have.\n\n|ENUM      | Description |\n| ---------------- | ------------ |\n| TEXT | A single text line such as an URL to a product manual or a reminder to the cashier/salesperson.|\n| SINGLESELECT | A list of values where a product can only have one at any given time.|\n| MULTISELECT | A list of values where a product can have none or several at any given time.|","enum":["TEXT","SINGLESELECT","MULTISELECT"],"title":"PropertyTypeENUM","type":"string"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"AllowDeliveryENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| YES | Allow the product to be delivered|\n| NO | Do not allow the product to be delivered|\n| NOT_BEFORE_DATE | Do not allow the product to be delivered before a specified date|","enum":["YES","NO","NOT_BEFORE_DATE"],"title":"AllowDeliveryENUM","type":"string"},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER","PURCHASEORDER_CONFIRMED"],"description":""},"SalesReservationDetailsSchema":{"title":"SalesReservationDetailsSchema","type":"object","properties":{"warehouse":{"$ref":"#/components/schemas/SalesReservationWarehouseSchema"},"purchaseOrder":{"$ref":"#/components/schemas/SalesReservationPurchaseOrderSchema"},"receivement":{"$ref":"#/components/schemas/SalesReservationReceivementSchema"},"interStorePurchaseOrder":{"$ref":"#/components/schemas/SalesReservationInterStorePurchaseOrderSchema"}}},"SalesReservationWarehouseSchema":{"title":"SalesReservationWarehouseSchema","type":"object","nullable":true,"description":"The warehouse a line covered from stock is held in.\n\nSet only when reservationType is WAREHOUSE. A line waiting on a purchase order can carry\na warehouse of its own, and naming it here would say the goods are in stock when they are\non order — so it stays absent for every other reservation type. That includes NONE, where\nthe line's own warehouseUid and warehouseName may well be set while this object is not.\n\nOn a sales order line it repeats what warehouseUid and warehouseName already say. Where it\nearns its place is a purchase order: there this object describes the coupled seller line,\nand the response carries no sales line to read those fields from, so this is the only\nplace the buying store learns which of the seller's warehouses its goods are held in.","required":["warehouseName"],"properties":{"warehouseName":{"type":"string","description":"The name of the warehouse. The uid is not part of this object: a sales order line\nreports it in its own warehouseUid, and a purchase order's coupled seller line does\nnot carry one at all."}}},"SalesReservationPurchaseOrderSchema":{"title":"SalesReservationPurchaseOrderSchema","type":"object","nullable":true,"required":["purchaseOrderUid","purchaseOrderItemUid","purchaseOrderNumber","quantityOrdered"],"properties":{"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"purchaseOrderNumber":{"type":"string"},"quantityOrdered":{"type":"integer","description":"The quantity ordered on this purchase order line."},"externalId":{"type":"string"}}},"SalesReservationReceivementSchema":{"title":"SalesReservationReceivementSchema","type":"object","required":["receivementUid","receivementItemUid","expectedArrival","quantity","supplierOrderReference","receivedAt"],"properties":{"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"expectedArrival":{"type":"string","format":"date-time"},"expectedDispatch":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"supplierOrderReference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","nullable":true}}},"SalesReservationInterStorePurchaseOrderSchema":{"title":"SalesReservationInterStorePurchaseOrderSchema","type":"object","nullable":true,"description":"In inter-store trade, the seller store this sales order line's goods are coming from,\nand the seller's own incoming purchase order line they are coming in on.\n\nSet only on a line at the buying store. The seller's own mirrored line does not carry it,\nso the presence of this field is what tells a client which side of the coupling it is\nlooking at — no need to read the order it belongs to. A seller store learns how much of\nits mirrored line is promised to customers from interStoreOrderReservationQuantity on\nthat line instead.\n\nRead it on order and delivery responses. A receipt line does not carry it: both of the\nline-level inter-store fields are live reservation state, counted from the reserving lines\nas they stand when the line is read, and a receipt records a settled sale. So on a receipt\nline their absence says nothing about which side of a coupling it is on.\n\nNote that reservationDetails.purchaseOrder alongside it is unchanged: that is still the\nbuying store's own purchase order, the one this line actually reserves against. This\nfield is one hop further out — where that purchase order gets its goods from.\n\nThe store is always named; the purchase order fields can be absent. They are absent when\nthe seller is fulfilling from its own stock rather than from an incoming purchase order.\nThat is the state a proactive inter-store purchase starts in, where the mirrored seller\nline is reserved from stock, and the normal case for a seller-initiated sale. The fields\nappear once the seller line is re-pointed at a specific incoming purchase order line.","required":["storeUid","storeName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderNumber":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"ProductGtinSchema":{"properties":{"gtin":{"type":"string"},"primary":{"type":"boolean"},"type":{"type":"string"}},"title":"ProductGtinSchema","type":"object"},"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"}},"parameters":{"checkStatusQuery":{"description":"Check external payment gateways and fetch status","in":"query","name":"checkStatus","schema":{"type":"boolean"}},"includeDisplayMessagesQuery":{"description":"Include display messages in the response","in":"query","name":"includeDisplayMessages","schema":{"type":"boolean"}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}/settlements/{settlementUid}":{"get":{"summary":"Get settlement details","tags":["Receipt"],"responses":{"200":{"$ref":"#/components/responses/ReceiptResponse"}},"operationId":"get-receipt-settlement-details","description":"Get settlement details\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","parameters":[{"$ref":"#/components/parameters/checkStatusQuery"},{"$ref":"#/components/parameters/includeDisplayMessagesQuery"}]}}}}
```

## Delete a settlement

> Delete a settlement\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"parameters":{"forceDeleteQuery":{"description":"Force Delete on a settlement","in":"query","name":"forceDelete","schema":{"type":"boolean"}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}/settlements/{settlementUid}":{"delete":{"summary":"Delete a settlement","tags":["Receipt"],"responses":{"204":{"description":"No Content"}},"operationId":"delete-receipt-settlement","description":"Delete a settlement\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","parameters":[{"$ref":"#/components/parameters/forceDeleteQuery"}]}}}}
```

## Get EHF invoice status

> Check the status for an EHF invoice.\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"EhfInvoiceResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EhfInvoiceResponseSchema"}}}}},"schemas":{"EhfInvoiceResponseSchema":{"title":"EhfInvoiceResponseSchema","type":"object","required":["voucherNumber","orderUid","orderNumber","orderSettlementUid","statusOk","statusAt","statusMessage"],"properties":{"voucherNumber":{"type":"string"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"orderSettlementUid":{"$ref":"#/components/schemas/UID"},"statusOk":{"type":"boolean"},"statusAt":{"type":"string","format":"date-time"},"statusMessage":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}/ehf":{"get":{"summary":"Get EHF invoice status","responses":{"200":{"$ref":"#/components/responses/EhfInvoiceResponse"}},"operationId":"get-orders-ehf","description":"Check the status for an EHF invoice.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","tags":["Receipt"]}}}}
```

## Send EHF invoice

> An EHF invoice is normally sent automatically upon order settlement completion, \
> but here you can try an send it again if it failed the first time.\
> If sending succeeds, the status is also checked.\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"EhfInvoiceResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EhfInvoiceResponseSchema"}}}}},"schemas":{"EhfInvoiceResponseSchema":{"title":"EhfInvoiceResponseSchema","type":"object","required":["voucherNumber","orderUid","orderNumber","orderSettlementUid","statusOk","statusAt","statusMessage"],"properties":{"voucherNumber":{"type":"string"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"orderSettlementUid":{"$ref":"#/components/schemas/UID"},"statusOk":{"type":"boolean"},"statusAt":{"type":"string","format":"date-time"},"statusMessage":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}/ehf":{"post":{"summary":"Send EHF invoice","responses":{"201":{"$ref":"#/components/responses/EhfInvoiceResponse"}},"operationId":"post-orders-ehf","description":"An EHF invoice is normally sent automatically upon order settlement completion, \nbut here you can try an send it again if it failed the first time.\nIf sending succeeds, the status is also checked.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","tags":["Receipt"]}}}}
```

## Send receipt by email

> Send receipt by email\
> \
> Required permissions: SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Email","description":"Email"},{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"ReceiptEmailRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptEmailSchema"}}},"description":"ReceiptEmailRequest"}},"schemas":{"ReceiptEmailSchema":{"title":"ReceiptEmailSchema","type":"object","required":["type","email"],"properties":{"type":{"$ref":"#/components/schemas/ReceiptEmailTypeENUM"},"email":{"$ref":"#/components/schemas/EmailTYPE"}},"description":"ReceiptEmailSchema"},"ReceiptEmailTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| RECEIPT | Send sales receipt as email|\n","minLength":1,"title":"ReceiptEmailTypeENUM","type":"string","enum":["RECEIPT"]},"EmailTYPE":{"title":"Email","type":"string"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}/email":{"post":{"summary":"Send receipt by email","tags":["Receipt","Email"],"responses":{"204":{"description":"No Content"}},"operationId":"post-send-receipt-email","description":"Send receipt by email\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","requestBody":{"$ref":"#/components/requestBodies/ReceiptEmailRequest"}}}}}
```

## Get receipt PDF

> Get receipt PDF as direct download.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Receipt","description":"Receipt"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/receipts/{receiptUid}/pdf":{"post":{"summary":"Get receipt PDF","tags":["Receipt"],"responses":{"200":{"description":"OK","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}}},"operationId":"post-tenants-stores-receipts-pdf","description":"Get receipt PDF as direct download."}}}}
```


---

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

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

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

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

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

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

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