Update Profile
curl --request PUT \
--url https://api.example.com/api/profiles/{profileId} \
--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": {}
}
}Profiles
Update Profile
Update an existing profile configuration
PUT
/
api
/
profiles
/
{profileId}
Update Profile
curl --request PUT \
--url https://api.example.com/api/profiles/{profileId} \
--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": {}
}
}Authentication
This endpoint requires authentication using a JWT token in the Authorization header.Path Parameters
The unique identifier of the profile to update
Request Body
All fields are optional. Only include the fields you want to update.Name of the profile or business entity
RFC (Registro Federal de Contribuyentes) - Mexican tax identification number. Must be valid according to SAT format rules.
Type of taxpayer entity:
FISICA: Individual taxpayer (Persona Física)MORAL: Corporation or legal entity (Persona Moral)
Array of tax regime codes applicable to this profile. These are official SAT regime codes (e.g., “601”, “603”, “605”).
Configuration object for validation rules to enable for this profile
Validate RFC on income invoices
Validate RFC on expense invoices
Validate tax regime matches profile configuration
Check for duplicate invoice UUIDs
Block invoice processing if RFC doesn’t match
Block invoice processing if tax regime doesn’t match
Response
Success message confirming profile update
The updated profile object
Unique identifier for the profile
ID of the user who owns this profile
Name of the profile or business entity
RFC (Registro Federal de Contribuyentes)
Type of taxpayer entity (
FISICA or MORAL)Array of tax regime codes
Configuration object for validation rules
ISO 8601 timestamp of when the profile was created
ISO 8601 timestamp of when the profile was last updated
Whether the profile is frozen
Reason why the profile is frozen
ISO 8601 timestamp of when the profile was frozen
Example Request
curl -X PUT https://api.contafy.com/api/profiles/prof_1234567890 \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"nombre": "Mi Empresa Actualizada SA de CV",
"regimenes_fiscales": ["601", "603", "612"],
"validaciones_habilitadas": {
"validarRFCIngresos": true,
"validarRFCGastos": true,
"validarRegimenFiscal": true,
"validarUUIDDuplicado": true,
"bloquearSiRFCNoCoincide": true,
"bloquearSiRegimenNoCoincide": false
}
}'
Example Response
{
"message": "Profile updated successfully",
"data": {
"id": "prof_1234567890",
"user_id": "user_0987654321",
"nombre": "Mi Empresa Actualizada SA de CV",
"rfc": "XAXX010101000",
"tipo_persona": "MORAL",
"regimenes_fiscales": ["601", "603", "612"],
"validaciones_habilitadas": {
"validarRFCIngresos": true,
"validarRFCGastos": true,
"validarRegimenFiscal": true,
"validarUUIDDuplicado": true,
"bloquearSiRFCNoCoincide": true,
"bloquearSiRegimenNoCoincide": false
},
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-03-04T16:45:00.000Z",
"frozen": false
}
}
Error Responses
400 Bad Request
{
"error": "Bad Request",
"message": "Invalid RFC format"
}
401 Unauthorized
{
"error": "Unauthorized",
"message": "Invalid or missing authentication token"
}
403 Forbidden
{
"error": "Forbidden",
"message": "You do not have permission to update this profile"
}
404 Not Found
{
"error": "Not Found",
"message": "Profile not found"
}
422 Unprocessable Entity
{
"error": "Validation Error",
"message": "Invalid tipo_persona value"
}
500 Internal Server Error
{
"error": "Internal Server Error",
"message": "An error occurred while updating the profile"
}
⌘I