POST
/
quote-requests
Request quotes
curl --request POST \
  --url https://staging.yasmina.ai/api/v1/car-comp/quote-requests \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_id": "<string>",
  "phone": "<string>",
  "birthdate": "2023-12-25",
  "car_sequence_number": "<string>",
  "car_estimated_cost": 123
}'
{
  "owner_id": 123,
  "phone": "<string>",
  "birthdate": "2023-12-25",
  "car_sequence_number": 123,
  "is_ownership_transfer": true,
  "car_estimated_cost": 123,
  "car_model_year": 123,
  "quotes": [
    {
      "company_name": "<string>",
      "prices": [
        {
          "quote_price_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "deductible": 123,
          "subtotal": 123,
          "vat_percentage": 15,
          "vat": 123,
          "total": 123
        }
      ],
      "benefits": [
        {
          "quote_benefit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "id": "<string>",
          "name": "<string>",
          "amount": 123,
          "vat": 123,
          "url": "<string>"
        }
      ]
    }
  ],
  "client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updated_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "id": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
owner_id
string
required

Owner ID must be 10 digits starting with 1, 2, or 7

phone
string
required

Phone number must start with 05 and be 10 digits

birthdate
string<date>
required

Birthdate in YYYY-MM-DD format

car_sequence_number
string
required

Car sequence number must be 8 or 9 digits

car_estimated_cost
number
required

Estimated cost of the car

is_ownership_transfer
boolean
default:false

Indicates if the ownership is being transferred

current_car_owner_id
string

Required if is_ownership_transfer is true; 10 digits starting with 1,2,7

car_model_year
integer

Car model year between 1950 and next year

Required range: 1950 <= x <= 2026

Response

Insurance quote details

owner_id
integer

The owner’s national ID or Iqama ID

phone
string

The owner's phone number

birthdate
string<date>

The owner's birthdate. Hijri for Saudi nationals, Gregorian for others

car_sequence_number
integer

The car sequence number from 9 digits

is_ownership_transfer
boolean

Whether it was a car transfer or not

car_estimated_cost
number

The estimated cost of the car

car_model_year
integer

The car model year

quotes
object[]

An array representing each insurance company quote. Each item has the company name, the prices, and the benefits.

client_id
string<uuid>

Your own client ID

updated_at
string<date-time>

In case of an update on this quote, this date will change

created_at
string<date-time>

When was the quote requested

id
integer

Yasmina ID for the quote. You can use it to delete items or showing it again to the customer