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

# Issue policy

> Issue a Life S&P policy based on a selected offer.



## OpenAPI

````yaml /life-snp/openapi.json post /policies
openapi: 3.0.1
info:
  title: OpenAPI For Life Savings & Protection (Bank)
  description: >-
    APIs used by a bank channel to quote, issue, cancel, and claim on Life
    Savings & Protection policies.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://sandbox.yasmina.ai/api/v1/life-snp
  - url: https://production.yasmina.ai/api/v1/life-snp
security:
  - bearerAuth: []
paths:
  /policies:
    post:
      tags:
        - Policies
      summary: Issue policy
      description: Issue a Life S&P policy based on a selected offer.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                offer_id:
                  type: string
                  description: Offer identifier returned by /offers.
                applicant_id:
                  type: string
                  pattern: ^\d{10}$
                date_of_birth:
                  type: string
                  format: date
                gender:
                  type: string
                  enum:
                    - male
                    - female
                smoker:
                  type: boolean
                policy_term_years:
                  type: integer
                  minimum: 5
                  maximum: 40
                premium_frequency:
                  type: string
                  enum:
                    - monthly
                    - quarterly
                    - semi_annual
                    - annual
                sum_assured:
                  type: number
                  minimum: 10000
                agreed_premium:
                  type: number
                  minimum: 50
                start_date:
                  type: string
                  format: date
                iban:
                  type: string
                  description: Customer bank IBAN for premium collection.
                  example: SA0380000000608010167519
                beneficiaries:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      national_id:
                        type: string
                        pattern: ^\d{10}$
                      relationship:
                        type: string
                        enum:
                          - spouse
                          - child
                          - parent
                          - sibling
                          - other
                      share_percentage:
                        type: number
                        minimum: 0
                        maximum: 100
                    required:
                      - name
                      - national_id
                      - relationship
                      - share_percentage
                consent:
                  type: boolean
                  description: Customer consents to policy issuance and bank auto-debit.
                extra_fields:
                  type: object
                  description: Optional key-value extras (max JSON-encoded size 255 chars).
                  additionalProperties: true
              required:
                - offer_id
                - applicant_id
                - date_of_birth
                - gender
                - smoker
                - policy_term_years
                - premium_frequency
                - agreed_premium
                - start_date
                - beneficiaries
                - consent
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Policy'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
components:
  schemas:
    Policy:
      type: object
      properties:
        id:
          type: integer
        client_id:
          type: string
        provider_policy_id:
          type: integer
        provider_policy:
          type: string
        start_date:
          type: string
        end_date:
          type: string
        policy_term_years:
          type: integer
        sum_assured:
          type: number
        premium_amount:
          type: number
        premium_frequency:
          type: string
        approval_status:
          type: integer
        order_status:
          type: integer
        status:
          type: string
          example: active
        beneficiaries:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              national_id:
                type: string
              relationship:
                type: string
              share_percentage:
                type: number
        iban_masked:
          type: string
          example: SA03*****************519
        is_claimed:
          type: boolean
        canceled_at:
          type: string
          nullable: true
        invoice:
          type: string
        cancellation_document:
          type: string
        meta_data:
          type: object
        created_at:
          type: string
        updated_at:
          type: string
    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

````