Skip to content

Restore an archived site

POST
/v1/clients/{clientId}/sites/{id}/restore
curl --request POST \
--url https://api2.recruso.co.uk/v1/clients/1/sites/1/restore \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "clientId": 137, "id": 512 }'

Restores a site that was archived with DeleteSite, returning it to the client’s active sites with its address and history intact.

Only an archived site can be restored. An active site id, a site belonging to another client, and a site from another agency all return 404.

If the client has since gained an active site with the same name, the restore returns 400 — rename the active site first, because two active sites of one client cannot share a name.

The request body is empty; the client and site come from the route. On success the restored site is returned.

Access. Requires a client-credentials access token. Tokens issued through the interactive user login are rejected.

clientId
required
integer format: int32

The clientId path parameter

id
required
integer format: int32

The id path parameter

Media typeapplication/json

Identifies the site to restore. Both values come from the route; the body is empty.

object
clientId

The client this site belongs to.

integer format: int32
Example
137
id

The site to restore. Taken from the route.

integer format: int32
Example
512

OK

Media typeapplication/json

A site as it stands after being restored.

object
siteId

The site’s unique identifier, assigned by Recruso.

integer format: int32
clientId

The client this site belongs to.

integer format: int32
siteName

The site’s name. Required, up to 70 characters, and unique among the client’s active sites.

string
memo

Free-text notes about the site. Up to 550 characters.

string
nullable
gre
number format: float
nullable
grn
number format: float
nullable
address1

First line of the site address. Up to 150 characters.

string
nullable
address2

Second line of the site address. Up to 50 characters.

string
nullable
town

Town or city of the site address.

string
nullable
county

County of the site address.

string
nullable
country

Country of the site address.

string
nullable
postCode

Postcode of the site address.

string
nullable
telephone1

The site’s main telephone number.

string
nullable
telephone2

A second telephone number for the site.

string
nullable
fax

The site’s fax number.

string
nullable
email

The site’s main email address.

string
nullable
invoiceMethodId

How invoices for this site are delivered, as an id from the invoice methods vocabulary.

integer format: int16
nullable
useSiteAddressForInvoice

Whether invoices for this site use the site address rather than the client’s invoice address.

boolean
nullable
useSiteEmailForInvoice

Whether invoices for this site are sent to the site email rather than the client’s invoice email.

boolean
nullable
branchId

The branch this site is managed under.

integer format: int16
nullable
timesheetEmail

The address timesheets for this site are sent to.

string
nullable
Example
{
"siteId": 512,
"clientId": 137,
"siteName": "Trafford Park DC",
"memo": "Gatehouse sign-in required; ask for the shift supervisor.",
"address1": "Northgate House",
"address2": "22 Ashburton Road West",
"town": "Trafford Park",
"county": "Greater Manchester",
"country": "United Kingdom",
"postCode": "M17 1RU",
"telephone1": "0161 872 4410",
"telephone2": "0161 872 4411",
"fax": "0161 872 4412",
"email": "trafford@example-northgate.co.uk",
"invoiceMethodId": 1,
"useSiteAddressForInvoice": true,
"useSiteEmailForInvoice": false,
"branchId": 4,
"timesheetEmail": "timesheets@example-northgate.co.uk"
}

Bad Request

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Unauthorized

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Forbidden

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Not Found

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}