Skip to main content
GET
/
sites
/
v2
/
rs
/
{siteId}
Retrieves an site by its ID
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/sites/v2/rs/{siteId} \
  --header 'Authorization: Bearer <token>' \
  --header 'x-session-token: <x-session-token>'
{
  "data": {
    "id": 1,
    "name": "Main site",
    "types": [
      1,
      1
    ],
    "classifications": [
      "ERT",
      "ERP"
    ],
    "isEstablishment": true,
    "establishmentId": 10,
    "serialNumber": "123456",
    "sortOrder": 1,
    "archivedAt": "2024-12-10T10:00:00.000Z",
    "updatedAt": "2024-12-09T14:23:00.000Z",
    "createdAt": "2024-01-15T08:45:00.000Z",
    "establishment": {
      "id": 1,
      "name": "Main site",
      "address": "123 Main Street",
      "zipCode": 75001,
      "city": "Paris",
      "country": "France",
      "classifications": [
        0,
        2
      ],
      "isGroupment": true
    },
    "tags": [
      {
        "id": 1,
        "name": "at the office",
        "color": "#FF5733",
        "type": {
          "id": 1,
          "name": "brands",
          "type": 1
        }
      }
    ],
    "actions": {
      "canBeUpdated": true,
      "canBeDeleted": true
    },
    "updatableFields": {
      "name": true,
      "types": true,
      "classifications": true,
      "serialNumber": true,
      "tagIds": true
    },
    "plan": {
      "id": 1,
      "name": "Main Plan"
    },
    "building": {
      "id": 1,
      "name": "Main Building"
    },
    "area": {
      "id": 1,
      "name": "Plan Item 1"
    },
    "isPositioned": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-session-token
string
required

Session token used for authenticating the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwic2Vzc2lvbklkIjoiYWJjZGVmMTIzNDU2IiwiaWF0IjoxNjA1MDk3ODk5LCJleHAiOjE2MDUxODQyOTl9.4XRQ1iXDyvEj5LgPZHbmTmzOZs98M3YPOzgf3MhxjaI"

Path Parameters

siteId
integer
required

Unique identifier of the site.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

Query Parameters

extend
enum<string>[]

Extend options:

  • "establishment": Get the establishment information of the site

  • "tags": Get the tags of the site

  • "actions-info": Give information about actions that can be performed on the site

  • "updatable-fields": Get information about the field that can be updated

  • "position": Get the position information of the site

Available options:
establishment,
tags,
actions-info,
updatable-fields,
position

Response

200 - application/json

Site successfully retrieved

data
object
required