Overview
The AltaAnulada endpoint allows you to cancel a previously registered traffic violation. The violation is identified by the municipality code and expedition number.Endpoint
Authentication
This endpoint requires authentication with a valid device identifier (IMEI).Content Type
- Consumes:
application/json,application/xml - Produces:
application/xml
Query Parameters
Municipality code according to ORGT codification (3-digit string). Example: ‘100’ = Hospitalet de Llobregat. Use
ObtenirMunicipis() to see all valid values.Expedition number. Together with the municipality code, this uniquely identifies the violation to cancel.
Device identifier (IMEI). Maximum 15 alphanumeric characters.
Response
Success Response (200)
Returns atRetorn object with the operation result.
Return code indicating the result:
0: Success - cancellation request recorded1: A violation with the same expedition number has already been cancelled (possibly in a different municipality)-1: Failed to save cancellation to database- Negative value (not -9000): Database error
-9000: Other error (non-database)
Error description (empty on success)
Error Codes
| Code | Description |
|---|---|
| 0 | Success - cancellation request recorded* |
| 1 | Violation with same expedition number already cancelled |
| -1 | Failed to save cancellation to database |
| -9000 | Unhandled exception |
| Other negative | Database error |
*Even with a return code of 0, the cancellation may not complete due to asynchronous processing. See Cancellation Processing Notes below.
Cancellation Processing Notes
Cancellations are saved to an intermediate database and processed asynchronously. Even if the API returns code 0, the cancellation may not be completed for the following reasons:- The violation already has a date/proposal, or there is no balance by date
- The violation has been transferred
- The violation is in a blocked executive file
- An appeal or legal recourse has already been submitted
- The violation has a sanction and the payment deadline has expired
Examples
Request Example
Success Response Example
Error Response Example (Already Cancelled)
Important Notes
- The pCdclie must be a valid 3-digit municipality code
- The pCdexpa must match an existing violation
- The pIMEI must be a valid registered device identifier
- Return code 1 indicates the violation was already cancelled, even if it was in a different municipality
- Successful API response (code 0) does not guarantee the cancellation will be processed - check violation status later to confirm
Verification
After calling AltaAnulada, you can verify the cancellation status by calling the GET /Consulta endpoint and checking theAnulada field in the response.
Related Endpoints
- POST /AltaMulta - Create a new violation
- GET /Consulta - Query violation status
- GET /ObtenirMunicipis - Get list of valid municipality codes