Capture a new purchase intent for an insurance policy
curl --request POST \
--url https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"tenure": 123,
"customer_metadata": {
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"residential_address": {
"city": "<string>",
"state": "<string>",
"country": "<string>",
"street": "<string>",
"postal_code": "<string>",
"address": "<string>",
"house_number": "<string>"
},
"occupation": "<string>",
"identity_card_img": "<string>",
"utility_bill_img": "<string>",
"identity_card_number": "<string>",
"identity_card_type": "driver_license",
"phone": "<string>",
"date_of_birth": "2023-12-25",
"identity_card_expiry_date": "2023-12-25"
}
}
'import requests
url = "https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/"
payload = {
"tenure": 123,
"customer_metadata": {
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"residential_address": {
"city": "<string>",
"state": "<string>",
"country": "<string>",
"street": "<string>",
"postal_code": "<string>",
"address": "<string>",
"house_number": "<string>"
},
"occupation": "<string>",
"identity_card_img": "<string>",
"utility_bill_img": "<string>",
"identity_card_number": "<string>",
"identity_card_type": "driver_license",
"phone": "<string>",
"date_of_birth": "2023-12-25",
"identity_card_expiry_date": "2023-12-25"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenure: 123,
customer_metadata: {
first_name: '<string>',
last_name: '<string>',
email: 'jsmith@example.com',
residential_address: {
city: '<string>',
state: '<string>',
country: '<string>',
street: '<string>',
postal_code: '<string>',
address: '<string>',
house_number: '<string>'
},
occupation: '<string>',
identity_card_img: '<string>',
utility_bill_img: '<string>',
identity_card_number: '<string>',
identity_card_type: 'driver_license',
phone: '<string>',
date_of_birth: '2023-12-25',
identity_card_expiry_date: '2023-12-25'
}
})
};
fetch('https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tenure' => 123,
'customer_metadata' => [
'first_name' => '<string>',
'last_name' => '<string>',
'email' => 'jsmith@example.com',
'residential_address' => [
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'street' => '<string>',
'postal_code' => '<string>',
'address' => '<string>',
'house_number' => '<string>'
],
'occupation' => '<string>',
'identity_card_img' => '<string>',
'utility_bill_img' => '<string>',
'identity_card_number' => '<string>',
'identity_card_type' => 'driver_license',
'phone' => '<string>',
'date_of_birth' => '2023-12-25',
'identity_card_expiry_date' => '2023-12-25'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/"
payload := strings.NewReader("{\n \"tenure\": 123,\n \"customer_metadata\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"residential_address\": {\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"street\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"address\": \"<string>\",\n \"house_number\": \"<string>\"\n },\n \"occupation\": \"<string>\",\n \"identity_card_img\": \"<string>\",\n \"utility_bill_img\": \"<string>\",\n \"identity_card_number\": \"<string>\",\n \"identity_card_type\": \"driver_license\",\n \"phone\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"identity_card_expiry_date\": \"2023-12-25\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tenure\": 123,\n \"customer_metadata\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"residential_address\": {\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"street\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"address\": \"<string>\",\n \"house_number\": \"<string>\"\n },\n \"occupation\": \"<string>\",\n \"identity_card_img\": \"<string>\",\n \"utility_bill_img\": \"<string>\",\n \"identity_card_number\": \"<string>\",\n \"identity_card_type\": \"driver_license\",\n \"phone\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"identity_card_expiry_date\": \"2023-12-25\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenure\": 123,\n \"customer_metadata\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"residential_address\": {\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"street\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"address\": \"<string>\",\n \"house_number\": \"<string>\"\n },\n \"occupation\": \"<string>\",\n \"identity_card_img\": \"<string>\",\n \"utility_bill_img\": \"<string>\",\n \"identity_card_number\": \"<string>\",\n \"identity_card_type\": \"driver_license\",\n \"phone\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"identity_card_expiry_date\": \"2023-12-25\"\n }\n}"
response = http.request(request)
puts response.read_body{
"intent_id": "<string>",
"quote_code": "<string>",
"product": "<string>",
"selected_tenure": {},
"total_amount": "<string>"
}Quotes
Capture a new purchase intent for an insurance policy
Create a new pre-purchase intent for a selected insurance quote.
This endpoint allows customers to create a new quote intent, which is a record of their interest in purchasing an insurance policy. The intent includes details such as the quote code, customer ID, and other relevant information.
POST
/
api
/
v1
/
quotes
/
{quote_code}
/
intent
/
capture
/
Capture a new purchase intent for an insurance policy
curl --request POST \
--url https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"tenure": 123,
"customer_metadata": {
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"residential_address": {
"city": "<string>",
"state": "<string>",
"country": "<string>",
"street": "<string>",
"postal_code": "<string>",
"address": "<string>",
"house_number": "<string>"
},
"occupation": "<string>",
"identity_card_img": "<string>",
"utility_bill_img": "<string>",
"identity_card_number": "<string>",
"identity_card_type": "driver_license",
"phone": "<string>",
"date_of_birth": "2023-12-25",
"identity_card_expiry_date": "2023-12-25"
}
}
'import requests
url = "https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/"
payload = {
"tenure": 123,
"customer_metadata": {
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"residential_address": {
"city": "<string>",
"state": "<string>",
"country": "<string>",
"street": "<string>",
"postal_code": "<string>",
"address": "<string>",
"house_number": "<string>"
},
"occupation": "<string>",
"identity_card_img": "<string>",
"utility_bill_img": "<string>",
"identity_card_number": "<string>",
"identity_card_type": "driver_license",
"phone": "<string>",
"date_of_birth": "2023-12-25",
"identity_card_expiry_date": "2023-12-25"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenure: 123,
customer_metadata: {
first_name: '<string>',
last_name: '<string>',
email: 'jsmith@example.com',
residential_address: {
city: '<string>',
state: '<string>',
country: '<string>',
street: '<string>',
postal_code: '<string>',
address: '<string>',
house_number: '<string>'
},
occupation: '<string>',
identity_card_img: '<string>',
utility_bill_img: '<string>',
identity_card_number: '<string>',
identity_card_type: 'driver_license',
phone: '<string>',
date_of_birth: '2023-12-25',
identity_card_expiry_date: '2023-12-25'
}
})
};
fetch('https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tenure' => 123,
'customer_metadata' => [
'first_name' => '<string>',
'last_name' => '<string>',
'email' => 'jsmith@example.com',
'residential_address' => [
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'street' => '<string>',
'postal_code' => '<string>',
'address' => '<string>',
'house_number' => '<string>'
],
'occupation' => '<string>',
'identity_card_img' => '<string>',
'utility_bill_img' => '<string>',
'identity_card_number' => '<string>',
'identity_card_type' => 'driver_license',
'phone' => '<string>',
'date_of_birth' => '2023-12-25',
'identity_card_expiry_date' => '2023-12-25'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/"
payload := strings.NewReader("{\n \"tenure\": 123,\n \"customer_metadata\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"residential_address\": {\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"street\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"address\": \"<string>\",\n \"house_number\": \"<string>\"\n },\n \"occupation\": \"<string>\",\n \"identity_card_img\": \"<string>\",\n \"utility_bill_img\": \"<string>\",\n \"identity_card_number\": \"<string>\",\n \"identity_card_type\": \"driver_license\",\n \"phone\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"identity_card_expiry_date\": \"2023-12-25\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tenure\": 123,\n \"customer_metadata\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"residential_address\": {\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"street\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"address\": \"<string>\",\n \"house_number\": \"<string>\"\n },\n \"occupation\": \"<string>\",\n \"identity_card_img\": \"<string>\",\n \"utility_bill_img\": \"<string>\",\n \"identity_card_number\": \"<string>\",\n \"identity_card_type\": \"driver_license\",\n \"phone\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"identity_card_expiry_date\": \"2023-12-25\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.superpool.unyte.africa/api/v1/quotes/{quote_code}/intent/capture/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenure\": 123,\n \"customer_metadata\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"residential_address\": {\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"street\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"address\": \"<string>\",\n \"house_number\": \"<string>\"\n },\n \"occupation\": \"<string>\",\n \"identity_card_img\": \"<string>\",\n \"utility_bill_img\": \"<string>\",\n \"identity_card_number\": \"<string>\",\n \"identity_card_type\": \"driver_license\",\n \"phone\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"identity_card_expiry_date\": \"2023-12-25\"\n }\n}"
response = http.request(request)
puts response.read_body{
"intent_id": "<string>",
"quote_code": "<string>",
"product": "<string>",
"selected_tenure": {},
"total_amount": "<string>"
}Authorizations
Headers
Idempotency key to enforce idempotent processing of POST requests
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
Quote Intent created successfully
Name of the insurance product
Returns the relevant tenure details (duration and premium) for the response
Show child attributes
Show child attributes
Total amount to be paid
Pattern:
^-?\d{0,8}(?:\.\d{0,2})?$⌘I
