Skip to main content

Purchase Insurance Products


Purchase an Insurance Product

You can make it possible for customers to purchase any insurance product from your user interface; under the hood, they are making a POST request to the Purchase an insurance product for a customer endpoint.

Required Parameters

When purchasing any insurance product, a bunch of parameters is required in the body of your request:

  • product_code: the code of the insurance product to be purchased; this can be found on the list of each available insurance product.
  • customer_ref: this is a unique identifier for each customer making the order. It is generated when a customer is created.
  • payment_type: This indicates how a customer wants to pay for the purchase/order. The values are wallet or bank_transfer.
  • policy_start_date: This denotes when the insurance policy would start coverage. It is in date format.

List an Insurance Type

To obtain the list of a particular type of insurance, you simply pass the query parameter type and the insurance type as its value to the List available insurance products endpoint.

Text
'https://api.playbox.grow.curacel.co/api/v1/products?type=<value>'

If you want to see every available insurance type, List Insurance Product Type.

At this point, let's walk through some of the insurance product types available on the Grow API.

Pre-requisites

  • You need to have cURL installed on your PC or Mac. In case you do not have cURL installed, check out this guide.
  • Your unique API key to authenticate requests to the server. If you do not have an API key, generate Grow API key here.
  • (Optional) A Postman environment, to make easy API requests to every endpoint at a go. Set up Grow with Postman here.

Marine Insurance 🚢

The body parameters associated with marine insurance types are explained thus:

ParameterDescription
asset_valueThe value of the asset the product covers
pickup_locationThe pickup location of the shipment/parcel. Usually the origin port
dropoff_locationThe dropoff location of the shipment/parcel. Usually the destination port
asset_refThis represents the asset the order covers

Right now, let's purchase a marine product on the Sandbox server called SMART INSURE LITE, with the id of 7. Using its code of 435te, you now have one of the required parameters, the product_code.

Marine Insurance

Request

cURL
curl --location --request POST 'https://api.playbox.grow.curacel.co/api/v1/orders' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--data-raw '{
"product_code": "435te",
"customer_ref": "189jwsf7",
"payment_type": "wallet",
"policy_start_date": "2023-01-28",
"asset_value": 12500.58,
"pickup_location": "fugiat est ullamco tempor",
"dropoff_location": "cupidatat id laboris dolore",
"asset_ref": "rwt345"
}'

Response

JSON
{
"order": {
"id": 4866,
"asset_ref": "rwt345",
"product_price": 34.38,
"partner_commission": 0.34,
"amount_due": 34.04,
"currency": "NGN",
"payment_instructions": {
"message": "Payment successful",
"success": true
},
"payment_gateway_charge": null,
"status": "paid"
}
}

Credit Life Insurance 💵

Purchasing credit life insurance may involve even more information parameters due to the number of things it covers.

ParameterDescription
asset_valueThis is also the same as the loan amount
maturity_dateThe date when the final payment of a loan, bond or other financial product is due
loan_durationThe duration of the loan to be insured in months, should not exceed 12 months
monthly_loan_instalmentThis is for loans lasting more than one month, the amount returned every month by the customer
business_addressThe address of the customer's business/company
nature_of_businessThe nature of business the customer operates

Credit Life Insurance

Request

On your terminal or Git Bash, make a POST request to purchase a credit life product.

cURL
curl --location --request POST 'https://api.playbox.grow.curacel.co/api/v1/orders' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--data-raw '{
"product_code": "435te",
"customer_ref": "189jwsf7",
"payment_type": "wallet",
"policy_start_date": "2023-04-28",
"asset_value": 12500.58,
"asset_ref": "rwt345",
"loan_duration": 4,
"maturity_date": "2022-01-31",
"monthly_loan_instalment": 900,
"business_address": "Block A, Lagos street, ...",
"nature_of_business": "Logistics"
}'

Response

JSON
{
"order": {
"id": 4867,
"asset_ref": "rwt345",
"product_price": 34.38,
"partner_commission": 0.34,
"amount_due": 34.04,
"currency": "NGN",
"payment_instructions": {
"message": "Payment successful",
"success": true
},
"payment_gateway_charge": null,
"status": "paid"
}
}

Goods In Transit (GIT) 🚚

For this type of product, similar to the marine product, pickup and dropoff locations should be specified alongside other parameters.

Goods-In-Transit

ParameterDescription
asset_valueThe value of the asset the product covers
pickup_locationThis is the pickup address
dropoff_durationThis is the destination address
trip_frequencyThis indicates whether it is a one-off or recurring trip. It takes two values single and recurring. The default is recurring if none is specified
trips_per_dayThis is required when trip_frequency is set to recurring. It indicates the number of trips per day
trip_days_per_yearThis is required when trip_frequency is set to recurring. It indicates the number of days in a year that has trips (max of 365)

Request

cURL
curl --location --request POST 'https://api.playbox.grow.curacel.co/api/v1/orders' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--data-raw '{
"product_code": "435te",
"customer_ref": "189jwsf7",
"payment_type": "wallet",
"policy_start_date": "2022-04-28",
"asset_value": 12500.58,
"trip_frequency": "recurring",
"trips_per_day": 92155490,
"trip_days_per_year": -64146670,
"pickup_location": "fugiat est ullamco tempor",
"dropoff_location": "cupidatat id laboris dolore"
}'

Response

JSON
{
"order": {
"id": 4868,
"asset_ref": null,
"product_price": 34.38,
"partner_commission": 0.34,
"amount_due": 34.04,
"currency": "NGN",
"payment_instructions": {
"message": "Payment successful",
"success": true
},
"payment_gateway_charge": null,
"status": "paid"
}
}

Travel Insurance 🛫

When purchasing travel products, the travel_duration parameter is required; it represents the number of days the travel is billed to last. This means it takes a maximum value of 365

cURL
curl --location --request POST 'https://api.playbox.grow.curacel.co/api/v1/orders' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--data-raw '{
"product_code": "435te",
"customer_ref": "189jwsf7",
"payment_type": "wallet",
"policy_start_date": "2022-04-28",
"asset_value": 12500.58,
"travel_duration": 365
}'

Response

JSON
{
"order": {
"id": 4869,
"asset_ref": null,
"product_price": 34.38,
"partner_commission": 0.34,
"amount_due": 34.04,
"currency": "NGN",
"payment_instructions": {
"message": "Payment successful",
"success": true
},
"payment_gateway_charge": null,
"status": "paid"
}
}
Full Purchase Reference

For full details of the parameters that can be used when making a purchase, refer to the Purchase an insurance product for a customer reference.