Skip to main content
GET
/
FerLogin
FerLogin
curl --request GET \
  --url https://api.example.com/FerLogin
{
  "Retorn": {
    "CodiRetorn": 123,
    "DescRetorn": "<string>"
  },
  "Client": "<string>",
  "DiaiHora": "<string>",
  "Canviar": true
}

Overview

The FerLogin endpoint authenticates an agent and their device to the system. The agent must belong to the municipality associated with the device. This is the recommended endpoint for authentication instead of the deprecated ValidarLogin.

Authentication

This endpoint performs authentication and does not require prior authentication. It validates the agent credentials (CodiAgent and Password) along with the device identifier (IMEI).

Query Parameters

CodiAgent
string
required
Agent code: maximum 5 alphanumeric positions
Password
string
required
Password: maximum 8 alphanumeric positions
IMEI
string
required
Device identifier: maximum 15 alphanumeric positions

Response Schema

The endpoint returns a LoginResult object containing:
Retorn
object
Return object with operation result
CodiRetorn
integer
Return code indicating the operation result
DescRetorn
string
Return description with additional details
Client
string
Municipality code according to ORGT codification, obtained from the device identifier. A device is associated with a single municipality.
DiaiHora
string
Current server date and time in format dd/MM/yyyy HH:mm:ss
Canviar
boolean
Indicates whether the password needs to be changed (True/False)

Error Codes

CodeDescription
0Success - authentication successful
-1Device not found or password not set
-2Agent does not belong to the device’s municipality
-3Current password is incorrect
-4Password could not be modified due to database error
-9000General error different from the above
Other negativeDatabase error

Usage Examples

cURL

curl -X GET "https://pdaprv16.orgt.diba.cat/RestMultesPDA/svcMultesPDA.svc/rest/FerLogin?CodiAgent=501&Password=mypass123&IMEI=353947020131525" \
  -H "Accept: application/xml"

Example Response

<LoginResult xmlns="http://schemas.datacontract.org/2004/07/WcfMultesPDA" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Canviar>false</Canviar>
  <Client>088</Client>
  <DiaiHora>04/03/2026 10:30:15</DiaiHora>
  <Retorn>
    <CodiRetorn>0</CodiRetorn>
    <DescRetorn/>
  </Retorn>
</LoginResult>

Notes

  • This endpoint is recommended over the deprecated ValidarLogin endpoint
  • The device identifier (IMEI) is uniquely associated with a municipality
  • After successful authentication, use the returned Client code for subsequent operations
  • If Canviar is true, the agent should be prompted to change their password using the /CanviPassword endpoint

Build docs developers (and LLMs) love