Entidades legales
POST
Crear entidad legal
POST /api/legal-entities/create-legal-entity
Descripción
Registra una entidad legal nueva con sus datos de facturación.
Detalles
* La razón social es obligatoria; el resto de los datos son opcionales. * El logo de factura se gestiona con sus propias acciones independientes. * La dirección y el teléfono se imprimen en la factura de esta entidad.
Permisos requeridos
admin.module
Request
| Nombre | Tipo | Requerido | Reglas |
|---|---|---|---|
| legalName | string | Sí |
max:200
|
| displayName | string | No |
max:200
|
| taxNumber | string | No |
max:30
|
| phone | string | No |
max:30
|
| addressLine1 | string | No |
max:255
|
| addressLine2 | string | No |
max:255
|
| municipalityCode | string | No |
max:10
|
| postalCode | string | No |
max:20
|
| invoiceHeader | string | No |
max:1000
|
| invoiceFooter | string | No |
max:1000
|
| receiptLogoSize | string | No |
enum:small,medium,large
|
| invoiceShowLogo | bool | No | — |
| invoiceShowName | bool | No | — |
| prebillShowLogo | bool | No | — |
| prebillShowName | bool | No | — |
Ejemplo de request
curl -X POST https://restofy.pro/api/legal-entities/create-legal-entity \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <accessToken>" \
-d '{
"legalName": "string"
}'
Los valores son demo: reemplázalos por datos reales del negocio.
Ejemplo de respuesta
Actualizado: 2026-11-02T19:00:57Z
HTTP 200
Request
{
"legalName": "Comidas del Valle SAS 6ae8d81392f77",
"displayName": "Comidas del Valle",
"taxNumber": "900123456-7",
"municipalityCode": "76001"
}
Response
{
"success": true,
"message": "Entidad legal creada",
"data": {
"legalEntity": {
"legalEntityUuid": "6db2f5ec-9b3e-4b99-b3fc-3b614b66ece2",
"legalEntityId": 4,
"legalName": "Comidas del Valle SAS 6ae8d81392f77",
"displayName": "Comidas del Valle",
"logoUrl": null,
"receiptLogoSize": "medium",
"invoiceShowLogo": 1,
"invoiceShowName": 1,
"prebillShowLogo": 1,
"prebillShowName": 1,
"invoiceHeader": null,
"invoiceFooter": null,
"phone": "***",
"addressLine1": null,
"addressLine2": null,
"countryCode": "CO",
"municipalityCode": "76001",
"city": "Cali",
"stateRegion": "Valle del Cauca",
"postalCode": null,
"taxNumber": "900123456-7",
"isActive": 1,
"isAvailable": 1
}
}
}