Actualizar datos fiscales del equipo
PUT
/invoices/fiscal
const url = 'https://api.dev.lade.com.mx/invoices/fiscal';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"teamId":"550e8400-e29b-41d4-a716-446655440000","rfc":"TGA850101AB1","legalName":"Transportes García SA de CV","taxSystem":"601","address":{"zip":"64000","city":"Monterrey","state":"Nuevo León","neighborhood":"Centro"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.dev.lade.com.mx/invoices/fiscal \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "teamId": "550e8400-e29b-41d4-a716-446655440000", "rfc": "TGA850101AB1", "legalName": "Transportes García SA de CV", "taxSystem": "601", "address": { "zip": "64000", "city": "Monterrey", "state": "Nuevo León", "neighborhood": "Centro" } }'Actualiza los datos fiscales/legales del equipo en Facturapi (PUT /organizations/{id}/legal) y los persiste en DynamoDB. Requiere rol OWNER o ADMIN y que la organización ya esté configurada (/invoices/setup-org). El RFC no se envía a Facturapi — se asigna automáticamente al subir el CSD, aquí solo se persiste localmente.
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
teamId
required
string format: uuid
rfc
required
string
name
string
legalName
required
string
taxSystem
required
Clave SAT de régimen fiscal (c_RegimenFiscal)
string
website
string
supportEmail
string
phone
string
address
required
object
exterior
string
interior
string
zip
required
string
neighborhood
string
city
string
municipality
string
state
string
Example
{ "teamId": "550e8400-e29b-41d4-a716-446655440000", "rfc": "TGA850101AB1", "legalName": "Transportes García SA de CV", "taxSystem": "601", "address": { "zip": "64000", "city": "Monterrey", "state": "Nuevo León", "neighborhood": "Centro" }}Responses
Sección titulada «Responses»Datos fiscales actualizados
Media typeapplication/json
object
message
string
fiscalRfc
string
fiscalName
string
fiscalLegalName
string
fiscalTaxSystem
string
fiscalPhone
string
fiscalWebsite
string
fiscalSupportEmail
string
fiscalConfigured
boolean
Example
{ "message": "Fiscal data updated successfully", "fiscalRfc": "TGA850101AB1", "fiscalName": "Transportes García SA de CV", "fiscalLegalName": "Transportes García SA de CV", "fiscalTaxSystem": "601", "fiscalConfigured": true}Solicitud inválida
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Validation failed", "field": "email", "message": "Invalid email format"}Sin permisos
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Forbidden", "message": "You don't have permission to access this resource"}Error al comunicarse con el proveedor externo (Facturapi/Stripe)
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Facturapi error: the CSD certificate is invalid"}