Returns normalized insurance policy records by national code.
GET /insurance-policies
| name | required | in | type | aliases | default | description |
|---|---|---|---|---|---|---|
| insurance | yes | query | string | ins | Insurance slug (ma, razi, asia, ...). | |
| national_code | yes | query | string | nationalCode | National code or provider identity value. | |
| type | no | query | int | 1 | Provider lookup type. |
| path | type | description |
|---|---|---|
| ok | bool | True on success. |
| error | string|null | Error message when ok=false. |
| provider | string | Selected provider key. |
| insurance | string | Insurance slug. |
| meta.provider_status | int|null | Provider HTTP status. |
| meta.count | int | Returned item count. |
| meta.is_under_cov | bool|null | Coverage status when returned by provider. |
| data[] | object | Normalized policy records. |
| data[].policy_id | int|null | Policy identifier. |
| data[].policy_number | int|null | Policy number. |
| data[].policy_full_number | string|null | Policy full number. |
| data[].business_group.slug | string|null | Business group slug. |
| data[].insured_person.national_code | string|null | Insured national code. |
| data[].insured_person.relation.slug | string|null | Relation slug. |
| data[].insured_person.seminary_student.slug | string|null | Seminary student slug. |
| data[].coverage.policy_begin | int|null | Policy begin date as unix timestamp. |
| data[].coverage.coverage_begin | int|null | Coverage begin date as unix timestamp. |
| data[].coverage.coverage_end | int|null | Coverage end date as unix timestamp. |
| data[].coverage.valid_until | int|null | Validity date as unix timestamp. |
| data[].coverage.entry_reason.slug | string|null | Entry reason slug. |
Request
GET /insurance-policies?insurance=ma&national_code=1234567890&type=1
Response
{
"ok": true,
"provider": "mad",
"insurance": "ma",
"meta": {
"provider_status": 200,
"count": 1,
"is_under_cov": true
},
"data": [
{
"policy_id": 10001,
"policy_number": 1,
"policy_full_number": "12345678\/00\/000001",
"policy_version": 1,
"contract_id": 2001,
"business_group": {
"slug": null,
"label": null
},
"customer": {
"id": 1001,
"name": "Example Customer"
},
"insured_person": {
"id": 123456,
"policy_link_id": 555001,
"national_code": "1234567890",
"relation": {
"slug": "child",
"label": "Child"
},
"seminary_student": {
"slug": "dependent",
"label": "Dependent"
},
"employee_code": "E-12345",
"is_iranian": true,
"passport_no": null,
"naturalized_code": null,
"has_special_illness": false,
"special_illness_label": "No"
},
"coverage": {
"policy_begin": 1700000000,
"coverage_begin": 1700000000,
"coverage_end": 1731536000,
"valid_until": 1731536000,
"entry_reason": {
"slug": null,
"label": null
}
},
"first_insurer": {
"id": null,
"number": null
},
"insurance_caption": null
}
]
}