Skip to main content

Introduction

This guide describes the Property Insurance APIs available on Yasmina’s platform. These APIs cover the core operations required for property insurance. This includes issuing and managing policies, generating payment links, and handling claims. Our APIs follow the RESTful standard and are structured to provide consistent inputs and outputs, making them straightforward to integrate, test, and maintain within your systems.

What you will learn

  • Issuing policies
  • Uploading images for your insured property
  • Starting a claim

Prerequisites

  1. Account in Yasmina - See the Onboarding section for details.
  2. Authenticated Token - Follow the Authentication guide to generate one.
  3. Backend server - Required to securely call Yasmina APIs.

Issue policies

To issue policies, use the Issue Policies API. The following fields are required when creating a Property Insurance request. All requests must conform to these validation rules.
FieldTypeRulesDescription
personal_detailsobjectrequiredContains personal information of the policyholder.
personal_details.namestringrequired, max:255Full name of the policyholder.
personal_details.genderstringrequired, in: M, FGender of the policyholder.
personal_details.emailstringrequired, max:255Email address of the policyholder.
personal_details.phone_numberstringrequired, regex: /^\+\d{10,15}$/Phone number in international format (e.g., +966512345678).
personal_details.birthdatedaterequiredDate of birth (ISO 8601 format recommended, e.g., 1990-05-20).
personal_details.nationalitystringrequired, in: list of supported countriesCountry code of nationality (must match supported country codes).
personal_details.nationality_idstringrequired, max:20National ID, Iqama, or passport number.
building_detailsobjectrequiredDetails of the insured building.
building_details.building_ageintegerrequired, min:0Age of the building in years.
building_details.building_typestringrequired, in: apartment, villa, private_accommodationType of property.
building_details.apartment_sizeintegerrequired, min:0Size of apartment in square meters (if applicable).
addressobjectrequiredFull address of the property.
address.street_namestringrequired, max:255Street name of the property.
address.building_numberstringrequired, max:50Building number.
address.district_namestringrequired, max:255District/area name.
address.city_namestringrequired, in: availableCities configCity name (must match Yasmina’s supported cities list).
address.additional_numberstringrequired, max:20Additional number (Saudi address standard).
address.zip_codestringrequired, max:20Zip/postal code.
address.unit_numberstringrequired, max:20Unit/flat number.
property_costnumericnullable, required_without: contents_costEstimated value of the building/property. Required if contents_cost is not provided.
contents_costnumericnullable, required_without: property_costEstimated value of the home contents. Required if property_cost is not provided.
has_agreed_to_terms_and_conditionsbooleanaccepted (true, 1, yes)Must explicitly confirm acceptance of terms and conditions.

Understanding Payment and Policy activation

When you first make a request to the Issue Policy API. The Policy is not yet activated and the status 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.
On Staging and Sandbox, you can use a testing card with the following information:
Card number: 4111 1111 1111 1111
Expiry: 02/27
CVV: 123
Card owner: Yasmina test

Upload Images

Supporting documents are required from your clients. These can include home photos, images of valuable contents, or surrounding areas. You can upload these documents using the Upload Document API