Claims
For an issued policy, you report the claim to your provider through your provider connection. You file the claim with POST /api/v1/insurance/policies/{policyId}/claims and track its outcome from the claim endpoint and by webhook.
- A claim is a notification. Lunixi passes the claim to your provider and shows the outcome of that submission. The assessment of the claim (acceptance, rejection, payment) is done by the insurance company; its result is not part of the claim.
- Lunixi does not store the document. The document you send is processed only in this request and passed to your provider. The document's content is not included in responses, request logs or webhooks.
- A claim belongs to a policy. Insurance is per unit; take the
policyIdvalue from the order'spolicies[]array: Order object.
Authentication and signing: Flows › Authentication.
Policies that accept a claim
| Condition | If not met |
|---|---|
The insurance type supports claims. Today only TICKET_CANCELLATION. | 412 insurance.claim.not_supported |
| The product in your connection supports claims. | 412 insurance.claim.not_supported |
The policy is in force: the policy's policyStatus is ISSUED. | 409 insurance.claim.state_conflict; see State conflict |
| The policy has no open claim. | 409 insurance.claim.state_conflict, reason: claim_open |
What counts is the status of that policy (policies[].policyStatus), not of the order. A policy has at most one open claim at a time: a claim with status PENDING, SUBMITTED or UNKNOWN is open. While a claim that reached the provider (SUBMITTED) exists, no second claim can be filed for the same policy. A FAILED claim does not prevent a new one.
Flow
Prepare the document
Prepare the document the insurance type requires as a PDF: Documents.
File the claim
Call POST /api/v1/insurance/policies/{policyId}/claims with the incident time and the document. Lunixi opens the claim and passes it to your provider in the same request.
Handle the outcome
Continue according to the status value in the response: Outcomes. When the outcome is final, the insurance.claim.submitted or insurance.claim.failed webhook is sent.
Get the provider's document
Once the claim is SUBMITTED, you can get the provider's claim document from the document endpoint.
Filing a claim: POST /api/v1/insurance/policies/{policyId}/claims
Idempotency-Key is required. See Retries and Idempotency-Key.
| Path parameter | Description |
|---|---|
policyId | Policy ID (insp_…). |
| Field | Type | Required | Description |
|---|---|---|---|
incidentAt | string | Yes | Time of the incident the claim is about; ISO 8601 with a time zone. TICKET_CANCELLATION: the time the ticket was cancelled with the carrier. A time at most 5 minutes in the future is accepted. |
documents | array | Yes | Documents; each document the type requires exactly once. Fields below. |
Documents
| Field | Type | Description |
|---|---|---|
documents[].kind | string | Type of the document; values below. |
documents[].contentType | string | Only application/pdf. |
documents[].contentBase64 | string | Base64 content of the PDF file. |
| Insurance type | kind | Document |
|---|---|---|
TICKET_CANCELLATION | CANCELLATION_PROOF | The document you received from the carrier showing that the ticket was cancelled. Required. |
- The total size of the documents may be at most 3 MB after base64 decoding. A request over the limit returns
400 VALIDATION_ERRORor422 insurance.validation.invalid(field: documents,reason: too_large). - The file must be a PDF; a document whose content is not a PDF returns
422. - The document may carry your buyer's personal data. Lunixi does not store the document and passes it to the provider; the document's content is not included in request logs.
source lunixi-sign.sh
REQ_PATH="/api/v1/insurance/policies/<policyId>/claims"
CONTENT=$(base64 < cancellation-proof.pdf | tr -d '\n')
BODY=$(printf '{"incidentAt":"2026-10-12T09:30:00+03:00","documents":[{"kind":"CANCELLATION_PROOF","contentType":"application/pdf","contentBase64":"%s"}]}' "$CONTENT")
printf '%s' "$BODY" > claim.json
lunixi_sign POST "$REQ_PATH" "$BODY"
curl -X POST "https://api-gateway.lunixi.com$REQ_PATH" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: insurance-claim-1001" \
-H "X-Key-Id: $LUNIXI_KEY_ID" \
-H "X-Date: $DATE" \
-H "X-Nonce: $NONCE" \
-H "Digest: $DIGEST" \
-H "X-Signature: $SIGNATURE" \
--data-binary @claim.jsonThe body can be large because of the document; so the example sends the body from a file. Compute Digest from exactly the body you write to the file.
Response
When the request completes, it returns 201 with the claim object in data. If the provider recorded the claim, status is SUBMITTED; if the outcome is not final, it is UNKNOWN.
Outcomes
| Outcome | Response | On the claim | What to do |
|---|---|---|---|
| The provider recorded the claim | 201 | status: SUBMITTED | The claim was reported. insurance.claim.submitted is sent. You can get the provider's document from the document endpoint. |
| The outcome is not final | 201 | status: UNKNOWN | The request reached the provider but its outcome is unknown. The claim is not sent again; the outcome is verified with the provider. When it is final, insurance.claim.submitted or insurance.claim.failed arrives. Do not file a new claim for the same policy in the meantime. |
| The provider rejected the claim | 422 insurance.claim.rejected | status: FAILED, errorCode: insurance.claim.rejected | The provider did not accept the claim; retrying the same request does not change the result. insurance.claim.failed is sent. If needed, you can file a new claim with a new Idempotency-Key. |
| The provider was unreachable | 503 insurance.provider.unavailable | status: FAILED, errorCode: insurance.provider.unavailable | The claim was not passed to the provider. If the claim was opened, it becomes FAILED and insurance.claim.failed is sent. Send it again later with a new Idempotency-Key. |
If the outcome cannot be verified, the claim is reviewed and stays UNKNOWN until its outcome is final.
Retries and Idempotency-Key
- Filing a claim passes the document to the provider in the same request. The request can take up to 45 seconds; set your client's timeout accordingly.
- If you did not get a response after a timeout or a
5xx, repeat the request with the sameIdempotency-Keyand the same body. If the claim was opened on the first attempt, no new claim is opened; the existing claim is returned with its current status and the document is not sent to the provider again. - The same key returns the same claim whatever its status. To send a
FAILEDclaim again, generate a new key. - If you use the same key with a different request (another policy, incident time or document),
409 insurance.idempotency.conflictis returned.
Claim object
| Field | Type | Description |
|---|---|---|
claimId | string | Claim ID (insclm_…). |
orderId | string | The policy's order (inso_…). |
policyId | string | The policy the claim was filed for (insp_…). |
insuranceType | string | Insurance type, e.g. TICKET_CANCELLATION. |
status | string | Status of the claim; see Statuses. |
source | string | Where the claim was filed: MERCHANT_API or PANEL. |
incidentAt | string | Time of the incident the claim is about, ISO 8601. |
documentKinds | string[] | Types of the documents sent with the claim. The document itself is not part of the claim. |
errorCode | string or null | If the claim is FAILED, the Lunixi code of the reason: insurance.claim.rejected or insurance.provider.unavailable. |
submittedAt | string or null | The time it was confirmed that the provider recorded the claim. null until SUBMITTED. |
createdAt | string | Creation time, ISO 8601. |
updatedAt | string | Last change time, ISO 8601. |
The claim does not contain the provider's claim reference or error codes.
Statuses
status | Meaning |
|---|---|
PENDING | The claim was opened and is being passed to the provider. You see this value only when you read the claim while the request is still running or when you repeat a request with the same Idempotency-Key. |
SUBMITTED | The provider recorded the claim. |
UNKNOWN | The request reached the provider but its outcome is unknown; the outcome is being verified. |
FAILED | The provider rejected the claim or the request did not reach the provider. The reason is in errorCode. |
SUBMITTED and FAILED are final; they do not change.
Listing: GET /api/v1/insurance/claims
Returns your claims from newest to oldest, in cursor-based pages.
| Query parameter | Type | Description |
|---|---|---|
limit | integer | Records per page, 1-100. Default 25. |
cursor | string | pageInfo.nextCursor from the previous response. Not sent on the first page. |
orderId | string | Only the claims of this order (inso_…). |
policyId | string | Only the claims of this policy (insp_…). |
status | string | Only claims with this status: PENDING, SUBMITTED, UNKNOWN or FAILED. |
In the response, the claims are in the data.items array; pagination information is in pageInfo. A malformed cursor returns 422 insurance.validation.invalid (field: cursor).
source lunixi-sign.sh
REQ_PATH="/api/v1/insurance/claims?limit=25&policyId=<policyId>"
lunixi_sign GET "$REQ_PATH"
curl "https://api-gateway.lunixi.com$REQ_PATH" \
-H "X-Key-Id: $LUNIXI_KEY_ID" \
-H "X-Date: $DATE" \
-H "X-Nonce: $NONCE" \
-H "X-Signature: $SIGNATURE"Retrieving: GET /api/v1/insurance/claims/{claimId}
Returns a single claim. In the response, data is the claim object. Use this endpoint to track a claim whose outcome is UNKNOWN or to verify an outcome you did not receive by webhook.
The provider's claim document: GET /api/v1/insurance/claims/{claimId}/document
Returns the document the provider issued for the claim as a PDF. The document is available only when the claim is SUBMITTED.
- Lunixi does not store the document. It is fetched from the provider on every request and passed to you as is.
- A successful response returns
200and the body is the PDF file itself; there is no JSON envelope. Error responses are the JSON error envelope; tell them apart by the response'sContent-Typeheader.
| Header | Value |
|---|---|
Content-Type | application/pdf |
Content-Disposition | attachment; filename="<claimId>.pdf" |
Cache-Control | no-store |
source lunixi-sign.sh
REQ_PATH="/api/v1/insurance/claims/<claimId>/document"
lunixi_sign GET "$REQ_PATH"
curl "https://api-gateway.lunixi.com$REQ_PATH" \
-H "X-Key-Id: $LUNIXI_KEY_ID" \
-H "X-Date: $DATE" \
-H "X-Nonce: $NONCE" \
-H "X-Signature: $SIGNATURE" \
-o claim.pdf| Situation | Response |
|---|---|
The claim is SUBMITTED | The document is returned. |
| The claim has another status | 409 insurance.claim.state_conflict, reason: claim_not_submitted |
| The provider cannot provide the document at that moment | 503 insurance.document.unavailable (details.retryable: true). The claim does not change; repeat the request later, increasing the wait between retries. |
Errors
| HTTP | code | What to do |
|---|---|---|
400 | VALIDATION_ERROR | Fix the format. This error is also returned if Idempotency-Key is missing, kind or contentType is not recognised, contentBase64 is not base64 or an undefined field was sent. |
404 | insurance.policy.not_found | The policy was not found or belongs to another account. Take the policyId value from the order. |
404 | insurance.claim.not_found | The claim was not found or belongs to another account. |
409 | insurance.claim.state_conflict | See details.reason; table below. |
409 | insurance.idempotency.conflict | The same Idempotency-Key was used with a different request; generate a new key for a new claim. |
412 | insurance.claim.not_supported | A claim cannot be filed for this policy: the insurance type or the product in your connection does not support claims. |
422 | insurance.validation.invalid | Fix the details.errors[] fields; table below. |
422 | insurance.claim.rejected | The provider did not accept the claim; the claim becomes FAILED. |
503 | insurance.provider.unavailable | The provider could not be reached; if the claim was opened, it becomes FAILED. Send it again later with a new Idempotency-Key. |
503 | insurance.document.unavailable | Only on the document endpoint: the provider's document cannot be retrieved right now; try again later. |
Common codes: Flows › Responses and errors. Details of the codes: Error Codes › Claims.
State conflict
reason | Meaning |
|---|---|
policy_not_issued | The policy was not issued: not requested yet, being issued, outcome not final or could not be issued. |
policy_cancel_pending | The policy has an open cancellation request. |
policy_cancelled | The policy was cancelled. |
claim_open | The policy has an open claim (PENDING, SUBMITTED or UNKNOWN). If present, details.claimId is the ID of the open claim. |
claim_not_submitted | The document is available only for a claim the provider recorded (SUBMITTED). |
Field violations
field | reason | Meaning |
|---|---|---|
incidentAt | required | The incident time was not sent. |
incidentAt | timezone_required | The timestamp has no time zone. |
incidentAt | invalid_timestamp | The value is not an ISO 8601 timestamp. |
incidentAt | in_future | The incident time is more than 5 minutes in the future. |
documents | too_large | The total size of the documents exceeds 3 MB. |
documents[i].content | not_pdf | The document's content is not a PDF. |
Related
- Orders and Payment Binding:
policies[]and the policy status - Webhook Events:
insurance.claim.submittedandinsurance.claim.failed - Error Codes: the claim codes
- Insurance Types and Schemas:
TICKET_CANCELLATION