Skip to main content
GET
/
api
/
profiles
List Profiles
curl --request GET \
  --url https://api.example.com/api/profiles
{
  "message": "<string>",
  "data": [
    {
      "id": "<string>",
      "user_id": "<string>",
      "nombre": "<string>",
      "rfc": "<string>",
      "tipo_persona": "<string>",
      "regimenes_fiscales": [
        {}
      ],
      "validaciones_habilitadas": {},
      "frozen": true,
      "frozen_reason": "<string>",
      "frozen_at": "<string>",
      "fiel_cer_encrypted": "<string>",
      "fiel_key_encrypted": "<string>",
      "fiel_password_encrypted": "<string>",
      "sat_download_last_sync_at": "<string>",
      "sat_download_sync_enabled": true,
      "created_at": "<string>",
      "updated_at": "<string>"
    }
  ],
  "count": 123
}
Retrieve all profiles for the authenticated user.

Authentication

This endpoint requires Bearer token authentication. Include the JWT token in the Authorization header.
Authorization: Bearer <your_token>

Response

Returns an array of profile objects sorted by creation date (newest first).
message
string
required
Success message
data
array
required
Array of profile objects
id
string
required
Profile unique identifier (UUID)
user_id
string
required
Owner user ID (UUID)
nombre
string
required
Profile name
rfc
string
required
Mexican tax ID (RFC) in normalized uppercase format
tipo_persona
string
required
Person type. Possible values: FISICA (individual) or MORAL (company)
regimenes_fiscales
array
required
Array of tax regime codes (SAT format)
validaciones_habilitadas
object
required
Custom validation settings object
frozen
boolean
required
Whether the profile is frozen
frozen_reason
string
Reason for freezing. Possible values: plan_limit, user_suspension, payment_issue, or null
frozen_at
string
ISO 8601 timestamp when profile was frozen
fiel_cer_encrypted
string
Encrypted FIEL certificate
fiel_key_encrypted
string
Encrypted FIEL private key
fiel_password_encrypted
string
Encrypted FIEL password
sat_download_last_sync_at
string
ISO 8601 timestamp of last SAT download sync
sat_download_sync_enabled
boolean
required
Whether automatic SAT download sync is enabled
created_at
string
required
ISO 8601 timestamp of profile creation
updated_at
string
required
ISO 8601 timestamp of last update
count
number
required
Total number of profiles returned

Example Request

curl -X GET https://api.contafy.com/api/profiles \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "message": "Perfiles obtenidos exitosamente",
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "user_id": "123e4567-e89b-12d3-a456-426614174000",
      "nombre": "Mi Empresa S.A. de C.V.",
      "rfc": "EMP840101ABC",
      "tipo_persona": "MORAL",
      "regimenes_fiscales": ["601", "603"],
      "validaciones_habilitadas": {},
      "frozen": false,
      "frozen_reason": null,
      "frozen_at": null,
      "fiel_cer_encrypted": null,
      "fiel_key_encrypted": null,
      "fiel_password_encrypted": null,
      "sat_download_last_sync_at": null,
      "sat_download_sync_enabled": false,
      "created_at": "2024-03-07T12:00:00.000Z",
      "updated_at": "2024-03-07T12:00:00.000Z"
    }
  ],
  "count": 1
}

Error Responses

401 Unauthorized
User is not authenticated or token is invalid
{
  "error": "Usuario no autenticado"
}
500 Internal Server Error
Server error occurred while fetching profiles
{
  "error": "Error al obtener perfiles"
}

Build docs developers (and LLMs) love