Unarchive a Document
/public/v1/documents/{document}/unarchiveClears the Document's archived state and returns it with archived_at empty.
Refuses with a 409 when the Document is not archived.
A Document on a participant record is the exception to that 409: a current one answers 403
rather than 409, because the archive rule that refuses to archive a participant record's
Document on its own gates this endpoint too, and it refuses before the archived state is
read. Read archived_at first for this owner type rather than reading 403 as "unsupported".
A Document is only unarchivable 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 or a participant information item's attachment answers 403. Neither can one whose participant record is itself archived: that record archived its Documents with it, and unarchiving the record is what brings them back together. A Document archived on its own while its record is current — as a document import leaves it — is unarchived here, which puts it back in step with the record. Archiving a participant record's Document individually is refused either way: that is the record's own archive to make.
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 and is not archived.404Not found409The Document is not archived, or its participant record is archived too.