Skip to main content
PATCH
/
api
/
v1
/
policies
/
update
Update an existing policy data
curl --request PATCH \
  --url https://dev.superpool.unyte.africa/api/v1/policies/update/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "policy_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "policy_holder": {}
}
'
{
  "policy_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "policy_number": "<string>",
  "effective_from": "2023-12-25",
  "effective_through": "2023-12-25",
  "premium": "<string>",
  "policy_holder": {
    "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "customer_name": "<string>",
    "customer_email": "[email protected]",
    "customer_phone": "<string>"
  },
  "merchant": "<string>",
  "provider": {
    "provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "provider_name": "<string>",
    "email": "[email protected]"
  },
  "coverage": "<string>",
  "policy_type": "<string>",
  "renewable": true,
  "renewal_date": "2023-11-07T05:31:56Z",
  "inspection_required": true,
  "cerfication_required": true,
  "status": "accepted",
  "cancellation_initiator": "<string>",
  "cancellation_reason": "<string>",
  "cancellation_date": "2023-11-07T05:31:56Z",
  "beneficiaries": [
    {
      "beneficiary_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "beneficiary_name": "<string>"
    }
  ]
}

Authorizations

X-API-Key
string
header
required

Query Parameters

policy_id
string

Body

Serializer for updating policy holder-related information within a policy. Only allows updates to the following fields: first_name, last_name, dob, email, and address.

policy_id
string<uuid>
policy_holder
object

Response

Policy updated successfully

Serializer for the Policy model

policy_id
string<uuid>
required

Unique identifier for the policy

policy_number
string | null
required

Policy Refrence Number assigned by the insurer e.g GI86585700-1, AXA2024727-2, LEAD18002-42, etc

effective_from
string<date>
required

Date the policy becomes active - determined by the time of purchase

effective_through
string<date>
required

Date the policy expires

premium
string<decimal>
required

Amount paid for the policy

policy_holder
object
required
merchant
string
required
provider
object
required
coverage
string | null
required

Coverage details for the policy

policy_type
string
required

Returns the type of the policy

renewable
boolean
required

Indicates if the policy is renewable

renewal_date
string<date-time> | null
required

Date when this insurance policy is due for renewal

inspection_required
boolean
required

Indicates if an inspection is required before the policy can be purchased

cerfication_required
boolean
required

Indicates if any certifications are required before the policy can be purchased

status
enum<string>
required

Current status of the policy

  • accepted - Accepted
  • cancelled - Cancelled
  • active - Active
Available options:
accepted,
cancelled,
active
cancellation_initiator
string | null
required

Who requested for cancellation of this policy?

cancellation_reason
string | null
required

Reason for policy cancellation

cancellation_date
string<date-time> | null
required

Date when the policy was cancelled

beneficiaries
object[]
required