File Commands

Delete document

Deletes a <glossary:Document> uploaded to a <glossary:Book>.


A <glossary:Document> can be deleted from any state except QUEUED, PROCESSING, GROOMING, VERIFYING, DELETING, or DELETED. This means Documents in the COMPLETED, FAILED, VERIFICATION_COMPLETE, and REJECTED states can all be deleted.

🚧 No turning back! Deleted <glossary:Document>s and their associated data, such as transactions, cannot be recovered. Make sure you want to proceed before deleting.

post/v1/document/remove

Request

  • Base URL
    https://api.ocrolus.com
  • URL
    https://api.ocrolus.com/v1/document/remove
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://auth.ocrolus.com/oauth/token

Request body

doc_uuidstring

The unique identifier of the <glossary:Document> that will be deleted. Mutually exclusive with doc_id.

doc_idinteger

The <glossary:PK> of the <glossary:Document> that will be deleted. Mutually exclusive with doc_uuid.

Response

Success

statusinteger

A numerical code that indicates the status of the request.

messagestring

A textual description that indicates details about this response's status.

Example response

{
  "status": 200,
  "message": "OK",
  "response": {
    "pk": 54857464,
    "id": 54857464,
    "checksum": "716a9e2119b197fc8fed9e2ca3e56cae",
    "created_ts": "2023-02-09T10:47:40Z",
    "book_pk": 30219565,
    "name": "bank-statement.pdf",
    "page_count": 4,
    "document_status": "DELETING"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.