Archive a site
const url = 'https://api2.recruso.co.uk/v1/clients/1/sites/1';const options = {method: 'DELETE', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api2.recruso.co.uk/v1/clients/1/sites/1 \ --header 'Authorization: <Authorization>'Archives one site belonging to one of your own agency’s clients. This is a soft delete: the row is retained with its history, siteArchivedBy and siteArchivedOn are stamped, and RestoreSite can bring it back.
An archived site drops out of ListSites and out of the sites embedded in ListClientsWithSites, but GetSiteById still returns it with isDeleted true.
The name stays reserved. Creating or renaming another site to the archived site’s name returns 409 until the archived site is restored or renamed.
The site must belong to the client named in the route; otherwise 404. Archiving a site that is already archived is not rejected — it re-stamps the archive audit fields.
Access. Requires a client-credentials access token. Tokens issued through the interactive user login are rejected.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The clientId path parameter
The id path parameter
Responses
Section titled “Responses”No Content
Unauthorized
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}
