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

> For issuing a new policy



## OpenAPI

````yaml /cartpl-api-reference/openapi.json post /car/policies
openapi: 3.0.1
info:
  title: OpenAPI For Motor Insurance
  description: API's that you need to use to issue insurance policies to your clients
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://sandbox.yasmina.ai/api/v1
    description: Sandbox
  - url: https://production.yasmina.ai/api/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /car/policies:
    post:
      tags:
        - Policies
      summary: Issue policy
      description: For issuing a new policy
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                vin:
                  type: string
                car_sequence_number:
                  type: string
                current_car_owner:
                  description: The nationality ID of the current owner
                  type: string
                new_owner_id:
                  description: The Nationality ID of the new owner
                  type: string
                extra_fields:
                  type: object
                  description: >-
                    Optional free-form object with additional fields. Total
                    JSON-encoded size must not exceed 255 characters.
                  additionalProperties: true
                  example:
                    some_key: some value
                    another_key: 123
              required:
                - vin
                - car_sequence_number
                - current_car_owner
                - new_owner_id
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Policy'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: Problem in the values that you submitted
          content:
            application/json:
              schema:
                type: object
                example:
                  code: '42201'
                  message: The vin must be 17 characters. (and 3 more errors)
                  details:
                    vin:
                      - The vin must be 17 characters.
                    car_sequence_number:
                      - The car sequence number must be 9 digits.
                    new_owner_id:
                      - The new owner id must be 10 digits.
                    current_car_owner:
                      - The current owner id field cannot be empty.
components:
  schemas:
    Policy:
      type: object
      properties:
        id:
          type: integer
        meta_data:
          type: object
        start_date:
          type: string
        provider_policy_id:
          type: integer
        provider_policy:
          type: string
        order_status:
          type: integer
        approval_status:
          type: integer
        end_date:
          type: string
        is_claimed:
          type: boolean
        created_at:
          type: string
        updated_at:
          type: string
        client_id:
          type: string
        canceled_at:
          type: string
          nullable: true
        invoice:
          type: string
        cancellation_document:
          type: string
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: '40101'
              message:
                type: string
                example: Unauthenticated
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````