Overview
The Alta Multes API uses a flexible device identification system based on IMEI codes to authenticate and authorize client applications. While originally designed for PDAs, the system has evolved to support multiple device types while maintaining backwards compatibility.The IMEI System
Every device or application that connects to the Alta Multes API must be identified by a unique IMEI (International Mobile Equipment Identity) code. This IMEI serves as:- A unique identifier for the device/application
- An association mechanism linking the device to a specific municipality (Ajuntament)
- An authentication credential for API access
Each IMEI is registered in the ORGT database and is associated with exactly one municipality. This ensures that devices can only create fines for their assigned municipality.
Device Types
The API supports three primary device deployment scenarios:Physical PDAs
The original use case for which the service was designed. How it works:- Uses the actual hardware IMEI from the PDA device
- Each PDA is registered with ORGT and assigned to a municipality
- The device can work offline using pre-allocated expedition number ranges
Mobile Applications
Smartphone apps that function as “virtual PDAs.” How it works:- ORGT assigns a unique code that acts as a virtual IMEI
- Each mobile device receives its own unique identifier
- If a single device needs to work with multiple municipalities, it must use a different IMEI for each one
The term “IMEI” is retained for consistency, but for mobile apps it’s actually an ORGT-assigned unique code, not the device’s physical IMEI.
Centralized Web Applications
Web-based systems that manage fines centrally. How it works:- Uses a standardized naming convention:
empresa-codigo_ajuntament - Each municipality requires a separate IMEI, even within the same application
- The company name and municipality code are combined to ensure uniqueness
IMEI Registration Process
Before using the API, you must register your devices with ORGT:- Submit Adhesion Form - Complete and sign the official adhesion form
- Provide Certificate - Submit the public key of your authentication certificate
- Register IMEIs - Communicate the list of IMEIs you plan to use
- Activate Devices - ORGT adds the IMEIs to their database
- Add New Devices - Each time you add a device, notify ORGT to register the new IMEI
The same SSL certificate can be used for all your devices. However, each device must have its own unique IMEI registered in the ORGT system.
Authentication Flow
Devices authenticate using a combination of certificate-based authentication and agent login:1. Certificate Authentication (Transport Level)
All API requests require mutual TLS authentication:2. Agent Login (Application Level)
After establishing a secure connection, agents must log in: Request:- The IMEI must exist in the ORGT database
- The agent must belong to the municipality associated with the IMEI
- The password must match the agent’s credentials
Device-Municipality Relationship
This one-to-one relationship between IMEI and municipality ensures data isolation and prevents unauthorized cross-municipality access.
Offline Operation
One of the key advantages of the IMEI system is support for offline work:- Range Allocation - Each IMEI can request expedition number ranges
- Local Storage - Master data is synchronized to the device
- Offline Creation - Fines are created using local ranges
- Synchronization - When online, fines are uploaded to ORGT
Testing and Production
IMEI behavior differs between environments:Pre-production Testing
- Register IMEIs specifically for testing
- Same authentication requirements as production
- URL:
https://pdaprv16.orgt.diba.cat/RestMultesPDA/svcMultesPDA.svc/rest/
Production Testing
- Use production IMEIs
- Create fines with agent codes starting with “USU” (e.g., “USU1”)
- These fines are marked as tests and excluded from the system
Production
- Use registered production IMEIs
- Use real agent codes
- URL:
https://pda.orgt.diba.cat/RestMultesPDA/svcMultesPDA.svc/rest/
Common Error Codes
When working with device identification, you may encounter:| Code | Meaning |
|---|---|
-1 | IMEI not found or invalid |
-2 | Agent doesn’t belong to the IMEI’s municipality |
-3 | Incorrect password |
-4 | Database error updating credentials |
-9000 | Uncontrolled exception |
Best Practices
- Unique Naming - Use descriptive, unique names for web application IMEIs
- Document Assignments - Maintain an internal registry of IMEI-to-municipality mappings
- Secure Storage - Store IMEI values securely; they are authentication credentials
- Test Thoroughly - Always test in pre-production before using production IMEIs
- Monitor Usage - Track which agents use which IMEIs for audit purposes
- Update ORGT - Promptly notify ORGT when adding or removing devices
Security Considerations
- Certificate Required - All API access requires valid SSL certificates
- IMEI Pre-registration - IMEIs must be registered before use
- Agent Validation - Agents must belong to the device’s municipality
- Audit Trail - All actions are logged with IMEI and agent information