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
- 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
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.
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.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:
Example request:
204 - No Content on success.
The OTP must be supplied to the Issue Policy API
Issuing a policy
In order to Issue a policy. You can head to the Issue Policy API You need to use the fields that were retrieved in the Request Quotes API.
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

