Sites

APIs to manage an organisation's sites.

Create/Update site

Update site information.

Securityo_auth
Request
Request Body schema: application/json
required

Update site information.

address
string
id
string or null <uuid>
name
required
string non-empty
openingHour
object or null
organisationId
string <uuid>
state
string
Enum: "active" "deleted"
tz
string
Responses
201

OK.

204

Update was successful.

400

Bad request.

401

Authentication failed.

403

Not allowed.

410

Gone.

422

Unprocessable entity.

500

Failed.

put/sites
Request samples
application/json
{
  • "address": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "openingHour": { },
  • "organisationId": "c9b3f279-e3b5-4204-ad99-646257417f98",
  • "state": "active",
  • "tz": "string"
}
Response samples
application/json
{
  • "address": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "openingHour": { },
  • "organisationId": "c9b3f279-e3b5-4204-ad99-646257417f98",
  • "state": "active",
  • "tz": "string"
}

Delete site

Set the state of a site to decommissioned.

Securityo_auth
Request
path Parameters
siteId
required
string <uuid>

The ID of the site that will be decommissioned.

Responses
204

OK.

400

Bad request.

401

Authentication failed.

403

Not allowed.

404

Not found.

410

Gone.

422

Unprocessable entity.

500

Failed.

delete/sites/{siteId}
Request samples
Response samples
application/json
{
  • "code": 0,
  • "message": "string"
}

Get site

Get all attributes of a site model given a site ID.

Securityo_auth
Request
path Parameters
siteId
required
string <uuid>

The ID of the site to be returned.

Responses
200

OK.

401

Authentication failed.

403

Not allowed.

404

Not found.

500

Failed.

get/sites/{siteId}
Request samples
Response samples
application/json
{
  • "address": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "openingHour": { },
  • "organisationId": "c9b3f279-e3b5-4204-ad99-646257417f98",
  • "state": "active",
  • "tz": "string"
}

List sites

List all the sites in the portfolio along with the organisations that own them.

Securityo_auth
Request
query Parameters
organisationId
string <uuid>

The ID of an organisation.

userId
string

The ID of a user.

state
string

Site state.

Enum: "active" "deleted"
Responses
200

OK.

401

Authentication failed.

403

Not allowed.

404

Not found.

422

Unprocessable entity.

500

Failed.

get/sites
Request samples
Response samples
application/json
[
  • {
    }
]