Skip to main content

Overview

The AltaAnulada endpoint allows you to cancel a previously registered traffic violation. The violation is identified by the municipality code and expedition number.
Cancellations are saved to an intermediate database and processed asynchronously. Even if the endpoint returns a success code (0), the cancellation may not be completed for various reasons outlined in the Error Codes section.

Endpoint

GET /AltaAnulada

Authentication

This endpoint requires authentication with a valid device identifier (IMEI).

Content Type

  • Consumes: application/json, application/xml
  • Produces: application/xml

Query Parameters

pCdclie
string
required
Municipality code according to ORGT codification (3-digit string). Example: ‘100’ = Hospitalet de Llobregat. Use ObtenirMunicipis() to see all valid values.
pCdexpa
string
required
Expedition number. Together with the municipality code, this uniquely identifies the violation to cancel.
pIMEI
string
required
Device identifier (IMEI). Maximum 15 alphanumeric characters.

Response

Success Response (200)

Returns a tRetorn object with the operation result.
CodiRetorn
integer
required
Return code indicating the result:
  • 0: Success - cancellation request recorded
  • 1: 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)
DescRetorn
string
Error description (empty on success)

Error Codes

CodeDescription
0Success - cancellation request recorded*
1Violation with same expedition number already cancelled
-1Failed to save cancellation to database
-9000Unhandled exception
Other negativeDatabase 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

GET /AltaAnulada?pCdclie=088&pCdexpa=P090018145&pIMEI=353947020131525

Success Response Example

<tRetorn xmlns="http://schemas.datacontract.org/2004/07/WcfMultesPDA" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <CodiRetorn>0</CodiRetorn>
  <DescRetorn/>
</tRetorn>

Error Response Example (Already Cancelled)

<tRetorn xmlns="http://schemas.datacontract.org/2004/07/WcfMultesPDA" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <CodiRetorn>1</CodiRetorn>
  <DescRetorn>Violation already cancelled</DescRetorn>
</tRetorn>

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 the Anulada field in the response.
<Anulada>true</Anulada>
  • POST /AltaMulta - Create a new violation
  • GET /Consulta - Query violation status
  • GET /ObtenirMunicipis - Get list of valid municipality codes

Build docs developers (and LLMs) love