The resident endpoint (api/integration/patients/) is typically called with the full details supplied - e.g. this type of payload:
{ "external_id": "123456", "first_name":"Fred", "last_name":"Smith", "gender":"m", "birth_date": "1940-01-20", "deleted_reason": null }
It is, however, permissible to pass just the "deleted_reason" (with the external_id) to archive an existing patient:
{ "external_id": "123456", "deleted_reason": "Discharged" }
See Archive a Patient for more details on how to archive (and unarchive patients).
Should you wish to restore or reactivate a resident that was archived, you need to supply the deleted_reason field in the payload with a null value:
{ "external_id": "123456", "deleted_reason": null }
Note: If the deleted_reason is not part of the payload, PainChek does not update the status of the resident.