> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yasmina.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Read the policy

> One policy, with everything needed to take payment: its `price`, `pending_declarations` naming anyone who still has to declare, and `payment_link` once nobody does. The link is a fresh signed URL on every read, valid 15 minutes, and null while the policy cannot be paid for or once it is issued.



## OpenAPI

````yaml /medical-api-reference/openapi.json get /policies/{policyId}
openapi: 3.0.1
info:
  title: OpenAPI For SME Medical Insurance
  description: API's that you need to use to request insurance(s) for your clients
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://production.yasmina.ai/api/v1/medical
  - url: https://sandbox.yasmina.ai/api/v1/medical
security:
  - bearerAuth: []
paths:
  /policies/{policyId}:
    get:
      tags:
        - Policies
      summary: Read the policy
      description: >-
        One policy, with everything needed to take payment: its `price`,
        `pending_declarations` naming anyone who still has to declare, and
        `payment_link` once nobody does. The link is a fresh signed URL on every
        read, valid 15 minutes, and null while the policy cannot be paid for or
        once it is issued.
      parameters:
        - name: policyId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: The policy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MedicalPolicy'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    MedicalPolicy:
      type: object
      properties:
        id:
          type: integer
        status:
          type: integer
          description: 0 pending payment, 1 active, 2 cancelled.
        price:
          type: number
          description: The premium for everyone on the policy, for a year.
        pending_declarations:
          type: array
          items:
            type: string
          description: >-
            Employees who still have to declare their medical history. Empty
            once everyone has.
        payment_link:
          type: string
          nullable: true
          description: >-
            Where the company pays. A fresh signed link on every read, valid 15
            minutes. Null while anyone is in pending_declarations, and once the
            policy is issued.
        provider_policy_id:
          type: string
          nullable: true
          description: The insurer's policy number, once issued.
        policy_url:
          type: string
          nullable: true
          description: The policy schedule, once issued.
        redirect_url:
          type: string
          nullable: true
        meta_data:
          type: object
          properties:
            company_id:
              type: integer
            insurance_provider:
              type: string
            quote_request_id:
              type: string
              format: uuid
            quote_price_id:
              type: string
              format: uuid
            insured:
              type: array
              items:
                $ref: '#/components/schemas/Insured'
    Insured:
      type: object
      properties:
        name:
          type: string
        nationality_iso:
          type: string
        category:
          type: string
          enum:
            - basic
            - standard
            - premium
            - executive
          description: >-
            The tier this employee picked. Every provider sells all four, so the
            quote request can price it with each of them.
        nationality_id:
          type: string
          description: For Saudis. Exactly 10 digits.
          pattern: ^[0-9]{10}$
          example: '1111111111'
        iqama_id:
          type: string
          description: For non-Saudis. Exactly 10 digits.
          pattern: ^[0-9]{10}$
          example: '2222222222'
        mobile_number:
          type: string
          description: The employee's mobile number.
          example: '0500000001'
        dependents:
          type: array
          description: >-
            Family members covered under this employee's policy. They get the
            same provider and category as the employee. Optional; omit or send
            an empty array for an employee without dependents.
          items:
            $ref: '#/components/schemas/Dependent'
        date_of_birth:
          type: string
          description: >-
            Format YYYY-MM-DD. Saudi nationals whose national id starts with 1
            give the Hijri (Umm al-Qura) date printed on their id, for example
            1409-09-14; everyone else gives a Gregorian date. Employees must be
            between 18 and 110 years old.
      required:
        - name
        - nationality_iso
        - category
        - mobile_number
        - date_of_birth
    Dependent:
      type: object
      required:
        - name
        - relationship
        - nationality_iso
        - date_of_birth
      properties:
        name:
          type: string
        relationship:
          type: string
          enum:
            - spouse
            - child
            - parent
          description: How the dependent is related to the employee
        nationality_iso:
          type: string
          description: ISO 3166-1 alpha-2 country code
        nationality_id:
          type: string
          description: Required when nationality_iso is SA. Exactly 10 digits.
          pattern: ^[0-9]{10}$
          example: '1111111112'
        iqama_id:
          type: string
          description: Required when nationality_iso is not SA. Exactly 10 digits.
          pattern: ^[0-9]{10}$
          example: '2222222222'
        date_of_birth:
          type: string
          description: >-
            Format YYYY-MM-DD. Saudi nationals whose national id starts with 1
            give the Hijri (Umm al-Qura) date printed on their id, for example
            1409-09-14; everyone else gives a Gregorian date. A dependent can be
            any age up to 110.
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: '40101'
              message:
                type: string
                example: Unauthenticated
    NotFound:
      description: Record not found
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: '40401'
              message:
                type: string
                example: Not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````