Hermeseus Docs
Legacy docs

Travel insurance orders

Order travel insurance for one or more travellers in a single call. Your wallet pays; each traveller gets a policy that is issued by the insurer and then downloadable as a PDF.

Lifecycle

An order holds one policy per traveller. Each policy moves on its own; the order status sums them up.

statusMeaning
pendingOrdered. The price is held on your wallet; the policy is not with the insurer yet. You can still cancel.
processingSent to the insurer. Cancellation through the API is no longer possible.
issuedThe insurer issued the policy. The held amount is charged and the document is available.
failedThe insurer declined. The hold is released; reason says why.
cancelledCancelled before it reached the insurer. The hold is released.
partially_issuedOrder only: some policies issued, the rest failed or cancelled.

Issue usually takes minutes but depends on the insurer; poll the order, there are no webhooks yet. In the test environment orders are issued automatically after about a minute with a sample policy, and nothing is charged.

Create an order

POST/v3/HAPI/insurance/orders

Requires insurance:write. Send an Idempotency-Key so a retry never orders twice.

Body

FieldTypeRequiredDescription
offer_idstringYesAn ins_off_ id from quotes.
travelers[]arrayYes1 to 9 travellers.
travelers[].given_namestringYesAs in the passport.
travelers[].family_namestringYesAs in the passport.
travelers[].birth_datestringInsurerYYYY-MM-DD.
travelers[].genderstringInsurermale or female.
travelers[].passport_numberstringInsurerPassport number.
travelers[].emailstringNoTraveller email.
travelers[].fieldsobjectNoAny other form key and its value.

"Insurer" means required when the offer's form requires it (all three are required by the current insurer).

curl -X POST https://api.hermeseus.com/v3/HAPI/insurance/orders \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 0b8f2a64-5d1e-4c1b-9f43-7a2d9e6c1b55" \
  -d '{
    "offer_id": "ins_off_eyJrIjoiSW5zdXJhbmNlLVRhbWtlZW4...",
    "travelers": [
      { "given_name": "Lina", "family_name": "Haddad", "birth_date": "1992-07-15", "gender": "female", "passport_number": "P5550002" },
      { "given_name": "Omar", "family_name": "Haddad", "birth_date": "1955-03-01", "gender": "male", "passport_number": "P5550003" }
    ]
  }'

Response 201

{
  "object": "insurance_order",
  "id": "ins_ord_22276",
  "status": "pending",
  "plan": "Insurance-TamkeenInsurance-PlanA",
  "provider": "TamkeenInsurance",
  "origin": "JOR",
  "destination": "ARE",
  "start_date": "2026-12-10",
  "end_date": "2026-12-20",
  "total": { "amount": "48.00", "currency": "USD" },
  "policies": [
    {
      "object": "insurance_policy",
      "id": "ins_pol_8ad26e11-a8a1-42b4-b6e3-7f8535d09379",
      "supplier_reference": "22136",
      "status": "pending",
      "traveler": { "given_name": "Lina", "family_name": "Haddad" },
      "price": { "amount": "15.00", "currency": "USD" },
      "issued_at": null,
      "cancelled_at": null,
      "reason": null,
      "document": null
    }
  ],
  "sandbox": false,
  "created_at": "2026-10-27T11:17:45+00:00"
}

Errors

StatuscodeWhen
422missing_traveler_fieldsA traveller lacks a required field; detail.missing lists the form keys.
422invalid_traveler_fieldsThe insurer rejected a value.
422offer_expiredThe trip start date has passed.
402insufficient_balanceYour wallet does not cover the total. Nothing is held.
502supplier_errorThe insurer did not answer; retry with the same Idempotency-Key.

Read an order

GET/v3/HAPI/insurance/orders/{id}

Requires insurance:read. Returns the insurance_order with each policy's current status.

List orders

GET/v3/HAPI/insurance/orders

Requires insurance:read. Newest first, paged with limit (1 to 50) and the after cursor.

Cancel an order

POST/v3/HAPI/insurance/orders/{id}/cancellation

Requires insurance:write. Cancels every pending policy and releases its hold. Returns 409 not_cancellable once a policy is with the insurer; contact support for those.

Download a policy

GET/v3/HAPI/insurance/orders/{id}/documents/{document_id}

Requires insurance:read. Use the document.url of an issued policy. Returns the PDF.