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
id
string
Operation ID to remove document from.
Yes
"op_12345"
documentId
string
Document ID to remove from operation.
Yes
"doc_abc123"
Headers
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
Operation Not Found:
Document Not Found:
Document Not Attached:
Operation Not Editable:
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:
Remove old document using this endpoint
Upload new document via document upload endpoint
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

