Send a verification code
curl --request POST \
--url https://production.yasmina.ai/api/v1/medical/quote-otp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"phone": "0512345678",
"sponsor_number": "1000000001"
}
'import requests
url = "https://production.yasmina.ai/api/v1/medical/quote-otp"
payload = {
"email": "[email protected]",
"phone": "0512345678",
"sponsor_number": "1000000001"
}
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({email: '[email protected]', phone: '0512345678', sponsor_number: '1000000001'})
};
fetch('https://production.yasmina.ai/api/v1/medical/quote-otp', 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-otp",
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([
'email' => '[email protected]',
'phone' => '0512345678',
'sponsor_number' => '1000000001'
]),
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://production.yasmina.ai/api/v1/medical/quote-otp"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"phone\": \"0512345678\",\n \"sponsor_number\": \"1000000001\"\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://production.yasmina.ai/api/v1/medical/quote-otp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"phone\": \"0512345678\",\n \"sponsor_number\": \"1000000001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.yasmina.ai/api/v1/medical/quote-otp")
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 \"email\": \"[email protected]\",\n \"phone\": \"0512345678\",\n \"sponsor_number\": \"1000000001\"\n}"
response = http.request(request)
puts response.read_body{
"code": "40101",
"message": "Unauthenticated"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "42902",
"message": "Verification code was requested recently, try again in 2:41.",
"retry_after_seconds": 161
}{
"code": "50302",
"message": "The verification code could not be sent. Please try again in a moment."
}Send a verification code
Sends the company a 4-digit verification code by SMS, to send with Get prices from every provider as otp. The code is optional on pricing for now. Send the company’s own sponsor_number: pricing checks the code against the latest one sent for that sponsor number. A code stays valid for the time in X-OTP-Expires-In (8 hours) and can price the company again within it; three wrong codes lock it until a new one is sent. One code per phone every three minutes.
POST
/
quote-otp
Send a verification code
curl --request POST \
--url https://production.yasmina.ai/api/v1/medical/quote-otp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"phone": "0512345678",
"sponsor_number": "1000000001"
}
'import requests
url = "https://production.yasmina.ai/api/v1/medical/quote-otp"
payload = {
"email": "[email protected]",
"phone": "0512345678",
"sponsor_number": "1000000001"
}
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({email: '[email protected]', phone: '0512345678', sponsor_number: '1000000001'})
};
fetch('https://production.yasmina.ai/api/v1/medical/quote-otp', 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-otp",
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([
'email' => '[email protected]',
'phone' => '0512345678',
'sponsor_number' => '1000000001'
]),
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://production.yasmina.ai/api/v1/medical/quote-otp"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"phone\": \"0512345678\",\n \"sponsor_number\": \"1000000001\"\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://production.yasmina.ai/api/v1/medical/quote-otp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"phone\": \"0512345678\",\n \"sponsor_number\": \"1000000001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.yasmina.ai/api/v1/medical/quote-otp")
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 \"email\": \"[email protected]\",\n \"phone\": \"0512345678\",\n \"sponsor_number\": \"1000000001\"\n}"
response = http.request(request)
puts response.read_body{
"code": "40101",
"message": "Unauthenticated"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "42902",
"message": "Verification code was requested recently, try again in 2:41.",
"retry_after_seconds": 161
}{
"code": "50302",
"message": "The verification code could not be sent. Please try again in a moment."
}Authorizations
Body
application/json
Example:
Response
The code was sent
⌘I