Skip to main content
GET
/
interventions
/
v2
/
rs
List interventions with filters pagination
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/interventions/v2/rs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'X-Session-Token: <x-session-token>'
{
  "data": [
    {
      "id": 1,
      "status": 2,
      "type": 1,
      "subType": 1,
      "codePin": 123456,
      "autoCreated": true,
      "creationStatus": 1,
      "description": "Description of the intervention",
      "scheduledStart": "2024-12-01T12:34:56.000Z",
      "scheduledEnd": "2024-12-05T14:56:23.000Z",
      "actualStart": "2024-12-01T12:34:56.000Z",
      "actualEnd": "2024-12-01T12:34:56.000Z",
      "archivedAt": "2024-12-09T14:23:00.000Z",
      "updatedAt": "2024-12-09T14:23:00.000Z",
      "createdAt": "2024-01-15T08:45:00.000Z",
      "actions": {
        "canBeUpdated": true,
        "canBeDeleted": true,
        "canBeExecuted": true,
        "canBeVerified": true,
        "canSendSignatureEmail": true,
        "canSendInformationEmail": true,
        "canSendToProvider": true
      },
      "assignedTo": {
        "type": 1,
        "id": 1,
        "name": "John Doe",
        "email": "[email protected]"
      },
      "anomalyStats": {
        "corrective": {
          "unresolved": 123,
          "resolved": 123
        },
        "preventive": {
          "unreviewed": 123,
          "pending": 123,
          "resolved": 123
        }
      },
      "technicalInstallations": [
        {
          "id": 1,
          "name": "establishment_informations.installation_ascenseurs",
          "presignedUrl": "https://example.com/presigned-url"
        }
      ],
      "rule": {
        "id": 1,
        "name": "Annual Safety Check",
        "type": 1,
        "rrule": "FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=1",
        "workflowType": 1,
        "complianceType": 1
      },
      "rulesCount": 123,
      "rules": [
        {
          "id": 1,
          "name": "Annual Safety Check"
        }
      ],
      "performedBy": {
        "name": "Provider name",
        "email": "[email protected]",
        "actionComment": "Action comment from the provider",
        "comment": "General comment from the provider"
      },
      "report": {
        "id": 1,
        "name": "Document Name",
        "presignedUrl": "https://bucket.s3.amazonaws.com/1"
      },
      "reportsCount": 123,
      "routine": {
        "id": 1,
        "name": "Monthly Maintenance",
        "autoCreateEnabled": true,
        "archivedAt": "2024-12-01T12:34:56.000Z"
      },
      "establishmentCell": {
        "establishment": {
          "id": 1,
          "name": "Main site",
          "count": 123
        },
        "cell": {
          "id": 1,
          "name": "Main site",
          "count": 123
        }
      },
      "sites": [
        {
          "id": 123,
          "name": "<string>"
        }
      ]
    }
  ],
  "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
x-sites
string

List of site IDs.

Example:

"['1', '2']"

Query Parameters

extend
enum<string>[]

Extend options:

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

  • "assigned-to": Get information about the assigned to (company contact or profile)

  • "anomaly-stats": Get information about the anomaly statistics

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

  • "rules": Get information about the rules linked to the intervention

  • "rules-details": Get all rules with their id and name

  • "performed-by": Get information about the performed by

  • "reports": Get information about the reports

  • "routine": Get information about the routine

  • "establishment-cell": Get information about the establishment cell

  • "sites": Get all sites with id and name

Available options:
actions-info,
assigned-to,
anomaly-stats,
technical-installations,
rules,
rules-details,
performed-by,
reports,
routine,
establishment-cell,
sites
whereText
string

Filter by text

Example:

"string"

whereStatus
integer[]

Filter by status

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

Filter by type

Example:
[1, 2, 3]
whereDescription
string

Filter by description (text search)

Example:

"string"

whereScheduled
object

Filter by scheduledStart or scheduledEnd within a date range

Example:
{
"start": "2021-01-01T00:00:00.000Z",
"end": "2021-12-31T23:59:59.999Z"
}
whereActual
object

Filter by actual start/end dates

Example:
{
"start": "2021-01-01T00:00:00.000Z",
"end": "2021-12-31T23:59:59.999Z"
}
whereProvider
string

Filter by provider (text search)

Example:

"string"

wherePerformedBy
string

Filter by performedBy (text search)

Example:

"string"

whereVerifiedById
integer

Filter by verifiedById

Example:

1

whereAssignedTo
integer

Filter by assignedTo (either company contact or profile)

Example:

1

whereAssignedToProfile
integer[]

Filter by assigned profile ids

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

Filter by assigned provider ids

Example:
[1, 2, 3]
whereVerifiedAt
object

Filter by verifiedAt

Example:
{
"start": "2021-01-01T00:00:00.000Z",
"end": "2021-12-31T23:59:59.999Z"
}
whereDecisionComment
string

Filter by decisionComment (text search)

Example:

"string"

whereIsArchived
boolean

Filter by isArchived (boolean)

Example:

true

whereOrganizationId
integer

Filter by organizationId

Example:

1

whereArchivedAt
object

Filter by archivedAt

Example:
{
"start": "2021-01-01T00:00:00.000Z",
"end": "2021-12-31T23:59:59.999Z"
}
whereTechnicalInstallationIds
integer[]

Filter by technicalInstallationIds from related rules

Example:
[1, 2, 3]
whereTechnicalInstallationName
string

Filter by technicalInstallation name from related rules

Example:

"string"

whereRoutineId
integer

Filter by routineId

Example:

1

whereCompanyId
integer

Filter by companyId

Example:

1

whereRuleIds
integer[]

Filter by ruleIds

Example:
[1, 2, 3]
whereRuleName
string

Filter by rule name (text search)

Example:

"string"

whereSiteIds
integer[]

Filter by siteIds

Example:
[1, 2, 3]
whereAnomalyId
integer

Filter by anomalyId

Example:

1

whereReport
string

Filter by report name (text search)

Example:

"string"

orderBy
object[]
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

List of interventions

data
object[]
required
totalCount
integer

Total count of items.

Example:

100

pagination
object

Pagination information.