Skip to main content
GET
/
companies
/
v2
/
rs
/
{companyId}
Get a company
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/companies/v2/rs/{companyId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'X-Session-Token: <x-session-token>'
{
  "id": 1,
  "name": "Company Name",
  "comment": "Company comment",
  "location": "Company address",
  "type": 1,
  "archivedAt": "2024-12-10T10:00:00.000Z",
  "email": "[email protected]",
  "phones": [
    "phone1",
    "phone2"
  ],
  "primaryContactId": 1,
  "technicalInstallations": [
    {
      "id": 1,
      "name": "establishment_informations.installation_ascenseurs",
      "image": {
        "id": 1,
        "presignedUrl": "https://example.com/presigned-url"
      },
      "tradKey": "establishment_informations.installation_ascenseurs",
      "isDefault": false
    }
  ],
  "labels": [
    {
      "id": 1,
      "name": "Urgent",
      "color": "#FF5733"
    }
  ],
  "actions": {
    "canBeUpdated": true,
    "canBeDeleted": true
  },
  "updatableFields": {
    "name": true,
    "type": true,
    "location": true,
    "comment": true,
    "email": true,
    "phones": true,
    "establishmentIds": true,
    "labelIds": true,
    "technicalInstallationIds": true
  },
  "contacts": [
    {
      "id": 1,
      "name": "Company Contact Name",
      "email": "[email protected]",
      "phones": [
        "phone1",
        "phone2"
      ],
      "comment": "Company contact comment",
      "notifyAt": "2024-12-05T14:56:23.000Z"
    }
  ],
  "establishmentIds": [
    1
  ]
}

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

Path Parameters

companyId
integer
required

Unique identifier of the company.

Example:

1

Query Parameters

whereContactName
string

Filter by name

Example:

"string"

whereContactEmail
string

Filter by email

Example:

"string"

whereContactPhones
string

Filter by phone numbers

Example:

"string"

whereContactComment
string

Filter by comment

Example:

"string"

whereContactText
string

Filter by name or location

Example:

"string"

whereContactCreatedAt
string

Filter by createdAt

Example:

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

orderBy
object[]
extend
enum<string>[]

Extend options:

  • "technical-installations": Get information about technical installations linked to the report

  • "labels": Get the labels linked to the companies

  • "actions-info": Give information about actions that can be done on the Company

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

  • "contacts": Get the contacts linked to the companies

  • "establishmentIds": Get information about the establishment IDs linked to the company.

Available options:
technical-installations,
labels,
actions-info,
updatable-fields,
contacts,
establishmentIds

Response

200 - application/json

Company retrieved successfully

id
integer
required

Unique identifier of the company.

Example:

1

name
string
required

Name of the company.

Maximum string length: 250
Example:

"Company Name"

comment
string | null
required

Comment on the company.

Maximum string length: 2500
Example:

"Company comment"

location
string | null
required

Company address.

Maximum string length: 250
Example:

"Company address"

type
enum<number>
required

Type of company (verification, work...).

Available options:
1,
2,
3
Example:

1

archivedAt
required

Date when the rule was archived.

Example:

"2024-12-10T10:00:00.000Z"

email
string | null
required

Email of the company contact.

Maximum string length: 250
phones
string[]
required

Phones of the company contact.

Maximum array length: 5
Maximum string length: 50
Example:
["phone1", "phone2"]
primaryContactId
integer | null
required

Unique identifier of the company contact.

Example:

1

technicalInstallations
object[]
labels
object[]
actions
object
updatableFields
object
contacts
object[]
establishmentIds
integer[]

Unique identifier of the establishment.