Início Rápido
Comece a usar a API Ecosys Auto em 5 minutos
Início Rápido
Este guia mostra como fazer sua primeira integração com a API Ecosys Auto. Ao final, você terá criado um cliente e um veículo via API.
Pré-requisitos
- Conta ativa no Ecosys Auto
- API Key gerada (veja Autenticação)
store_idda sua loja (em Configurações → Lojas no painel)
Obtenha sua API Key e o ID da Loja
- Acesse o painel do Ecosys Auto
- Navegue até Configurações → API Keys
- Clique em Criar Nova Chave
- Copie sua chave (formato:
ea_live_...)
Para obter o store_id, vá em Configurações → Lojas e copie o ID da loja desejada.
Guarde sua API Key em segurança. Ela não será exibida novamente!
Crie seu primeiro cliente
Crie um cliente Pessoa Física:
curl -X POST https://dashboard.ecosysauto.ai/api/v1/clients \
-H "Authorization: Bearer ea_live_sua_chave_aqui" \
-H "Content-Type: application/json" \
-d '{
"type": "PF",
"name": "João da Silva",
"email": "joao.silva@email.com",
"cpf": "123.456.789-00",
"phone": "+55 11 99999-8888",
"segment": "premium"
}'const response = await fetch('https://dashboard.ecosysauto.ai/api/v1/clients', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ECOSYS_AUTO_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'PF',
name: 'João da Silva',
email: 'joao.silva@email.com',
cpf: '123.456.789-00',
phone: '+55 11 99999-8888',
segment: 'premium'
})
});
const data = await response.json();
console.log('Cliente criado:', data.data.id);import requests
import os
response = requests.post(
'https://dashboard.ecosysauto.ai/api/v1/clients',
headers={
'Authorization': f'Bearer {os.environ["ECOSYS_AUTO_API_KEY"]}',
'Content-Type': 'application/json'
},
json={
'type': 'PF',
'name': 'João da Silva',
'email': 'joao.silva@email.com',
'cpf': '123.456.789-00',
'phone': '+55 11 99999-8888',
'segment': 'premium'
}
)
data = response.json()
print(f"Cliente criado: {data['data']['id']}")Resposta:
{
"success": true,
"data": {
"id": "uuid-do-cliente",
"type": "PF",
"name": "João da Silva",
"email": "joao.silva@email.com",
"cpf": "123.456.789-00",
"phone": "+55 11 99999-8888",
"segment": "premium",
"status": "active",
"created_at": "2026-02-04T10:30:00Z"
}
}Cadastre um veículo
Agora cadastre um veículo no inventário. O campo store_id é obrigatório:
curl -X POST https://dashboard.ecosysauto.ai/api/v1/vehicles \
-H "Authorization: Bearer ea_live_sua_chave_aqui" \
-H "Content-Type: application/json" \
-d '{
"title": "Honda Civic EXL 2.0 2024",
"store_id": "uuid-da-sua-loja",
"brand": "Honda",
"model": "Civic",
"version": "EXL 2.0 Flex",
"year_model": 2024,
"year_manufacture": 2023,
"price": 142900.00,
"purchase_price": 125000.00,
"mileage": 18500,
"color": "Preto",
"fuel": "flex",
"transmission": "automatico",
"plate": "ABC1D23",
"client_id": "uuid-do-cliente"
}'Resposta:
{
"success": true,
"data": {
"id": "uuid-do-veiculo",
"title": "Honda Civic EXL 2.0 2024",
"brand": "Honda",
"model": "Civic",
"version": "EXL 2.0 Flex",
"year_model": 2024,
"price": 142900.00,
"purchase_price": 125000.00,
"mileage": 18500,
"color": "Preto",
"fuel": "flex",
"transmission": "automatico",
"plate": "ABC1D23",
"phase": "entrada",
"status": "ativo",
"store_id": "uuid-da-sua-loja",
"client_id": "uuid-do-cliente",
"created_at": "2026-02-04T10:31:00Z"
}
}Crie um negócio (deal)
Registre um negócio vinculando o cliente ao veículo:
curl -X POST https://dashboard.ecosysauto.ai/api/v1/deals \
-H "Authorization: Bearer ea_live_sua_chave_aqui" \
-H "Content-Type: application/json" \
-d '{
"title": "Venda Honda Civic 2024 — João da Silva",
"value": 142900.00,
"phase": "lead",
"probability": 40,
"client_id": "uuid-do-cliente",
"source": "showroom",
"tags": ["civic", "premium"]
}'Resposta:
{
"success": true,
"data": {
"id": "uuid-do-negocio",
"title": "Venda Honda Civic 2024 — João da Silva",
"value": 142900.00,
"phase": "lead",
"probability": 40,
"status": "ativo",
"client_id": "uuid-do-cliente",
"created_at": "2026-02-04T10:32:00Z"
}
}Liste seus veículos
Verifique os veículos cadastrados:
curl -X GET "https://dashboard.ecosysauto.ai/api/v1/vehicles?status=ativo" \
-H "Authorization: Bearer ea_live_sua_chave_aqui"Resposta:
{
"success": true,
"data": [
{
"id": "uuid-do-veiculo",
"title": "Honda Civic EXL 2.0 2024",
"brand": "Honda",
"model": "Civic",
"year_model": 2024,
"price": 142900.00,
"mileage": 18500,
"color": "Preto",
"status": "ativo",
"phase": "entrada",
"client": {
"id": "uuid-do-cliente",
"name": "João da Silva"
}
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1,
"pages": 1
}
}Próximos Passos
Agora que você fez sua primeira integração, explore mais recursos:
- Veículos — Documentação completa do inventário (campos FIPE, carroceria, etc.)
- Clientes — Gerenciar clientes PF e PJ com endereço e segmentação
- Negócios — Pipeline de vendas e como marcar ganho/perdido
Exemplo Completo em JavaScript
// ecosys-auto-client.js
class EcosysAutoClient {
constructor(apiKey) {
this.apiKey = apiKey;
this.baseUrl = 'https://dashboard.ecosysauto.ai/api/v1';
}
async request(endpoint, options = {}) {
const response = await fetch(`${this.baseUrl}${endpoint}`, {
...options,
headers: {
'Authorization': `Bearer ${this.apiKey}`,
'Content-Type': 'application/json',
...options.headers
}
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error?.message || 'Erro na requisição');
}
return response.json();
}
// Clientes
async createClient(data) {
return this.request('/clients', {
method: 'POST',
body: JSON.stringify(data)
});
}
async getClients(params = {}) {
const query = new URLSearchParams(params).toString();
return this.request(`/clients?${query}`);
}
// Veículos
async createVehicle(data) {
return this.request('/vehicles', {
method: 'POST',
body: JSON.stringify(data)
});
}
async getVehicles(params = {}) {
const query = new URLSearchParams(params).toString();
return this.request(`/vehicles?${query}`);
}
async updateVehicle(id, data) {
return this.request(`/vehicles/${id}`, {
method: 'PUT',
body: JSON.stringify(data)
});
}
// Negócios
async createDeal(data) {
return this.request('/deals', {
method: 'POST',
body: JSON.stringify(data)
});
}
async markDealWon(id, finalValue) {
return this.request(`/deals/${id}`, {
method: 'PUT',
body: JSON.stringify({ status: 'ganho', value: finalValue })
});
}
async markDealLost(id, lossReason) {
return this.request(`/deals/${id}`, {
method: 'PUT',
body: JSON.stringify({ status: 'perdido', loss_reason: lossReason })
});
}
}
// Uso
const client = new EcosysAutoClient(process.env.ECOSYS_AUTO_API_KEY);
const STORE_ID = process.env.ECOSYS_AUTO_STORE_ID;
async function cadastrarVeiculoCompleto(dadosCliente, dadosVeiculo) {
const cliente = await client.createClient(dadosCliente);
const veiculo = await client.createVehicle({
...dadosVeiculo,
store_id: STORE_ID,
client_id: cliente.data.id
});
return { cliente: cliente.data, veiculo: veiculo.data };
}
// Exemplo
cadastrarVeiculoCompleto(
{
type: 'PF',
name: 'Maria Santos',
email: 'maria@email.com',
cpf: '987.654.321-00'
},
{
title: 'Toyota Corolla XEi 2.0 2025',
brand: 'Toyota',
model: 'Corolla',
version: 'XEi 2.0 Flex',
year_model: 2025,
price: 165000.00,
mileage: 0
}
).then(console.log);Precisa de Ajuda?
- Email: suporte@ecosysauto.ai
- Dashboard: dashboard.ecosysauto.ai