Archive a Document
/public/v1/documents/{document}/archiveRecords that the Document is no longer current, and returns it with archived_at set.
Refuses with a 409 when it is already archived, so the date it was first archived on is
never overwritten. Archiving does not remove the Document from the Document lists of the
records it is attached to: those lists carry no status filter, so read archived_at to
tell an archived Document from a current one.
A Document is only archivable here when every record it is attached to is one these endpoints manage, and a note about a staff member is not one of them, so a staff member's file, a staff note's attachment, a leave certificate, a payment record or a participant information item's attachment answers 403. One attached to a participant record is archived and unarchived with that record rather than on its own.
documentstringrequiredThe document UUID
Response
200application/jsonDocumentResource
dataobjectrequired▶Show 6 child attributesHide child attributes
idstringrequiredExample:d1c2e3f4-a5b6-47c8-9d0e-1f2a3b4c5d6enamestringrequiredExample:Service Agreementfile_extensionstringrequiredExample:pdfarchived_atstring | nullrequiredExample:2024-02-01T09:00:00+00:00created_atstringrequiredExample:2024-01-15T10:30:00+00:00categoriesobject[]required▶Show 2 child attributesHide child attributes
idstringrequiredExample:c4a5b6c7-d8e9-40f1-a2b3-c4d5e6f7a8b9namestringrequiredExample:Assessments
401Unauthenticated403The Document is attached to a record these endpoints do not support, it is no longer attached to any record at all, or it belongs to a participant record, whose Documents are archived with the record itself.404Not found409The Document is already archived, or it belongs to a participant record and lost a race against that record being unarchived.