curl --request GET \
--url https://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId}', 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://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_id": 123,
"employees": [
{
"name": "<string>",
"nationality_iso": "<string>",
"category": "basic",
"mobile_number": "0500000001",
"date_of_birth": "<string>",
"nationality_id": "1111111111",
"iqama_id": "2222222222",
"border_number": "3000000001",
"sponsor_id": "1000000001",
"is_married": true,
"dependents": [
{
"name": "<string>",
"relationship": "spouse",
"nationality_iso": "<string>",
"date_of_birth": "<string>",
"nationality_id": "1111111112",
"iqama_id": "2222222222"
}
],
"health_declaration": {
"answers": {
"allergies": "Yes",
"current_medications": "Yes",
"hospitalizations": "Yes",
"pre_existing_conditions": "Yes",
"past_surgeries": "Yes",
"surgery_complications": "Yes",
"chest_pain_or_breathlessness": "Yes",
"heart_procedures": "Yes",
"smoking": "Yes",
"alcohol_consumption": "Yes",
"physical_activity": "Yes",
"family_history": "Yes",
"chronic_disease": [
"Diabetes"
]
},
"consent": true,
"filled_at": "2023-11-07T05:31:56Z"
}
}
],
"quotes": [
{
"quote_price_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"insurance_provider": "<string>",
"insurance_provider_name": "<string>",
"total_price": 123,
"price_per_employee": 800,
"currency": "SAR",
"employees": [
{
"name": "<string>",
"identifier": "<string>",
"category": "<string>",
"dependents": 123,
"price": 123
}
],
"packages": {}
}
]
}{
"code": "40101",
"message": "Unauthenticated"
}Read a quote request
curl --request GET \
--url https://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId}', 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://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.yasmina.ai/api/v1/medical/quote-requests/{quoteRequestId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_id": 123,
"employees": [
{
"name": "<string>",
"nationality_iso": "<string>",
"category": "basic",
"mobile_number": "0500000001",
"date_of_birth": "<string>",
"nationality_id": "1111111111",
"iqama_id": "2222222222",
"border_number": "3000000001",
"sponsor_id": "1000000001",
"is_married": true,
"dependents": [
{
"name": "<string>",
"relationship": "spouse",
"nationality_iso": "<string>",
"date_of_birth": "<string>",
"nationality_id": "1111111112",
"iqama_id": "2222222222"
}
],
"health_declaration": {
"answers": {
"allergies": "Yes",
"current_medications": "Yes",
"hospitalizations": "Yes",
"pre_existing_conditions": "Yes",
"past_surgeries": "Yes",
"surgery_complications": "Yes",
"chest_pain_or_breathlessness": "Yes",
"heart_procedures": "Yes",
"smoking": "Yes",
"alcohol_consumption": "Yes",
"physical_activity": "Yes",
"family_history": "Yes",
"chronic_disease": [
"Diabetes"
]
},
"consent": true,
"filled_at": "2023-11-07T05:31:56Z"
}
}
],
"quotes": [
{
"quote_price_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"insurance_provider": "<string>",
"insurance_provider_name": "<string>",
"total_price": 123,
"price_per_employee": 800,
"currency": "SAR",
"employees": [
{
"name": "<string>",
"identifier": "<string>",
"category": "<string>",
"dependents": 123,
"price": 123
}
],
"packages": {}
}
]
}{
"code": "40101",
"message": "Unauthenticated"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
The quote request
The quote_request_id.
Hide child attributes
Hide child attributes
The tier this employee picked. Every provider sells all four, so the quote request can price it with each of them.
basic, standard, premium, executive The employee's mobile number.
"0500000001"
Format YYYY-MM-DD. Saudi nationals whose national id starts with 1 give the Hijri (Umm al-Qura) date printed on their id, for example 1409-09-14; everyone else gives a Gregorian date. Employees must be between 18 and 110 years old.
For Saudis only. Exactly 10 digits.
^[0-9]{10}$"1111111111"
For non-Saudis. Exactly 10 digits. A non-Saudi whose iqama is not issued yet sends border_number instead.
^[0-9]{10}$"2222222222"
For non-Saudis without an iqama yet, in place of iqama_id. Exactly 10 digits.
^[0-9]{10}$"3000000001"
The employee's sponsor id. Optional. Exactly 10 digits.
^[0-9]{10}$"1000000001"
Whether the employee is married. Optional.
true
Family members covered under this employee's policy. They get the same provider and category as the employee. Optional; omit or send an empty array for an employee without dependents.
Hide child attributes
Hide child attributes
How the dependent is related to the employee
spouse, child, parent ISO 3166-1 alpha-2 country code
Format YYYY-MM-DD. Saudi nationals whose national id starts with 1 give the Hijri (Umm al-Qura) date printed on their id, for example 1409-09-14; everyone else gives a Gregorian date. A dependent can be any age up to 110.
Required when nationality_iso is SA. Exactly 10 digits.
^[0-9]{10}$"1111111112"
Required when nationality_iso is not SA. Exactly 10 digits.
^[0-9]{10}$"2222222222"
The employee's declaration, on the employees of a quote request and a policy. Set through Submit the declarations; ignored when sent in.
Hide child attributes
Hide child attributes
Yes or No for each question, and the list of chronic diseases.
Hide child attributes
Hide child attributes
Yes, No Yes, No Yes, No Yes, No Yes, No Yes, No Yes, No Yes, No Yes, No Yes, No Yes, No Yes, No Diabetes, Asthma, Chronic Kidney Disease, Liver Disease, Cancer, None of the above true Hide child attributes
Hide child attributes
What the company pays for a year of cover with this provider.
total_price divided by the number of employees.
800
"SAR"
One entry per tier the employees picked, keyed by tier.
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
"Basic"
The yearly price per employee on this tier.
300
What the tier covers: the same coverage values the Categories API returns for it. The Categories API's translations label the keys.
The network of facilities a tier gives access to.
Hide child attributes
Hide child attributes
The provider's own name for this tier's network.
"Network 3"
How many facilities are in it, included or by referral.
907
The facilities by type.
Hide child attributes
Hide child attributes
137
7
591
39
133
The Networks API call that lists the facilities, or null when we hold no list for this provider yet.
"https://api.yasmina.ai/api/v1/medical/products/networks?insurance_provider=tawuniya&category=basic"