Overview
This endpoint allows you to register a new incident on public roads. The incident is recorded in the database with details about the type, location, anomaly, and optionally a photo.Authentication
This endpoint requires authentication through a device IMEI identifier that must be associated with a municipality in the system.HTTP Request
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/xml | Yes |
Request Body
The request body must be an XML document with the incident data conforming to theInciType schema.
Municipality code according to ORGT coding (3 digits in string format). Example: ‘088’
Incident number
Device identifier (maximum 15 alphanumeric positions)
Agent code
Incident type number
Scope/environment number
Object number
Anomaly number
Incident description
Location description
Incident date and time (format: yyyy/MM/dd HH:mm:ss)
PDA incident number
Photo indicator (‘S’ for yes, ‘N’ for no)
Photo data encoded in Base64 format
Response
Example Request
Example Response
Success Response (200 OK)
Error Codes
| Code | Description |
|---|---|
| 0 | Success - incident recorded successfully |
| -1 | Could not save the incident to the database |
| -9000 | Error different from database errors |
| Other negative | Database error |
Notes
- All XML fields should be ordered alphabetically within the
InciTypeelement - The
Fotofield should contain Base64-encoded image data - The device IMEI must be previously registered and associated with a municipality
- The incident types, scopes, objects, and anomalies should be obtained from the master data using the
ObtenirActualitzacionsendpoint