Skip to main content
GET
/
establishments
/
v2
/
rs
List establishments with filters
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/establishments/v2/rs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'X-Session-Token: <x-session-token>'
{
  "data": [
    {
      "id": 1,
      "address": "123 Main Street",
      "city": "Paris",
      "zipCode": 75001,
      "country": "France",
      "classifications": [
        0,
        2
      ],
      "category": 3,
      "isGroupment": true,
      "totalSurfaceArea": 1500,
      "publicCapacity": 300,
      "privateCapacity": 50,
      "organizationId": 10,
      "establishmentSiteId": 5,
      "pinCode": 1234,
      "pinCodeEnabled": false,
      "accessInstructions": "Enter through the back door.",
      "disable": true,
      "name": "Main site",
      "types": [
        1,
        1
      ],
      "presignedUrl": "https://example.com/presigned-url",
      "tags": [
        {
          "id": 1,
          "name": "at the office",
          "color": "#FF5733",
          "type": {
            "id": 1,
            "name": "brands",
            "type": 1
          }
        }
      ],
      "actions": {
        "canBeUpdated": true,
        "canBeDeleted": true
      },
      "sites": [
        {
          "id": 1,
          "name": "Main site",
          "types": [
            1,
            1
          ],
          "classifications": [
            "ERT",
            "ERP"
          ],
          "isEstablishment": true,
          "serialNumber": "123456",
          "tags": [
            {
              "id": 1,
              "name": "at the office",
              "color": "#FF5733",
              "type": {
                "id": 1,
                "name": "brands",
                "type": 1
              }
            }
          ],
          "actions": {
            "canBeUpdated": true
          },
          "targetReport": {
            "hasReport": true,
            "canBeDeleted": true
          },
          "siteRuleActions": {
            "canBeDeleted": true
          },
          "siteITActions": {
            "canBeDeleted": true
          }
        }
      ],
      "totalCellCount": 123,
      "targetReport": {
        "hasReport": true,
        "canBeDeleted": true
      },
      "siteRuleActions": {
        "canBeDeleted": true
      },
      "siteITActions": {
        "canBeDeleted": true
      }
    }
  ],
  "totalCount": 100,
  "pagination": {
    "page": 1,
    "pageSize": 50
  }
}

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"

Content-Type
enum<string>
required

Content type, must be "application/json".

Available options:
application/json

Query Parameters

extend
enum<string>[]

Extend options:

  • "image": Add the presigned URL for the establishment image

  • "tags": Get the tags of the establishment

  • "actions-info": Give information about the origin of the establishment (commission or intervention)

  • "sites": Get the sites of the establishment

  • "sites-tags": Get the tags of the sites of establishment

  • "sites-actions-info": Get the sites of the establishment

  • "target-report": Get the target report of the establishment

  • "site-rule-actions-info": Get the site rule actions info of the establishment

  • "site-it-actions-info": Get the site IT actions info of the establishment

  • "sites-target-rule": Get the site IT actions info of the establishment

  • "target-rule": Get the site IT actions info of the establishment

Available options:
image,
tags,
actions-info,
sites,
sites-tags,
sites-actions-info,
target-report,
site-rule-actions-info,
site-it-actions-info,
sites-target-rule,
target-rule
whereName
string

Filter by site name

Example:

"string"

whereTypes
integer[]

Filter by site type

Example:
[1, 2, 3]
whereAddress
string

Filter by Establishment address

Example:

"string"

whereCity
string

Filter by Establishment city

Example:

"string"

whereZipCode
integer[]

Filter by Establishment zip code

Example:
[1, 2, 3]
whereCountry
string

Filter by Establishment country

Example:

"string"

whereClassifications
integer[]

Filter by Establishment classifications

Example:
[1, 2, 3]
whereCategories
integer[]

Filter by Establishment categories

Example:
[1, 2, 3]
whereIsGroupment
boolean

Filter by isGroupment flag

Example:

true

whereTotalSurfaceArea
integer

Filter by total surface area

Example:

1

wherePublicCapacity
integer

Filter by public capacity

Example:

1

wherePrivateCapacity
integer

Filter by private capacity

Example:

1

wherePinCodeEnabled
boolean

Filter by pin code enabled flag

Example:

true

whereCreatedAt
string

Filter by createdAt date

Example:

"2021-01-01T00:00:00.000Z"

whereUpdatedAt
string

Filter by updatedAt date

Example:

"2021-01-01T00:00:00.000Z"

whereIsArchived
boolean

Filter by isArchived flag

Example:

true

whereArchivedAt
string

Filter by archivedAt date

Example:

"2021-01-01T00:00:00.000Z"

whereText
string

Filter by global text in report

Example:

"string"

whereTags
integer[]

Filter by tags

Example:
[1, 2, 3]
whereTechnicalInstallationId
integer

Filter by a single technical installation ID

Example:

1

whereTechnicalInstallationIds
integer[]

Filter by technical installation IDs

Example:
[1, 2, 3]
whereRuleIds
integer[]

Filter by rule IDs

Example:
[1, 2, 3]
whereCompanyIds
integer[]

Filter by company IDs

Example:
[1, 2, 3]
whereMissingTechnicalInstallationIds
integer[]

Filter by not having specific technical installation IDs

Example:
[1, 2, 3]
whereMissingRuleIds
integer[]

Filter by not having specific rule IDs

Example:
[1, 2, 3]
whereRuleIdsAreCompatible
integer[]

Filter by compatibility with target rules

Example:
[1, 2, 3]
whereRuleIdsAreIncompatible
integer[]

Filter by incompatibility with target rules

Example:
[1, 2, 3]
whereEstablishmentId
integer

Filter by Establishment ID

Example:

1

whereEstablishmentSiteId
integer

Return all elements in the establishment site

Example:

1

whereEquipmentId
integer

Filter by equipment ID

Example:

1

whereNotPositioned
boolean

Filter by sites without position

Example:

true

whereInterventionId
integer

Filter by Intervention ID

Example:

1

whereReportId
integer

Filter by Report ID

Example:

1

whereCommissionId
integer

Filter by Commission ID

Example:

1

whereSelectableForInterventionId
object

Filter by Selectable Intervention ID

whereHasFloor
boolean

Filter by establishments with or without buildings that have plans

Example:

true

orderBy
object[]
targetRuleId
integer

Target Rule identifier. Use with extend=target-rule to reveal whether the site is linked to the target rule and whether it can be dissociated.

Example:

123

targetTechnicalInstallationId
integer

Target Technical Installation identifier. Use with extend=target-technical-installation to reveal whether the site is linked to the target technical installation and whether it can be dissociated.

Example:

123

targetReportId
integer

Target Report identifier. Use with extend=target-report to reveal whether the site is linked to the target report and whether it can be dissociated.

Example:

123

whereSerialNumber
string

Filter by site serial number

Example:

"string"

whereSortOrder
integer[]

Filter by sort order

Example:
[1, 2, 3]
includeCount
boolean
default:false

Include total count in response.

Example:

true

page
integer
default:1

Page number.

Example:

1

pageSize
integer
default:50

Page size.

Example:

50

findId
integer

Get the page where the item with this id is located.

Example:

1

subPageSize
integer
default:10

Sub page size for grouping items.

Example:

10

Response

200 - application/json

Establishments retrieved successfully

data
object[]
required
totalCount
integer

Total count of items.

Example:

100

pagination
object

Pagination information.