Saltar al contenido principal

Negocios

Listar negocios

GET /api/v1/crm/deals

Parámetros:

NombreTipoDescripción
cursorstringCursor de paginación
limitintItems por página (default 25, máx 100)
filter[pipeline_id]stringUUID del pipeline
filter[stage_id]stringUUID de la etapa
filter[owner_id]stringUUID del propietario
filter[contact_id]stringUUID del contacto
filter[account_id]stringUUID de la cuenta
filter[status]stringopen, won, lost
sortstring-created_at, amount, -expected_close

Respuesta 200:

{
"data": [
{
"id": "uuid",
"pipeline_id": "uuid",
"stage_id": "uuid",
"contact_id": "uuid",
"account_id": "uuid",
"owner_id": "uuid",
"title": "Acme initial proposal",
"amount": 500000,
"currency": "PEN",
"status": "open",
"probability": 60,
"expected_close": "2026-08-01T00:00:00Z",
"lost_reason": "",
"tags": ["enterprise"],
"metadata": {},
"created_at": "2026-04-08T12:00:00Z",
"updated_at": "2026-04-08T12:00:00Z",
"closed_at": null
}
],
"meta": { "pagination": { "cursor": "eyJ...", "has_next": true, "limit": 25 } }
}

Crear negocio

POST /api/v1/crm/deals

{
"pipeline_id": "uuid",
"stage_id": "uuid",
"contact_id": "uuid",
"account_id": "uuid",
"title": "Acme initial proposal",
"amount": 500000,
"currency": "PEN",
"probability": 60,
"expected_close": "2026-08-01T00:00:00Z",
"tags": ["enterprise"]
}

Respuesta 201: objeto Deal completo.


Obtener negocio

GET /api/v1/crm/deals/:id


Actualizar negocio

PATCH /api/v1/crm/deals/:id

Mismos campos que crear. Omite los campos que no quieras cambiar.


Mover negocio de etapa

POST /api/v1/crm/deals/:id/move

{ "stage_id": "uuid" }

Marcar como ganado

POST /api/v1/crm/deals/:id/won


Marcar como perdido

POST /api/v1/crm/deals/:id/lost

{ "reason": "Presupuesto insuficiente" }

Eliminar negocio

DELETE /api/v1/crm/deals/:id

Respuesta 204 No Content