/quotes
Quote API is for creating priced quotes from Swallow pricing projects, and returning quote data at volume.
Create a quote
Project reference. It is a UUID.
56c575d2-b6b9-44ed-9c75-5d705b987ec1
Project version reference. It is a UUID.
46c575d2-b6b9-44ed-9c75-5d705b987ec1
Example age input
23
Example name input
Smith
Example postcode input
SW1A1AA
Example email input
bob@smith.com
POST /sw/public/quotes/{project_reference} HTTP/1.1
Host: api.llow.io
Content-Type: application/json
Accept: */*
Content-Length: 70
{
"age": 23,
"name": "Smith",
"postcode": "SW1A1AA",
"email": "bob@smith.com"
}
/sw/public/quotes/{project_reference} response
{
"quote_reference": "56c575d2-b6b9-44ed-9c75-5d705b987ec1",
"project_reference": "56c575d2-b6b9-44ed-9c75-5d705b987ec1",
"version_reference": "46c575d2-b6b9-44ed-9c75-5d705b987ec1",
"company_reference": "86c575d2-b6b9-44ed-9c75-8d705b987ec1",
"version": 1,
"result": 400,
"valid": true,
"refers": [
{}
],
"exclusions": [
{}
],
"excesses": [
{}
],
"endorsements": [
{}
],
"indicators": "indicator_value_1::indicator_value_2::indicator_value_3",
"execution_time": 125,
"output": {
"result": 100,
"valid": true,
"tax": 15,
"commission": 21
},
"input": {
"age": 23,
"name": "Rimmer",
"email": "cal@cal.com",
"postcode": "PO343TR"
},
"created_at": "2021-03-22T14:29:22.000Z"
}
Project reference. It is a UUID.
56c575d2-b6b9-44ed-9c75-5d705b987ec1
Return the detailed quote response
true
Project version reference. It is a UUID.
46c575d2-b6b9-44ed-9c75-5d705b987ec1
Example age input
23
Example name input
Smith
Example postcode input
SW1A1AA
Example email input
bob@smith.com
POST /sw/quotes/{project_reference} HTTP/1.1
Host: api.llow.io
Content-Type: application/json
Accept: */*
Content-Length: 70
{
"age": 23,
"name": "Smith",
"postcode": "SW1A1AA",
"email": "bob@smith.com"
}
/sw/quotes/{project_reference} response
{
"quote_reference": "56c575d2-b6b9-44ed-9c75-5d705b987ec1",
"project_reference": "56c575d2-b6b9-44ed-9c75-5d705b987ec1",
"version_reference": "46c575d2-b6b9-44ed-9c75-5d705b987ec1",
"company_reference": "86c575d2-b6b9-44ed-9c75-8d705b987ec1",
"version": 1,
"result": 400,
"valid": true,
"refers": [
{}
],
"exclusions": [
{}
],
"excesses": [
{}
],
"endorsements": [
{}
],
"indicators": "indicator_value_1::indicator_value_2::indicator_value_3",
"execution_time": 125,
"output": {
"result": 100,
"valid": true,
"tax": 15,
"commission": 21
},
"input": {
"age": 23,
"name": "Rimmer",
"email": "cal@cal.com",
"postcode": "PO343TR"
},
"created_at": "2021-03-22T14:29:22.000Z"
}
The request body should match the inputs that are defined within your Swallow pricing project. You can see the desired payload by looking at the Try page of any project or project version. For example:
{
"name": "Smith",
"date_of_birth": "1990-01-01",
"country": "UK",
"duration_days": 5,
"is_healthy": true
}
The response body will return the priced quote with the outputs that are defined within your Swallow pricing project.
{
"company_reference": "098ae4f2-3af8-4740-8760-5d312e46742c",
"project_reference": "1085e088-5501-4cc0-babd-464c6ae04707",
"version_reference": "862360ff-fe53-40e1-8f11-57bf9a6f7477",
"quote_reference": "e8733d88-b560-44d4-8c03-b2366dfd2cbb",
"version": 1,
"indicators": "bob@smith.com::Smith",
"output": {
"commission": 31.46,
"tax": 23.595,
"result": 212.36,
"valid": true
},
"input": {
"name": "Smith",
"date_of_birth": "1990-01-01",
"country": "UK",
"duration_days": 5,
"is_healthy": true
},
"created_at": "2023-09-20T09:32:43.865Z",
}
To respond with debugging details, provide ?debug=true as a query parameter within the endpoint. This will return an additional parameter called debug with granular detail of how the quote was created. This will not work on the public quote endpoint.
{
...
"debug": {
"timer": [],
"errors": [],
"exclusions": [],
"refers": [],
"excesses": [],
"endorsements": [],
"indicators": {},
"steps": {}
}
...
}
Retrieve quotes
Project reference. It is a UUID.
56c575d2-b6b9-44ed-9c75-5d705b987ec1
Project version reference. It is a UUID.
46c575d2-b6b9-44ed-9c75-5d705b987ec1
This is a search term use to find a quote. It searches all defined input indictors.
56c575d2-b6b9-44ed-9c75-5d705b987ec1
GET /sw/quotes HTTP/1.1
Host: api.llow.io
Accept: */*
/sw/quotes response
{
"quote_reference": "56c575d2-b6b9-44ed-9c75-5d705b987ec1",
"project_reference": "56c575d2-b6b9-44ed-9c75-5d705b987ec1",
"version_reference": "46c575d2-b6b9-44ed-9c75-5d705b987ec1",
"company_reference": "86c575d2-b6b9-44ed-9c75-8d705b987ec1",
"version": 1,
"result": 400,
"valid": true,
"refers": [
{}
],
"exclusions": [
{}
],
"excesses": [
{}
],
"endorsements": [
{}
],
"indicators": "indicator_value_1::indicator_value_2::indicator_value_3",
"execution_time": 125,
"output": {
"result": 100,
"valid": true,
"tax": 15,
"commission": 21
},
"input": {
"age": 23,
"name": "Rimmer",
"email": "cal@cal.com",
"postcode": "PO343TR"
},
"created_at": "2021-03-22T14:29:22.000Z"
}
Quotes can be fetched in bulk or filtered (via a ?search query) on indicators that are defined in the inputs of Swallow pricing models. Indicators are up to 4 defined input parameters that can be searched (e.g. name, password, registration, zip code, postcode).
https://api.llow.io/sw/quotes?search=bob@smith.com
Quotes can also be filtered on a specific version_reference or project_reference.
https://api.llow.io/sw/quotes?version_reference=862360ff-fe53-40e1-8f11-57bf9a6f7477
Retrieve quote detail
Quote reference. It is a UUID.
56c575d2-b6b9-44ed-9c75-5d705b987ec1
Return the detailed quote response
true
GET /sw/quotes/{quote_reference} HTTP/1.1
Host: api.llow.io
Accept: */*
/sw/quotes/{quote_reference} response
{
"quote_reference": "56c575d2-b6b9-44ed-9c75-5d705b987ec1",
"version_reference": "46c575d2-b6b9-44ed-9c75-5d705b987ec1",
"project_reference": "56c575d2-b6b9-44ed-9c75-5d705b987ec1",
"meta": {
"name": "Monthly motor insurance product",
"project_reference": "56c575d2-b6b9-44ed-9c75-5d705b987ec1",
"version_reference": "46c575d2-b6b9-44ed-9c75-5d705b987ec1",
"version": 1
},
"input": {
"age": 23,
"name": "Rimmer",
"email": "cal@cal.com",
"postcode": "PO343TR"
},
"output": {
"result": 100,
"valid": true,
"tax": 15,
"commission": 21
},
"debug": {
"endorsements": [],
"errors": [],
"excesses": [],
"exclusions": [],
"indicators": {},
"meta": {},
"refers": [],
"steps": {},
"timer": []
},
"created_at": "2021-03-22T14:29:22.000Z"
}
Each quote has a unique quote_reference that is used within the quote request.
To respond with debugging details, provide ?debug=true as a query parameter within the endpoint. This will return an additional parameter called debug with granular detail of how the quote was created.
{
"project_reference": "1085e088-5501-4cc0-babd-464c6ae04707",
"version_reference": "862360ff-fe53-40e1-8f11-57bf9a6f7477",
"quote_reference": "e8733d88-b560-44d4-8c03-b2366dfd2cbb",
"meta": {
"project_reference": "1085e088-5501-4cc0-babd-464c6ae04707",
"version_reference": "862360ff-fe53-40e1-8f11-57bf9a6f7477",
"quote_reference": "2ebc2426-772f-4f10-af63-25110554d35b",
"company_reference": "098ae4f2-3af8-4740-8760-5d312e46742c",
"version": 1
},
"output": {
"commission": 31.46,
"tax": 23.595,
"result": 212.36,
"valid": true
},
"input": {
"name": "smith",
"date_of_birth": "1990-01-01",
"country": "UK",
"duration_days": 5,
"is_healthy": true
},
"created_at": "2023-09-20T09:32:43.865Z",
"debug": {}
}
Quote storage period
Different account types will store quotes for different periods of time.
Free
3 Months
Pay-as-you-go
12 Months
Professional
indefinitely
Enterprise
indefinitely
Last updated