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

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


---

# 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/retry-the-failed-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.
