Capvant

Attach a document

post
https://sandbox.capvant.com/partner/v1/leads/{id}/documents/{type}
POST
/leads/{id}/documents/{type}

One or more files.

multipart/form-data with one or more parts named file. bank-statements is the classified lane: every file is read before anything is stored, and a batch containing something that is not a statement is refused whole with the reason. Up to 6 files, each up to 10MB.

Authorization

AuthorizationBearer <token>

An access token from POST /oauth/token. Valid for one hour. Preferred, because a leaked request log then exposes an hour rather than a permanent credential.

In: header

Path Parameters

id*string

The lead id returned by POST /leads.

Formatuuid
type*string

Document type from /enums/document-types. Hyphens and underscores are both accepted.

Value in

  • "bank-statements"
  • "management_accounts"
  • "debt_schedule"
  • "aged_debtors"
  • "filed_accounts"
  • "proof_of_id"
  • "other"

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

Shell
curl -X POST "https://sandbox.capvant.com/leads/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents/bank-statements" \  -F file="[    \"string\"  ]"
JSON
{  "lead_id": "string",  "document_type": "bank_statements",  "documents": [    {      "id": "string",      "document_type": "bank_statements",      "filename": "string",      "byte_size": 0,      "state": "accepted",      "reason": "string",      "received_at": "string"    }  ]}