cURL
curl --request POST \ --url https://api.example.com/api/profiles \ --header 'Content-Type: application/json' \ --data ' { "nombre": "<string>", "rfc": "<string>", "tipo_persona": {}, "regimenes_fiscales": [ "<string>" ], "validaciones_habilitadas": { "validarRFCIngresos": true, "validarRFCGastos": true, "validarRegimenFiscal": true, "validarUUIDDuplicado": true, "bloquearSiRFCNoCoincide": true, "bloquearSiRegimenNoCoincide": true } } '
{ "message": "<string>", "data": { "id": "<string>", "user_id": "<string>", "nombre": "<string>", "rfc": "<string>", "tipo_persona": {}, "regimenes_fiscales": [ "<string>" ], "validaciones_habilitadas": {}, "created_at": "<string>", "updated_at": "<string>", "frozen": true, "frozen_reason": {}, "frozen_at": {} } }
Create a new profile for managing CFDI invoices
FISICA
MORAL
curl -X POST https://api.contafy.com/api/profiles \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "nombre": "Mi Empresa SA de CV", "rfc": "XAXX010101000", "tipo_persona": "MORAL", "regimenes_fiscales": ["601", "603"], "validaciones_habilitadas": { "validarRFCIngresos": true, "validarRFCGastos": true, "validarRegimenFiscal": false, "validarUUIDDuplicado": true, "bloquearSiRFCNoCoincide": false, "bloquearSiRegimenNoCoincide": false } }'
{ "message": "Profile created successfully", "data": { "id": "prof_1234567890", "user_id": "user_0987654321", "nombre": "Mi Empresa SA de CV", "rfc": "XAXX010101000", "tipo_persona": "MORAL", "regimenes_fiscales": ["601", "603"], "validaciones_habilitadas": { "validarRFCIngresos": true, "validarRFCGastos": true, "validarRegimenFiscal": false, "validarUUIDDuplicado": true, "bloquearSiRFCNoCoincide": false, "bloquearSiRegimenNoCoincide": false }, "created_at": "2024-03-04T16:30:00.000Z", "updated_at": "2024-03-04T16:30:00.000Z", "frozen": false } }
{ "error": "Bad Request", "message": "Invalid RFC format" }
{ "error": "Unauthorized", "message": "Invalid or missing authentication token" }
{ "error": "Forbidden", "message": "Profile limit reached for your current plan" }
{ "error": "Validation Error", "message": "Missing required field: nombre" }
{ "error": "Internal Server Error", "message": "An error occurred while creating the profile" }