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
|
| city | string | No |
max:100
|
| stateRegion | string | No |
max:100
|
| 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>" \
-H "X-Tenant-Key: <tenantKey>" \
-d '{
"legalName": "string"
}'
Los valores son demo: reemplázalos por datos reales del negocio.
Ejemplo de respuesta
Actualizado: 2026-09-08T16:35:34Z
HTTP 200
Request
{
"legalName": "Comidas del Valle SAS 6aa038917a3bc",
"displayName": "Comidas del Valle",
"taxNumber": "900123456-7",
"city": "Cali"
}
Response
{
"success": true,
"message": "Entidad legal creada",
"data": {
"legalEntity": {
"legalEntityUuid": "bf552800-14b1-4865-9934-da4761dc1ebd",
"legalEntityId": 4,
"legalName": "Comidas del Valle SAS 6aa038917a3bc",
"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,
"city": "Cali",
"stateRegion": null,
"postalCode": null,
"taxNumber": "900123456-7",
"isActive": 1,
"isAvailable": 1
}
}
}