Skip to main content
Version: 1.0.0

Curacel Grow API Docs

Introduction

Curacel Grow is an embedded insurance that aims to drive insurance literacy and inclusion in Africa. This API allows developers, product owners, and business owners to tap into retail insurance by embedding insurance with their solutions, thereby offering customers tailored insurance to fit thier needs.

This API gives you access to:

  • Insurance

  • Custom

In this API reference, you'll find all the information you need about each endpoint and resource.

Tip: Make sure to also visit our Developer Portal for guides on Getting started with Grow, Setting up your environment, and Using our drop-in widget,

Environment

We currently offer two environments: sandbox and production.

EnvironmentPurposeAccess
SandboxWe've created a sandbox environment where you can test your API client code without incurring any costs. In this environment, you can create links without real credentials. No data is tampered with and you are able to thoroughly test API endpoints in test mode before going live.Base URL (cURL): https://api.playbox.grow.curacel.co/api
ProductionThe Production environment is recommended for live applications that have direct connections to institutions. You will need real credentials to create links in this environment, and you will be pulling real data from the institutions.Base URL (cURL): https://api.grow.curacel.co/api
note

You can't create an application for live mode and sandbox using the same API key. We use the same endpoint structure, the only difference is the base URL.

Therefore, for each environment, you'll need to generate seperate API keys.

HTTP Response status codes

Status CodeDescription
1xxInformational.
2xxSuccessful - Everything worked as expected.
3xxRedirection messages.
4xxClient Error responses.
5xxServer error responses.

HTTP Response Status Codes Summary

Curacel Grow uses the standard HTTP response codes to indicate if an API request was successful or not.

Status CodesDescription
200 - OKEverything worked perfectly.
201 - CreatedAs a result of the request's success, a new resource was created.
400 - Bad RequestThe request was denied, usually because a required parameter was missing.
401 - UnauthorizedUnauthenticated because no valid API key was provided.
402 - Request FailedThe parameters were correct, however, the request did not succeed.
403The client does not have access rights to the content.
404 - Not FoundThe server can not find the requested resource. The link may be correct, but the resource does not exist.
409 - ConflictThis response is sent when a request conflicts with the current state of the server.
422 - Unprocessable EntityThe request was well-formed, however, it couldn't be carried out because of semantic flaws.
429 - Too Many RequestsThe user has issued an excessive number of requests in a short period of time ("rate limiting").
500, 502, 503, 504 - Server ErrorsSomething went wrong on Curacels' end. (These are rare.) Note that together with this response, a user-friendly page explaining the problem should be sent.

Error handling

Error messages

We don't yet have any custom error codes, but errors would always contain one of the standard HTTP codes with a message in the payload.

Curacel Grow API errors are returned in JSON format. For example, an error might look like this:

JSON
[
{
"message": "The given data was invalid.",
"errors": {
"trip_days_per_year": [
"The trip days per year field is required."
],
"trips_per_day": [
"The trips per day field is required."
],
"asset_value": [
"The asset value field is required."
]
}
}
]

An error response will typically include the following parameters:

  • request_id:

  • message:

  • code:

  • field (optional):

    Request identifier

    When you encounter any issues with a specific error, include the request identifier ('request id') in your message for the Grow support team. This will ease the process of investigation and get you back up and running in no time.

Error codes and troubleshooting

Please see our dedicated error handling articles on our Developer Portal for a complete list of errors and how to troubleshoot them.

Authentication

Security Scheme Type:http
HTTP Authorization Scheme:bearer
Bearer format:API KEY from your account dashboard

Contact

Curacel Grow API Support: grow@curacel.aiURL: https://docs.curacel.co/

License

Apache 2.0