NextGen APIs

DELETE /documents/r1/files/{fileUuid}

Http Verb

DELETE

Url

/documents/r1/files/{fileUuid}

Permissions required


Personally Identifiable Information (PII)

No

Sensitive Information

No

Last Modified Version

r1

Released since

2025 W2 (FSM 20.0)

Deprecated since


Removed since


Tech Tags


Business Logic

This API deletes a file version. The deletion is always logical: the deleted flag of the target file version is set to true. Optionally, if the physicalDeletion query parameter is set to true, the associated physical file is also permanently removed from the storage.

The deletion process steps are:

  1. Validation:

    • The fileUuid path parameter is validated as mandatory.

  2. File Loading:

    • If no version is specified, the main version of the file is loaded (i.e., the currently active version, or the latest one if no active version is available).

    • If a specific version is provided, that exact version is loaded.

    • If no matching file is found, a NOT_FOUND error is returned.

  3. Logical Deletion:

    • The deleted flag of the loaded file version is set to true and the record is updated.

  4. Physical Deletion (optional):

    • If physicalDeletion is true, the physical file at the stored path is located and permanently deleted from the storage.

    • If the physical file cannot be found or an error occurs during deletion, an appropriate error is returned.

  5. Notification:

    • A delete notification event is dispatched after the operation completes successfully.

Path Parameters

Field

Note

fileUuid

The UUID of the file to delete.

Query String Parameters

Field

Validations

Note

physicalDeletion

Boolean. Default: false

When true, the physical file associated with the file version is also permanently deleted from the storage, in addition to the logical deletion.

Header Parameters

Default.

Response documentation

Response error codes

BASE_0001, NOT_FOUND