Build it with AI — an AI coding assistant can scaffold this entire integration for you straight from these docs. See Build with AI to get started.
Introduction
This guide introduces Yasmina’s Comprehensive Motor Insurance APIs for Multiple Insurance Providers (for the single-provider version, click here). These APIs enable you to retrieve quotes from several insurance companies before issuing a policy to your customer. The guide covers all key operations, including requesting quotes, issuing and managing policies, generating payment links, and handling claims. Our APIs are built on RESTful principles and follow consistent input and output structures, making them simple to integrate, test, and maintain within your systemsWhat you will learn
- Request OTPs
- Requesting and managing quotes
- Best practices and branding guidelines
- Uploading vehicle photos
- Issuing and managing policies
Prerequisites
- Account in Yasmina - See the Onboarding section for details. You need to add “Comprehensive Motor Insurance (Multiple Providers)” in the products field.
- Authenticated Token - You can follow the Authentication guide or head straight to the Generate Token API.
- Backend server - Required to securely call Yasmina APIs.
Quotes
Quotes represent the different premiums, benefits, and deductibles offered by insurance providers. Before issuing a Comprehensive Motor Insurance policy, you need to provide the car details to retrieve quotes from various insurance providers. These quotes are then used when issuing the policy.OTP for quotations
Before requesting quotations, we need to verify the Phone number of the customer through an OTP. You can do that using the Quote OTP API You need to provide the following properties for the Quote OTP API:
Example Payload
204 No Content.
This quote OTP remains valid for 8 hours and can be reused for multiple quote
requests during that period. You do not need to request a new quote OTP before
every quotation.
The response includes:
X-OTP-Expires-In: Remaining validity in secondsX-OTP-Expires-At: Exact expiry time in ISO 8601 format
Requesting a new quote OTP invalidates the previously issued quote OTP. After
8 hours, request a new OTP before submitting another quote request.
Request Quotes
In order to provide quotes for your customer you need to execute the Request Quotes API. This API provides an array response from different insurance providers. Each item in this array, represents the name of the company, the logo, the different premiums and deductibles, and also the list of benefits (both free and paid).The Request Quotes API may take longer to respond because it retrieves results
from multiple insurance providers. Be sure to increase your timeout to at
least 2 minutes before making the request.
Customs card vehicle lookup
If your customer identifies vehicles only by customs card number, collect the provider-compatible maker, model, and body-type codes before requesting a quote. Do not send codes from your own vehicle catalogue. All three lookup endpoints support an optionalq query parameter. It searches
English and Arabic names without case sensitivity. A complete numeric value
searches by exact code. The maximum search length is 100 characters.
1. Search vehicle makers
2. Search models for the selected maker
maker_code is required. The returned model codes belong only to that maker.
3. Search vehicle body types
For a customs card quote, send
custom_number, maker_code, model_code,
and body_type_code. Omit car_sequence_number. Yasmina registers the
imported vehicle with the insurance platform before requesting quotations.
If the vehicle is already registered, the quotation continues normally.Drivers Array
When providing drivers, each driver object must include the following fields:When drivers are provided, the vehicle owner must be included among the
drivers.
Explaining the Quotes Request response
The ID value represents Yasmina’s unique identifier for this quote request. You will later need to provide in the Issue policy API asquote_id
The Quote reference ID must also be provided to the Issue Policy API as quote_reference_id. Each insurance provider has its own quote_reference_id.
Each insurance provider gives a prices array. This represents different pricing options. Each has its own deductible and total. You will need to provide quote_price_id when issuing a policy.
Finally we have the benefits array. We have two types. Some require an additional price and are optional (amount > 0), while others are considered free and are automatically added (amount = 0).
For those that have a price, you need to provide the quote_benefit_id in the benefits array in the Issue Policy API.
Arabic localisation fields
Each quote object includes Arabic counterparts for the fields that typically appear in the UI. Use these when rendering an Arabic experience:insurance_type and type are normalised category values used internally for filtering (TPL, TPL +, Comprehensive) and do not have Arabic equivalents — use insurance_type_display_ar for display purposes.
List Quotes Requests
You can list a paginated list of all the quote requests that your account has generated. In order to do so, you can use the List quote requests API You can filter these by usingowner_id in the query string. This may be useful in case your customer navigated from one page to another and you need to show the quote requests again (rather than making a new request)
Example:
GET /car-api-reference/quotes/list-quotes?page=2&per_page=1&owner_id=1234567890
Delete Quotes Requests
You can delete some of the requests from the system using the Delete Quotes Requests API. This is rarely used, but may be helpful if you’d like to reduce the items listed.Best practices and branding guidelines
Show a provider attribution alongside every set of quotes — naming the licensed insurance broker behind the offers and its Insurance Authority licence — together with the support routes a customer can use if they need help. This is expected of every integration. Rather than hard-coding the wording, fetch it from the Guideline Texts API. English and Arabic come back together, so a bilingual page needs one request — and when the wording changes, it reaches you without an integration change.
Rendered, the attribution reads “Quotes are provided through Shahin · Under
supervision of the Insurance Authority, license و س ط/No. 20158/82”, with
brand
linking to brand_url. The FAQ is optional but recommended — it answers the questions
buyers raise most often before choosing a policy.
The licence number and the toll-free number are the same in both locales. Wrap
them in
<bdi> so they are not reordered when the page is rendered right-to-left.Vehicle photos
If the customer has selected a comprehensive policy, upload the five photos before you issue the policy — front, back, right, left, and the chassis (VIN) number. Use the Upload Vehicle Photos API, against the quote request and the price the customer selected. See Best practices and branding guidelines for what to show alongside the quotes. Example of a requestRules
- All five together. A partial upload is rejected with a
422. - JPG or PNG, up to 3 MB each. Other formats and anything larger are rejected.
- Once per vehicle. The insurance provider keeps the first set it accepts; a second
upload comes back as a
409. Check the photos before sending them. - Comprehensive only. A
quote_price_idbelonging to a TPL quote is rejected.
Issuing policies
Issue Policy OTP
When a customer selects a quotation, they need to go through another OTP check. This time you need to request it through the Issue OTP API The Issue Policy OTP requires the following fields: The three quote identifiers must come from the response returned by the earlierPOST /quote-requests call. Use the provider quote and price selected by the
customer from that same response.
Example request:
204 No Content on success. This OTP is valid for 15 minutes and must be
supplied to the Issue Policy API within that period. If it expires, request a
new issuance OTP before issuing the policy.
Issuing a policy
In order to Issue a policy. You can head to the Issue Policy API Use the same three identifiers previously sent to the Issue Policy OTP API. They must all come from the earlierPOST /quote-requests response and represent
one consistent customer selection.
Example of a request
201 HTTP response code. Here is an example of the Policy object.
Payment and Policy activation
When you first make a request to the Issue Policy API. The Policy is not yet activated and thestatus is 0 (which means pending).
Also the provider_policy and provider_policy_id will both be null.
In order for the policy to be activated, the customer needs to make the purchase from the payment link. Once the customer successfully pays. The policy will be activated and the status becomes 1.
Although the payment page is provided by Yasmina, it does not display the
Yasmina logo or have any mention of Yasmina.
Yasmina does not receive credit card information, instead the payment page sends card information directly to the payment vendor.
Yasmina does not receive credit card information, instead the payment page sends card information directly to the payment vendor.
Redirect URL
You can supply the payload aredirect_url. This is used to redirect the customer to any page or deep link you need. You can also include a query string with policyID and it will automatically replace it with the actual id of the policy object.
Example for policy id 123
Showing a policy
In order to get a status of a policy, you can use the Show Policy API. This API, takes a Yasmina Policyid and will return the policy object
This API is ideal when you want to re-fetch a specific policy after the PDF gets generated.
Example of a request

