Entidades legales
POST
Actualizar entidad legal
POST /api/legal-entities/update-legal-entity
Descripción
Actualiza los datos de facturación de una entidad legal existente.
Detalles
* La razón social es obligatoria; el resto de los datos son opcionales. * Falla si la entidad legal no existe o fue eliminada. * El logo de factura se gestiona con sus propias acciones independientes.
Permisos requeridos
admin.module
Request
| Nombre | Tipo | Requerido | Reglas |
|---|---|---|---|
| legalEntityUuid | string | Sí |
max:36
|
| 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/update-legal-entity \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <accessToken>" \
-H "X-Tenant-Key: <tenantKey>" \
-d '{
"legalEntityUuid": "string",
"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
{
"legalEntityUuid": "4c7df78b-3164-4b64-9fa1-f1b1d064167b",
"legalName": "Cafe Central Renombrado SAS",
"displayName": "Cafe Central",
"invoiceFooter": "Gracias por tu visita"
}
Response
{
"success": true,
"message": "Entidad legal actualizada",
"data": {
"legalEntity": {
"legalEntityUuid": "4c7df78b-3164-4b64-9fa1-f1b1d064167b",
"legalEntityId": 6,
"legalName": "Cafe Central Renombrado SAS",
"displayName": "Cafe Central",
"logoUrl": null,
"receiptLogoSize": "medium",
"invoiceShowLogo": 1,
"invoiceShowName": 1,
"prebillShowLogo": 1,
"prebillShowName": 1,
"invoiceHeader": null,
"invoiceFooter": "Gracias por tu visita",
"phone": "***",
"addressLine1": null,
"addressLine2": null,
"city": null,
"stateRegion": null,
"postalCode": null,
"taxNumber": null,
"isActive": 1,
"isAvailable": 1
}
}
}