Skip to content

Crear empresa

Registra la empresa emisora automáticamente desde tu plataforma para que tus usuarios puedan emitir documentos tributarios electrónicos

Método: POST

https://api-sandbox.lumendte.com/v1/companies

CampoTipoDescripción
legalNamestringRazón social de la empresa o nombre de la persona natural
tradeNamestringNombre comercial
taxIdentityNumberstringNIT o DUI si es una persona natural
taxRegistrationNumberstringNRC
economicActivityCodestringCódigo de actividad económica
taxpayerTypestringSMALL, MEDIUM o LARGE

Significados de taxpayerType (categoría de contribuyente):

ValorSignificado
SMALLPequeño Contribuyente
MEDIUMMediano Contribuyente
LARGEGran Contribuyente

Tras crear la empresa, registra sus establecimientos como la casa matriz o sucursales con sus respectivos códigos de departamento, municipio y distrito: Departamentos, Municipios y Distritos. Ver Crear establecimiento.

Terminal window
curl -X POST https://api-sandbox.lumendte.com/v1/companies \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer tu_access_token" \
-d '{
"legalName": "Distribuidora El Sol, S.A. de C.V.",
"tradeName": "El Sol",
"taxIdentityNumber": "0614-090590-123-4",
"taxRegistrationNumber": "123456-7",
"economicActivityCode": "46900",
"taxpayerType": "SMALL"
}'

Status: 201 Created

La API utilizará el taxIdentityNumber para identificar la empresa emisora.

{
"legalName": "Distribuidora El Sol, S.A. de C.V.",
"tradeName": "El Sol",
"taxIdentityNumber": "0614-090590-123-4",
"taxRegistrationNumber": "123456-7",
"economicActivityCode": "46900",
"taxpayerType": "SMALL"
}

Campo vacío o taxpayerType fuera de SMALL | MEDIUM | LARGE.

{
"errorCode": "INVALID_PARAMETERS",
"statusCode": 400,
"message": [
"legalName must not be empty",
"taxIdentityNumber must be at least 9 characters long",
"taxpayerType must be one of: SMALL, MEDIUM, LARGE"
],
"error": "Bad Request"
}

Fix: Revisa el valor de taxpayerType y vuelve a enviar el JSON completo.

Ya existe una empresa con el mismo NIT o NRC. Recuerda que esos datos son únicos para cada empresa o contribuyente y Lumen identifica cuando estan bajo tu cuenta registrada.

Si el NIT ya existe:

{
"errorCode": "COMPANY_ALREADY_EXISTS",
"statusCode": 409,
"message": "A company with the same taxIdentityNumber already exists",
"error": "Conflict"
}

Si el NRC ya existe:

{
"errorCode": "COMPANY_ALREADY_EXISTS",
"statusCode": 409,
"message": "A company with the same taxRegistrationNumber already exists for tenant 42",
"error": "Conflict"
}