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
id
string
Operation ID to attach document to.
Yes
"5b55db86-17e5-4612-81f9-29d3bd5082a1"
Headers
Authorization
Bearer <JWT>
Yes
Content-Type
application/json
Yes
Accept
application/json
Yes
Request Body (JSON)
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
Operation Not Found:
Document Not Found:
Document Already Attached:
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:
Upload document via document upload endpoint → returns
documentIdCreate operation or get existing operation ID
Attach document to operation using this endpoint
Operation appears in operation details with attached documents
Request sample
Response sample
Last updated

