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

# Submit Underwriting Data

> Submit business profile information required for credit decisioning.

## Overview

Sends business structure, address, and profile data required by the credit decision engine. Must be called after `POST /v1/loans/apply`. The optional `userIdentity` object provides additional KYC data.

### Request

**Method:** `POST`\
**URL:** `/v1/loans/:applicationId/submit-underwriting`

#### Parameters

| Name            | In     | Type     | Required | Description                     |
| --------------- | ------ | -------- | -------- | ------------------------------- |
| `x-carbon-key`  | Header | `string` | Yes      | API key for authentication.     |
| `applicationId` | Path   | `string` | Yes      | Application ID from apply step. |

#### Request Body

```json theme={null}
{
  "structure": {
    "hasWebsite": true,
    "hasSocialMediaHandles": true,
    "hasAuditedFinancialStatement": false,
    "payPension": false,
    "hasPayeeReceipt": false,
    "hasBusinessInsurance": false,
    "hasTaxClearanceCert": false,
    "hasManagementAccounts": false,
    "hasAccountant": true,
    "hasStaffHealthCare": false,
    "ownProperty": false,
    "payRent": true
  },
  "address": {
    "lga": "Lagos Island",
    "city": "Lagos Island",
    "state": "LAGOS",
    "country": "Nigeria",
    "addressVerificationType": "POWER_BILL"
  },
  "profile": {
    "yearsInBusiness": "TWO_TO_FIVE",
    "numberOfLocations": "ONE",
    "numberOfStaff": "ONE_TO_FIVE",
    "grossProfitMargin": 35,
    "operatingExpenses": 150000,
    "businessRole": "OWNER",
    "averageDailyCustomers": "FIVE_TO_FOURTEEN",
    "businessStartDate": "2022-01-15"
  },
  "userIdentity": {
    "idType": "NIN",
    "idNumber": "11111111111"
  }
}
```

**`structure`** — all boolean:

`hasWebsite` · `hasSocialMediaHandles` · `hasAuditedFinancialStatement` · `payPension` · `hasPayeeReceipt` · `hasBusinessInsurance` · `hasTaxClearanceCert` · `hasManagementAccounts` · `hasAccountant` · `hasStaffHealthCare` · `ownProperty` · `payRent`

**`address`:**

| Field                     | Required | Allowed values                                                                                               |
| ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| `lga`                     | Yes      | Local government area string                                                                                 |
| `city`                    | No       |                                                                                                              |
| `state`                   | No       |                                                                                                              |
| `country`                 | No       |                                                                                                              |
| `addressVerificationType` | No       | `POWER_BILL` · `INTERNET_BILL` · `WATER_CORPORATION_BILL` · `WASTE_MANAGEMENT_BILL` · `STAMPED_RENT_RECEIPT` |

**`profile`:**

| Field                   | Required | Allowed values                                                                                             |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------- |
| `yearsInBusiness`       | Yes      | `ONE` · `TWO_TO_FIVE` · `SIX_OR_MORE`                                                                      |
| `numberOfLocations`     | Yes      | `ONE` · `TWO_TO_FIVE` · `SIX_OR_MORE`                                                                      |
| `numberOfStaff`         | Yes      | `ONE_TO_FIVE` · `SIX_TO_FIFTEEN` · `SIXTEEN_OR_MORE`                                                       |
| `grossProfitMargin`     | Yes      | Number between `1` and `100`                                                                               |
| `operatingExpenses`     | Yes      | Positive number (kobo)                                                                                     |
| `businessRole`          | Yes      | `OWNER` · `PARTNER`                                                                                        |
| `averageDailyCustomers` | Yes      | `ONE_TO_FOUR` · `FIVE_TO_FOURTEEN` · `FIFTEEN_TO_TWENTYFOUR` · `TWENTYFIVE_TO_FORTYNINE` · `FIFTY_OR_MORE` |
| `businessStartDate`     | Yes      | `YYYY-MM-DD`                                                                                               |

**`userIdentity`** — optional. Both fields required if the object is included:

| Field      | Description                               |
| ---------- | ----------------------------------------- |
| `idType`   | e.g. `NIN`, `DRIVERS_LICENSE`, `PASSPORT` |
| `idNumber` | The identity number                       |

### Response

#### 200 OK

```json theme={null}
{
  "status": "success",
  "message": "Underwriting data submitted"
}
```

#### Error Responses

| Status | Message                                                         | Cause                                            |
| ------ | --------------------------------------------------------------- | ------------------------------------------------ |
| 400    | `Application not found`                                         | Invalid `applicationId`                          |
| 400    | `structure is required`                                         | Missing `structure` object                       |
| 400    | `address.lga is required`                                       | Missing `lga` in address                         |
| 400    | `profile.yearsInBusiness must be one of: ...`                   | Invalid enum                                     |
| 400    | `profile.grossProfitMargin must be a number between 1 and 100`  | Out of range                                     |
| 400    | `userIdentity.idType is required when userIdentity is provided` | Incomplete identity object                       |
| 422    | `Application has no loan ID`                                    | Application not yet registered in lending engine |


## OpenAPI

````yaml POST /v1/loans/{applicationId}/submit-underwriting
openapi: 3.0.0
info:
  title: Carbon Business API
  description: >-
    ## Welcome to our API Developer Documentation


    Carbon aims to unlock the full potential of your business with a
    feature-rich account designed for growth.


    ## Integrations


    We aim to provide our APIs for developers and businesses to offer financial
    services to their existing customer base through REST APIs without doing the
    heavy lifting. Our API has predictable resource-oriented URLs, accepts
    form-encoded request bodies, returns JSON-encoded responses, and uses
    standard HTTP response codes, authentication, and verbs.


    ### Authentication


    `Authorization : API Key`


    Header  

    `x-carbon-key : value`


    `x-carbon-key` can be generated via developer page on Carbon Business


    | Environment | URL |

    | --- | --- |

    | Live |  |

    | Sandbox |
    [https://carbonapistagingsecure.getcarbon.co/baas/api](https://carbonapistagingsecure.getcarbon.co/baas/api)
    |


    ### **Handling Errors**


    We use the conventional HTTP response codes to indicate the success or
    failure of an API request.  

    Codes in the 2xx range indicate success. Codes in the 4xx range indicate an
    error that failed given the information provided (e.g., a required parameter
    was omitted, etc.). Codes in the 5xx range indicate an error with our
    servers.


    | Error | Description |

    | --- | --- |

    | 400 - Bad Request | The request was unacceptable, often due to missing a
    required parameter. |

    | 401 - Unauthorized | Not a valid API key was provided. |

    | 402 - Request Failed | The parameters were valid but the request failed. |

    | 403 - Forbidden | The API key doesn't have permission to perform the
    request. |

    | 404 - Not Found | The requested resource doesn't exist. |

    | 429 - Too Many Requests | Too many requests hit the API |

    | 500, 502, 503, 504 - Server Errors | System Error |
  version: 1.0.0
servers:
  - url: https://carbonapistagingsecure.getcarbon.co/baas/api
    description: >-
      Replace {{base_url}} with your API base URL (e.g.,
      https://api.example.com)
security:
  - apikeyAuth: []
tags:
  - name: Accounts
    description: >-
      Virtual accounts are generated account details (account number and bank)
      that allow Carbon Business merchants to receive payments from customers
      via NGN bank transfer. This is currently only available in naira (NGN).


      Virtual accounts are either dynamic (temporary) or static (permanent). A
      dynamic account number expires after handling a transaction, while a
      static account number doesn't expire.


      **Static Account**


      Creating static accounts can be useful when receiving recurring payments
      through bank transfers. The process involves generating a static virtual
      account with customer information. Once payment is made, we will send you
      a webhook notification, which you can then manage.


      **Dynamic Account**


      Creating dynamic accounts can be useful when receiving one-time payments
      through bank transfers. The process involves generating a dynamic virtual
      account with a set amount for the customer during checkout. Once payment
      is made, we will send you a webhook notification, which you can then
      manage.


      Key things you can do with these endpoints:


      - Create an account

      - Retreive an account

      - Verify Transaction

      - Retreive a list of transactions
  - name: Accounts > Transactions
  - name: Banks
    description: |-
      - Get a list of banks and financial institutions
      - Verify/resolve account details
  - name: Customers
    description: >-
      This collection contains a set of API endpoints to manage customer-related
      operations for an application. The endpoints allow for creating a new
      customer, retrieving a list of all customers, and fetching details of a
      single customer.


      - Create Customer
          
      - Fetch Customer/Customers
  - name: Payout
    description: |-
      - Make Transfer
      - Verify Transfer
  - name: Status
    description: '- Service Health check'
  - name: Verification
  - name: Webhook
    description: |-
      ## EVENTS

      `account.incoming-transaction`

      ``` json
      {
          "event": "account.incoming-transaction",
          "data": {
              "id": "string",
              "amount": "float",
              "currency": "string",
              "transactionType": "string",
              "entryDate": "datetime",
              "uniqueRef": "string",
              "account": {
                  "id": "string",
                  "bankAccount": {
                      "accountName": "string",
                      "accountNumber": "string",
                      "bank": {
                          "code": "string",
                          "name": "string"
                      }
                  },
                  "static": boolean,
                  "currency": "string",
                  "clientId": "string"
              }
            }
      }

       ```

      `account.outgoing-transaction`

      ``` json
      {
          "event": "account.outgoing-transaction",
          "data": {
              "id": "string",
              "amount": "float",
              "currency": "string",
              "transactionType": "string",
              "entryDate": "datetime",
              "uniqueRef": "string",
              "account": {
                  "id": "string",
                  "bankAccount": {
                      "accountName": "string",
                      "accountNumber": "string",
                      "bank": {
                          "code": "string",
                          "name": "string"
                      }
                  },
                  "static": boolean,
                  "currency": "string",
                  "clientId": "string"
              }
          }
      }

       ```
  - name: Loans
    description: >-
      Partner lending API. Enables fintech partners to originate business loans
      for their end-customers.


      - Enroll customers for lending and trigger KYC

      - Submit loan applications and supporting documents

      - Manage offer acceptance, disbursement account, and post-offer steps

      - Charge repayments and retrieve repayment schedules
paths:
  /v1/loans/{applicationId}/submit-underwriting:
    post:
      tags:
        - Loans
      summary: Submit Underwriting
      description: >-
        Submits business profile data used for credit decisioning.

        ### Request Body

        - `monthly_revenue` (number, required): Average monthly revenue in kobo.
        - `years_in_business` (number, required): Number of years operating. -
        `num_employees` (number, required): Number of employees. -
        `business_sector` (string, required): Business sector/industry.
      parameters:
        - name: x-carbon-key
          in: header
          schema:
            type: string
          required: true
          example: '{{access_token}}'
        - name: applicationId
          in: path
          schema:
            type: string
          required: true
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
      requestBody:
        description: Provide the required values for the request body.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - monthly_revenue
                - years_in_business
                - num_employees
                - business_sector
              properties:
                monthly_revenue:
                  type: number
                  example: 5000000
                years_in_business:
                  type: number
                  example: 3
                num_employees:
                  type: number
                  example: 10
                business_sector:
                  type: string
                  example: RETAIL
            example:
              monthly_revenue: 5000000
              years_in_business: 3
              num_employees: 10
              business_sector: RETAIL
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                status: success
                message: Underwriting data submitted
components:
  securitySchemes:
    apikeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: Provide your API key in the 'apikey' header.

````