> 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/list-the-post-settlement-tasks-on-a-receipt.md).

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

Set `waitSeconds` to long poll: the response is held until every task has reached a final state (COMPLETE, FAILED or SKIPPED), or until the wait runs out, whichever comes first. The tasks are returned in their state at that moment. Without `waitSeconds`, or with 0, the response returns immediately.

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","PAYMENT_AGREEMENT_LINES","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\nSet `waitSeconds` to long poll: the response is held until every task has\nreached a final state (COMPLETE, FAILED or SKIPPED), or until the wait runs\nout, whichever comes first. The tasks are returned in their state at that\nmoment. Without `waitSeconds`, or with 0, the response returns immediately.\n\nRequired permissions: SALES_ORDER,RETURN_ORDER","operationId":"get-receipt-tasks","parameters":[{"name":"waitSeconds","in":"query","required":false,"description":"How many seconds to wait for every task to reach a final state before\nreturning. 0 or omitted returns immediately. Maximum 60.","schema":{"type":"integer","minimum":0,"maximum":60}}],"responses":{"200":{"$ref":"#/components/responses/OrderReceiptTaskListResponse"}},"tags":["Receipt"]}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/receipt/list-the-post-settlement-tasks-on-a-receipt.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
