Skip to main content
PATCH
/
interventions
/
v2
/
rs
/
preventive
/
{interventionId}
Update preventive intervention scheduled
curl --request PATCH \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/interventions/v2/rs/preventive/{interventionId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'X-Session-Token: <x-session-token>' \
  --data '
{
  "description": "Description of the intervention",
  "scheduledStart": "2024-12-01T12:34:56.000Z",
  "scheduledEnd": "2024-12-05T14:56:23.000Z",
  "siteRuleIds": [
    1,
    2,
    3
  ],
  "creationStatus": 1,
  "assignedCompanyContactId": 1,
  "assignedProfileId": 1,
  "sendUpdateEmailToCurrentAssignee": false,
  "previousAssigneeNotification": {
    "sendEmail": true,
    "reason": "The intervention details have changed."
  }
}
'
{
  "data": {
    "id": 1,
    "status": 2,
    "type": 1,
    "description": "Description of the intervention",
    "imgSignature": "Signature image",
    "codePin": 123456,
    "autoCreated": true,
    "creationStatus": 1,
    "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",
    "providerName": "Provider name",
    "providerEmail": "[email protected]",
    "providerActionComment": "Action comment from the provider",
    "providerGeneralComment": "General comment from the provider",
    "assignedCompanyContactId": 1,
    "assignedProfileId": 1,
    "verifiedById": 1,
    "verifiedAt": "2024-12-09T14:23:00.000Z",
    "decisionComment": "Provider refused the intervention due to scheduling conflicts.",
    "routineId": 1,
    "organizationId": 1,
    "createdById": 1,
    "archivedAt": "2024-12-09T14:23:00.000Z",
    "updatedAt": "2024-12-09T14:23:00.000Z",
    "createdAt": "2024-01-15T08:45:00.000Z",
    "companyId": 1,
    "negotiationEndDate": "2024-12-01T12:34:56.000Z",
    "checkType": 1,
    "deletedAt": "2024-12-09T14:23:00.000Z"
  }
}

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

Body

application/json
description
string

Description of the intervention.

Maximum string length: 2500
Example:

"Description of the intervention"

scheduledStart

Start time of the intervention.

Example:

"2024-12-01T12:34:56.000Z"

scheduledEnd

End time of the intervention.

Example:

"2024-12-05T14:56:23.000Z"

siteRuleIds
integer[]

Unique identifiers of the site rules.

Minimum array length: 1
Example:
[1, 2, 3]
creationStatus
enum<number>

Current creation status of the intervention. Available values:

  • 0: toScheduled
  • 1: scheduled
  • 2: done
Available options:
0,
1,
2
Example:

1

assignedCompanyContactId
integer

Identifier of the associated company contact.

Example:

1

assignedProfileId
integer

Identifier of the associated profile.

Example:

1

sendUpdateEmailToCurrentAssignee
boolean
default:false

Whether to send an update email to the current assignee.

Example:

false

previousAssigneeNotification
object

Notification settings for the previous assignee when the intervention is reassigned.

Response

200 - application/json

The preventive intervention has been updated

data
object
required