For the complete documentation index, see llms.txt. This page is also available as Markdown.

Add Document

Attaches an existing document to a specific operation. This is used to associate supporting documentation (invoices, contracts, etc.) with financial operations for compliance, verification, and audit

Endpoint

POST/v2/billing/operation/{id}/document

Link

First, you need to use the Upload Document method. In response, we receive a document ID, which we then specify in the Add Document method. The URL in the method must include the ID of the operation to which we are attaching the document: {{baseUrl}}/v2/billing/operation/5b55db86-17e5-4612-81f9-29d3bd5082a1/document

Request

Path Parameters

Parameter
Type
Description
Required
Example

id

string

Operation ID to attach document to.

Yes

"5b55db86-17e5-4612-81f9-29d3bd5082a1"

Headers

Key
Value
Required

Authorization

Bearer <JWT>

Yes

Content-Type

application/json

Yes

Accept

application/json

Yes

Request Body (JSON)

Field
Type
Description & Requirements
Required
Example

documentId

string

ID of the document (must be previously uploaded to the system).

Yes

"doc_abc123"

name

string

Document display name (for reference).

No

"Invoice_Q2_2024"

Example Request Body:

Example Request Body (Minimal):


Response (200 OK)

Returns the updated operation object with the newly attached document included in the documents array.

Response Fields

Returns the complete operation object (same structure as Get Operation), with the documents array updated to include the new document.

Example Response:

Example Response (Multiple Documents):


Examples

Request

Request with Multiple Documents

Note: Call endpoint multiple times to add multiple documents


Error Responses

  1. Operation Not Found:

  2. Document Not Found:

  3. Document Already Attached:

  4. Operation Not Editable:


Notes

  • Document Pre-upload: Documents must be uploaded to the system first (via separate document upload endpoint)

  • Multiple Documents: Can attach multiple documents to a single operation

  • Document Types: Various document types supported (invoices, contracts, statements, etc.)

  • Status Restrictions: Typically cannot add documents to completed/failed/canceled operations

  • Audit Trail: Document attachments are logged for compliance

Typical Workflow:

  1. Upload document via document upload endpoint → returns documentId

  2. Create operation or get existing operation ID

  3. Attach document to operation using this endpoint

  4. Operation appears in operation details with attached documents

Request sample

Response sample

Last updated