Skip to main content
GET
/
establishments
/
v2
/
bo
List establishments
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/establishments/v2/bo \
  --header 'Authorization: Bearer <token>' \
  --header 'x-session-token: <x-session-token>'
{
  "data": [
    {
      "id": 1,
      "address": "123 Main Street",
      "city": "Paris",
      "zipCode": 75001,
      "country": "France",
      "classifications": [
        "ERT",
        "ERP"
      ],
      "category": 3,
      "isGroupment": true,
      "totalSurfaceArea": 1500,
      "publicCapacity": 300,
      "privateCapacity": 50,
      "organizationId": 10,
      "establishmentSiteId": 5,
      "pinCode": 1234,
      "pinCodeEnabled": false,
      "onboardingStatus": "COMPLETED",
      "accessInstructions": "Enter through the back door.",
      "name": "Main site",
      "types": [
        1,
        1
      ],
      "serialNumber": "123456",
      "description": "This is the main site of the establishment.",
      "createdAt": "2023-01-01T08:00:00.000Z",
      "metadata": {
        "leafletDispatched": true
      },
      "presignedUrl": "https://example.com/presigned-url",
      "nbSites": 4,
      "organization": {
        "id": 1,
        "name": "Organization Name",
        "createdAt": "2024-12-01T12:34:56.000Z"
      },
      "createdBy": {
        "id": 1,
        "firstName": "John",
        "lastName": "Doe"
      },
      "actions": {
        "canBeUpdated": true,
        "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"

Query Parameters

extend
enum<string>[]

Extend options:

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

  • "nb-sites": Number of sites associated with the Establishment

  • "organization": Obtain the Organization in which the profile is involved

  • "created-by": Get information about the person that created the activity log

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

Available options:
image,
nb-sites,
organization,
created-by,
actions-info
whereName
string

Filter by Establishment name

Example:

"string"

whereTypes
integer[]

Filter by Establishment types

Required range: -9007199254740991 <= x <= 9007199254740991
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

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereCountry
string

Filter by Establishment country

Example:

"string"

whereIsGroupment
boolean

Filter by isGroupment flag

Example:

true

whereTotalSurfaceArea
integer[]

Filter by total surface area

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
wherePublicCapacity
integer[]

Filter by public capacity

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
wherePrivateCapacity
integer[]

Filter by private capacity

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
wherePinCodeEnabled
boolean

Filter by pin code enabled flag

Example:

true

whereCreatedAt
string

Filter by createdAt date

Example:

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

whereIsDeleted
boolean

Filter by deletedAt field (true for deleted establishments, false for non-deleted)

Example:

true

whereIsArchived
boolean

Filter by archivedAt field (true for archived establishments, false for non-archived)

Example:

true

whereText
string

Filter by global text in establishment

Example:

"string"

whereOrganizationId
integer

Filter by organization id

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

1

orderBy
object[]
includeCount
boolean
default:false

Include total count in response.

Example:

true

page
integer
default:1

Page number.

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

1

pageSize
integer
default:50

Page size.

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

50

findId
integer

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

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

1

subPageSize
integer
default:10

Sub page size for grouping items.

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

10

Response

200 - application/json

Establishments retrieved successfully

data
object[]
required
totalCount
integer

Total count of items.

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

100

pagination
object

Pagination information.