Overview
The Empresas (Companies) API allows you to create, retrieve, update, and delete company records. Companies are organizations that create advertising campaigns and manage their brand presence on the platform.
Base Endpoint
POST /Database/Database/empresas/
GET /Database/Database/empresas/
GET /Database/Database/empresas/{id_empresa}/
PUT /Database/Database/empresas/{id_empresa}/
PATCH /Database/Database/empresas/{id_empresa}/
DELETE /Database/Database/empresas/{id_empresa}/
The Empresa Object
Unique identifier for the company (auto-generated)
Foreign key reference to the Usuario (User) that owns this company account
Tax identification number (RUC). Maximum 13 characters
Company name. Maximum 30 characters
Company description. Maximum 300 characters
Contact email address. Maximum 40 characters
Contact phone number. Maximum 10 characters
Foreign key reference to the Pais (Country) where the company is located. Defaults to 1
Date when the company was created (YYYY-MM-DD format)
Date when the company was last modified (YYYY-MM-DD format)
Foreign key reference to Estado (Status) indicating the company’s current state
Create a Company
curl -X POST https://api.example.com/Database/Database/Database/empresas/ \
-H "Content-Type: application/json" \
-d '{
"id_usuario": 5,
"ruc": "1234567890001",
"nombre": "TechCorp Solutions",
"descripcion": "Leading technology solutions provider specializing in digital transformation and innovation",
"mail_contacto": "[email protected]",
"telefono": "0991234567",
"id_pais": 1,
"fecha_creacion": "2024-01-15",
"fecha_modificacion": "2024-01-15",
"estado": 1
}'
{
"id_empresa": 12,
"id_usuario": 5,
"ruc": "1234567890001",
"nombre": "TechCorp Solutions",
"descripcion": "Leading technology solutions provider specializing in digital transformation and innovation",
"mail_contacto": "[email protected]",
"telefono": "0991234567",
"id_pais": 1,
"fecha_creacion": "2024-01-15",
"fecha_modificacion": "2024-01-15",
"estado": 1
}
Retrieve a Company
curl -X GET https://api.example.com/Database/Database/Database/empresas/12/
{
"id_empresa": 12,
"id_usuario": 5,
"ruc": "1234567890001",
"nombre": "TechCorp Solutions",
"descripcion": "Leading technology solutions provider specializing in digital transformation and innovation",
"mail_contacto": "[email protected]",
"telefono": "0991234567",
"id_pais": 1,
"fecha_creacion": "2024-01-15",
"fecha_modificacion": "2024-01-15",
"estado": 1
}
List All Companies
curl -X GET https://api.example.com/Database/Database/Database/empresas/
[
{
"id_empresa": 12,
"id_usuario": 5,
"ruc": "1234567890001",
"nombre": "TechCorp Solutions",
"descripcion": "Leading technology solutions provider specializing in digital transformation and innovation",
"mail_contacto": "[email protected]",
"telefono": "0991234567",
"id_pais": 1,
"fecha_creacion": "2024-01-15",
"fecha_modificacion": "2024-01-15",
"estado": 1
},
{
"id_empresa": 13,
"id_usuario": 6,
"ruc": "9876543210001",
"nombre": "Marketing Plus",
"descripcion": "Full-service marketing agency focused on brand development and digital advertising",
"mail_contacto": "[email protected]",
"telefono": "0987654321",
"id_pais": 1,
"fecha_creacion": "2024-02-10",
"fecha_modificacion": "2024-02-10",
"estado": 1
}
]
Update a Company
curl -X PUT https://api.example.com/Database/Database/Database/empresas/12/ \
-H "Content-Type: application/json" \
-d '{
"id_usuario": 5,
"ruc": "1234567890001",
"nombre": "TechCorp Solutions Inc",
"descripcion": "Leading technology solutions provider specializing in digital transformation, innovation, and cloud services",
"mail_contacto": "[email protected]",
"telefono": "0991234567",
"id_pais": 1,
"fecha_creacion": "2024-01-15",
"fecha_modificacion": "2024-03-09",
"estado": 1
}'
{
"id_empresa": 12,
"id_usuario": 5,
"ruc": "1234567890001",
"nombre": "TechCorp Solutions Inc",
"descripcion": "Leading technology solutions provider specializing in digital transformation, innovation, and cloud services",
"mail_contacto": "[email protected]",
"telefono": "0991234567",
"id_pais": 1,
"fecha_creacion": "2024-01-15",
"fecha_modificacion": "2024-03-09",
"estado": 1
}
Delete a Company
curl -X DELETE https://api.example.com/Database/Database/Database/empresas/12/