curl --request POST \
--url https://dev.superpool.unyte.africa/api/v1/policies \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"intent_id": "d5c36562-b86f-4e97-8288-8c6cb2da35ef",
"merchant_code": "ERO-2635",
"additional_information": {
"make": "Honda",
"model": "CBR600RR",
"value": 15000,
"owner": "Alex Rider",
"year": "2021-05-15",
"usecase": "private",
"vehicle_type": "saloon",
"engine_number": "ENG567890",
"chassis_number": "CHS678901",
"registration_number": "MOT1234"
},
"activation_metadata": {
"renew": true,
"send_customer_notification": true
}
}
'{
"policy_id": "ba4fc272-5591-4812-9f36-48c3ffb27a69",
"policy_reference_number": "EXAMPLE-POLICY-NUMBER",
"effective_from": "2022-08-10",
"effective_through": "2024-12-11",
"premium": "10000.00",
"insurer": "AXA",
"policy_status": "active",
"product_information": {
"product_name": "Home Insurance",
"product_type": "Home",
"product_description": "Home"
},
"customer_information": {
"customer_name": "John Doe",
"customer_email": "john.doestar@email.com",
"customer_phone": "1234567890",
"customer_address": "123 Main St, Springfield, IL"
},
"renewal_information": {
"renewable": false
}
}Purchase a policy
Purchase a new policy for your customer
curl --request POST \
--url https://dev.superpool.unyte.africa/api/v1/policies \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"intent_id": "d5c36562-b86f-4e97-8288-8c6cb2da35ef",
"merchant_code": "ERO-2635",
"additional_information": {
"make": "Honda",
"model": "CBR600RR",
"value": 15000,
"owner": "Alex Rider",
"year": "2021-05-15",
"usecase": "private",
"vehicle_type": "saloon",
"engine_number": "ENG567890",
"chassis_number": "CHS678901",
"registration_number": "MOT1234"
},
"activation_metadata": {
"renew": true,
"send_customer_notification": true
}
}
'{
"policy_id": "ba4fc272-5591-4812-9f36-48c3ffb27a69",
"policy_reference_number": "EXAMPLE-POLICY-NUMBER",
"effective_from": "2022-08-10",
"effective_through": "2024-12-11",
"premium": "10000.00",
"insurer": "AXA",
"policy_status": "active",
"product_information": {
"product_name": "Home Insurance",
"product_type": "Home",
"product_description": "Home"
},
"customer_information": {
"customer_name": "John Doe",
"customer_email": "john.doestar@email.com",
"customer_phone": "1234567890",
"customer_address": "123 Main St, Springfield, IL"
},
"renewal_information": {
"renewable": false
}
}Authorizations
Headers
Idempotency key to enforce idempotent processing of POST requests
Body
Improved data handler for policy purchase requests
Intent ID
Merchant or Partner Seller short code
50Insurance Product-specific additional information required for the selected product type e.g {"vehicle_make": "Toyota", "vehicle_model": "Camry"}
Show child attributes
Show child attributes
Response
Policy purchase successful
Limited view of the PolicySerializer for the purchase response
Date the policy becomes active - determined by the time of purchase
Date the policy expires
Amount paid for the policy
^-?\d{0,8}(?:\.\d{0,2})?$Returns the product information as a dictionary
Show child attributes
Show child attributes
Returns the customer information as a dictionary
Show child attributes
Show child attributes
Returns the renewal information as a dictionary
Show child attributes
Show child attributes
Unique identifier for the policy
Policy number issued to the customer as assigned by the insurer e.g GI86585700-1
