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>" \
-d '{
"legalName": "string"
}'
Los valores son demo: reemplázalos por datos reales del negocio.
Ejemplo de respuesta
Actualizado: 2026-09-13T21:05:19Z
HTTP 200
Request
{
"legalName": "Logo Test SAS 6aa70f44eaf6b"
}
Response
{
"success": true,
"message": "Entidad legal creada",
"data": {
"legalEntity": {
"legalEntityUuid": "25d66189-de1b-4ee9-b92f-d2673a3d8192",
"legalEntityId": 4,
"legalName": "Logo Test SAS 6aa70f44eaf6b",
"displayName": null,
"logoUrl": null,
"receiptLogoSize": "medium",
"invoiceShowLogo": 1,
"invoiceShowName": 1,
"prebillShowLogo": 1,
"prebillShowName": 1,
"invoiceHeader": null,
"invoiceFooter": null,
"phone": "***",
"addressLine1": null,
"addressLine2": null,
"city": null,
"stateRegion": null,
"postalCode": null,
"taxNumber": null,
"isActive": 1,
"isAvailable": 1
}
}
}