Purchase
curl --request POST \
--url https://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quote_id": "Q-L5ELL0WU",
"redirect_url": "<string>"
}
'import requests
url = "https://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/policies"
payload = {
"quote_id": "Q-L5ELL0WU",
"redirect_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({quote_id: 'Q-L5ELL0WU', redirect_url: '<string>'})
};
fetch('https://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/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://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/policies",
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([
'quote_id' => 'Q-L5ELL0WU',
'redirect_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/policies"
payload := strings.NewReader("{\n \"quote_id\": \"Q-L5ELL0WU\",\n \"redirect_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"Q-L5ELL0WU\",\n \"redirect_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote_id\": \"Q-L5ELL0WU\",\n \"redirect_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 936,
"meta_data": {
"bill": {
"items": {},
"adminFees": 25
},
"email": "[email protected]",
"price": 92,
"duration": 10,
"quote_id": 1,
"start_date": "2026-02-27",
"travellers": [
{
"gender": "m",
"relation": "self",
"full_name": "Yasmina Alex",
"nationality": "SA",
"date_of_birth": "1982-04-20",
"passport_number": "G12345678",
"passport_expiry_date": "2026-10-30"
}
],
"multi_entry": false,
"phone_number": "+966501234567",
"date_of_birth": "1988-04-20",
"nationality_id": "1234567890"
},
"product_id": 8,
"client_id": "a0fd456b-853d-4511-b80f-2bfdb0e66303",
"pdf_parsed": 0,
"has_sent_cancellation_email": 0,
"created_at": "2026-02-03T07:12:45.000000Z",
"updated_at": "2026-02-03T07:12:45.000000Z",
"status": 0,
"is_old_policy": 0,
"payment_link": "https://sandbox.yasmina.ai/short/4OrJN",
"price": 92,
"canceled_at": "2023-11-07T05:31:56Z",
"provider_policy_id": "<string>",
"provider_policy": {},
"start_date": "2023-12-25",
"cancellation_document": "<string>",
"invoice": {},
"transfer_date_at": "2023-11-07T05:31:56Z",
"cancellation_request_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"insurance_company_id": 123,
"redirect_url": "<string>",
"hidden_meta_data": {},
"uploaded_at": "2023-11-07T05:31:56Z",
"policy_url": "<string>",
"invoice_url": "<string>"
}Purchase
POST
/
policies
Purchase
curl --request POST \
--url https://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quote_id": "Q-L5ELL0WU",
"redirect_url": "<string>"
}
'import requests
url = "https://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/policies"
payload = {
"quote_id": "Q-L5ELL0WU",
"redirect_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({quote_id: 'Q-L5ELL0WU', redirect_url: '<string>'})
};
fetch('https://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/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://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/policies",
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([
'quote_id' => 'Q-L5ELL0WU',
'redirect_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/policies"
payload := strings.NewReader("{\n \"quote_id\": \"Q-L5ELL0WU\",\n \"redirect_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"Q-L5ELL0WU\",\n \"redirect_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel/policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote_id\": \"Q-L5ELL0WU\",\n \"redirect_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 936,
"meta_data": {
"bill": {
"items": {},
"adminFees": 25
},
"email": "[email protected]",
"price": 92,
"duration": 10,
"quote_id": 1,
"start_date": "2026-02-27",
"travellers": [
{
"gender": "m",
"relation": "self",
"full_name": "Yasmina Alex",
"nationality": "SA",
"date_of_birth": "1982-04-20",
"passport_number": "G12345678",
"passport_expiry_date": "2026-10-30"
}
],
"multi_entry": false,
"phone_number": "+966501234567",
"date_of_birth": "1988-04-20",
"nationality_id": "1234567890"
},
"product_id": 8,
"client_id": "a0fd456b-853d-4511-b80f-2bfdb0e66303",
"pdf_parsed": 0,
"has_sent_cancellation_email": 0,
"created_at": "2026-02-03T07:12:45.000000Z",
"updated_at": "2026-02-03T07:12:45.000000Z",
"status": 0,
"is_old_policy": 0,
"payment_link": "https://sandbox.yasmina.ai/short/4OrJN",
"price": 92,
"canceled_at": "2023-11-07T05:31:56Z",
"provider_policy_id": "<string>",
"provider_policy": {},
"start_date": "2023-12-25",
"cancellation_document": "<string>",
"invoice": {},
"transfer_date_at": "2023-11-07T05:31:56Z",
"cancellation_request_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"insurance_company_id": 123,
"redirect_url": "<string>",
"hidden_meta_data": {},
"uploaded_at": "2023-11-07T05:31:56Z",
"policy_url": "<string>",
"invoice_url": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
application/json
Response
200 - application/json
Successful response
Example:
936
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Example:
25
Example:
Example:
92
Example:
10
Example:
1
Example:
"2026-02-27"
Hide child attributes
Hide child attributes
Available options:
m, f Example:
"m"
Example:
"self"
Example:
"Yasmina Alex"
Example:
"SA"
Example:
"1982-04-20"
Example:
"G12345678"
Example:
"2026-10-30"
Example:
false
Example:
"+966501234567"
Example:
"1988-04-20"
Example:
"1234567890"
Example:
8
Example:
"a0fd456b-853d-4511-b80f-2bfdb0e66303"
Example:
0
Example:
0
Example:
"2026-02-03T07:12:45.000000Z"
Example:
"2026-02-03T07:12:45.000000Z"
Example:
0
Example:
0
Example:
"https://sandbox.yasmina.ai/short/4OrJN"
Example:
92
⌘I

