---
title: "Delete a document"
method: DELETE
path: "/receivables/{id}/documents/{document_id}"
tags: ["Receivables"]
---

# Delete a document

`DELETE /receivables/{id}/documents/{document_id}`

## Request

- Base URL: `https://core.sivo.com`
- URL: `https://core.sivo.com/receivables/{id}/documents/{document_id}`
- Auth: one of:
  - API key in header `Authorization`
  - OAuth 2
    - Authorization code: `https://dashboard.sivo.com/oauth/authorize`
    - Client credentials
    - Token URL: `https://core.sivo.com/oauth/token`
- TypeScript: <https://skmtc.dev/sivo/apis/sivo-advance-api/docs/receivables/:id/documents/:document_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, required: An object ID assigned and owned by the originator
- `document_id` string, required: An object ID assigned and owned by the originator

## Response `200`

Successful operation

- object
  - `file_name` string, required: File name of the document, used when the file is downloaded
  - `content_type` 'application/pdf' | 'image/png' | 'image/jpeg' | 'image/webp' | 'application/xml' | 'text/xml', required: MIME type of the document file
  - `size_bytes` integer, required: Size of the file in bytes, at most 25 MB
  - `type` 'invoice' | 'contract' | 'proof_of_delivery' | 'other': Kind of document attached to the receivable
  - `metadata` object: Additional custom data associated with this document
  - `id` string, required: The receivable document ID assigned by the originator
  - `created_at` string, date-time, required: Creation date and time
  - `created_by` string, required: ID of the user that created this object
  - `updated_at` string, date-time, required: Last update date and time
  - `updated_by` string, required: ID of the user that last updated this object
  - `status` 'pending_upload' | 'uploaded' | 'quarantined', required: Lifecycle status of the document: pending_upload until the file upload is confirmed, quarantined when the file failed malware scanning (upload a replacement file to clear it)
  - `etag` string: Entity tag of the stored file, set once the upload is confirmed

## Changes

- **2026-11-03** `4bbab9699612`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sivo/apis/sivo-advance-api/changes/receivables/:id/documents/:document_id/delete.md)

---

[API](https://skmtc.dev/sivo/apis/sivo-advance-api.md) - [All operations](https://skmtc.dev/sivo/apis/sivo-advance-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sivo/apis/sivo-advance-api/revisions/4bbab9699612?raw)
