PATCH
cURL

Authorizations

Authorization
string
header
required

JWT bearer token. App-user tokens are issued by POST /auth/token (the partner backend calls it as its platform service account); admin and dashboard tokens are issued via OIDC login.

Path Parameters

insurance_policy_id
string
required

Insurance Policy ID

Body

application/json
end_date
string | null
Example:

"2027-01-15"

external_policy_id
string | null
start_date
string | null
Example:

"2026-01-15"

status
null | enum<string>

Insurance policy lifecycle status.

Available options:
PENDING,
VERIFICATION,
APPROVED,
ISSUED,
REQUIRES_CUSTOMER_RENEWAL_IN_GRACE,
REQUIRES_POLICY_REISSUANCE,
REQUIRES_CUSTOMER_RENEWAL,
EXPIRED,
REJECTED

Response

Insurance policy updated

benefit_id
string
required
benefit_name
string
required
created_at
string
required
dependant_ids
string[]
required
dependants
object[]
required
documents
object
required
id
string
required
last_modified_at
string
required
plan_code
string
required
premium_amounts
object
required
primary_member
object
required
primary_user_id
string
required

A validated 12-digit numeric user identifier.

Every external entry point validates:

  • JSON Deserialize runs [UserId::parse] (outer whitespace trimmed, length and digit-only enforced) via #[serde(try_from = "String")].
  • DB FromSql runs [UserId::parse] on every row read.

Display / Deref<Target = str> / AsRef<str> / Into<String> are derived via derive_more — the inner String is pass-through for every read-only borrow, display, and move-out.

Example:

"012345678901"

questionnaire
object
required

JSONB wrapper for insurance_policies.questionnaire.

status
enum<string>
required

Insurance policy lifecycle status.

Available options:
PENDING,
VERIFICATION,
APPROVED,
ISSUED,
REQUIRES_CUSTOMER_RENEWAL_IN_GRACE,
REQUIRES_POLICY_REISSUANCE,
REQUIRES_CUSTOMER_RENEWAL,
EXPIRED,
REJECTED
end_date
string | null
Example:

"2027-01-15"

external_policy_id
string | null
master_policy_number
string | null
metadata
null | object

Auxiliary metadata for an insurance policy.

nominee_details
object

Nominee for an insurance policy — either a registered dependant or an external person whose details are captured inline.

start_date
string | null
Example:

"2026-01-15"