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 '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",
    "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": "[email protected]",
      "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": 1,
        "id": 1,
        "name": "John Doe",
        "email": "[email protected]"
      }
    },
    "hasRoutineInterventionDrift": true,
    "assignedTo": {
      "type": 1,
      "id": 1,
      "name": "John Doe",
      "email": "[email protected]"
    },
    "performedBy": {
      "name": "Provider name",
      "email": "[email protected]",
      "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,
        "name": "Main site",
        "count": 123
      },
      "cell": {
        "id": 1,
        "name": "Main site",
        "count": 123
      }
    },
    "updatableFields": {
      "description": true,
      "scheduledStart": true,
      "scheduledEnd": true,
      "siteRuleIds": true,
      "assignedCompanyContactId": true,
      "assignedProfileId": true,
      "anomalyIds": true,
      "creationStatus": true
    },
    "siteRuleIds": [
      1
    ],
    "anomalyIds": [
      1
    ],
    "establishmentInstruction": "Enter through the back door.",
    "sites": [
      {
        "id": 123,
        "name": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
enum<string>
required

Content type, must be "application/json".

Available options:
application/json
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.

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 profile)

  • "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

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,
performed-by,
sites

Response

200 - application/json

Intervention retrieved successfully

data
object
required