> ## 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.

# Save the employees

> Replaces the company's employee list with the one given: who is covered, their dependents, and the tier each has picked (`basic`, `standard`, `premium` or `executive`). Nothing is priced here; see Get prices from every provider.



## OpenAPI

````yaml /medical-api-reference/openapi.json put /companies/{companyId}/employees
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:
  /companies/{companyId}/employees:
    put:
      tags:
        - Employees
      summary: Save the employees
      description: >-
        Replaces the company's employee list with the one given: who is covered,
        their dependents, and the tier each has picked (`basic`, `standard`,
        `premium` or `executive`). Nothing is priced here; see Get prices from
        every provider.
      parameters:
        - required: true
          name: companyId
          in: path
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - employees
              properties:
                employees:
                  type: array
                  minItems: 1
                  items:
                    $ref: '#/components/schemas/Insured'
      responses:
        '200':
          description: The saved list
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
components:
  schemas:
    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.
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: '40101'
              message:
                type: string
                example: Unauthenticated
    UnprocessableEntity:
      description: Unprocessable Entity
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````