Skip to main content
This sequence follows the implemented FastAPI routes. It needs an existing paid order, working Azure storage, and a configured Durable Functions host to complete the full workflow. Use synthetic data in a local development environment.

1. Create or obtain an order

POST /v1/claims checks that the signed-in customer owns the order and that the requested amount does not exceed the paid amount. A test order can be created at POST /v1/admin/orders; see Servers and Authentication for the current role behavior.

2. Create a claim

The response is a RefundClaim with its claim ID. The sample assumes order-1001 exists for this customer with at least CAD 129.99 paid.

3. Upload and verify evidence

Call POST /v1/claims/{claim_id}/uploads for a direct-to-Blob upload grant. Send the file to the returned upload_url with required_headers, then call POST /v1/claims/{claim_id}/uploads/{document_id}/complete. The Blob upload itself is not a FastAPI route. Keep the short-lived URL private.

4. Submit and review

Call POST /v1/claims/{claim_id}/submit after every upload is verified. The API starts or reuses the Durable workflow and returns HTTP 202 with a workflow instance ID. A Reviewer or Admin can read GET /v1/reviews/{claim_id}, download evidence through the review route, and send POST /v1/reviews/{claim_id}/decision when the claim is pending approval.