Skip to main content
GET
/
api
/
profiles
/
{id}
Get Profile
curl --request GET \
  --url https://api.example.com/api/profiles/{id}
{
  "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>"
  }
}
Retrieve a specific profile by its ID.

Authentication

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

Path Parameters

id
string
required
Profile unique identifier (UUID format)Validation:
  • Must be a valid UUID
  • Profile must belong to the authenticated user

Response

Returns the requested profile object.
message
string
required
Success message
data
object
required
Profile object
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

Example Request

curl -X GET https://api.contafy.com/api/profiles/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "message": "Perfil obtenido 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"
  }
}

Error Responses

400 Bad Request
Invalid UUID format
{
  "errors": [
    {
      "field": "id",
      "message": "ID de perfil inválido"
    }
  ]
}
401 Unauthorized
User is not authenticated or token is invalid
{
  "error": "Usuario no autenticado"
}
404 Not Found
Profile not found or does not belong to authenticated user
{
  "error": "Perfil no encontrado"
}
500 Internal Server Error
Server error occurred while fetching profile
{
  "error": "Error al obtener perfil"
}

Security

Users can only access profiles that belong to them. Attempting to access another user’s profile will return a 404 error.

Build docs developers (and LLMs) love