Skip to main content
GET
/
interventions
/
v2
/
rs
/
{interventionId}
Get single intervention by ID
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/interventions/v2/rs/{interventionId} \
  --header 'Authorization: Bearer <token>' \
  --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",
    "attendeeCount": 25,
    "technicalInstallations": [
      {
        "id": 1,
        "name": "establishment_informations.installation_ascenseurs",
        "presignedUrl": "https://example.com/presigned-url"
      }
    ],
    "actions": {
      "canBeUpdated": true,
      "canBeDeleted": true,
      "canBeExecuted": true,
      "canBeVerified": true,
      "canSendSignatureEmail": true,
      "canSendInformationEmail": true,
      "canSendToProvider": true
    },
    "summary": {
      "name": "Provider name",
      "email": "example@mail.fr",
      "actionComment": "Action comment from the provider",
      "comment": "General comment from the provider",
      "imgSignature": "Signature image",
      "doneAt": "2024-12-01T12:34:56.000Z"
    },
    "routine": {
      "id": 1,
      "name": "Monthly Maintenance",
      "autoCreateEnabled": true,
      "archivedAt": "2024-12-01T12:34:56.000Z",
      "assignedTo": {
        "type": 123,
        "id": 1,
        "name": "John Doe",
        "email": "test@mail.com"
      }
    },
    "hasRoutineInterventionDrift": true,
    "assignedTo": {
      "type": 123,
      "id": 1,
      "name": "John Doe",
      "email": "test@mail.com"
    },
    "performedBy": {
      "name": "Provider name",
      "email": "example@mail.fr",
      "actionComment": "Action comment from the provider",
      "comment": "General comment from the provider"
    },
    "rule": {
      "id": 1,
      "name": "Annual Safety Check",
      "type": 1,
      "rrule": "FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=1",
      "workflowType": 1,
      "complianceType": 1
    },
    "rulesCount": 123,
    "anomalyBySiteIT": [
      {
        "id": 1,
        "name": "Main site",
        "technicalInstallations": [
          {
            "id": 1,
            "name": "establishment_informations.installation_ascenseurs",
            "presignedUrl": "https://bucket.s3.amazonaws.com/1",
            "anomalies": [
              {
                "id": 1,
                "title": "Anomaly title",
                "type": 1,
                "risk": 1,
                "description": "Anomaly description",
                "createdAt": "2024-01-15T08:45:00.000Z",
                "providerAction": 1
              }
            ]
          }
        ]
      }
    ],
    "anomalyStats": {
      "corrective": {
        "unresolved": 123,
        "resolved": 123
      },
      "preventive": {
        "unreviewed": 123,
        "pending": 123,
        "resolved": 123
      }
    },
    "establishmentCell": {
      "establishment": {
        "id": 1,
        "establishmentSiteId": 5,
        "name": "Main site",
        "count": 123
      },
      "cell": {
        "id": 1,
        "name": "Main site",
        "count": 123
      }
    },
    "updatableFields": {
      "description": true,
      "scheduledStart": true,
      "scheduledEnd": true,
      "siteRuleIds": true,
      "siteIds": true,
      "ruleId": true,
      "userIds": true,
      "assignedCompanyContactId": true,
      "assignedUserId": true,
      "anomalyIds": true,
      "creationStatus": true,
      "proofAttachment": true,
      "validateIntervention": true,
      "attendeeCount": true,
      "sendUpdateEmailToCurrentAssignee": true,
      "previousAssigneeNotification": true
    },
    "siteRuleIds": [
      1
    ],
    "anomalyIds": [
      1
    ],
    "establishmentInstruction": "Enter through the back door.",
    "sites": [
      {
        "id": 123,
        "name": "<string>"
      }
    ],
    "trainingProof": {
      "id": 1,
      "name": "document.pdf",
      "presignedUrl": "https://example.com/presigned-url"
    },
    "trainedUsers": [
      {
        "id": 1,
        "firstName": "John",
        "lastName": "Doe",
        "attendanceStatus": "present"
      }
    ],
    "trainedUsersCount": 123,
    "createdBy": {
      "id": 1,
      "firstName": "John",
      "lastName": "Doe"
    },
    "rules": [
      {
        "userScopes": [
          {
            "id": 1,
            "professions": [
              {
                "id": 1,
                "name": "Urgent"
              }
            ],
            "diplomaTitles": [
              {
                "id": 1,
                "name": "Urgent"
              }
            ]
          }
        ]
      }
    ]
  }
}

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

interventionId
integer
required

Unique identifier of the intervention.

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

1

Query Parameters

extend
enum<string>[]

Extend options:

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

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

  • "summary": Get information about the summary of the intervention

  • "routine": Get information about the routine

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

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

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

  • "anomaly-by-site-it": Get anomalies grouped by site, then by technical installation, sorted alphabetically by IT name and anomaly title

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

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

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

  • "site-rule-ids": Get information about the site rule IDs

  • "anomaly-ids": Get information about the anomaly IDs

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

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

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

  • "training-proof": Get information about the training proof

  • "trained-users": Get information about the trained users

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

  • "rules-user-scopes": Get information about scopes linked to the intervention

Available options:
technical-installations,
actions-info,
summary,
routine,
assigned-to,
performed-by,
rules,
anomaly-by-site-it,
anomaly-stats,
establishment-cell,
updatable-fields,
site-rule-ids,
anomaly-ids,
establishment-instruction,
sites,
training-proof,
trained-users,
created-by,
rules-user-scopes

Response

200 - application/json

Intervention retrieved successfully

data
object
required