Skip to main content
GET
/
routines
/
v1
/
rs
/
{routineId}
Get a specific routine
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/routines/v1/rs/{routineId} \
  --header 'Authorization: Bearer <token>' \
  --header 'content-type: <content-type>' \
  --header 'x-session-token: <x-session-token>'
{
  "data": {
    "id": 1,
    "name": "Monthly Maintenance",
    "description": "This routine involves monthly maintenance checks for all equipment.",
    "type": 1,
    "autoCreateEnabled": true,
    "autoAttachEnabled": false,
    "contractId": 1,
    "assignedCompanyContactId": 1,
    "assignedUserId": 1,
    "archivedAt": "2024-12-01T12:34:56.000Z",
    "updatedAt": "2024-12-01T12:34:56.000Z",
    "createdAt": "2024-12-01T12:34:56.000Z",
    "rrule": "FREQ=MONTHLY;INTERVAL=1",
    "contract": {
      "id": 1,
      "name": "Service Agreement",
      "status": 1,
      "dueAt": "2025-01-15T09:30:00.000Z"
    },
    "assignedTo": {
      "type": 123,
      "id": 1,
      "name": "John Doe",
      "email": "test@mail.com"
    },
    "sites": [
      {
        "id": 1,
        "name": "Main site",
        "isEstablishment": true,
        "establishmentId": 10,
        "serialNumber": "123456",
        "archivedAt": "2024-12-10T10:00:00.000Z"
      }
    ],
    "users": [
      {
        "id": 1,
        "firstName": "John",
        "lastName": "Doe",
        "email": "test@mail.com"
      }
    ],
    "rule": {
      "id": 1,
      "name": "Annual Safety Check",
      "type": 1,
      "rrule": "FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=1",
      "workflowType": 1,
      "complianceType": 1,
      "sourceType": 1,
      "archivedAt": "2024-12-10T10:00:00.000Z"
    },
    "rulesCount": 123,
    "technicalInstallations": [
      {
        "id": 1,
        "name": "establishment_informations.installation_ascenseurs",
        "presignedUrl": "https://example.com/presigned-url"
      }
    ],
    "establishmentCell": {
      "establishment": {
        "id": 1,
        "establishmentSiteId": 5,
        "name": "Main site",
        "count": 123
      },
      "cell": {
        "id": 1,
        "name": "Main site",
        "count": 123
      }
    },
    "lastIntervention": {
      "id": 1,
      "date": "2024-12-01T12:34:56.000Z"
    },
    "scheduleIntervention": {
      "id": 1,
      "date": "2024-12-01T12:34:56.000Z"
    },
    "updatableFields": {
      "name": true,
      "description": true,
      "autoCreateEnabled": true,
      "siteRuleIds": true,
      "userRuleIds": true,
      "assignedCompanyContactId": true,
      "assignedUserId": true
    },
    "siteRuleIds": [
      1
    ],
    "actions": {
      "canBeUpdated": true,
      "canBeDeleted": true
    }
  }
}

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
string
required

Content type, must be "application/json".

Allowed value: "application/json"

Path Parameters

routineId
integer
required

Unique identifier of the routine.

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

1

Query Parameters

extend
enum<string>[]

Extend options:

  • "contract": Get the routine with contract fields

  • "assigned-to": Get the routine with assigned to fields

  • "sites": Get the sites associated with the routine

  • "users": Get the users for the routines

  • "rules": Get the rules for the routines

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

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

  • "interventions": Get the latest intervention date.

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

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

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

Available options:
contract,
assigned-to,
sites,
users,
rules,
technical-installations,
establishment-cell,
interventions,
updatable-fields,
site-rule-ids,
actions-info

Response

200 - application/json

Get of routines

data
object
required