Reconciliation Report
You get the policy and premium report per connection from the API to reconcile with your provider. The report on the panel's Reconciliation screen is built from the same data: Insurance Menu › Reconciliation.
- The figures are read from your insurance orders themselves. For the same filter, the totals of the summary endpoint equal the sum of the rows of the rows endpoint and of the CSV file.
- Statuses are the statuses at the time you get the report.
- Orders created in the Checkout Form and through the API are all in the report; the premium may have been collected in a Lunixi payment, outside Lunixi or by the provider.
Authentication and signing: Flows › Authentication.
Filter
The three endpoints take the same filter:
| Query parameter | Type | Required | Description |
|---|---|---|---|
from | string | Yes | Start of the period (inclusive). ISO 8601, time zone required (Z or ±hh:mm). |
to | string | Yes | End of the period (exclusive). ISO 8601, time zone required. |
connectionId | string (UUID) | No | Only the orders of this provider connection. |
insuranceType | string | No | Only the orders of this insurance type, e.g. TICKET_CANCELLATION. |
currency | string | No | Only the orders in this currency, ISO 4217. |
- The period applies to the order creation time and is half-open:
frominclusive,toexclusive. The period is at most 366 days. - In a query string, write the
+sign of a time zone as%2B.
A request that breaks the period rules returns 422 insurance.validation.invalid:
field | reason | Meaning |
|---|---|---|
filter.from, filter.to | timezone_required | The timestamp has no time zone. |
filter.from, filter.to | invalid_timestamp | The value is not an ISO 8601 timestamp. |
filter.to | not_after_from | to is not after from. |
filter.to | period_too_long | The period is longer than 366 days. |
If from or to is missing, connectionId is not a UUID, or currency or insuranceType is malformed, the request returns 400 VALIDATION_ERROR.
Summary: GET /api/v1/insurance/reconciliation/summary
Returns the totals of the period, grouped by connection, currency and who collects the premium.
source lunixi-sign.sh
REQ_PATH="/api/v1/insurance/reconciliation/summary?from=2026-09-01T00:00:00Z&to=2026-10-01T00:00:00Z"
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"data carries these fields:
| Field | Type | Description |
|---|---|---|
period.from, period.to | string | The period you requested. |
filters.connectionId, filters.insuranceType, filters.currency | string or null | The filters applied; null when not sent. |
groups | array | One group per connection, currency and premium collector; fields below. |
generatedAt | string | When the report was generated, ISO 8601. |
groups[]:
| Field | Type | Description |
|---|---|---|
provider.code | string | The provider's code in the Lunixi catalog. |
provider.name | string | The provider's name. |
provider.logoUrl | string or null | The provider's logo. |
provider.connectionId | string | The ID of your provider connection. |
currency | string | Currency, ISO 4217. |
premiumCollectedBy | string | Who collects the premium: MERCHANT or PROVIDER. |
totals | object | Totals; fields below. |
totals, amounts in minor units:
| Field | What it counts |
|---|---|
orderCount, premiumAmount | Orders created in the period and their premiums. |
collectedOrderCount, collectedPremiumAmount | Orders whose premium was collected (collectionStatus: COLLECTED). |
policyCount | Number of policies. |
inForcePolicyCount, inForcePremiumAmount | In-force policies (ISSUED or CANCEL_PENDING) and their premiums. A policy with an open cancellation request is counted here until the provider confirms the cancellation. |
cancelledPolicyCount, cancelledPremiumAmount | Policies whose cancellation the provider confirmed (CANCELLED) and their premiums. |
refundedOrderCount, refundedPremiumAmount | Orders whose premium refund is complete (refundStatus: REFUNDED). |
refundOpenOrderCount, refundOpenPremiumAmount | Orders whose premium refund is required, in progress or failed (REQUIRED, PENDING or FAILED). |
Collection and refund totals are per order; policy totals are per policy.
Rows: GET /api/v1/insurance/reconciliation/orders
Returns the orders behind the summary together with their policies, newest first, in cursor-based pages. In addition to the filter parameters:
| Query parameter | Type | Description |
|---|---|---|
limit | integer | Orders per page, 1-100. Default 100. |
cursor | string | pageInfo.nextCursor from the previous response. Not sent on the first page. |
In the response, the rows are in the data.items array; pagination information is in pageInfo.
| Field | Type | Description |
|---|---|---|
orderId | string | Order ID (inso_…). |
merchantOrderId | string or null | Your own order number. |
paymentIntentId | string or null | ID of the bound Lunixi payment. |
externalPaymentId | string or null | The payment ID you reported for a premium collected outside Lunixi. |
insuranceType | string | Insurance type. |
connectionId | string | The ID of your provider connection. |
providerCode | string | The provider's code in the Lunixi catalog. |
premiumCollectedBy | string | MERCHANT or PROVIDER. |
paymentMode | string | NO_PAYMENT, LUNIXI_PAYMENT or EXTERNAL_PAYMENT. |
premiumAmount | integer | The order premium, in minor units. |
currency | string | Currency, ISO 4217. |
collectionStatus, policyStatus, refundStatus | string | The order's status axes: Concepts › Order statuses. |
createdAt | string | When the order was created. |
collectedAt | string or null | When the premium was collected. |
refundedAt | string or null | When the refund was finalized. |
policies | array | The order's policies; fields below. An empty array when there is no policy yet. |
policies[]:
| Field | Type | Description |
|---|---|---|
policyId | string | Policy ID (insp_…). |
basketItemId | string | The basket item the policy insures. |
policyNumber | string or null | The number on the policy document. |
policyStatus | string | The policy's status. |
premiumAmount | integer | The policy premium, in minor units. |
cancelledAt | string or null | When the cancellation was finalized. |
A malformed cursor returns 422 insurance.validation.invalid (field: cursor).
CSV: GET /api/v1/insurance/reconciliation/export
Returns the report rows as a CSV file. The filter parameters are the same; it also takes cursor to continue a truncated file.
source lunixi-sign.sh
REQ_PATH="/api/v1/insurance/reconciliation/export?from=2026-09-01T00:00:00Z&to=2026-10-01T00:00:00Z"
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 reconciliation.csv| Header | Value |
|---|---|
Content-Type | text/csv; charset=utf-8 |
Content-Disposition | attachment; filename="insurance-reconciliation-<YYYY-MM-DD>.csv" |
Cache-Control | no-store |
X-Export-Order-Cap | The maximum number of orders in one file. |
- The file is UTF-8 and starts with a BOM. Amounts are in minor units.
- Each policy is one line. Order columns repeat on each policy line of the order; an order without a policy yet is a single line with empty policy columns. For the order total, sum
orderPremiumAmountMinoronce perorderId; for the policy total, sumpolicyPremiumAmountMinor. - A file holds at most 20,000 orders. When the limit is reached, the last line of the file is
# truncated=true orderCap=20000 nextCursor=<cursor>; for the remaining orders, repeat the request with the same filter andcursor=<cursor>. - If the export is interrupted, the last line of the file is
# export-aborted=trueand the file is incomplete; download it again. - If the request fails validation, the response is not CSV but the JSON error envelope. Check the response's
Content-Typeheader.
| Column group | Columns |
|---|---|
| Order | orderId, merchantOrderId, paymentIntentId, externalPaymentId, orderCreatedAt, collectedAt, insuranceType, connectionId, providerCode, premiumCollectedBy, paymentMode, currency, orderPremiumAmountMinor, collectionStatus, orderPolicyStatus, refundStatus, refundedAt |
| Policy | policyId, policyNumber, basketItemId, policyStatus, policyPremiumAmountMinor, cancelledAt |
Errors
| HTTP | code | What to do |
|---|---|---|
400 | VALIDATION_ERROR | Fix the format of the query parameters. |
422 | insurance.validation.invalid | Fix the period; see details.errors[] (Filter). |
Common codes: Flows › Responses and errors.
Related
- Insurance Menu › Reconciliation: the report in the panel
- Orders and Payment Binding: the order object
- Concepts and Statuses: status axes