Skip to main content
PATCH
/
routines
/
v1
/
rs
/
{routineId}
/
training
Update a training routine
curl --request PATCH \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/routines/v1/rs/{routineId}/training \
  --header 'Authorization: Bearer <token>' \
  --header 'content-type: <content-type>' \
  --header 'x-session-token: <x-session-token>' \
  --data '
{
  "name": "Monthly Maintenance",
  "description": "This routine involves monthly maintenance checks for all equipment.",
  "autoCreateEnabled": true,
  "ruleIds": [
    1,
    2,
    3
  ],
  "userIds": [
    1,
    2,
    3
  ],
  "assignedCompanyContactId": 1,
  "assignedUserId": 1
}
'
{
  "data": {
    "id": 1,
    "name": "Monthly Maintenance",
    "description": "This routine involves monthly maintenance checks for all equipment.",
    "type": 1,
    "autoCreateEnabled": true,
    "assignedCompanyContactId": 1,
    "assignedUserId": 1,
    "contractId": 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"
  }
}

Authorizations

Authorization
string
header
required

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

Headers

content-type
string
required

Content type, must be "application/json".

Allowed value: "application/json"
x-session-token
string
required

Session token used for authenticating the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwic2Vzc2lvbklkIjoiYWJjZGVmMTIzNDU2IiwiaWF0IjoxNjA1MDk3ODk5LCJleHAiOjE2MDUxODQyOTl9.4XRQ1iXDyvEj5LgPZHbmTmzOZs98M3YPOzgf3MhxjaI"

Path Parameters

routineId
integer
required

Unique identifier of the routine.

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

1

Body

application/json

Details required to update a training routine

name
string

Name of the routine.

Maximum string length: 250
Example:

"Monthly Maintenance"

description
string | null

Description of the routine.

Maximum string length: 2500
Example:

"This routine involves monthly maintenance checks for all equipment."

autoCreateEnabled
boolean

Whether the routine automatically creates interventions.

Example:

true

ruleIds
integer[]

List of rule IDs to associate with the profile.

Unique identifier of the rule.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
userIds
integer[]

Unique identifiers of the users.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
assignedCompanyContactId
integer | null

Unique identifier of the company contact assigned to the routine.

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

1

assignedUserId
integer | null

Unique identifier of the user assigned to the routine.

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

1

Response

200 - application/json

Routine updated successfully

data
object
required