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

# Add employees

> Adds the people on the company employee list who are not on this paid policy yet: new employees with their dependents, and new dependents of employees already covered. Everyone joining must have declared first. They are priced by the insurer of the policy for the days from today to the last day of the policy, and the response carries a payment link. Once paid they join this same policy. Calling again before payment replaces the unpaid addition. Removals are not supported yet.



## OpenAPI

````yaml /medical-api-reference/openapi.json post /policies/{policyId}/additions
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}/additions:
    post:
      tags:
        - Policies
      summary: Add employees
      description: >-
        Adds the people on the company employee list who are not on this paid
        policy yet: new employees with their dependents, and new dependents of
        employees already covered. Everyone joining must have declared first.
        They are priced by the insurer of the policy for the days from today to
        the last day of the policy, and the response carries a payment link.
        Once paid they join this same policy. Calling again before payment
        replaces the unpaid addition. Removals are not supported yet.
      parameters:
        - name: policyId
          required: true
          description: The id of the paid policy
          in: path
          schema:
            type: integer
      responses:
        '201':
          description: The addition, waiting to be paid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MedicalAddition'
        '400':
          description: >-
            `40023` when someone joining has not declared yet (employee_ids
            lists them), `40024` when the policy would pass 250 employees,
            `40027` when the policy is unpaid, cancelled or expired, `40028`
            when nobody on the list is new.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: '40023'
                message: >-
                  Everyone joining the policy has to declare their medical
                  history first. Still to declare: Sam New, Sara New.
                employee_ids:
                  - '1333333333'
                  - '1333333334'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    MedicalAddition:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - pending
            - paid
        insurance_provider:
          type: string
          description: The insurer of the policy, which prices the addition
        starts_on:
          type: string
          format: date
          description: >-
            The first day the new people are covered: the day the addition was
            priced
        ends_on:
          type: string
          format: date
          description: The last day of the policy
        days:
          type: integer
          description: Days from starts_on to ends_on, both included
        members:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              identifier:
                type: string
                description: National id or iqama
              type:
                type: string
                enum:
                  - employee
                  - dependent
              category:
                type: string
                description: >-
                  The tier. A dependent is covered under the tier of the
                  employee they are listed beneath
              price:
                type: number
                description: >-
                  What this person costs for the days covered. Dependents are
                  not charged separately
          description: >-
            Everyone joining: new employees, their dependents, and new
            dependents of employees already covered
        total_price:
          type: number
        currency:
          type: string
          example: SAR
        payment_link:
          type: string
          nullable: true
          description: Where the company pays for the addition. Null once it is paid
        created_at:
          type: string
          format: date-time
        paid_at:
          type: string
          format: date-time
          nullable: true
    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
    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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.