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

# Purchase



## OpenAPI

````yaml /yasmina-schengen-travel-insurance/openapi.json post /policies
openapi: 3.0.1
info:
  title: Schengen Travel Insurance
  version: 1.0.0
servers:
  - url: https://sandbox.yasmina.ai/api/v1/yasmina-schengen-travel
  - url: https://production.yasmina.ai/api/v1/yasmina-schengen-travel
security:
  - Oauth2: []
paths:
  /policies:
    post:
      tags:
        - Policies
      summary: Purchase
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
            default: application/json
          example: application/json
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                quote_id:
                  type: string
                  example: Q-L5ELL0WU
                redirect_url:
                  type: string
                  format: uri
                  minLength: 1
                  description: >-
                    Optional URL to redirect the customer after completing
                    payment. If provided, it must not be empty.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Policy'
      security:
        - bearerAuth: []
components:
  schemas:
    Policy:
      type: object
      required:
        - id
        - meta_data
        - product_id
        - client_id
        - pdf_parsed
        - has_sent_cancellation_email
        - created_at
        - updated_at
        - status
        - is_old_policy
        - payment_link
        - price
      properties:
        id:
          type: integer
          example: 936
        meta_data:
          $ref: '#/components/schemas/PolicyMetaData'
        product_id:
          type: integer
          example: 8
        client_id:
          type: string
          format: uuid
          example: a0fd456b-853d-4511-b80f-2bfdb0e66303
        canceled_at:
          type: string
          format: date-time
          nullable: true
        provider_policy_id:
          type: string
          nullable: true
        provider_policy:
          type: object
          nullable: true
          additionalProperties: true
        start_date:
          type: string
          format: date
          nullable: true
        pdf_parsed:
          type: integer
          example: 0
        cancellation_document:
          type: string
          nullable: true
        invoice:
          type: object
          nullable: true
          additionalProperties: true
        has_sent_cancellation_email:
          type: integer
          example: 0
        created_at:
          type: string
          format: date-time
          example: '2026-02-03T07:12:45.000000Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-02-03T07:12:45.000000Z'
        status:
          type: integer
          example: 0
        transfer_date_at:
          type: string
          format: date-time
          nullable: true
        cancellation_request_at:
          type: string
          format: date-time
          nullable: true
        deleted_at:
          type: string
          format: date-time
          nullable: true
        is_old_policy:
          type: integer
          example: 0
        payment_link:
          type: string
          format: uri
          example: https://sandbox.yasmina.ai/short/4OrJN
        price:
          type: number
          example: 92
        insurance_company_id:
          type: integer
          nullable: true
        redirect_url:
          type: string
          format: uri
          nullable: true
        hidden_meta_data:
          type: object
          nullable: true
          additionalProperties: true
        uploaded_at:
          type: string
          format: date-time
          nullable: true
        policy_url:
          type: string
          format: uri
          nullable: true
        invoice_url:
          type: string
          format: uri
          nullable: true
    PolicyMetaData:
      type: object
      required:
        - bill
        - email
        - price
        - duration
        - quote_id
        - start_date
        - travellers
        - multi_entry
        - phone_number
        - date_of_birth
        - nationality_id
      properties:
        bill:
          $ref: '#/components/schemas/Bill'
        email:
          type: string
          format: email
          example: someone@example.com
        price:
          type: number
          example: 92
        duration:
          type: integer
          example: 10
        quote_id:
          type: integer
          example: 1
        start_date:
          type: string
          format: date
          example: '2026-02-27'
        travellers:
          type: array
          items:
            $ref: '#/components/schemas/Traveller'
        multi_entry:
          type: boolean
          example: false
        phone_number:
          type: string
          example: '+966501234567'
        date_of_birth:
          type: string
          format: date
          example: '1988-04-20'
        nationality_id:
          type: string
          example: '1234567890'
    Bill:
      type: object
      required:
        - items
        - adminFees
      properties:
        items:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/BillItem'
        adminFees:
          type: number
          example: 25
    Traveller:
      type: object
      required:
        - gender
        - relation
        - full_name
        - nationality
        - date_of_birth
        - passport_number
        - passport_expiry_date
      properties:
        gender:
          type: string
          enum:
            - m
            - f
          example: m
        relation:
          type: string
          example: self
        full_name:
          type: string
          example: Yasmina Alex
        nationality:
          type: string
          example: SA
        date_of_birth:
          type: string
          format: date
          example: '1982-04-20'
        passport_number:
          type: string
          example: G12345678
        passport_expiry_date:
          type: string
          format: date
          example: '2026-10-30'
    BillItem:
      type: object
      required:
        - count
        - price
        - total
      properties:
        count:
          type: integer
          example: 1
        price:
          type: number
          example: 55
        total:
          type: number
          example: 55
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````