Skip to main content

Admin Login

Authenticate admin or staff users to access the App Courier admin panel.
curl -X POST https://api.eisegmi.facturador.es/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "your_password"
  }'

Request Body

email
string
required
Admin user’s email address
password
string
required
Admin user’s password

Response

data
object
exito
boolean
Indicates if the login was successful
token
string
JWT authentication token for subsequent API requests
id_usuario
integer
Unique identifier for the authenticated user
id_tipo_usuario
integer
User type identifier (role ID)
fullname
string
Full name of the authenticated user
id_sucursal
integer
Branch/office ID associated with the user
total_encomiendas_hoy
integer
Total number of shipments processed today
total_clientes
integer
Total number of customers
tipo_usuario
string
User type name/description
sucursal
string
Branch/office name
email
string
User’s email address
direccion
string
User’s address
{
  "data": {
    "exito": true,
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "id_usuario": 123,
    "id_tipo_usuario": 1,
    "fullname": "Juan Pérez",
    "id_sucursal": 5,
    "total_encomiendas_hoy": 42,
    "total_clientes": 1250,
    "tipo_usuario": "Administrador",
    "sucursal": "Lima Centro",
    "email": "[email protected]",
    "direccion": "Av. Principal 123, Lima"
  }
}

Customer Login

Authenticate customer users to access their App Courier account and track shipments.
curl -X POST https://api.eisegmi.facturador.es/auth/loginCliente \
  -H "Content-Type: application/json" \
  -d '{
    "usuario": "[email protected]",
    "password": "customer_password"
  }'

Request Body

usuario
string
required
Customer’s username or email address
password
string
required
Customer’s password

Response

data
object
exito
boolean
Indicates if the login was successful
token
string
JWT authentication token for subsequent API requests
id_usuario
integer
Unique identifier for the authenticated customer
id_tipo_usuario
integer
User type identifier (customer role)
fullname
string
Full name of the customer
id_sucursal
integer
Associated branch/office ID
tipo_usuario
string
User type description
sucursal
string
Branch/office name
email
string
Customer’s email address
direccion
string
Customer’s address
{
  "data": {
    "exito": true,
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "id_usuario": 456,
    "id_tipo_usuario": 3,
    "fullname": "María García",
    "id_sucursal": 2,
    "tipo_usuario": "Cliente",
    "sucursal": "Lima Norte",
    "email": "[email protected]",
    "direccion": "Jr. Los Olivos 456, Lima"
  }
}

Authentication Token Usage

After successful login, include the authentication token in subsequent API requests:
curl -X GET https://api.eisegmi.facturador.es/encomienda/getEncomiendas \
  -H "Authorization: Bearer YOUR_TOKEN_HERE"
Tokens are stored in SharedPreferences on the client side and should be included in the Authorization header for all authenticated requests.

Build docs developers (and LLMs) love