Skip to main content

Site

A Site represents a physical location of a Client where workers are assigned to complete bookings. Each site belongs to a single client and inherits the client’s branch and agency context.

🏒 Sites are critical for setting up rates, rules, and compliance requirements for workers.


Overview


API Endpoints

1. List All Sites

Retrieve all sites for a given client.

GET /api/clients/{clientId}/sites

Query Parameters

Response Example

{
  "data": [
    {
      "id": "1",
      "clientId": "1",
      "name": "Recruso Logistics Depot A",
      "address": "1 Industrial Way, Manchester, EC2 4AA",
      "phone": "+44 845 051 1055",
      "email": "sitea@recrusologistics.co.uk",
      "assessmentRequired": true,
      "createdOn": "2021-03-01T09:00:00Z"
    }
  ],
  "pageNumber": 1,
  "pageSize": 20,
  "nextPage": null,
  "previousPage": null,
  "pageCount": 1,
  "totalRecordCount": 1
}

2. Get Site by ID

Retrieve details of a single site.

GET /api/sites/{siteId}

Response Example

{
  "id": "1",
  "clientId": "1",
  "name": "Recruso Logistics Depot A",
  "address": "1 Industrial Way, Manchester, EC2 4AA",
  "phone": "+44 845 051 1055",
  "email": "sitea@recrusologistics.co.uk",
  "assessmentRequired": true,
  "departments": [
    { "name": "Operations", "contactPerson": "John Doe", "email": "ops@recrusologistics.co.uk" }
  ],
  "rates": [
    { "skill": "LGV Driver", "hourlyRate": 15.50 },
    { "skill": "Warehouse Operative", "hourlyRate": 12.00 }
  ],
  "bannedWorkers": ["W003", "W007"],
  "documents": [
    { "name": "Site Risk Assessment", "url": "/docs/sites/1/risk_assessment.pdf" }
  ],
  "createdOn": "2021-03-01T09:00:00Z"
}

3. Create a Site

Create a new site under a client.

POST /api/clients/{clientId}/sites

Request Body

{
  "name": "Recruso Logistics Depot B",
  "address": "2 Industrial Way, Manchester, EC2 4AB",
  "phone": "+44 20 7946 5679",
  "email": "siteb@recrusologistics.co.uk",
  "assessmentRequired": true,
  "departments": [
    { "name": "Operations", "contactPerson": "Jane Doe", "email": "ops@recrusologistics.co.uk" }
  ],
  "rates": [
    { "skill": "LGV Driver", "hourlyRate": 16.00 },
    { "skill": "Warehouse Operative", "hourlyRate": 12.50 }
  ],
  "bannedWorkers": []
}

Response Example

{
  "id": "S002",
  "clientId": "1",
  "name": "Recruso Logistics Depot B",
  "address": "2 Industrial Way, Manchester, EC2 4AB",
  "phone": "+44 20 7946 5679",
  "email": "siteb@recrusologistics.co.uk",
  "assessmentRequired": true,
  "departments": [
    { "name": "Operations", "contactPerson": "Jane Doe", "email": "ops@recrusologistics.co.uk" }
  ],
  "rates": [
    { "skill": "LGV Driver", "hourlyRate": 16.00 },
    { "skill": "Warehouse Operative", "hourlyRate": 12.50 }
  ],
  "bannedWorkers": [],
  "createdOn": "2025-10-06T14:00:00Z"
}

4. Update a Site

Update site details, rates, or worker lists.

PUT /api/sites/{siteId}

Request Body

{
  "name": "Recruso Logistics Depot B - Updated",
  "phone": "+44 20 7946 5680",
  "assessmentRequired": false,
  "departments": [
    { "name": "Operations", "contactPerson": "Jane Doe", "email": "ops@recrusologistics.co.uk" }
  ],
  "rates": [
    { "skill": "LGV Driver", "hourlyRate": 16.50 },
    { "skill": "Warehouse Operative", "hourlyRate": 12.75 }
  ],
  "bannedWorkers": ["W010"]
}

Response Example

{
  "id": "S002",
  "clientId": "1",
  "name": "Recruso Logistics Depot B - Updated",
  "phone": "+44 20 7946 5680",
  "assessmentRequired": false,
  "departments": [
    { "name": "Operations", "contactPerson": "Jane Doe", "email": "ops@recrusologistics.co.uk" }
  ],
  "rates": [
    { "skill": "LGV Driver", "hourlyRate": 16.50 },
    { "skill": "Warehouse Operative", "hourlyRate": 12.75 }
  ],
  "bannedWorkers": ["W010"],
  "updatedOn": "2025-10-06T14:30:00Z"
}

5. Delete a Site

Delete an existing site.

DELETE /api/sites/{siteId}

Response Example

{
  "status": "success",
  "message": "Site deleted successfully."
}

Relationships


Typical Usage

Scenario: A staffing mobile app needs to check site rules before assigning a worker.

Steps:

  1. Call GET /api/clients/{clientId}/sites to list all client sites.
  2. Retrieve site details with GET /api/sites/{siteId} to check rates, assessment requirements, and banned workers.
  3. Create or update site details with POST /api/clients/{clientId}/sites or PUT /api/sites/{siteId}.
  4. Delete sites with DELETE /api/sites/{siteId} when required.

For a complete list of request and response fields, and to test the endpoints interactively — click below.

Try it