Archive an employee
const url = 'https://example.com/api/public/v1/employees/archive';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"Id":"example","Email":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/public/v1/employees/archive \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "Id": "example", "Email": "example" }'Archives an employee, addressed by corporate email or by id — the signal that this person is no longer in the HRIS. Access itself is the person’s to close: this API can never revoke a card. Idempotent: the response says whether this call archived the record or found it already archived.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Addresses one employee record by either handle. Give exactly one: the corporate email the record was created with, or the id a previous call returned.
object
Examplegenerated
{ "Id": "example", "Email": "example"}Addresses one employee record by either handle. Give exactly one: the corporate email the record was created with, or the id a previous call returned.
object
Examplegenerated
{ "Id": "example", "Email": "example"}Addresses one employee record by either handle. Give exactly one: the corporate email the record was created with, or the id a previous call returned.
object
Examplegenerated
{ "Id": "example", "Email": "example"}Responses
Section titled “Responses”OK
What archiving did. Idempotent: archiving an already-archived record succeeds and says so, rather than answering the same empty 204 either way and leaving the caller to guess.
object
True when this call archived the record; false when it was already archived.
Example
{ "Status": "NotActivated"}Bad Request
The Integration API’s error shape — RFC 7807 application/problem+json. The Portal API answers
in its own { Error, Details } envelope because one client parses one shape; an external
integrator expects the standard instead.
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Unauthorized
The Integration API’s error shape — RFC 7807 application/problem+json. The Portal API answers
in its own { Error, Details } envelope because one client parses one shape; an external
integrator expects the standard instead.
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
The Integration API’s error shape — RFC 7807 application/problem+json. The Portal API answers
in its own { Error, Details } envelope because one client parses one shape; an external
integrator expects the standard instead.
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}