curl --request POST \
--url https://api.example.com/api/profiles \
--header 'Content-Type: application/json' \
--data '
{
"nombre": "<string>",
"rfc": "<string>",
"tipo_persona": "<string>",
"regimenes_fiscales": [
{}
],
"validaciones_habilitadas": {}
}
'{
"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>",
"created_at": "<string>",
"updated_at": "<string>"
}
}curl --request POST \
--url https://api.example.com/api/profiles \
--header 'Content-Type: application/json' \
--data '
{
"nombre": "<string>",
"rfc": "<string>",
"tipo_persona": "<string>",
"regimenes_fiscales": [
{}
],
"validaciones_habilitadas": {}
}
'{
"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>",
"created_at": "<string>",
"updated_at": "<string>"
}
}Authorization: Bearer <your_token>
^[A-Z&Ñ]{3,4}\d{6}[A-V1-9][A-Z1-9][0-9A]$FISICA - Individual personMORAL - Company/Legal entity[] if not provided{} if not providedFISICA or MORALcurl -X POST https://api.contafy.com/api/profiles \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"nombre": "Mi Empresa S.A. de C.V.",
"rfc": "EMP840101ABC",
"tipo_persona": "MORAL",
"regimenes_fiscales": ["601", "603"],
"validaciones_habilitadas": {}
}'
{
"message": "Perfil creado 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"
}
}
{
"errors": [
{
"field": "nombre",
"message": "El nombre debe tener entre 2 y 255 caracteres"
},
{
"field": "rfc",
"message": "Formato de RFC inválido"
},
{
"field": "tipo_persona",
"message": "El tipo de persona debe ser FISICA o MORAL"
}
]
}
{
"error": "Usuario no autenticado"
}
{
"error": "Has alcanzado el límite de perfiles para tu plan FREE",
"limit": 1,
"current": 1,
"code": "PROFILE_LIMIT_REACHED"
}
{
"error": "Este RFC ya está en uso",
"message": "Este RFC ya está registrado en Contafy por otro usuario. Si requiere ayuda para resolver este problema, contacte a [email protected]",
"code": "RFC_IN_USE"
}
{
"error": "Error al crear perfil"
}
regimenes_fiscales array are filtered out