Update Incident
Updates an existing incident in Sodtrack.
/api/integration/incidentRequest
curl -X PATCH "https://dev.integration.cl.sodtrack-shared.sodtrack.com/api/integration/incident" \
-H "Authorization: Bearer $SODTRACK_TOKEN"Base URL: https://dev.integration.cl.sodtrack-shared.sodtrack.com Β· other environments
Responses
{
"id": 45,
"bookingId": 1515,
"incidentStatus": {
"id": 1
}
}Error responses for this endpoint follow the shared error reference.
Purpose
Updates an existing incident in Sodtrack.
The incident is identified by incident (by incidentId or incidentReference). Only the fields you send are updated; omitted fields keep their current values. You can update the description, incident status, accountable user, and dynamic forms data.
Field Definitions
π Request body
| Field | Type | Required | Description |
|---|---|---|---|
incident | object | β | Incident identifier (by ID or reference). |
description | string | β | New incident description. Only sent if you want to change it. |
incidentStatus | object | β | New incident status identifier. Only statusId is supported; statusReference is not yet supported. |
accountableUser | object | β | New user accountable for the incident. If provided, must resolve to an existing user. |
dynamicForms | array[object] | β | Optional form data (if configured for incident status change). See Dynamic forms below. |
π Dynamic forms
| Field | Type | Required | Description |
|---|---|---|---|
dynamicForms | array[object] | β | List of form snapshots to submit. |
dynamicForms[].formReference | string | β when form sent | Identifier of the form (must match a form configured for the incident status change flow). |
dynamicForms[].values | array[object] | β when form sent | List of field values for this form. |
dynamicForms[].values[].fieldReference | string | β | Identifier of the form field (must match a field in the form). |
dynamicForms[].values[].value | string | β | Submitted value for the field. Numbers are accepted and converted to string. |
π Incident status identifier
| Field | Type | Required | Description |
|---|---|---|---|
incidentStatus.type | string | β when incidentStatus sent | Must be "statusId". "statusReference" is not yet supported. |
incidentStatus.value | string | β when incidentStatus sent | Numeric ID of the incident status (must exist in Sodtrack). |
π€ User information (accountable)
| Field | Type | Required | Description |
|---|---|---|---|
type | string | β when accountableUser sent | User identifier type: "userId", "userEmail", or "userReference". |
value | string | β when accountableUser sent | The user ID, email, or reference according to type. |
Example Request (by incident reference)
{
"incident": {
"type": "incidentReference",
"value": "INC-EXT-2025-001"
},
"description": "Actualizado: resoluciΓ³n en progreso.",
"incidentStatus": {
"type": "statusId",
"value": "2"
},
"accountableUser": {
"type": "userEmail",
"value": "manager@example.com"
}
}
Example Request (by incident ID)
{
"incident": {
"type": "incidentId",
"value": "101"
},
"description": "DescripciΓ³n actualizada del incidente.",
"incidentStatus": {
"type": "statusId",
"value": "3"
},
"dynamicForms": [
{
"formReference": "incident_status_update_form",
"values": [
{
"fieldReference": "incident_status_update_form_field_1",
"value": "yesterday"
}
]
}
]
}
Example Request (minimal β change status only)
{
"incident": {
"type": "incidentId",
"value": "101"
},
"incidentStatus": {
"type": "statusId",
"value": "2"
}
}
Response Example
{
"id": 101,
"entityType": "booking",
"entityId": 12345,
"bookingId": 12345,
"incidentStatus": {
"id": 2,
"name": "In Progress",
"description": "In Progress",
"isFinalStatus": false,
"isInitialStatus": false,
"bookingStatusUpdate": ""
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | number | Incident ID. |
entityType | string | Entity type: "booking" or "lead". |
entityId | number | Entity ID (booking id or lead id). |
bookingId | number | Present only when entityType is "booking". |
incidentStatus | object | Updated incident status (id, name, description, isFinalStatus, isInitialStatus, bookingStatusUpdate). |
Error Responses
| HTTP Status | Error | Description |
|---|---|---|
400 Bad Request | INCIDENT_NOT_FOUND | No incident found for the given ID or reference. |
400 Bad Request | MULTIPLE_INCIDENTS_FOUND_FOR_REFERENCE | More than one incident matches the given reference. |
400 Bad Request | INVALID_INCIDENT_TYPE | Invalid incident identifier type (must be incidentId or incidentReference). |
400 Bad Request | INVALID_ACCOUNTABLE_USER | accountableUser was provided but could not be resolved to an existing user. |
400 Bad Request | INVALID_INCIDENT_STATUS_ID | Status id must be a number. |
400 Bad Request | INCIDENT_STATUS_NOT_FOUND | The incident status ID does not exist in Sodtrack. |
400 Bad Request | INCIDENT_STATUS_REFERENCE_NOT_SUPPORTED | Resolution by statusReference is not yet supported. Use statusId. |
400 Bad Request | INVALID_INCIDENT_STATUS_TYPE | Invalid incident status identifier type. |
400 Bad Request | InvalidParameters | One or more required fields are missing or invalid. |
401 Unauthorized | β | Authentication token missing or expired. |
403 Forbidden | β | The API key or origin is not authorized. |
500 Internal Server Error | β | Unexpected server error. Contact Sodtrack support. |
Business Rules & Constraints
Incident identification
-
incident is required, with type and value.
-
type must be
incidentIdorincidentReference. Any other value returnsINVALID_INCIDENT_TYPE. -
If no incident is found for the given ID or reference, the API returns
INCIDENT_NOT_FOUND. -
When type = incidentReference, if more than one incident matches the reference, the API returns
MULTIPLE_INCIDENTS_FOUND_FOR_REFERENCE.
Update behavior
-
description, incidentStatus, and accountableUser are optional. Only provided fields are updated; omitted fields leave existing values unchanged.
-
You can send only incident plus one or more of description, status, and accountable user.
Accountable user
- When accountableUser is provided, it must resolve to an existing user (by
userId,userEmail, oruserReference). If the user cannot be resolved, the request fails withINVALID_ACCOUNTABLE_USER.
Incident status
-
incidentStatus (when provided) must use type = statusId. statusReference is not yet supported and returns
INCIDENT_STATUS_REFERENCE_NOT_SUPPORTED. -
value must be a valid numeric status ID that exists in Sodtrack. Invalid number returns
INVALID_INCIDENT_STATUS_ID; non-existent status returnsINCIDENT_STATUS_NOT_FOUND.
Data and format
-
Dynamic form data (when provided) is validated and stored according to the incident status change flow configuration.
-
All timestamps in responses follow ISO 8601 format (UTC) where applicable.