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

Remove Document

Removes a previously attached document from a specific operation. This allows for document management and correction of document associations without affecting the operation itself.

Endpoint

DELETE/v2/billing/operation/{id}/document/{documentId}

Link

Request

Path Parameters

Parameter
Type
Description
Required
Example

id

string

Operation ID to remove document from.

Yes

"op_12345"

documentId

string

Document ID to remove from operation.

Yes

"doc_abc123"

Headers

Key
Value
Required

Authorization

Bearer <JWT>

Yes

Accept

application/json

Yes


Response (200 OK)

Returns the updated operation object with the specified document removed from the documents array.

Response Fields

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

Example Response (After Removing One Document):

Example Response (After Removing All Documents):


Examples

Request

Scenario: Removing Multiple Documents

Remove documents one by one using separate requests


Error Responses

  1. Operation Not Found:

  2. Document Not Found:

  3. Document Not Attached:

  4. Operation Not Editable:

  5. Locked Document:


Notes

  • Document Preservation: The document itself is not deleted from the system, only the association with the operation is removed

  • Multiple Removal: Can remove multiple documents by calling the endpoint multiple times

  • Status Restrictions: Typically cannot remove documents from completed/failed/canceled operations

  • Audit Trail: Document removal is logged for compliance purposes

  • Locked Documents: Some documents may be locked (e.g., by compliance team) and cannot be removed

Typical Use Cases:

  • Correcting mistakenly attached documents

  • Replacing outdated documents with updated versions

  • Removing unnecessary supporting documents

  • Compliance cleanup and document management

Workflow for Document Replacement:

  1. Remove old document using this endpoint

  2. Upload new document via document upload endpoint

  3. Attach new document to operation using Add Document endpoint


Security Considerations

  • Requires proper authorization to modify operation documents

  • Operations in certain statuses may be restricted from document modifications

  • Some documents may have additional protection/locking mechanisms

Last updated