> ## Documentation Index
> Fetch the complete documentation index at: https://docs.khanhng.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 4.3 Getting Started

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](https://docs.khanhng.com/decision-lane/api-reference/servers-and-authentication.md) for the current role behavior.

## 2. Create a claim

```bash theme={null}
curl -X POST "$API_BASE_URL/v1/claims" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": "order-1001",
    "claim_type": "damaged_item",
    "reason": "The item arrived damaged and the package was intact.",
    "requested_amount": 129.99,
    "currency": "CAD"
  }'
```

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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.