openapi: 3.0.0
servers:
- url: https://api.playbox.grow.curacel.co/api
  description: Sandbox
- url: https://api.grow.curacel.co/api
  description: Production
info:
  version: 1.0.0
  title: Curacel Grow API Docs
  description: |
    # Introduction
    Curacel Grow is an embedded insurance that aims to drive insurance literacy and inclusion in Africa. This API allows developers, product owners, and business owners to tap into retail insurance by embedding insurance with their solutions, thereby offering customers tailored insurance to fit thier needs.

    This API gives you access to:

      - **Insurance**

      - **Custom**

    In this API reference, you'll find all the information you need about each endpoint and resource.
    <div style="background-color:#EDF0F2; border-radius:4px"; padding: 50px;margin-left: 25px; margin-right:25px; border-radius: 4px;>

    <strong> Tip: </strong> Make sure to also visit our Developer Portal for guides on <a href="https://docs.curacel.co/docs/get-started-with-grow">Getting started with Grow,</a> <a href="https://docs.curacel.co/docs/environment">Setting up your environment,</a> and <a href="https://docs.curacel.co/docs/for-the-web">Using our drop-in widget,</a>
    </div>

    ## Environment
    We currently offer two environments: sandbox and production.
    | Environment | Purpose | Access |
    |----------|-------|-------|
    | **Sandbox** | We've created a [sandbox environment](https://playbox.grow.curacel.co) where you can test your API client code without incurring any costs. In this environment, you can create links without real credentials. No data is tampered with and you are able to thoroughly test API endpoints in test mode before going live. | Base URL (cURL): https://api.playbox.grow.curacel.co/api <br></br>
    | **Production** | The Production environment is recommended for live applications that have direct connections to institutions. You will need real credentials to create links in this environment, and you will be pulling real data from the institutions.| Base URL (cURL): https://api.grow.curacel.co/api | <br></br>

    <strong>Note</strong>
      You can't create an application for live mode and sandbox using the same API key.
      We use the same endpoint structure, the only difference is the base URL.

      Therefore, for each environment, you'll need to [generate seperate API keys](https://grow.curacel.co/dashboard).


    ## HTTP Response status codes

    | Status Code | Description |
    | ----------- | ------- |
    | `1xx` | Informational. |
    | `2xx` | Successful - Everything worked as expected.|
    | `3xx` | Redirection messages. |
    | `4xx` | Client Error responses. |
    | `5xx` | Server error responses. |

    ## HTTP Response Status Codes Summary
    Curacel Grow uses the standard HTTP response codes to indicate if an API request was successful or not.
    | Status Code | Description |
    |-----------|-------|
    | `200` - **OK** |  ✅ Everything worked perfectly.|
    | `201` - **Created** |  ✅ As a result of the request's success, a new resource was created. Most common use-case is in a POST request.|
    | `204` - **Success** |  ✅ Although, the request was successful, no content to return by the server.|
    | `400` - **Bad Request** | ❌ The request was denied, usually because a required parameter was missing. |
    | `401` - **Unauthorized** | ❌ Unauthenticated because no valid API key was provided. |
    | `402` - **Request Failed**| ❌ The parameters were correct, however, the request did not succeed.|
    | `403` | ❌ The client does not have access rights to the content. |
    | `404` - **Not Found** | ❌ The server can not find the requested resource. The link may be correct, but the resource does not exist.|
    | `409` - **Conflict** | ❌ This response is sent when a request conflicts with the current state of the server.|
    | `422` - **Unprocessable Entity** | ❌ The request was well-formed, however, it couldn't be carried out because of semantic flaws. |
    | `429` - **Too Many Requests** | ❌ The user has issued an excessive number of requests in a short period of time ("rate limiting"). |
    | `500`, `502`, `503`, `504` - **Server Errors** | ❌ Something went wrong on Curacels' end. (These are rare.) <br> </br>

      Note that together with this response, a user-friendly page explaining the problem should be sent.|


    ## Error handling

      ### Error messages

      We don't yet have any custom error codes, but errors would always contain one of the standard HTTP codes with a message in the payload.

      Curacel Grow API errors are returned in JSON format. For example, an error might look like this:

        ```json

        [
          {
            "message": "The given data was invalid.",
            "errors": {
              "trip_days_per_year": [
                "The trip days per year field is required."
              ],
              "trips_per_day": [
                "The trips per day field is required."
              ],
              "asset_value": [
                "The asset value field is required."
              ]
            }
          }
        ]

        ```

    An error response will typically include the following parameters:

       - `request_id`:

       -  `message`:

       - `code`:

       - `field` *(optional)*:

      ### Request identifier

      When you encounter any issues with a specific error, include the request identifier ('request id') in your message for the Grow support team.
      This will ease the process of investigation and get you back up and running in no time.


    ### Error codes and troubleshooting

      Please see our dedicated error handling articles on our Developer Portal for a complete list of errors and how to troubleshoot them.
  contact:
    name: Curacel Grow API Support
    email: grow@curacel.ai
    url: https://docs.curacel.co/
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
tags:
- name: products
  description: Everything about available Insurance Products
  x-displayName: Products
- name: customers
  description: Everything about customers
  x-displayName: Customers
- name: credit-requests
  description: Everything about your Insurance Credit Requests
  x-displayName: Insurance Credits
- name: product-purchase
  description: Everything about purchasing insurance products
  x-displayName: Orders
- name: policies
  description: Everything about insurance policies created for your customers
  x-displayName: Policies
- name: quotations
  description: Everything about quotations for insurance products
  x-displayName: Quotations
- name: claims
  description: Everything about claims
  x-displayName: Claims
- name: wallets
  description: Manage your wallets
  x-displayName: Wallets
- name: insurance-brokers
  description: Everything relating to brokers
  x-displayName: Brokers
- name: attachments
  description: Attachments are simply files such as documents, images, videos, etc
    that may be relevant to an insurance policy or claim.
  x-displayName: Attachments
- name: parent-child
  description: Create and manage children partners' specific operations
  x-displayName: Sub Accounts
- name: compliance
  description: Create and manage everything compliance
  x-displayName: Compliance
paths:
  "/v1/product-types":
    get:
      tags:
      - products
      summary: List all product types
      operationId: list-product-types
      description: Retrieves a list of all available insurance product types. Product
        types refer to the major categories of insurance e.g Health, Automobile, Life,
        Gadget, Goods in transit, etc
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/ProductType"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/products":
    get:
      operationId: getProducts
      tags:
      - products
      summary: List available insurance products
      description: This endpoint allows you to retrieve a list of available insurance
        products.
      parameters:
      - in: query
        name: q
        schema:
          type: string
        description: Any text supplied here would be used to search products by their
          names
      - in: query
        name: page
        schema:
          type: integer
          default: 1
        description: The page of results
      - in: query
        name: per_page
        schema:
          type: integer
          default: 20
        description: Maximum Number of results per page
      - in: query
        name: type
        schema:
          type: string
          enum:
          - health
          - 3rd_party_auto
          - comprehensive_auto
          - life
          - marine
          - git
          - credit_life
          - fire_burglary
          - gadget
          - job_loss
          - personal_accident
          - micro_health
          - travel
          - investment_life
          - investment
          - medical_malpractice
        description: |-
          Filter the products returned by product type. Must be the slug of one of the types as available on the product-types endpoint e.g health, auto, life, etcetera. <br/> This is required, if you wish to use the `'calculate-premium'` parameter listed below.
          'auto' is an alias
      - in: query
        name: with
        schema:
          type: string
          enum:
          - cover_benefits
          - travel_plans
        description: Include additional information within the response. <br/> <em>**For
          Example:**</em> To add the cover benefits to the product result, the `with`
          parameter is valid for this use case.<br/> ``'?with=cover_benefits'``
      - in: query
        name: insurer_country
        schema:
          type: string
        description: Use this to limit the products to only the ones that are insured
          by companies based in the country specified. This accepts an [ISO alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
          country code.
      - in: query
        name: travel_country
        schema:
          type: string
        description: For Travel products, use this parameter to limit the list to
          products that covers the country specified. This accepts an [ISO alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
          country code.
      - in: query
        name: calculate_premium
        schema:
          type: integer
          enum:
          - 0
          - 1
          default: 0
        description: Set to 1 to calculate the premium value of the products returned.
          The `type` parameter must be supplied to use this parameter.
      - in: query
        name: asset_value
        schema:
          type: number
          format: float
        description: Value of the insured asset. May be required when `calculate_premium`
          is set to 1
      - in: query
        name: net_income
        schema:
          type: number
          format: float
        description: Employee's net monthly income
      - in: query
        name: trip_days_per_year
        schema:
          type: integer
          minimum: 1
          maximum: 365
        description: Number of days in a year that have trips (max of 365). Required
          for 'recuring' GIT products when `calculate_premium` is set to 1
      - in: query
        name: trips_per_day
        schema:
          type: integer
        description: Number of trips per day. Required for 'recuring' GIT products
          when `calculate_premium` is set to 1
      - in: query
        name: trip_frequency
        schema:
          type: string
          enum:
          - single
          - recurring
          default: recurring
        description: Frequency of trips. Required for GIT product when `calculate_premium`
          is set to 1
      - in: query
        name: loan_duration
        schema:
          type: integer
          maximum: 12
        description: Loan duration in months. Required for credit life products when
          `calculate_premium` is set to 1
      - in: query
        name: travel_duration
        schema:
          type: integer
          maximum: 12
        description: Travel duration in months. Required for travel products when
          `calculate_premium` is set to 1
      - in: query
        name: shipment_type
        schema:
          type: string
          enum:
          - import
          - export
        description: For marine products. Use this to limit the results to products
          that cover the specified shipment type.
      - in: query
        name: clause
        schema:
          type: string
          enum:
          - A
          - C
        description: For marine products. Use this to limit the results to products
          that cover the specified clause.
      - in: query
        name: age
        schema:
          type: integer
        description: The age of the policy holder. May be required for some product
          types when `calculate_premium` is set to 1
      - in: query
        name: beneficiaries
        schema:
          type: integer
        description: When attempting to calculate the premium of some products that
          require beneficiaries, please pass the total number of beneficiaries here.
      - in: query
        name: policy_start_date
        schema:
          type: string
          format: date
        description: When required, please provide the start date of the intended
          policy purchase here
      - in: query
        name: duration
        schema:
          type: integer
        description: Duration of the life cover or savings plan
      - in: query
        name: cover_amount
        schema:
          type: number
          format: float
        description: The life cover amount
      - in: query
        name: life_cover_amount
        schema:
          type: number
          format: float
        description: The life cover amount
      - in: query
        name: monthly_savings_amount
        schema:
          type: number
          format: float
        description: How much would be saved on monthly basis. Note that if a quarterly
          savings_frequency is chosen, then expected amount every quarter is monthly_savings_amount
          multiplied by 3. The same applies to other frequencies.
      - in: query
        name: savings_frequency
        schema:
          enum:
          - monthly
          - quarterly
          - half-yearly
          - yearly
          - one-off
        description: How often savings will be made until the duration is complete.
      - in: query
        name: occupation
        schema:
          type: string
        description: The medical practitioner's occupation. Required for medical malpractice
          products when `calculate_premium` is set to 1. Must be one of the valid
          options available for this product (use the field-options endpoint to get
          available options)
      - in: query
        name: indemnity_limit
        schema:
          type: number
          format: float
        description: The maximum amount that can be paid out for a single claim. Required
          for medical malpractice products when `calculate_premium` is set to 1
      - in: query
        name: aggregated_claim_limit
        schema:
          type: number
          format: float
        description: The maximum total amount that can be paid out for all claims
          during the policy period. Required for medical malpractice products when
          `calculate_premium` is set to 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Product"
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      prev:
                        type: string
                      next:
                        type: string
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/products/{id}":
    get:
      operationId: getProductDetail
      tags:
      - products
      summary: Get a single insurance product
      description: This endpoint allows you to get a product using it's id
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
        description: The ID of the product or the code of the product when the `using_product_code`  parameter
          is set to 1
      - in: query
        name: asset_value
        schema:
          type: number
        description: Required when `calculate_premium` is set to 1
      - in: query
        name: trip_days_per_year
        schema:
          type: integer
          minimum: 1
          maximum: 365
        description: Number of days in a year that have trips (max of 365). Required
          for 'recuring' GIT products when `calculate_premium` is set to 1
      - in: query
        name: trips_per_day
        schema:
          type: integer
        description: Number of trips per day. Required for 'recuring' GIT products
          when `calculate_premium` is set to 1
      - in: query
        name: trip_frequency
        schema:
          type: string
          enum:
          - single
          - recurring
          default: recurring
        description: Frequency of trips. Required for GIT product when `calculate_premium`
          is set to 1
      - in: query
        name: loan_duration
        schema:
          type: integer
          maximum: 12
        description: Loan duration in months. Required for credit life products when
          `calculate_premium` is set to 1
      - in: query
        name: travel_duration
        schema:
          type: integer
          maximum: 12
        description: Travel duration in months. Required for travel products when
          `calculate_premium` is set to 1
      - in: query
        name: calculate_premium
        schema:
          type: integer
          enum:
          - 0
          - 1
          default: 0
        description: Set to 1 to calculate the premium value of the product. This
          is only necessary for relative products such as Goods In Transit (GIT).
      - in: query
        name: using_product_code
        schema:
          type: integer
          enum:
          - 0
          - 1
        description: Must be one of 1,0. Ideally, you should only use this with the
          value set to 1 only when the `id` path contains the code of the product.
          Simply omit it when using the product's id.
      - in: query
        name: age
        schema:
          type: integer
        description: The age of the policy holder. May be required for some product
          types when `calculate_premium` is set to 1
      - in: query
        name: occupation
        schema:
          type: string
        description: The medical practitioner's occupation. Required for medical malpractice
          products when `calculate_premium` is set to 1. Must be one of the valid
          options available for this product (use the field-options endpoint to get
          available options)
      - in: query
        name: duration
        schema:
          type: integer
        description: Duration of the policy coverage in months. Required for medical
          malpractice products when `calculate_premium` is set to 1
      - in: query
        name: indemnity_limit
        schema:
          type: number
          format: float
        description: The maximum amount that can be paid out for a single claim. Required
          for medical malpractice products when `calculate_premium` is set to 1
      - in: query
        name: aggregated_claim_limit
        schema:
          type: number
          format: float
        description: The maximum total amount that can be paid out for all claims
          during the policy period. Required for medical malpractice products when
          `calculate_premium` is set to 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    "$ref": "#/components/schemas/Product"
        '404':
          description: 404 Not Found
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/products/{id}/field-options/{field_key}":
    get:
      operationId: getProductFieldOptions
      tags:
      - products
      summary: Get field options for a specific product ENUM field
      description: Retrieve the available options for a specific ENUM field of a product.
        This is useful for products that have fields with predefined options (e.g
        occupation for medical malpractice).These options should used to populate
        the dropdowns in the UI.
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
        description: The ID of the product or the code of the product when the `using_product_code`
          parameter is set to 1
      - in: path
        name: field_key
        required: true
        schema:
          type: string
        description: The key of the field for which to retrieve options (e.g., 'indemnity_limit',
          'duration', 'occupation', 'aggregated_claim_limit')
      - in: query
        name: using_product_code
        schema:
          type: integer
          enum:
          - 0
          - 1
        description: Must be one of 1,0. Set to 1 when the `id` path parameter contains
          the product code instead of the product ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    properties:
                      field_key:
                        type: string
                        description: The field key for which options were retrieved
                      options:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                              description: The option key/value
                            label:
                              type: string
                              description: The human-readable label for the option
                        description: Array of available options for the specified
                          field
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/insurance-credit-requests":
    post:
      tags:
      - credit-requests
      summary: Make a new Insurance credit request for a customer
      operationId: addCreditRequest
      description: Submit a request for insurance credits to be granted a customer
        based on a purchase made by the customer
      requestBody:
        description: Details about the transaction
        content:
          application/json:
            schema:
              type: object
              required:
              - total_amount_paid
              - ref
              - customer
              - item_original_price
              properties:
                ref:
                  type: string
                  description: The unique identifier for the transaction on your system
                narration:
                  type: string
                  description: Transaction narration
                customer:
                  type: object
                  required:
                  - email
                  - ref
                  - first_name
                  - last_name
                  properties:
                    ref:
                      type: string
                      description: Unique identifier of the customer on your system
                    email:
                      type: string
                      description: The customer's email address
                    phone:
                      type: string
                    first_name:
                      type: string
                    last_name:
                      type: string
                total_amount_paid:
                  type: number
                  description: The amount paid by the customer. This would be the
                    sum of the item original amount and markup amount added.
                item_original_price:
                  type: number
                  description: The original price of the product or service purchased
                    by the customer.
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    properties:
                      credits_issued:
                        type: number
                        description: The number of insurance credits issued for the
                          transaction
                      total_amount_paid:
                        type: number
                      item_original_price:
                        type: number
                      markup_amount:
                        type: number
                      markup_config:
                        type: object
                        description: The markup setting as is agreed and configured
                          on your account as at the time of the transaction
                        properties:
                          rate:
                            type: number
                            description: The percentage by which all original prices
                              would be marked up
                          max_cap:
                            type: number
                            description: The maximum markup that should be allowed
                              irrespective of the rate.
                      currency:
                        type: string
        '422':
          description: Unprocessable Content
    get:
      tags:
      - credit-requests
      summary: Fetch a list of insurance credit requests
      operationId: fetchCreditRequests
      description: Get all previously created insurance credit requests
      parameters:
      - in: query
        name: status
        schema:
          type: string
          enum:
          - completed
          - pending
        description: Filter the results by the status of the credit request
      - in: query
        name: currency
        schema:
          type: string
        description: Filter the results by currency
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/InsuranceCreditRequest"
        '401':
          description: Unauthenticated
        403:
          description: Unauthorized
  "/v1/insurance-credit-requests/markup-amount":
    get:
      tags:
      - credit-requests
      summary: Get the extra amount to add the price of your item for insurance credits
      operationId: fetchCreditRequestMarkupAmount
      parameters:
      - in: query
        name: item_price
        schema:
          type: number
          format: float
        description: The price of the item in your store
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  amount:
                    type: number
                    format: float
                    description: The extra amount to add to the price of the item
        '401':
          description: Unauthenticated
        403:
          description: Unauthorized
  "/v1/orders":
    post:
      operationId: purchaseProduct
      tags:
      - product-purchase
      summary: Purchase an insurance product for a customer
      description: Submit an order for an insurance product for a customer.
      requestBody:
        required: true
        description: Details of the customer and the product to be purchased.
        content:
          application/json:
            schema:
              oneOf:
              - "$ref": "#/components/schemas/GITPurchaseData"
              - "$ref": "#/components/schemas/ThirdPartyAutoPurchaseData"
              - "$ref": "#/components/schemas/ComprehensiveAutoPurchaseData"
              - "$ref": "#/components/schemas/MarinePurchaseData"
              - "$ref": "#/components/schemas/HealthPurchaseData"
              - "$ref": "#/components/schemas/JobLossPurchaseData"
              - "$ref": "#/components/schemas/GadgetPurchaseData"
              - "$ref": "#/components/schemas/CreditLifePurchaseData"
              - "$ref": "#/components/schemas/FireBurglaryPurchaseData"
              - "$ref": "#/components/schemas/InvestmentLifePurchaseData"
              - "$ref": "#/components/schemas/LifePurchaseData"
              - "$ref": "#/components/schemas/PersonalAccidentPurchaseData"
              - "$ref": "#/components/schemas/MicroHealthPurchaseData"
              - "$ref": "#/components/schemas/TravelPurchaseData"
              - "$ref": "#/components/schemas/InvestmentPurchaseData"
              - "$ref": "#/components/schemas/MedicalMalpracticePurchaseData"
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OrderCreatedResponse"
        400:
          description: The order could not be created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        401:
          description: Unauthenticated
        403:
          description: The product is unavailable to the partner or the request is
            unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        422:
          description: Unprocessable Content
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OrderUnprocessableContentResponse"
    get:
      operationId: fetchCustomerOrders
      tags:
      - product-purchase
      summary: Get all orders for a customer
      description: Get all orders for a customer.
      parameters:
      - in: query
        name: status
        schema:
          type: string
          enum:
          - pending
          - paid
          - creating_policy
          - policy_created
          - completed
          - cancelled
        description: The status of the order.
      - in: query
        name: product_type
        schema:
          type: integer
        description: The ID of the type of product the order is for.
      - in: query
        name: customer_ref
        schema:
          type: string
        description: The ref of the customer who owns this order, this would have
          been supplied when creating the customer
      - in: query
        name: search
        schema:
          type: string
        description: Search for orders by `customer name`, `product title`, or `asset_ref`
      - in: query
        name: child_partner_id
        schema:
          type: string
        description: The child partner key to get all orders belonging to the child
          partner
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                properties:
                  orders:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Order"
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/orders/{id}":
    get:
      operationId: productPurchaseDetails
      tags:
      - product-purchase
      summary: Get an order for a customer
      description: Get an order for a customer.
      parameters:
      - in: path
        required: true
        name: id
        schema:
          type: integer
        description: The ID of the order to retrieve
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                properties:
                  order:
                    "$ref": "#/components/schemas/OrderDetail"
        404:
          description: Not Found
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/orders/authorize":
    post:
      operationId: authorizeOrder
      tags:
      - product-purchase
      summary: Authorize an order that was created with your public partner key.
      description: When an order is created via the Grow widget and paid for via a
        custom payment integration, you will need to call this endpoint from your
        server to indicate that the payment was completed successfully so that the
        order will be processed.
      requestBody:
        description: Details of the order to be authorized.
        content:
          application/json:
            schema:
              type: object
              required:
              - id
              properties:
                id:
                  type: integer
                  description: the id of the order to authorize.
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                properties:
                  order:
                    "$ref": "#/components/schemas/OrderDetail"
        422:
          description: Unprocessable Content
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
  "/v1/orders/{id}/cancel":
    post:
      operationId: cancelOrder
      tags:
      - product-purchase
      summary: Cancel an order
      description: This is to allow developers to trigger and test the 'order.cancelled'
        webhook event in test environments. This operation will return a 403 response
        in production.
      parameters:
      - in: path
        required: true
        name: id
        schema:
          type: integer
        description: The ID of the order to cancel
      requestBody:
        description: Context of the cancellation
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: Why are you cancelling this order?
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                properties:
                  order:
                    "$ref": "#/components/schemas/OrderDetail"
        400:
          description: Bad Request
          content:
            application/json:
              schema:
                type: string
        403:
          description: Unauthorized
          content:
            application/json:
              schema:
                type: string
        404:
          description: Not Found
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/policies":
    get:
      operationId: listCustomerPolicies
      tags:
      - policies
      summary: Get policies created for your customers
      description: This endpoint allows you to get a listing of the policies that
        were created as a result of successfully proccessed orders made for your customers.
      parameters:
      - in: query
        name: page
        schema:
          type: integer
          default: 1
        description: The page of results.
      - in: query
        name: per_page
        schema:
          type: integer
          default: 15
        description: The maximum number of results per page.
      - in: query
        name: customer_ref
        schema:
          type: string
        description: Filter policies by customer ref
      - in: query
        name: insurance_type
        schema:
          type: string
          enum:
          - health
          - comprehensive_auto
          - 3rd_party_auto
          - life
          - marine
          - git
          - credit_life
          - fire_burglary
          - gadget
          - job_loss
          - medical_malpractice
        description: Filter policies by insurance type
      - in: query
        name: count
        schema:
          type: integer
          default: 0
          enum:
          - 0
          - 1
        description: Returns only the count of the policies
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Policy"
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      prev:
                        type: string
                      next:
                        type: string
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                      from:
                        type: integer
                      total:
                        type: integer
        422:
          description: Unprocessable Content
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                  errors:
                    type: object
                    properties:
                      customer_ref:
                        type: array
                        items:
                          type: string
                      "...":
                        type: array
                        items:
                          type: string
  "/v1/policies/{id}/doc":
    get:
      operationId: getInsurancePolicyDoc
      tags:
      - policies
      summary: Get the insurance policy document
      description: Get the binary data of the insurance document.
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
        description: The ID of the policy
      responses:
        200:
          description: OK
          content:
            application/pdf:
              schema:
                type: string
                format: binary
            application/jpeg:
              schema:
                type: string
                format: binary
            application/jpg:
              schema:
                type: string
                format: binary
            application/png:
              schema:
                type: string
                format: binary
            application/octect-stream:
              schema:
                type: string
                format: binary
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/policies/{identifier}":
    get:
      operationId: getSinglePolicy
      tags:
      - policies
      summary: Retrieve a single policy resource
      description: Retrieve a policy by providing its ID or number
      parameters:
      - in: path
        name: identifier
        required: true
        schema:
          type: string
        description: An identifier of the policy. Can either be the id (default) or
          number.
      - in: query
        name: using_policy_no
        schema:
          type: integer
          default: 0
          enum:
          - 0
          - 1
        description: Set to 1 when policy number is used as identifier instead of
          ID
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    "$ref": "#/components/schemas/Policy"
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: string
  "/v1/customers":
    post:
      operationId: createNewCustomer
      tags:
      - customers
      summary: Create a new customer on our platform
      description: |
        **Create a new customer**

        Creates a new customer which can be subsequently used to place an order for a product. Insurance regulation requires that KYC be done, thus a lot of fields would be mandato

        **Optional KYC parameters**

        The following parameters may be omitted
          - bvn
          - proof_of_address

        When the above parameters are absent, the customer will get an email notification with instructions to provide them.
      requestBody:
        description: Details of customers to be created
        content:
          application/json:
            schema:
              oneOf:
              - "$ref": "#/components/schemas/CustomerIndividual"
              - "$ref": "#/components/schemas/customerBusiness"
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Customer"
        422:
          description: Unprocessable Content
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                  errors:
                    type: object
                    properties:
                      ref:
                        type: array
                        items:
                          type: string
                      email:
                        type: array
                        items:
                          type: string
    get:
      operationId: fetchlistOfCustomers
      tags:
      - customers
      summary: List customers
      description: This endpoint allows you to retrieve a list of customers.
      parameters:
      - in: query
        name: search
        schema:
          type: string
        description: |
          Any text supplied here would be used to search for customers in any of the following fields

          - customer email
          - customer name
          - customer phone
          - customer ref
      - in: query
        name: page
        schema:
          type: integer
          default: 1
        description: The page of results
      - in: query
        name: per_page
        schema:
          type: integer
          default: 15
        description: Maximum Number of results per page
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Customer"
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      prev:
                        type: string
                      next:
                        type: string
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/customers/{ref}":
    get:
      operationId: fetchSingleCustomer
      tags:
      - customers
      summary: Get a single customer
      parameters:
      - in: path
        name: ref
        required: true
        schema:
          type: string
        description: The unique identifier for the customer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    "$ref": "#/components/schemas/Customer"
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
    patch:
      operationId: updateCustomer
      tags:
      - customers
      parameters:
      - in: path
        name: ref
        required: true
        schema:
          type: string
        description: The unique identifier for the customer
      summary: Update the missing details of a customer
      description: This allows any missing info of the customer to be provided. Any
        info previously provided will not be overwritten. Please contact support if
        you need to over write a customer's info.
      requestBody:
        description: Accepts the same details you would normally use to create a customer
        content:
          application/json:
            schema:
              type: object
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    "$ref": "#/components/schemas/Customer"
        422:
          description: Unprocessable
    delete:
      operationId: deleteCustomer
      parameters:
      - in: path
        name: ref
        required: true
        schema:
          type: string
        description: The unique identifier for the customer
      tags:
      - customers
      summary: Delete the detials of a customer
      description: Permanently remove a customer from your account
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
        401:
          description: Unauthenticated
        404:
          description: Not found
        422:
          description: Unprocessable Request
  "/v1/quotes":
    post:
      operationId: createInsuranceQuote
      tags:
      - quotations
      summary: Create a quote for an insurance product
      description: |
        <p>Get a quotation for an insurance product. This allows you to create a downlodable quote to send to a third party. In most cases, you would not need to do this.</p> <p>If you are just looking to list available insurance products alongside their prices, please use the <a href="https://docs.curacel.co/reference/getproducts" target="_blank">products</a> or <a href="https://docs.curacel.co/reference/getproductdetail" target="_blank">product</a> endpoints and set the `?calculate_premium=1` query parameter, then the price of each product will be set in the `premium` field.</p>
        <p>Please note that you may be required to provide some additional data via query parameters when the `calculate_premium=1` flag is set.</p>
      requestBody:
        description: Details of the customer and the product to be quoted.
        content:
          application/json:
            schema:
              oneOf:
              - "$ref": "#/components/schemas/GITPurchaseData"
              - "$ref": "#/components/schemas/ThirdPartyAutoPurchaseData"
              - "$ref": "#/components/schemas/ComprehensiveAutoPurchaseData"
              - "$ref": "#/components/schemas/MarinePurchaseData"
              - "$ref": "#/components/schemas/HealthPurchaseData"
              - "$ref": "#/components/schemas/JobLossPurchaseData"
              - "$ref": "#/components/schemas/GadgetPurchaseData"
              - "$ref": "#/components/schemas/CreditLifePurchaseData"
              - "$ref": "#/components/schemas/FireBurglaryPurchaseData"
              - "$ref": "#/components/schemas/InvestmentLifePurchaseData"
              - "$ref": "#/components/schemas/LifePurchaseData"
              - "$ref": "#/components/schemas/PersonalAccidentPurchaseData"
              - "$ref": "#/components/schemas/MicroHealthPurchaseData"
              - "$ref": "#/components/schemas/TravelPurchaseData"
              - "$ref": "#/components/schemas/InvestmentPurchaseData"
              - "$ref": "#/components/schemas/MedicalMalpracticePurchaseData"
      responses:
        201:
          description: OK
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                  quote:
                    type: object
                    properties:
                      id:
                        type: integer
                      asset_ref:
                        type: string
                      product_price:
                        type: number
                        format: float
                      partner_commission:
                        type: number
                        format: float
                      partner_commission_rate:
                        type: number
                        format: float
                      amount_due:
                        type: number
                        format: float
                      currency:
                        type: string
                      company_name:
                        type: string
                      description:
                        type: string
                      policy_start_date:
                        type: string
                        format: date
        422:
          description: Unprocessable Content
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                  errors:
                    type: object
                    properties:
                      customer_ref:
                        type: array
                        items:
                          type: string
                      product_code:
                        type: array
                        items:
                          type: string
    patch:
      operationId: UpdateQuote
      tags:
      - quotations
      summary: Update a quote
      description: Update a previously created quote.
      requestBody:
        description: Details of the quotation to be updated.
        content:
          application/json:
            schema:
              type: object
              required:
              - ref
              properties:
                ref:
                  type: string
                  description: the ref of the quotation to be updated.
                customer_ref:
                  type: string
                  description: the ref of the new customer to update the quotation
                    to, this should have been supplied when creating the customer
                asset_ref:
                  type: string
                  description: The new asset_ref to.
                company_name:
                  type: string
                  description: The updated company name.
                description:
                  type: string
                  description: An updated description for this quote
                child_partner_id:
                  type: string
                  description: The child partner key to update the quote for the child
                    partner
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    "$ref": "#/components/schemas/Quote"
        422:
          description: Unprocessable Content
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                  errors:
                    type: object
                    properties:
                      ref:
                        type: array
                        items:
                          type: string
                      customer_ref:
                        type: array
                        items:
                          type: string
    get:
      operationId: listSuccessfulQuotes
      tags:
      - quotations
      summary: Get quotations created
      description: This endpoint allows you to get a listing of the quotes that were
        created successfully.
      parameters:
      - in: query
        name: status
        schema:
          type: string
          enum:
          - paid
          - pending
        description: Filter the results by status. Value is one of <em>'paid'</em>
          or <em>'pending'</em>
      - in: query
        name: search
        schema:
          type: string
        description: search for quotes using product title or customer name
      - in: query
        name: child_partner_id
        schema:
          type: string
        description: The child partner key to get all quotes belonging to the child
          partner
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Quote"
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      prev:
                        type: string
                      next:
                        type: string
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                      from:
                        type: integer
                      total:
                        type: integer
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/quotes/accept":
    post:
      operationId: convertQuoteToOrder
      tags:
      - quotations
      summary: Convert a quote to an order
      description: Create an order from a quotation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - ref
              properties:
                ref:
                  type: string
                  description: The ref of the quotation to convert to order
                asset_ref:
                  "$ref": "#/components/schemas/ThirdPartyAutoPurchaseData/properties/asset_ref"
                customer_ref:
                  "$ref": "#/components/schemas/ThirdPartyAutoPurchaseData/properties/customer_ref"
                policy_start_date:
                  "$ref": "#/components/schemas/ThirdPartyAutoPurchaseData/properties/policy_start_date"
                payment_type:
                  "$ref": "#/components/schemas/ThirdPartyAutoPurchaseData/properties/payment_type"
                attachments:
                  "$ref": "#/components/schemas/ThirdPartyAutoPurchaseData/properties/attachments"
                child_partner_id:
                  type: string
                  description: The child partner key to create the order for the child
                    partner
      responses:
        200:
          "$ref": "#/paths/~1v1~1orders/post/responses/200"
        422:
          description: Unprocessable Content
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                  errors:
                    type: object
                    properties:
                      ref:
                        type: array
                        items:
                          type: string
                      customer_ref:
                        type: array
                        items:
                          type: string
                      "...":
                        type: array
                        items:
                          type: string
  "/v1/quotes/{quote}/invoice":
    get:
      operationId: downloadInvoice
      tags:
      - quotations
      summary: Download an invoice for the quote
      description: Download a pdf invoice for the quote.
      parameters:
      - in: query
        name: using_ref
        schema:
          type: string
          default: 0
          enum:
          - ''
        description: Used to indicate that the 'quote' parameter in path is ID or
          ref
      - in: path
        required: true
        name: quote
        schema:
          type: string
        description: A unique identifier of the quote. By default, this is the quote's
          ID. When the "using_ref" parameter is set to 1, then this assumes that the
          'ref' of the quote is supplied
      responses:
        200:
          description: OK
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/quotes/{quote}":
    get:
      operationId: retrieveSingleQuotation
      tags:
      - quotations
      summary: Retrieve a quotation
      description: Retrieve a single quotation.
      parameters:
      - in: path
        required: true
        name: quote
        schema:
          type: string
        description: A unique identifier of the quote. By default, this is the quote's
          ID. When used with the `using_ref` query parameter, the `ref` of the quote
          is supplied, if available.
      - in: query
        name: using_ref
        required: true
        schema:
          type: string
          enum:
          - ''
          default: 0
        description: Used to indicate that the 'quote' path parameter is a ref (or
          an ID).
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Quote"
        404:
          description: Not Found
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
    delete:
      operationId: deleteQuotation
      tags:
      - quotations
      summary: Delete a quotation
      description: Delete a single quotation.
      parameters:
      - in: path
        required: true
        name: quote
        schema:
          type: string
        description: A unique identifier of the quote. By default, this is the quote's
          ID. When used with the `using_ref` query parameter, the 'ref' of the quote
          is supplied, if available.
      - in: query
        name: using_ref
        schema:
          type: integer
          default: 0
          enum:
          - 1
          - 0
        description: Used to indicate that the 'quote' path parameter is a ref (or
          an ID).
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
        404:
          description: Not Found
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/claims":
    post:
      operationId: createNewClaimFromPolicy
      tags:
      - claims
      summary: Create a new claim from a policy
      description: Make a request to create a claim for a policy on our platform
      requestBody:
        description: Details of the claim to be created
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ClaimRequest"
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                properties:
                  claim:
                    "$ref": "#/components/schemas/Claim"
        422:
          description: Unprocessable Content
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ClaimsUnprocessableContentResponse"
    get:
      operationId: retrieveListOfClaims
      tags:
      - claims
      summary: List claims
      description: This endpoint allows you to retrieve a list of created claims.
      parameters:
      - in: query
        name: search
        schema:
          type: string
        description: |
          Any text supplied here would be used to search claims any of the following

          - Policy number
          - customer email
          - customer name
      - in: query
        name: page
        schema:
          type: integer
          default: 1
        description: The page of results
      - in: query
        name: per_page
        schema:
          type: integer
          default: 15
        description: Maximum Number of results per page
      - in: query
        name: status
        schema:
          type: string
          enum:
          - pending
          - approved
          - processing
          - discharge_voucher
          - settled
        description: Filter the claims returned by its status.
      - in: query
        name: child_partner_id
        schema:
          type: string
        description: The child partner key to get all claims belonging to the child
          partner
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Claim"
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      prev:
                        type: string
                      next:
                        type: string
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/claims/{claim_id}":
    get:
      operationId: retieveSingleClaim
      tags:
      - claims
      summary: Get a single claim
      description: This endpoint allows you retrieve a single claim
      parameters:
      - in: path
        name: claim_id
        required: true
        schema:
          type: string
        description: A unique identifier for the claim
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    "$ref": "#/components/schemas/Claim"
        400:
          description: Bad request(400).
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/claims/{claim_id}/discharge-voucher/{discharge_voucher_id}":
    put:
      operationId: updateVoucherStatus
      tags:
      - claims
      summary: Update a discharge voucher
      description: This endpoint allows you to update the status of a voucher
      parameters:
      - in: path
        name: claim_id
        required: true
        schema:
          type: integer
        description: The unique identifier for the claim
      - in: path
        name: discharge_voucher_id
        schema:
          type: integer
        required: true
        description: The unique identifier for a discharge voucher
      requestBody:
        description: The request body to be sent with this request
        content:
          application/json:
            schema:
              type: object
              required:
              - status
              properties:
                status:
                  type: string
                  enum:
                  - rejected
                  - approved
                  description: Either approved or rejected. Used to update the status
                    of a discharge voucher
                comment:
                  type: string
                  description: The comment or reason for rejecting a voucher
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    "$ref": "#/components/schemas/Claim"
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/partners/wallet/init-topup":
    post:
      operationId: initiateTopup
      tags:
      - wallets
      summary: Initiate a wallet topup
      description: This endpoint allows you to initiate a topup. The response will
        contain a redirect url to the payment gateway.
      requestBody:
        description: The request body to be sent with this request
        content:
          application/json:
            schema:
              type: object
              required:
              - amount
              - currency
              properties:
                amount:
                  type: number
                  description: The amount to be topped up
                currency:
                  type: string
                  description: The currency of the amount. You should already have
                    a wallet for this currency
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  payment_link:
                    type: string
                    description: The payment link to be used to make the payment
        '400':
          description: Bad Request. For all payment gateway errors
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
        '422':
          description: Unprocessable Content. For all input validation errors
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                  errors:
                    type: object
                    properties:
                      amount:
                        type: array
                        items:
                          type: string
                      currency:
                        type: array
                        items:
                          type: string
  "/v1/partners/wallet/balance":
    get:
      operationId: getWalletBalance
      tags:
      - wallets
      summary: Get the balance of your wallets
      description: This endpoint allows you to retrieve the balance of all your wallets
      parameters:
      - in: query
        name: wallet
        schema:
          type: string
        description: The currency of the wallet
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    currency:
                      type: string
                      description: The currency of the wallet
                    balance:
                      type: number
                      description: The balance of the wallet
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/partners/wallet/transactions":
    get:
      operationId: getTransactions
      tags:
      - wallets
      summary: Get the transactions of your wallets
      description: This endpoint allows you to retrieve the transactions that has
        occured on your wallets
      parameters:
      - in: query
        name: type
        schema:
          type: string
          enum:
          - credit
          - debit
        description: The type of transaction. Can be either credit or debit
      - in: query
        name: currency
        schema:
          type: string
        description: Restrict the results to a specific currency
      - in: query
        name: dateRange
        schema:
          type: string
          format: json
        description: Filter transactions by a date range.
      - in: query
        name: search
        schema:
          type: string
        description: The search query to filter the transactions by. You can search
          by transaction reference or transaction narration.
      - in: query
        name: per_page
        schema:
          type: integer
          default: 16
        description: The number of results to return per page. Default is 16.
      - in: query
        name: page
        schema:
          type: integer
          default: 1
        description: The page number to retrieve. Default is 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Transaction"
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/partners/compliance":
    post:
      operationId: createAndUpdateCompliance
      tags:
      - compliance
      summary: Create or update existing compliance data
      description: This endpoint creates or updates compliance data for different
        sections.
      requestBody:
        description: Details of the compliance data for the selected section
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - "$ref": "#/components/schemas/SlaComplianceRequest"
              - "$ref": "#/components/schemas/PersonalComplianceRequest"
              - "$ref": "#/components/schemas/BusinessComplianceRequest"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    "$ref": "#/components/schemas/CreditNote"
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/credit-notes":
    post:
      operationId: createCreditNote
      tags:
      - insurance-brokers
      summary: Insurance brokers ability to create a credit note
      description: Make a request to create a credit note
      requestBody:
        description: The request body to be sent with this request
        content:
          application/json:
            schema:
              type: object
              required:
              - insurer_code
              - customer_ref
              - premium
              - premium_due_date
              - current_date
              - product_code
              properties:
                insurer_code:
                  type: string
                  description: The unique code of the insurer
                customer_ref:
                  type: string
                  description: The unique ref attached to the customer
                premium:
                  type: number
                  description: The credit note amount
                premium_due_date:
                  type: string
                  format: date
                  description: The due date of the premium
                current_date:
                  type: string
                  format: date
                  description: The current date / Day credit note is created
                product_code:
                  type: string
                  description: The unique code for the product
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                properties:
                  data:
                    "$ref": "#/components/schemas/CreditNote"
        422:
          description: Unprocessable Content
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                  errors:
                    type: object
                    properties:
                      product_code:
                        type: array
                        items:
                          type: string
    get:
      operationId: retrieveListOfCreditNotes
      tags:
      - insurance-brokers
      summary: List credit notes
      description: This endpoint allows you to retrieve a list of created credit notes.
      parameters:
      - in: query
        name: page
        schema:
          type: integer
          default: 1
        description: The page of results
      - in: query
        name: per_page
        schema:
          type: integer
          default: 15
        description: Maximum Number of results per page
      - in: query
        name: status
        schema:
          type: string
          enum:
          - pending
          - active
          description: Can be any one of this 2 status. active, pending
        description: Filter the credit notes returned by its status.
      - in: query
        name: insurer
        schema:
          type: string
          description: Insurer's unique code
        description: Filter the credit notes returned by insurer.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/CreditNote"
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      prev:
                        type: string
                      next:
                        type: string
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/credit-notes/{code}":
    get:
      operationId: retrieveSingleCreditNote
      tags:
      - insurance-brokers
      summary: Get a single credit note
      description: This endpoint allows you to retrieve a credit note by its unique
        code
      parameters:
      - in: path
        name: code
        required: true
        schema:
          type: string
        description: The unique identifier for the credit note
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    "$ref": "#/components/schemas/CreditNote"
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/debit-notes":
    post:
      operationId: createDebitNote
      tags:
      - insurance-brokers
      summary: Insurance brokers ability to create a debit note
      description: Make a request to create a debit note
      requestBody:
        description: The request body to be sent with this request
        content:
          application/json:
            schema:
              type: object
              required:
              - insurer_code
              - customer_ref
              - premium
              - premium_due_date
              - current_date
              - product_code
              properties:
                insurer_code:
                  type: string
                  description: The unique code of the insurer
                customer_ref:
                  type: string
                  description: The unique ref attached to the customer
                premium:
                  type: number
                  description: The credit note amount
                premium_due_date:
                  type: string
                  format: date
                  description: The due date of the premium
                current_date:
                  type: string
                  format: date
                  description: The current date / Day debit note is created
                product_code:
                  type: string
                  description: The unique code for the product
                payment_details:
                  type: object
                  required:
                  - bank_name
                  - account_number
                  properties:
                    bank_name:
                      type: string
                      description: The name of the bank
                    account_number:
                      type: number
                      description: bank account number
                    sort_code:
                      type: integer
                      description: Six digits bank sort code
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                properties:
                  data:
                    "$ref": "#/components/schemas/DebitNote"
        422:
          description: Unprocessable Content
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                  errors:
                    type: object
                    properties:
                      product_code:
                        type: array
                        items:
                          type: string
    get:
      operationId: retieveListOfDebitNotes
      tags:
      - insurance-brokers
      summary: List debit notes
      description: This endpoint allows you to retrieve a list of created debit notes.
      parameters:
      - in: query
        name: page
        schema:
          type: integer
          default: 1
        description: The page of results
      - in: query
        name: per_page
        schema:
          type: integer
          default: 15
        description: Maximum number of results per page
      - in: query
        name: status
        schema:
          type: string
          enum:
          - pending
          - active
          description: Can be any one of this 2 status. active, pending
        description: Filter the credit notes returned by its status.
      - in: query
        name: insurer
        schema:
          type: string
          description: Insurer's unique code
        description: Filter the credit notes returned by insurer.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/DebitNote"
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      prev:
                        type: string
                      next:
                        type: string
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/debit-notes/{code}":
    get:
      operationId: retrieveDebitNote
      tags:
      - insurance-brokers
      summary: Get a single debit note
      description: This endpoint allows you to retrieve a debit note by its unique
        code
      parameters:
      - in: path
        name: code
        required: true
        schema:
          type: string
        description: The unique identifier for the debit note
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    "$ref": "#/components/schemas/DebitNote"
        '401':
          description: Unauthenticated
  "/v1/attachments":
    post:
      operationId: createAttachment
      tags:
      - attachments
      summary: Create an attachment
      description: Make a request to create an attachment
      requestBody:
        description: The request body to be sent with this request
        content:
          multipart/form-data:
            schema:
              oneOf:
              - "$ref": "#/components/schemas/fileAttachment"
              - "$ref": "#/components/schemas/urlAttachment"
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                properties:
                  attachment:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: The unique identifier for the attachment
                      description:
                        type: string
                        description: The description of the attachment
        400:
          description: Bad Request
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
        422:
          description: Unprocessable Content
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                  errors:
                    type: object
                    properties:
                      file:
                        type: array
                        items:
                          type: string
                      description:
                        type: array
                        items:
                          type: string
  "/v1/attachments/{id}":
    get:
      operationId: downloadAttachment
      tags:
      - attachments
      summary: Download an attachment
      description: This endpoint allows you to download an attachment by its unique
        id
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
        description: The unique identifier for the attachment
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
                description: The attachment file
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
  "/v1/partners/child":
    post:
      operationId: createChildPartner
      tags:
      - parent-child
      summary: Create partner
      requestBody:
        description: Details of the partner
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/CreateChildPartnerRequest"
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ChildPartnerCreatedResponse"
        403:
          description: Unauthorized
        422:
          description: Unprocessable Request
    get:
      tags:
      - parent-child
      summary: Fetch all child partners
      operationId: fetchChildPartners
      description: Get all child partners attached to your account
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/GetAllChildPartners"
        '401':
          description: Unauthenticated
        403:
          description: Unauthorized
  "/v1/partners/child/request":
    post:
      operationId: createChildPartnerRequest
      tags:
      - parent-child
      summary: Create partner request
      description: If there is already existing partner you would like to be parent
        partner with. The partner will give you their key to make request to this
        endpoint. After approval, the partner will now be listed as your child partner.
      requestBody:
        description: Request body
        content:
          application/json:
            schema:
              type: object
              properties:
                child_id:
                  type: string
                  format: string
                  description: Provide the key of the partner
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PartnerRequestResponse"
        403:
          description: Unauthorized
        422:
          description: Unprocessable Request
          content:
            application/json: {}
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API KEY from your account dashboard
  schemas:
    ProductType:
      properties:
        name:
          type: string
          description: The generally accepted human friendly name
        slug:
          type: string
          description: The unique identifier for technical purposes
      type: object
      description: A major category of insurance e.g Health, Automobile, Life, Gadget,
        Goods in transit, etc
    Product:
      properties:
        title:
          type: string
          description: The name of the product
        code:
          type: string
          description: The unique identifier for technical purposes
        id:
          type: integer
          description: Unique Id of the product.
        insurer:
          "$ref": "#/components/schemas/Insurer"
        product type:
          "$ref": "#/components/schemas/ProductType"
        cover-benefits:
          type: object
          description: list of the nefits covered.
        created-at:
          type: string
          description: Date of product creation
        price:
          type: integer
          description: Price of product
        premium-type:
          type: string
          description: Define the product premium tier.
        premium-rate-unit:
          type: integer
        premium-rate:
          type: number
        premium:
          type: number
        partner-commision-rate:
          type: number
        min-premium:
          type: string
        premium-rules:
          type: string
        premium_frequency:
          type: string
          enum:
          - monthly
          - quarterly
          - annually
          default: annually
      type: object
      description: An individual insurance product or plan
    Customer:
      required:
      - email
      - ref
      - first_name
      - last_name
      properties:
        ref:
          type: string
          description: Unique identifier for the customer on your system
        email:
          type: string
          description: The customer's email address
        phone:
          type: string
        first_name:
          type: string
        last_name:
          type: string
      type: object
      description: The the customer's information
    Insurer:
      properties:
        code:
          type: string
          description: The unique code of the insurer
        name:
          type: string
          description: The name of the insurer
        logo_url:
          type: string
          description: A link to the Insurer's logo
        terms_conditions:
          type: string
          description: Insurer's terms and conditions
      type: object
      description: An insurance provider
    Policy:
      properties:
        id:
          type: integer
          description: The unique ID of the policy
        number:
          type: string
          description: The policy number
        description:
          type: string
          description: The description of the policy
        start_date:
          type: string
          format: date
          description: The start date of the coverage
        end_date:
          type: string
          format: date
          description: The end date of the coverage
        status:
          type: string
          description: Current status of the policy
        document_url:
          type: string
          description: A url to download the polic document.
        customer:
          "$ref": "#/components/schemas/Customer"
        insurer:
          "$ref": "#/components/schemas/Insurer"
        order:
          "$ref": "#/components/schemas/Order"
      type: object
      description: Insurance policy
    Quote:
      type: object
      description: Product quotation
      properties:
        id:
          type: integer
          description: The unique ID of the quote.
        ref:
          type: string
          description: unique reference of the quote.
        status:
          type: string
          description: the current status of the quote.
        amount_due:
          type: number
          format: float
          description: the amount due for payment by partner, excluding the partner's
            commission
        policy_start_date:
          type: string
          format: date
          description: A provisional date when the policy coverage is due to start
        product_price:
          type: number
          format: float
          description: The cost of purchasing the product by policy holder, including
            the partner's commission.
        asset_ref:
          type: string
          description: An optional identifier for the asset the insurance covers.
            You may set this to a value that uniquley identifies the asset on your
            database.
        currency:
          type: string
          description: The currency of all monetary parameters.
        created_at:
          type: string
          format: date
        company_name:
          type: string
          description: The name of your company
        product:
          "$ref": "#/components/schemas/Product"
        customer:
          "$ref": "#/components/schemas/Customer"
    Claim:
      properties:
        id:
          type: integer
          description: The unique ID of the claim
        status:
          type: string
          description: Current status of the claim
        policy:
          type: object
          description: Policy
          properties:
            id:
              type: integer
              description: The unique ID of the policy
            number:
              type: string
              description: The policy number
            description:
              type: string
              description: The description of the policy
            start_date:
              type: string
              format: date
              description: The start date of the coverage
            end_date:
              type: string
              format: date
              description: The end date of the coverage
            status:
              type: string
              description: Current status of the policy
        amount_requested:
          type: string
          description: The amount requested when creating a claim
        amount_approved:
          type: string
          description: The amount approved for the claim
        currency:
          type: string
          description: The currency of the amount
        created_at:
          type: string
          format: date
          description: The date and time the claim was created
      type: object
      description: Claim
    ClaimRequest:
      type: object
      required:
      - policy_number
      - payment_details
      - amount
      - attachments
      properties:
        policy_number:
          type: string
          description: The policy number you want to create a claim for
        amount:
          type: number
          description: The claim value
        attachments:
          type: array
          items:
            type: integer
            description: The id/ids of the attachment to be added to back claim
        payment_details:
          description: To settle the claim, we will deposit the claimed amount to
            this account
          type: object
          properties:
            bank_name:
              type: string
            account_number:
              type: string
            sort_code:
              type: integer
              description: Six digits bank sort code
        child_partner_id:
          type: string
          description: If you are creating this claim for a child partner, add the
            partner key to the request
    ClaimsUnprocessableContentResponse:
      properties:
        message:
          type: string
        errors:
          type: object
          properties:
            policy_number:
              type: array
              items:
                type: string
            amount:
              type: array
              items:
                type: string
            payment_details:
              type: array
              items:
                type: string
    Transaction:
      properties:
        id:
          type: integer
          description: The unique ID of the transaction
        ref:
          type: string
          description: The unique reference of the transaction
        narration:
          type: string
          description: The description of the transaction
        amount:
          type: number
          format: float
          description: The amount of the transaction
        currency:
          type: string
          description: The currency of the transaction
        type:
          type: string
          description: 'The type of the transaction. One of: DEBIT, CREDIT'
        opening_bal:
          type: number
          format: float
          description: The balance of the account before the transaction
        closing_bal:
          type: number
          format: float
          description: The balance of the account after the transaction
        created_at:
          type: string
          format: date
          description: The date and time the transaction was created
      type: object
      description: A wallet transaction
    Order:
      type: object
      description: An order for an insurance product
      properties:
        id:
          type: integer
          description: The unique ID of the order.
        status:
          type: string
          description: the current status of the order.
        amount_due:
          type: number
          format: float
          description: the amount due for payment by partner, excluding the partner's
            commission
        policy_start_date:
          type: string
          format: date
          description: The date when the policy coverage is due to start
        asset_ref:
          type: string
          description: An optional identifier for the asset the insurance covers.
            You may set this to a value that uniquley identifies the asset on your
            database.
        currency:
          type: string
          description: The currency of all monetary parameters.
        channel:
          type: string
          description: The channel through which the order was made.
        created_at:
          type: string
          format: date
        product:
          "$ref": "#/components/schemas/Product"
        customer:
          "$ref": "#/components/schemas/Customer"
        policy:
          type: object
          description: The policy for which the order was made.
    OrderDetail:
      type: object
      description: An order for an insurance product
      properties:
        id:
          "$ref": "#/components/schemas/Order/properties/id"
        status:
          "$ref": "#/components/schemas/Order/properties/status"
        amount_due:
          "$ref": "#/components/schemas/Order/properties/amount_due"
        policy_start_date:
          "$ref": "#/components/schemas/Order/properties/policy_start_date"
        asset_ref:
          "$ref": "#/components/schemas/Order/properties/asset_ref"
        currency:
          "$ref": "#/components/schemas/Order/properties/currency"
        channel:
          "$ref": "#/components/schemas/Order/properties/channel"
        created_at:
          "$ref": "#/components/schemas/Order/properties/created_at"
        payment_made_at:
          type: string
          format: date
        payment_method:
          type: string
          description: The method of payment used for the order.
        product:
          "$ref": "#/components/schemas/Product"
        customer:
          "$ref": "#/components/schemas/Customer"
        policy:
          type: object
          description: The policy for which the order was made.
    CreditNote:
      properties:
        code:
          type: string
          description: The unique identifier for credit note
        status:
          type: string
          description: Current status of the policy
        premium:
          type: number
          description: The credit note premium
        premium_due_date:
          type: string
          format: date
          description: Date when premium will be due
        current_date:
          type: string
          format: date
          description: Date of creation
        customer:
          "$ref": "#/components/schemas/Customer"
        insurer:
          "$ref": "#/components/schemas/Insurer"
        product:
          "$ref": "#/components/schemas/Product"
      type: object
      description: Credit Note
    DebitNote:
      properties:
        code:
          type: string
          description: The unique identifier for debit note
        status:
          type: string
          description: Current status of the policy
        premium:
          type: number
          description: The debit note premium
        premium_due_date:
          type: string
          format: date
          description: Date when premium will be due
        current_date:
          type: string
          format: date
          description: Date of creation
        payment_details:
          type: object
          properties:
            bank_name:
              type: string
              description: The name of the bank
            account_number:
              type: number
              description: bank account number
            sort_code:
              type: integer
              description: Six digits bank sort code
        customer:
          "$ref": "#/components/schemas/Customer"
        insurer:
          "$ref": "#/components/schemas/Insurer"
        product:
          "$ref": "#/components/schemas/Product"
      type: object
      description: Debit Note
    NextOfKin:
      type: object
      required:
      - name
      - email
      - phone
      description: Next of kin details. Required if not set when creating the customer
        record. If customer record has next of kin, this will be used for this transaction
        instead.
      properties:
        name:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
    ComprehensiveAutoPurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      - registration_number
      - vehicle_class
      - vehicle_make
      - vehicle_year
      - chassis_number
      - engine_number
      - vehicle_color
      - drivers_licence_number
      - vehicle_model
      - drivers_licence_attachment_id
      description: Data for buying Comprehensive auto insurance
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        asset_value:
          type: number
          format: float
          description: Estimated value of the insured vehicle. Required when the product
            uses relative-premium calculation.
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        registration_number:
          type: string
          description: the vehicle registration number
        vehicle_class:
          type: string
          description: the class of the vehicle
          enum:
          - car
          - sedan
          - suv
        vehicle_make:
          type: string
          description: The brand of the vehicle
        vehicle_model:
          type: string
          description: The model of the vehicle
        vehicle_year:
          type: integer
          description: The vehicle's year of manufacture
        chassis_number:
          type: string
        engine_number:
          type: string
        drivers_licence_number:
          type: string
          description: The customer's driver's license number
        drivers_licence_attachment_id:
          type: integer
          description: Required for the Kenyan market. The id of the attachment containing
            the customer's driver's license
        vehicle_valuation_report_attachment_id:
          type: integer
          description: Required for Kenyan products when the partner was created on
            or after November 28, 2023. The ID of the vehicle valuation report attachment.
        vehicle_color:
          type: string
          description: The color of the vehicle
        attachments:
          type: array
          items:
            type: integer
          description: If this order has other attachments, supply their IDs as an
            array. Each attachment must belong to the authenticated partner and must
            not already be attached to another resource.
        broker_premium_rate:
          type: number
          format: float
          description: For brokers only. The premium rate for the product.
        broker_taxes:
          type: number
          format: float
          description: For brokers only. A percentage of the premium to be added as
            tax
        premium_frequency:
          type: string
          enum:
          - monthly
          - quarterly
          - annually
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    GITPurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      description: Data for Goods in Transit (GIT) insurance. This covers shipments
        within the same country
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        asset_value:
          type: number
          format: float
          description: Value of the insured goods. Required when the product uses
            relative-premium calculation.
        trip_frequency:
          type: string
          default: recurring
          enum:
          - single
          - recurring
          description: Single or recurring trip
        trips_per_day:
          type: integer
          format: int32
          description: Required for recurring trips. This is the number of trips made
            per day.
        trip_days_per_year:
          type: integer
          format: int32
          description: Required for recurring trips. Number of days in a year the
            trips are made (365 max)
        pickup_location:
          type: string
          description: The pickup address of the shipment or parcel. Accepted but
            not currently required by request validation.
        dropoff_location:
          type: string
          description: The destination address of the shipment or parcel. Accepted
            but not currently required by request validation.
        attachments:
          type: array
          items:
            type: integer
          description: If this order has attachments, supply their IDs as an array.
            Each attachment must belong to the authenticated partner and must not
            already be attached to another resource.
        broker_premium_rate:
          type: number
          format: float
          description: For brokers only. The premium rate for the product.
        broker_taxes:
          type: number
          format: float
          description: For brokers only. A percentage of the premium to be added as
            tax
        premium_frequency:
          type: string
          enum:
          - monthly
          - quarterly
          - annually
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    MarinePurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      description: Data for buying Marine insurance. This covers international shipments
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        asset_value:
          type: number
          format: float
          description: Value of the insured goods. Required when the product uses
            relative-premium calculation.
        pickup_location:
          type: string
          description: The originating port of the shipment. Accepted but not currently
            required by request validation.
        dropoff_location:
          type: string
          description: The destination port of the shipment. Accepted but not currently
            required by request validation.
        attachments:
          type: array
          items:
            type: integer
          description: If this order has attachments, supply their IDs as an array.
            Each attachment must belong to the authenticated partner and must not
            already be attached to another resource.
        broker_premium_rate:
          type: number
          format: float
          description: For brokers only. The premium rate for the product.
        broker_taxes:
          type: number
          format: float
          description: For brokers only. A percentage of the premium to be added as
            tax
        premium_frequency:
          type: string
          enum:
          - monthly
          - quarterly
          - annually
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    JobLossPurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      description: Data for buying job loss insurance
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        asset_value:
          type: number
          format: float
          description: The customer's net monthly income. Either this field or net_income
            must be supplied.
        employer:
          type: string
          description: The name of the customer's employer
        job_role:
          type: string
          description: The role of the user in the company
        employment_date:
          type: string
          format: date
          description: employment date
        gross_income:
          type: number
          format: float
          description: Gross monthly income before taxes or deductions
        net_income:
          type: number
          format: float
          description: Net monthly income after taxes or deductions. Either this field
            or asset_value must be supplied.
        attachments:
          type: array
          items:
            type: integer
          description: Optional attachment IDs. Each attachment must belong to the
            authenticated partner and must not already be attached to another resource.
        broker_premium_rate:
          type: number
          format: float
          description: For brokers only. The premium rate for the product.
        broker_taxes:
          type: number
          format: float
          description: For brokers only. A percentage of the premium to be added as
            tax
        premium_frequency:
          type: string
          enum:
          - monthly
          - quarterly
          - annually
        employee_letter_attachment_id:
          type: integer
          description: The ID of the employment letter attachment.
        gross_income_currency:
          type: string
          minLength: 3
          maxLength: 3
          description: The three-character currency code used for gross income.
        net_income_currency:
          type: string
          minLength: 3
          maxLength: 3
          description: The three-character currency code used for net income.
        next_of_kin:
          type: array
          maxItems: 1
          description: Optional. When supplied, every listed field is required.
          items:
            type: object
            required:
            - first_name
            - last_name
            - email
            - phone
            - relationship
            properties:
              first_name:
                type: string
              last_name:
                type: string
              email:
                type: string
                format: email
              phone:
                type: string
              relationship:
                type: string
                description: Your relationship with the beneficiary
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    GadgetPurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      description: Data for buying Gadget insurance
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        asset_value:
          type: number
          format: float
          description: The value or price of the gadget. Required when the product
            uses relative-premium calculation.
        gadget_type:
          type: string
          description: The type of gadget.
        gadget_name:
          type: string
          description: The name (model and brand) of the gadget.
        imei:
          type: number
          format: integer
          description: The IMEI or serial number of the gadget
        date_purchased:
          type: string
          format: date
          description: Date when the gadget was purchased
        attachments:
          type: array
          items:
            type: integer
          description: Optionally upload the following files via the attachments API
            - Picture of device - Receipt of Ownership Then supply their IDs as an
            array. Each attachment must belong to the authenticated partner and must
            not already be attached to another resource.
        beneficiaries:
          type: array
          maxItems: 5
          description: Optional. When supplied, every listed field is required.
          items:
            type: object
            required:
            - first_name
            - last_name
            - email
            - phone
            - relationship
            properties:
              first_name:
                type: string
              last_name:
                type: string
              email:
                type: string
                format: email
              phone:
                type: string
              relationship:
                type: string
                description: Your relationship with the beneficiary
        receipt_of_ownership_attachment_id:
          type: integer
          description: The id of the attachment to receipt of ownership
        picture_of_device_attachment_id:
          type: integer
          description: The id of the attachent of device attachment
        broker_premium_rate:
          type: number
          format: float
          description: For brokers only. The premium rate for the product.
        broker_taxes:
          type: number
          format: float
          description: For brokers only. A percentage of the premium to be added as
            tax
        premium_frequency:
          type: string
          enum:
          - monthly
          - quarterly
          - annually
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    CreditLifePurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      - loan_duration
      description: Data for buying credit life insurance
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        asset_value:
          type: number
          format: float
          description: The amount insured. Required when the product uses relative-premium
            calculation.
        loan_duration:
          type: integer
          format: int32
          minimum: 1
          maximum: 12
          description: Duration of the loan to be insured in months, should not exceed
            12 months.
        monthly_loan_instalment:
          type: number
          format: float
          description: For loans lasting more than one month, the amount returned
            every month by the customer.
        business_address:
          type: string
          description: Business address of the customer
        nature_of_business:
          type: string
          description: Nature of Customer's business
        height:
          type: number
          description: height of the policy holder in meters
        weight:
          type: number
          description: weight of the policy holder in Kg
        attachments:
          type: array
          items:
            type: integer
          description: If this order has attachments, supply their IDs as an array.
            Each attachment must belong to the authenticated partner and must not
            already be attached to another resource.
        premium_frequency:
          type: string
          enum:
          - monthly
          - quarterly
          - annually
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    HealthPurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      description: Data for buying health insurance
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner. The customer data must contain the following details - sex -
            birth_date
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: The start date of the intended policy coverage
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        preferred_hospital_location:
          type: string
          description: Preferred hospital location for claims
        medical_history:
          type: string
          description: Kindly write down any previous health complication you may
            have
        country:
          type: string
        state:
          type: string
        beneficiaries:
          type: array
          maxItems: 5
          description: Optional. When supplied, every listed field is required.
          items:
            type: object
            required:
            - first_name
            - last_name
            - email
            - phone
            - relationship
            properties:
              first_name:
                type: string
              last_name:
                type: string
              email:
                type: string
                format: email
              phone:
                type: string
              relationship:
                type: string
                description: Your relationship with the beneficiary
        next_of_kin:
          "$ref": "#/components/schemas/NextOfKin"
        attachments:
          type: array
          items:
            type: integer
          description: If this order has attachments, supply their IDs as an array.
            Each attachment must belong to the authenticated partner and must not
            already be attached to another resource.
        broker_premium_rate:
          type: number
          format: float
          description: For brokers only. The premium rate for the product.
        broker_taxes:
          type: number
          format: float
          description: For brokers only. A percentage of the premium to be added as
            tax
        height:
          type: number
          description: height of the policy holder in meters
        weight:
          type: number
          description: weight of the policy holder in Kg
        premium_frequency:
          type: string
          enum:
          - monthly
          - quarterly
          - annually
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    FireBurglaryPurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      description: Data for buying fire and burglary insurance.
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        asset_value:
          type: number
          format: float
          description: The value of the insured property. Required when the product
            uses relative-premium calculation.
        address:
          type: string
          description: Address of the insured property
        attachments:
          type: array
          items:
            type: integer
          description: If this order has attachments, supply their IDs as an array.
            Each attachment must belong to the authenticated partner and must not
            already be attached to another resource.
        broker_premium_rate:
          type: number
          format: float
          description: For brokers only. The premium rate for the product.
        broker_taxes:
          type: number
          format: float
          description: For brokers only. A percentage of the premium to be added as
            tax
        premium_frequency:
          type: string
          enum:
          - monthly
          - quarterly
          - annually
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    InsuranceCreditRequest:
      type: object
      description: Insurance credit request
      properties:
        ref:
          type: string
          description: unique ref of the credit request
        credits_earned:
          type: number
          format: float
          description: The amount of insurance credits earned
        currency:
          type: string
          default: NGN
          description: The currency used to purchase the credits
        original_price:
          type: number
          format: float
          description: The orginal price of the item purchased by the user
        markup_amount:
          type: number
          format: number
          description: Extra amount added to the original price. This is used to purchase
            the insurance credit.
        status:
          type: string
          description: The status of the request
          enum:
          - completed
          - pending
        created_at:
          type: string
          format: date
          description: The date the request was made
        customer:
          "$ref": "#/components/schemas/Customer"
    ThirdPartyAutoPurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      description: 'Data for purchasing a third-party auto insurance product. For
        partners created on or after September 12, 2023, vehicle_year, vehicle_class,
        vehicle_color, drivers_licence_number, registration_number, vehicle_make,
        chassis_number, engine_number, vehicle_model, and drivers_licence_attachment_id
        are required.

'
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        vehicle_value:
          type: number
          format: float
          description: Estimated value of the insured vehicle.
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        drivers_licence_number:
          type: string
          description: The customer's driver's license number
        drivers_licence_attachment_id:
          type: integer
          description: The id of the attachment containing the customer's driver's
            license
        registration_number:
          type: string
          description: the vehicle registration number
        vehicle_class:
          type: string
          description: the class of the vehicle
          enum:
          - car
          - sedan
          - suv
        vehicle_make:
          type: string
          description: The brand of the vehicle
        vehicle_model:
          type: string
          description: The model of the vehicle
        vehicle_year:
          type: integer
          description: The vehicle's year of manufacture
        chassis_number:
          type: string
        engine_number:
          type: string
        vehicle_color:
          type: string
          description: The color of the vehicle
        premium_frequency:
          type: string
          enum:
          - monthly
          - quarterly
          - annually
        attachments:
          type: array
          items:
            type: integer
          description: Optional attachment IDs. Each attachment must belong to the
            authenticated partner and must not already be attached to another resource.
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    CustomerIndividual:
      type: object
      required:
      - first_name
      - last_name
      - email
      - phone
      - birth_date
      - residential_address
      - id_card
      - id_type
      - id_number
      - id_expiry
      - country
      - city
      - state
      properties:
        ref:
          type: string
          description: Your unique identifier for the customer as it exists on your
            database. This would be used to identify this customer in all other operations.
        first_name:
          type: string
        last_name:
          type: string
        middle_name:
          type: string
        sex:
          type: string
          enum:
          - M
          - F
          description: Must be either M or F
        birth_date:
          type: string
          format: date
          description: Customer's date of birth e.g 1990-10-10
        email:
          type: string
          format: email
          description: Customer's email address. This need not be unique if the ref
            is provided.
        phone:
          type: string
          description: Customer's phone number.
        bvn:
          type: string
        occupation:
          type: string
        id_card:
          type: string
          format: binary
          description: ID card of the customer
        id_type:
          type: string
          enum:
          - driversLicense
          - internationalPassport
          - votersCard
          - nimc
          description: type of ID
        id_expiry:
          format: date
          description: expiry date of the ID
        id_number:
          format: string
          description: Number of the ID
        city:
          type: string
        residential_address:
          type: string
          description: This is required to be able to purchase credit life products
        state:
          type: string
        nationality:
          type: string
        country:
          type: string
        next_of_kin_name:
          type: string
          description: This is required to be able to purchase credit life products
            The name of customer's next of kin
        next_of_kin_phone:
          type: string
          description: This is required to be able to purchase credit life products
            Phone number of next of kin
        specialty:
          type: string
          description: The specialty of the policy holder
        proof_of_address:
          type: object
          properties:
            type:
              type: string
              description: The type of proof of address e.g Electricity bill
            url:
              type: string
              format: url
              description: A publicly available URL to the customer's proof of address
                file
          description: 'The proof of the customer''s address as part of required KYC.  The
            type can be any string describing what type of document it is. The url
            should be a publicly accessible file at the time of making this request
            as it would be copied and stored for insurers to view.

'
    customerBusiness:
      type: object
      required:
      - business_name
      - email
      - residential_address
      - description
      - country
      - registration_number
      - tin
      - registration_certificate
      - customer_type
      - id_card
      - id_type
      - id_number
      - id_expiry
      - memart (required if country is NG)
      - phone
      - city
      - birth_date
      - state
      properties:
        ref:
          type: string
          description: Your unique identifier for the customer as it exists on your
            database. This would be used to identify this customer in all other operations.
        business_name:
          type: string
        email:
          type: string
          format: email
          description: Customer's email address. This need not be unique if the ref
            is provided.
        description:
          type: string
          description: Customer's business description.
        phone:
          type: string
          description: Customer's phone number.
        residential_address:
          type: string
          description: Address of the business
        country:
          type: string
          description: Country of the business address
        state:
          type: string
          description: State of the business address
        city:
          type: string
          description: City of the business address
        registration_number:
          type: string
          description: Customer's business registration number
        tin:
          type: string
          description: Customer's Tax Identification Number (TIN)
        registration_certificate:
          type: string
          format: binary
          description: Customer's proof of business registration
        customer_type:
          type: string
          default: business
          description: Customer's type can be individual or business, this field differentiate
            between individual and business account
        birth_date:
          type: string
          format: date
          description: DoB of director whose ID is provided
        id_card:
          type: string
          format: binary
          description: ID card of one director
        id_type:
          type: string
          enum:
          - driversLicense
          - internationalPassport
          - votersCard
          - nimc
          description: type of ID
        id_expiry:
          format: date
          description: expiry date of the ID
        id_number:
          format: string
          description: Number of the ID
        memart:
          type: string
          format: binary
          description: Customer's memart
    InvestmentLifePurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      - holder_type
      - beneficiaries
      - current_health_condition
      - savings_frequency
      - monthly_savings_amount
      - life_cover_amount
      - duration
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        holder_type:
          type: string
          enum:
          - single
          - group
        beneficiaries:
          type: array
          maxItems: 5
          description: A maximum of five beneficiaries is accepted and their percentage
            shares must total 100.
          items:
            type: object
            required:
            - first_name
            - last_name
            - email
            - phone
            - percentage_share
            properties:
              first_name:
                type: string
              last_name:
                type: string
              email:
                type: string
                format: email
              phone:
                type: string
              percentage_share:
                type: number
                format: float
                description: The percentage of cover to be recieved by the beneficiary
        current_health_condition:
          type: string
        monthly_savings_amount:
          type: number
          format: float
          description: The monthly savings amount. It must meet the selected product's
            configured minimum.
        savings_frequency:
          type: string
          enum:
          - monthly
          - quarterly
          - half-yearly
          - yearly
          - one-off
          description: How often savings will be made until the duration is complete.
        duration:
          type: integer
          description: The savings duration in months. It must meet the selected product's
            configured minimum.
        life_cover_amount:
          type: number
          format: float
          description: The amount of life insurance coverage chosen. It cannot exceed
            the product's configured maximum life sum assured.
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
        height:
          type: number
          description: height of the policy holder in meters
        weight:
          type: number
          description: weight of the policy holder in Kg
    InvestmentPurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      - holder_type
      - beneficiaries
      - current_health_condition
      - savings_frequency
      - monthly_savings_amount
      - duration
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        holder_type:
          type: string
          enum:
          - single
          - group
        beneficiaries:
          type: array
          maxItems: 5
          description: A maximum of five beneficiaries is accepted and their percentage
            shares must total 100.
          items:
            type: object
            required:
            - first_name
            - last_name
            - email
            - phone
            - percentage_share
            properties:
              first_name:
                type: string
              last_name:
                type: string
              email:
                type: string
                format: email
              phone:
                type: string
              percentage_share:
                type: number
                format: float
                description: The percentage of cover to be recieved by the beneficiary
        current_health_condition:
          type: string
        monthly_savings_amount:
          type: number
          format: float
          description: The monthly savings amount. It must meet the selected product's
            configured minimum when one is configured.
        savings_frequency:
          type: string
          enum:
          - monthly
          - quarterly
          - half-yearly
          - yearly
          - one-off
          description: How often savings will be made until the duration is complete.
        duration:
          type: integer
          description: The savings duration in months. It must meet the selected product's
            configured minimum when one is configured.
        height:
          type: number
          description: height of the policy holder in meters
        weight:
          type: number
          description: weight of the policy holder in Kg
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    PersonalAccidentPurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      - identification_attachment_id
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        metadata:
          type: object
          nullable: true
          additionalProperties: true
          description: Additional values merged into the order metadata and included
            in relevant webhooks.
        occupation:
          type: string
          nullable: true
          description: Optional occupation of the policy holder. Stored in the order
            metadata when supplied.
        previous_injuries:
          type: array
          description: Any previous injuries of the policy holder
          items:
            type: string
        activities_liable_to_injury:
          type: array
          nullable: true
          description: Optional circumstances, lifestyle, or hobbies that make the
            policyholder liable to injury. Stored in the order metadata when supplied.
          items:
            type: string
        identification_attachment_id:
          type: integer
          description: The policy holder's identification attachment ID. It must belong
            to the authenticated partner.
        height:
          type: number
          nullable: true
          description: Optional height of the policy holder. Stored in the order metadata
            when supplied.
        weight:
          type: number
          nullable: true
          description: Optional weight of the policy holder. Stored in the order metadata
            when supplied.
        dependants:
          type: array
          description: Optional dependant plans. Each dependant must satisfy the selected
            plan's age rules.
          items:
            type: object
            required:
            - name
            - birth_date
            - relationship
            - plan_id
            properties:
              name:
                type: string
              email:
                type: string
                format: email
              phone:
                type: string
              birth_date:
                type: string
                format: date
                description: The dependant's date of birth
              gender:
                type: string
                enum:
                - M
                - F
              relationship:
                type: string
                description: relationship to the parent policy holder
              occupation:
                type: string
                description: occupation of the dependant
              plan_id:
                type: integer
                description: The ID of the personal accident plan for this dependant
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    MicroHealthPurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      - identification_attachment_id
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        current_health_condition:
          type: string
          nullable: true
          description: The optional current health condition of the policy holder.
            The customer must have a date of birth and satisfy the product's age rules.
        identification_attachment_id:
          type: integer
          description: The policy holder's identification attachment ID. It must belong
            to the authenticated partner.
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    LifePurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      - beneficiaries
      - current_health_condition
      - duration
      - cover_amount
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        holder_type:
          type: string
          enum:
          - single
          - group
        beneficiaries:
          type: array
          maxItems: 5
          description: A maximum of five beneficiaries is accepted and their percentage
            shares must total 100.
          items:
            type: object
            required:
            - first_name
            - last_name
            - email
            - phone
            - percentage_share
            properties:
              first_name:
                type: string
              last_name:
                type: string
              email:
                type: string
                format: email
              phone:
                type: string
              percentage_share:
                type: number
                format: float
                description: The percentage of cover to be recieved by the beneficiary
        current_health_condition:
          type: string
        duration:
          type: integer
          minimum: 12
          description: The policy duration in months. Product-specific minimum and
            customer age limits also apply.
        cover_amount:
          type: number
          format: float
          description: The requested cover amount. It cannot exceed the product's
            configured maximum sum assured.
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
        height:
          type: number
          description: height of the policy holder
        weight:
          type: number
          description: weight of the policy holder
    TravelPurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      - travel_purpose
      - travel_duration
      - passport_number
      - passport_attachment_id
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        asset_ref:
          type: string
          nullable: true
          description: An external reference stored on the order and included in relevant
            webhooks.
        travel_purpose:
          type: string
          description: Purpose of travel
          enum:
          - Business
          - Tourism
          - Study
          - Pilgrimage
        travel_duration:
          type: integer
          minimum: 1
          maximum: 365
          description: The number of travel days.
        passport_number:
          type: string
          description: international passport number
        passport_attachment_id:
          type: integer
          description: upload the internation passport using the attachments endpoint
            and supply the Id
        nationality:
          type: string
          description: 'Optional: The nationality of customer''s next of kin. Provide
            if missing from the customer record

'
        address:
          type: string
          description: 'Optional: The address of customer Provide if `residential_address`
            is  missing from the customer record

'
        state:
          type: string
          description: 'Optional: The state of customer''s address. Provide if missing
            from the customer record

'
        country:
          type: string
          description: 'Optional: The country of customer''s address. Provide if missing
            from the customer record

'
        next_of_kin_name:
          type: string
          description: 'Optional: The name of customer''s next of kin. Provide if
            missing from the customer record

'
        next_of_kin_phone:
          type: string
          description: 'Optional: The phone of customers''s next of kin. Provide if
            missing from the customer record

'
        travellers:
          type: array
          description: If the customer is travelling with others and wishes to purchase
            same insurance for them, then the detials of the extra travellers should
            be specified here.
          items:
            type: object
            required:
            - personal_info
            - contact_info
            - travel_info
            properties:
              personal_info:
                type: object
                required:
                - first_name
                - last_name
                - sex
                - birth_date
                - nationality
                - next_of_kin_name
                - next_of_kin_phone
                properties:
                  first_name:
                    type: string
                  last_name:
                    type: string
                  sex:
                    type: string
                    enum:
                    - M
                    - F
                    description: Must be either M or F
                  birth_date:
                    type: string
                    format: date
                    description: Traveller's date of birth e.g 1990-10-10
                  nationality:
                    type: string
                  next_of_kin_name:
                    type: string
                    description: The name of traveller's next of kin
                  next_of_kin_phone:
                    type: string
                    description: The phone of traveller's next of kin
              contact_info:
                type: object
                required:
                - email
                - phone
                - address
                - state
                - country
                properties:
                  email:
                    type: string
                    format: email
                    description: traveller's email address.
                  phone:
                    type: string
                    description: Traveller's phone number.
                  address:
                    type: string
                  state:
                    type: string
                  country:
                    type: string
              travel_info:
                type: object
                required:
                - travel_purpose
                - passport_number
                - passport_attachment_id
                properties:
                  travel_purpose:
                    type: string
                    description: Purpose of travel
                    enum:
                    - Business
                    - Tourism
                    - Study
                    - Pilgrimage
                  passport_number:
                    type: string
                    description: international passport number
                  passport_attachment_id:
                    type: integer
                    description: upload the internation passport using the attachments
                      endpoint and supply the Id
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    MedicalMalpracticePurchaseData:
      type: object
      required:
      - product_code
      - customer_ref
      - policy_start_date
      - indemnity_limit
      - aggregated_claim_limit
      - duration
      - occupation
      description: Data for buying medical malpractice insurance
      properties:
        product_code:
          type: string
          description: The code of an approved, non-archived product available to
            the authenticated partner.
        customer_ref:
          type: string
          description: The reference of a customer belonging to the authenticated
            partner.
        payment_type:
          type: string
          enum:
          - wallet
          - web_link
          - card
          description: How the order will be paid. If omitted, the authenticated partner's
            configured payment option is used.
        policy_start_date:
          type: string
          format: date
          description: the start date of the intended policy coverage
        metadata:
          type: object
          nullable: true
          additionalProperties: true
          description: Additional values merged into the order metadata and included
            in relevant webhooks.
        indemnity_limit:
          type: number
          format: float
          minimum: 1
          description: The maximum amount that can be paid out for a single claim
        aggregated_claim_limit:
          type: number
          format: float
          minimum: 1
          description: The maximum total amount that can be paid out for all claims
            during the policy period
        duration:
          type: number
          minimum: 1
          description: Duration of the policy coverage in months
        occupation:
          type: string
          description: The medical practitioner's occupation. Must be one of the valid
            options available for this product (use the field-options endpoint to
            get available options)
        attachments:
          type: array
          items:
            type: integer
          description: If this order has attachments, supply their IDs as an array.
            Each attachment must belong to the authenticated partner and must not
            already be attached to another resource.
        child_partner_id:
          type: string
          description: The key of a child partner belonging to the authenticated parent
            partner.
    fileAttachment:
      type: object
      required:
      - file
      properties:
        file:
          type: string
          format: binary
          description: The file to be uploaded
        description:
          type: string
          description: A description of the attachment
    urlAttachment:
      type: object
      required:
      - file_url
      properties:
        file_url:
          type: string
          format: url
          description: A publicly accessible url to fetch the attachment from
        description:
          type: string
          description: A description of the attachment
    CreateChildPartnerRequest:
      type: object
      properties:
        name:
          type: string
          maxLength: 200
          minLength: 4
          description: The name of the partner
        currency:
          type: string
          enum:
          - USD
          - EUR
          - GBP
          - NGN
          description: Fetch currency codes
        email:
          type: string
          format: email
          description: Unique email address of the partner
        phone:
          type: string
          minLength: 10
        logo_url:
          type: string
          format: binary
        commission_rate:
          type: number
          maximum: 5
          description: Commission of the partner
        payment_option:
          type: string
          enum:
          - card
          - web_link
          - wallet
        buys_insurance:
          type: boolean
        sells_insurance_credits:
          type: boolean
        password:
          type: string
          minLength: 8
          description: Login password of the partner
    ChildPartnerCreatedResponse:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
        email:
          type: string
        phone:
          type: string
        logo:
          type: string
          format: uri
        key:
          type: string
        sells_insurance_credits:
          type: boolean
        buys_insurance:
          type: boolean
        insurance_credits_markup_rate:
          type: number
        insurance_credits_markup_cap:
          type: number
        currency:
          type: string
        accepted_toc:
          type: string
        toc_date:
          type: string
          format: date-time
        is_broker:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        is_travel_agent:
          type: boolean
        commission_share:
          type: number
        payment_option:
          type: string
    PartnerRequestResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: number
            status:
              type: string
            child:
              type: object
              properties:
                id:
                  type: number
                status:
                  type: string
                name:
                  type: string
                email:
                  type: string
                phone:
                  type: string
                logo:
                  type: string
                  format: uri
                key:
                  type: string
                sells_insurance_credits:
                  type: boolean
                buys_insurance:
                  type: boolean
                insurance_credits_markup_rate:
                  type: number
                insurance_credits_markup_cap:
                  type: string
                currency:
                  type: string
                accepted_toc:
                  type: boolean
                toc_date:
                  type: string
                  format: date-time
                is_broker:
                  type: boolean
                created_at:
                  type: string
                  format: date-time
                updated_at:
                  type: string
                  format: date-time
                is_travel_agent:
                  type: boolean
                commission_share:
                  type: number
                payment_option:
                  type: string
    ChildPartnerComplianceResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: number
            personal_info:
              type: object
              properties:
                email:
                  type: string
                country:
                  type: string
                id_type:
                  type: string
                id_number:
                  type: string
                last_name:
                  type: string
                first_name:
                  type: string
                name:
                  type: string
            business_info:
              type: object
            sla_info:
              type: array
              items:
                type: object
            sla_doc:
              type: string
            sla_signed_at:
              type: string
              format: date-time
    OrderCreatedResponse:
      type: object
      properties:
        order:
          type: object
          properties:
            id:
              type: integer
            asset_ref:
              type: string
              nullable: true
            product_price:
              type: number
              format: float
            partner_commission:
              type: number
              format: float
            amount_due:
              type: number
              format: float
            currency:
              type: string
            payment_instructions:
              type: object
              nullable: true
              properties:
                message:
                  type: string
                success:
                  type: boolean
            payment_gateway_charge:
              type: number
              format: float
              nullable: true
            status:
              type: string
            country:
              type: string
            meta:
              type: object
              nullable: true
              additionalProperties: true
            life_sum_assured:
              type: string
              nullable: true
              description: Returned when the selected product defines a life sum assured.
    OrderUnprocessableContentResponse:
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          properties:
            customer_ref:
              type: array
              items:
                type: string
            product_code:
              type: array
              items:
                type: string
    GetAllChildPartners:
      type: object
      properties:
        id:
          type: integer
          description: The partner's ID
        name:
          type: string
          description: The partner's name
        email:
          type: string
          format: email
          description: The partner's email address
        phone:
          type: string
          description: The partner's phone number
        logo:
          type: string
          nullable: true
          description: The partner's logo (if available)
        key:
          type: string
          description: The partner's key
        sells_insurance_credits:
          type: boolean
          description: Indicates whether the partner sells insurance credits
        buys_insurance:
          type: boolean
          description: Indicates whether the partner buys insurance
        insurance_credits_markup_rate:
          type: number
          description: The markup rate for insurance credits
        insurance_credits_markup_cap:
          type: string
          description: The maximum markup cap for insurance credits
        currency:
          type: string
          description: The partner's currency
        accepted_toc:
          type: boolean
          description: Indicates whether the partner has accepted terms and conditions
        toc_date:
          type: string
          format: date-time
          nullable: true
          description: The date when the partner accepted terms and conditions
        is_broker:
          type: boolean
          description: Indicates whether the partner is a broker
        created_at:
          type: string
          format: date-time
          description: The date and time when the partner was created
        updated_at:
          type: string
          format: date-time
          description: The date and time when the partner was last updated
        is_travel_agent:
          type: boolean
          description: Indicates whether the partner is a travel agent
        commission_share:
          type: number
          description: The commission share percentage
        payment_option:
          type: string
          description: The partner's preferred payment option
        can_go_live:
          type: boolean
          description: Indicates whether the partner can go live
    SlaComplianceRequest:
      type: object
      properties:
        support_levels:
          type: array
          description: An array of support levels.
          items:
            type: object
            properties:
              section:
                type: string
                description: The section of the compliance document
                enum:
                - sla
              email:
                type: string
                format: email
                description: The email address of the support team member.
              level:
                type: integer
                description: The support level.
              last_name:
                type: string
                description: The last name of the support team member.
              first_name:
                type: string
                description: The first name of the support team member.
        child_partner_id:
          type: string
          description: If you are creating this claim for a child partner, add the
            partner key to the request
    PersonalComplianceRequest:
      type: object
      properties:
        section:
          type: string
          description: The section of the compliance document
          enum:
          - personal
        id_type:
          type: string
          description: Name to describe the type of identification document in the
            `id_file` field
          enum:
          - International Passport
          - Ghana Card,
          - Kenyan National ID,
          - Driving License,
          - Voter's Card,
          - Bank Verification Number,
          - National ID etc
        id_number:
          type: string
          description: The identification number.
        country:
          type: string
          description: The country code of residence e.g NG, GH, KE etc .
          minLength: 8
          maxLength: 8
        state:
          type: string
          description: The state or province of the partner.
        address:
          type: string
          description: The street address of the partner.
        city:
          type: string
          description: The city.
        first_name:
          type: string
          description: The first name of the partner.
        last_name:
          type: string
          description: The last name of the partner.
        email:
          type: string
          format: email
          description: The email address of the partner.
        phone:
          type: string
          description: The phone number of the partner.
        id_file:
          type: string
          format: binary
          description: The file to be uploaded
        signature:
          type: string
          format: binary
          description: The file to be uploaded as signature
        child_partner_id:
          type: string
          description: If you are creating this claim for a child partner, add the
            partner key to the request
      required:
      - country
      - email
      - id_type
      - id_number
      - first_name
      - last_name
    BusinessComplianceRequest:
      type: object
      properties:
        section:
          type: string
          description: The section of the compliance document
          enum:
          - business
        company_name:
          type: string
          description: The name of the company.
        business_sector:
          type: string
          description: The sector or industry the company operates in.
        country_of_inc:
          type: string
          description: The country where the company is incorporated e.g NG, GH, KE
            etc .
          minLength: 2
          maxLength: 2
        rc_number:
          type: string
          description: The Registration Number (RC number) of the company.
        state:
          type: string
          description: The state or province where the company is located.
        address:
          type: string
          description: The street address of the company.
        business_description:
          type: string
          description: A brief description of the company's business.
        city:
          type: string
          description: The city where the company is located.
        TIN:
          type: string
          description: The Tax Identification Number (TIN) of the company.
          minLength: 8
          maxLength: 8
        website:
          type: string
          description: The company's website URL.
        file:
          type: string
          format: binary
          enum:
          - CAC
          - Memart
          - Status_Report
          - Business_Registration_Certificate
          - Business_Commencement_Certificate
          - Form_3
          - Certificate_of_Incorporation
          - Form_CR1
          - Company_Incorporation_Document
          description: The binary file to upload. The name of the file must be in
            the enum value
        child_partner_id:
          type: string
          description: If you are creating this claim for a child partner, add the
            partner key to the request
security:
- bearerAuth: []
