> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unyte.africa/llms.txt
> Use this file to discover all available pages before exploring further.

# Capture a new purchase intent for an insurance policy

> Create a new pre-purchase intent for a selected insurance quote.

This endpoint allows customers to create a new quote intent, which is a record
of their interest in purchasing an insurance policy. The intent includes details
such as the quote code, customer ID, and other relevant information.



## OpenAPI

````yaml post /api/v1/quotes/{quote_code}/intent/capture/
openapi: 3.0.3
info:
  title: Superpool API
  version: 2.0.0
  description: >-
    Insurance infrastructure for Financial Institutions, Insurers, and
    Insurtechs
  contact:
    name: Unyte Africa LTD.
    url: https://ng.unyte.africa
    email: tech@unyte.com
servers: []
security: []
paths:
  /api/v1/quotes/{quote_code}/intent/capture/:
    post:
      tags:
        - Quotes
      summary: Capture a new purchase intent for an insurance policy
      description: >-
        Create a new pre-purchase intent for a selected insurance quote.


        This endpoint allows customers to create a new quote intent, which is a
        record

        of their interest in purchasing an insurance policy. The intent includes
        details

        such as the quote code, customer ID, and other relevant information.
      operationId: create-quote-intent
      parameters:
        - in: header
          name: U-Request-Id
          schema:
            type: string
          description: Idempotency key to enforce idempotent processing of POST requests
        - in: path
          name: quote_code
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteIntent'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/QuoteIntent'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/QuoteIntent'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteIntentResponse'
          description: Quote Intent created successfully
        '400':
          description: 'Bad Request: Invalid or Missing data'
        '500':
          description: >-
            Internal Server Error: An error occurred while processing the
            request
      security:
        - ClientKeyAuth: []
components:
  schemas:
    QuoteIntent:
      type: object
      properties:
        tenure:
          type: integer
          writeOnly: true
          description: Selected tenure in years
        customer_metadata:
          allOf:
            - $ref: '#/components/schemas/CustomerDetails'
          writeOnly: true
      required:
        - customer_metadata
        - tenure
    QuoteIntentResponse:
      type: object
      properties:
        intent_id:
          type: string
        quote_code:
          type: string
          readOnly: true
        product:
          type: string
          readOnly: true
          description: Name of the insurance product
        selected_tenure:
          type: object
          additionalProperties: {}
          description: >-
            Returns the relevant tenure details (duration and premium) for the
            response
          readOnly: true
        total_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          readOnly: true
          description: Total amount to be paid
      required:
        - intent_id
        - product
        - quote_code
        - selected_tenure
        - total_amount
    CustomerDetails:
      type: object
      description: Captures essential personal information about the applicant
      properties:
        first_name:
          type: string
          maxLength: 100
        last_name:
          type: string
          maxLength: 100
        email:
          type: string
          format: email
        phone:
          type: string
          maxLength: 20
        residential_address:
          $ref: '#/components/schemas/ResidentialAddress'
        date_of_birth:
          type: string
          format: date
        customer_gender:
          allOf:
            - $ref: '#/components/schemas/CustomerGenderEnum'
          description: |-
            Biological inclination; Male (M) or Female (F)

            * `M` - Male
            * `F` - Female
        occupation:
          type: string
          maxLength: 80
        identity_card_img:
          type: string
          format: uri
        utility_bill_img:
          type: string
          format: uri
        identity_card_number:
          type: string
          maxLength: 28
        identity_card_type:
          $ref: '#/components/schemas/IdentityCardTypeEnum'
        identity_card_expiry_date:
          type: string
          format: date
      required:
        - email
        - first_name
        - identity_card_img
        - identity_card_number
        - identity_card_type
        - last_name
        - occupation
        - residential_address
        - utility_bill_img
    ResidentialAddress:
      type: object
      properties:
        city:
          type: string
          maxLength: 100
        address:
          type: string
          maxLength: 100
        state:
          type: string
          maxLength: 100
        country:
          type: string
          maxLength: 100
        street:
          type: string
          maxLength: 100
        house_number:
          type: string
          maxLength: 50
        postal_code:
          type: string
          maxLength: 20
      required:
        - city
        - country
        - postal_code
        - state
        - street
    CustomerGenderEnum:
      enum:
        - M
        - F
      type: string
      description: |-
        * `M` - Male
        * `F` - Female
    IdentityCardTypeEnum:
      enum:
        - driver_license
      type: string
      description: '* `driver_license` - Driver''s License'
  securitySchemes:
    ClientKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````