Retrieve all active policies for a specific customer
curl --request GET \
--url https://dev.superpool.unyte.africa/api/v1/customers/{id}/policies/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://dev.superpool.unyte.africa/api/v1/customers/{id}/policies/"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://dev.superpool.unyte.africa/api/v1/customers/{id}/policies/', 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/customers/{id}/policies/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://dev.superpool.unyte.africa/api/v1/customers/{id}/policies/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dev.superpool.unyte.africa/api/v1/customers/{id}/policies/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.superpool.unyte.africa/api/v1/customers/{id}/policies/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"data": [
{
"policy_id": "24708b5a-10de-4364-8ea4-0249d9118a84",
"policy_type": "Travel",
"status": "active",
"start_date": "2025-01-23",
"end_date": "2026-01-23",
"premium_amount": "4724.93"
},
{
"policy_id": "136defb6-76b3-4974-845e-26c382fd266b",
"policy_type": "Auto",
"status": "active",
"start_date": "2025-01-23",
"end_date": "2026-01-23",
"premium_amount": "1000.00"
},
{
"policy_id": "ddd644cc-e418-43e6-9b53-7a717a23b24c",
"policy_type": "Gadget",
"status": "active",
"start_date": "2025-01-23",
"end_date": "2026-01-23",
"premium_amount": "100000.00"
},
{
"policy_id": "d4db8ec7-67fc-44d2-8b32-a67649b9373d",
"policy_type": "Gadget",
"status": "active",
"start_date": "2025-01-23",
"end_date": "2026-01-23",
"premium_amount": "100000.00"
},
{
"policy_id": "e137b581-01f9-45f6-be62-e576ab466f41",
"policy_type": "Travel",
"status": "active",
"start_date": "2025-01-23",
"end_date": "2026-01-23",
"premium_amount": "4724.93"
}
]
}
]
}Customers
Retrieve all active policies for a specific customer
This endpoint returns a list of all active policies associated with the customer. Filters are available to query by active, inactive, or expired policies.
GET
/
api
/
v1
/
customers
/
{id}
/
policies
/
Retrieve all active policies for a specific customer
curl --request GET \
--url https://dev.superpool.unyte.africa/api/v1/customers/{id}/policies/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://dev.superpool.unyte.africa/api/v1/customers/{id}/policies/"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://dev.superpool.unyte.africa/api/v1/customers/{id}/policies/', 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/customers/{id}/policies/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://dev.superpool.unyte.africa/api/v1/customers/{id}/policies/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dev.superpool.unyte.africa/api/v1/customers/{id}/policies/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.superpool.unyte.africa/api/v1/customers/{id}/policies/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"data": [
{
"policy_id": "24708b5a-10de-4364-8ea4-0249d9118a84",
"policy_type": "Travel",
"status": "active",
"start_date": "2025-01-23",
"end_date": "2026-01-23",
"premium_amount": "4724.93"
},
{
"policy_id": "136defb6-76b3-4974-845e-26c382fd266b",
"policy_type": "Auto",
"status": "active",
"start_date": "2025-01-23",
"end_date": "2026-01-23",
"premium_amount": "1000.00"
},
{
"policy_id": "ddd644cc-e418-43e6-9b53-7a717a23b24c",
"policy_type": "Gadget",
"status": "active",
"start_date": "2025-01-23",
"end_date": "2026-01-23",
"premium_amount": "100000.00"
},
{
"policy_id": "d4db8ec7-67fc-44d2-8b32-a67649b9373d",
"policy_type": "Gadget",
"status": "active",
"start_date": "2025-01-23",
"end_date": "2026-01-23",
"premium_amount": "100000.00"
},
{
"policy_id": "e137b581-01f9-45f6-be62-e576ab466f41",
"policy_type": "Travel",
"status": "active",
"start_date": "2025-01-23",
"end_date": "2026-01-23",
"premium_amount": "4724.93"
}
]
}
]
}Authorizations
Path Parameters
Response
200 - application/json
View customer's active policies
⌘I
