Get Entity Incident
This endpoint returns the list of incidents associated with a given entity (booking or lead).
GET
/api/integration/incidentRequest
cURL
curl -X GET "https://dev.integration.cl.sodtrack-shared.sodtrack.com/api/integration/incident?entity=booking&entityId=135" \
-H "Authorization: Bearer $SODTRACK_TOKEN"Base URL: https://dev.integration.cl.sodtrack-shared.sodtrack.com · other environments
Query parameters
| Name | Type | Description |
|---|---|---|
entity | string | —booking |
entityId | string | —135 |
Responses
Get Entity Incident
[
{
"id": 53,
"description": "Prueba de inyección de un incidente vía integración. 17-11-2025 incidente 1",
"bookingId": 2343,
"bookingVariantName": "Presupuesto instalación Electrodomésticos",
"bookingStatus": "done",
"bookingDate": "2025-11-18T11:00:00.000Z",
"bookingReference": "UPDT-2-FROM-EXT-INT",
"bookingIncidentReason": {
"id": 18,
"name": "Incidentes naturales",
"description": "Árboles caídos, hoyos en el camino, agua en exceso, nieve, etc"
},
"bookingIncidentStatus": {
"id": 1,
"name": "Create",
"description": "Created status"
},
"userReporter": {
"id": 15,
"name": "Felipe",
"lastName": "Hanckes",
"email": "felipe@sodtrack.com",
"reference": null
},
"userCreator": {
"id": 15,
"name": "Felipe",
"lastName": "Hanckes",
"email": "felipe@sodtrack.com",
"reference": null
},
"userAccountable": {
"id": 15,
"name": "Felipe",
"lastName": "Hanckes",
"email": "felipe@sodtrack.com",
"reference": null
},
"bookingIncidentAttachments": [],
"offlineCreatedDate": null,
"createdDate": "2025-11-17T17:34:46.856Z",
"updatedDate": "2025-11-17T17:34:46.856Z",
"reference": "ext-int-creation#1"
},
{
"id": 54,
"description": "Prueba de inyección de un incidente vía integración. 17-11-2025 incidente 2 update 1",
"bookingId": 2343,
"bookingVariantName": "Presupuesto instalación Electrodomésticos",
"bookingStatus": "done",
"bookingDate": "2025-11-18T11:00:00.000Z",
"bookingReference": "UPDT-2-FROM-EXT-INT",
"bookingIncidentReason": {
"id": 18,
"name": "Incidentes naturales",
"description": "Árboles caídos, hoyos en el camino, agua en exceso, nieve, etc"
},
"bookingIncidentStatus": {
"id": 2,
"name": "resuelto",
"description": "El incidente fue resuelto"
},
"userReporter": {
"id": 15,
"name": "Felipe",
"lastName": "Hanckes",
"email": "felipe@sodtrack.com",
"reference": null
},
"userCreator": {
"id": 15,
"name": "Felipe",
"lastName": "Hanckes",
"email": "felipe@sodtrack.com",
"reference": null
},
"userAccountable": {
"id": 16,
"name": "Felipe",
"lastName": "Hanckes",
"email": "felipe+2@sodtrack.com",
"reference": null
},
"bookingIncidentAttachments": [],
"offlineCreatedDate": null,
"createdDate": "2025-11-17T17:38:59.290Z",
"updatedDate": "2025-11-20T03:55:46.668Z",
"reference": "ext-int-creation#2"
}
]Error responses for this endpoint follow the shared error reference.
General Description
This endpoint returns the list of incidents associated with a given entity (booking or lead). The entity is identified by query parameters entity and entityId. Only booking and lead entities are supported for incident detail; project is not supported and returns an error.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
entity | enum | Yes | Entity type. Must be one of: booking, lead, project. Only booking and lead are supported for incident detail. |
entityId | number | Yes | ID of the booking or lead to fetch incidents for. |
Success Response
Returns an array of incident objects. Each item includes:
| Field | Type | Description |
|---|---|---|
id | number | Incident ID. |
description | string | Incident description. |
entityType | string | Entity type (booking or lead). |
entityId | number | Entity ID. |
bookingIncidentReason | object | { id, name, description }. |
bookingIncidentStatus | object | { id, name, description }. |
userReporter | object | { id, name, lastName, email, reference }. |
userCreator | object | { id, name, lastName, email, reference }. |
userAccountable | object | { id, name, lastName, email, reference } (nullable). |
bookingIncidentAttachments | array | Attachments linked to the incident. |
tasks | array | Tasks linked to the incident. |
offlineCreatedDate | string | Offline creation date (when applicable). |
createdDate | string | Creation date. |
updatedDate | string | Last update date. |
reference | string | External reference (optional). |
bookingId | number | Present when entity is booking. |
bookingVariantName | string | Present when entity is booking. |
bookingStatus | string | Present when entity is booking. |
bookingDate | string | Present when entity is booking. |
bookingReference | string | Present when entity is booking. |
leadId | number | Present when entity is lead. |
leadReference | string | Present when entity is lead (optional). |
Example Request
http
GET /integration/api/incident?entity=booking&entityId=73
Example Response
http
HTTP/1.1 200 OK
Content-Type: application/json
json
[
{
"id": 1,
"description": "Customer reported delay",
"entityType": "booking",
"entityId": 12345,
"bookingIncidentReason": { "id": 1, "name": "Delay", "description": "Service delay" },
"bookingIncidentStatus": { "id": 1, "name": "Open", "description": "Open" },
"userReporter": { "id": 10, "name": "John", "lastName": "Doe", "email": "john@example.com", "reference": "USR-001" },
"userCreator": { "id": 10, "name": "John", "lastName": "Doe", "email": "john@example.com", "reference": "USR-001" },
"userAccountable": { "id": 11, "name": "Jane", "lastName": "Smith", "email": "jane@example.com", "reference": "USR-002" },
"bookingIncidentAttachments": [],
"tasks": [],
"createdDate": "2025-02-20T10:00:00.000Z",
"updatedDate": "2025-02-20T10:00:00.000Z",
"reference": "INC-EXT-001",
"bookingId": 12345,
"bookingVariantName": "Installation",
"bookingStatus": "scheduled",
"bookingDate": "2025-02-25",
"bookingReference": "BKG-123"
}
]
Example Error Response
json
{
"statusCode": 400,
"message": "ENTITY_NOT_SUPPORTED: Only booking and lead entities are supported for incident detail.",
"error": "Bad Request"
}