/employers/{employerId}/worksites

Changed on

Use this endpoint to create a new Worksite for an Employer.

Accepts a standard Worksite object with no read-only values specified. If supplied, the name of the Worksite must be unique to the Employer.

Response

If successful, the endpoint responds with HTTP Status Code 201 Created and a Worksite object with the integer ID of the created Worksite in the response body. It also sets the Location header to the location of the Worksite.

If the specified Employer does not exist, this endpoint will return an error with HTTP Status Code 404 Not Found.

post/employers/{employerId}/worksites

Request

  • Base URL
    https://api.securevan.com/v4
  • URL
    https://api.securevan.com/v4/employers/{employerId}/worksites
  • Auth
    HTTP basic

Path parameters

employerIdinteger required

Required; unique identifier for the Employer

Request body

worksiteobject

Accepts a standard Worksite object with no read-only values specified. If supplied, the name of the Worksite must be unique to the Employer.

Response

201

worksiteIdinteger
namestring
isPreferredboolean

Example response

{
  "worksiteId": 321,
  "name": "Administration",
  "isPreferred": true,
  "address": {
    "addressLine1": "77 Salem Street",
    "unitNo": "Room H104",
    "city": "Malden",
    "stateOrProvince": "MA",
    "zipOrPostalCode": "02148"
  }
}

Changes