The AgileAPI allows 3rd parties to generate quotes and policies for insurance products. To generate a quote and subsequently accept the quote to create a policy there are 4 endpoints.
All requests are associated with a specific “partner” and permissions are based on the settings that Agile have made for that partner. Client access tokens should be provided in the Authorization header as Bearer tokens.
Example request with bearer token:
curl --request GET \
--url https://api.staging-agileaperture.com/v1/products/cargo \
--header 'Authorization: Bearer your-api-key' \
--header 'Content-Type: application/json'
The value for the header property Content-Type
should be application/json
on all requests
All responses are JSON encoded.
Timestamps are in UTC and formatted as ISO8601.
All 400 series errors (400, 401, 403, etc) will be returned with an optional JSON object in the body and a application/json content type.
We use HTTP status codes to indicate success or failure of a request.
200 OK
– Request succeeded. Response included201 Created
– Resource created. URL to new resource in Location header204 No Content
– Request succeeded, but no response body400 Bad Request
– Could not parse request401 Unauthorized
– No authentication credentials provided or authentication failed403 Forbidden
– Authenticated user does not have access404 Not Found
– Resource not found415 Unsupported Media Type
– POST/PUT/PATCH request occurred without a application/json content type422 Unprocessable Entry
– A request to modify or create a resource failed due to a validation error500, 501, 502, 503, etc
– An internal server error occuredIn case of validation errors on a POST/PUT/PATCH request, a 422 Unprocessable Entry
status code will be returned. The JSON response body will include an array of error messages.
This endpoint will return data that can be used to construct a form for requesting a quote. This includes information about the product in general, and rates and loadings that are required to generate a valid quotation.
The quotes endpoint accepts a set of parameters for a product, and returns data details for the cost of insuring the item/s along with other pertinent information. This includes the quote id that can the be used to generate a policy.
If needed, the quote can be updated with changed or extra parameter. Each product has a minimum set of parameters requited to create a quote, but the may be extra parameters needed to bind the quote. If you didn’t provide all the parameters when creating the quote, you can provide them with this endpoint.
This creates a policy from the quote, using the payment method you provide.