Skip to main content
POST
/
v1
/
loans
/
{applicationId}
/
documents
Upload Document
curl --request POST \
  --url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{applicationId}/documents \
  --header 'Content-Type: multipart/form-data' \
  --header 'apikey: <api-key>' \
  --header 'x-carbon-key: <x-carbon-key>' \
  --form file='@example-file' \
  --form file_tag=BUSINESS_REG_DOCS
{
  "status": "success",
  "data": {
    "file_url": "https://storage.example.com/documents/abc123.pdf"
  }
}

Overview

Uploads a single document to the loan application. Send one request per file. Accepted formats are PDF, JPEG, and PNG (max 10 MB). The file_url returned in the response is required when calling POST /v1/loans/:applicationId/board-resolution. Content-Type: multipart/form-data

Request

Method: POST
URL: /v1/loans/:applicationId/documents

Parameters

NameInTypeRequiredDescription
x-carbon-keyHeaderstringYesAPI key for authentication.
applicationIdPathstringYesApplication ID.

Form Fields

FieldTypeRequiredDescription
filefileYesPDF, JPEG, or PNG. Max 10 MB.
file_tagstringYesDocument category. See enum below.
file_tag values:
ValueDescription
ADDITIONAL_DOCSMiscellaneous supporting documents
BANK_STATEMENTSBank statement documents
BUSINESS_REG_DOCSCAC certificate — unlocks the CAC underwriting stage
CAC_FORM7_DOCSCAC Form 7 — also unlocks the CAC underwriting stage
FIN_ACCT_DOCSFinancial account documents
ID_CARD_DOCSIdentity card documents
PAYEE_PAYMENTS_DOCSPayee/PAYE payment receipts
PENSION_PAYMENTS_DOCSPension payment records
TAX_RETURNS_DOCSTax return documents
ADDRESS_VERIFICATION_DOCUtility bills or rent receipt for address verification
BOARD_RESOLUTION_DOCBoard resolution document — use file_url from this response in POST /board-resolution

Response

200 OK

{
  "status": "success",
  "message": "Loan document uploaded",
  "data": {
    "filename": "cac_certificate.pdf",
    "file_url": "https://storage.carbon.ng/files/abc123def456",
    "file_tag": "BUSINESS_REG_DOCS",
    "uploaded": true
  }
}
FieldDescription
file_urlURL of the uploaded file. Save this — required for POST /board-resolution.
file_tagThe tag that was submitted
uploadedtrue on success

Error Responses

StatusMessageCause
400file is requiredNo file attached
400Only PDF and image files (JPEG, PNG) are acceptedUnsupported file type
400File size must not exceed 10 MBFile too large
400file_tag is requiredMissing tag
400file_tag must be one of: ...Invalid tag value
400Application not foundInvalid applicationId
422Application has no loan IDApplication not yet registered

Authorizations

apikey
string
header
required

Provide your API key in the 'apikey' header.

Headers

x-carbon-key
string
required

Path Parameters

applicationId
string
required

Body

multipart/form-data

Upload a document file.

file
file
required
file_tag
string
required
Example:

"BUSINESS_REG_DOCS"

Response

200 - application/json

Successful response

The response is of type object.