C
Cotizera Docs

Pipeline

Pipeline API

Endpoints for the Kanban pipeline view. Returns all quotes (no pagination) with optional filters for building drag-and-drop boards grouped by status.


List Pipeline Quotes

GET /api/pipeline

Permission: pipeline:view | Collaborators see only their own quotes; Owners/Admins see all and can filter by vendor.

Retrieve all quotes for the pipeline view with optional filters.

Query Parameters:

Parameter Type Required Description
userId string No Filter by collaborator (Owner/Admin only)
from string No Start date (ISO 8601, e.g. 2026-03-01)
to string No End date (ISO 8601)
minAmount string No Minimum total amount
maxAmount string No Maximum total amount

Response 200 OK:

{
  "data": [
    {
      "id": "clxyz...",
      "quoteNumber": 42,
      "status": "SENT",
      "subtotal": "15000.00",
      "tax": "2400.00",
      "total": "17900.00",
      "createdAt": "2026-03-31T10:00:00.000Z",
      "client": {
        "contactName": "María López",
        "companyName": "Distribuidora del Norte S.A."
      },
      "user": {
        "name": "Carlos Méndez"
      }
    }
  ]
}

Errors:

Status Error When
401 "No autorizado" Missing or invalid session
403 "Sin permisos" Role lacks pipeline:view

cURL Example:

curl -X GET "https://cotizera.com/api/pipeline?from=2026-03-01&to=2026-03-31&minAmount=10000" \
  -H "Cookie: next-auth.session-token=YOUR_TOKEN"

List Vendors

GET /api/pipeline/vendors

Permission: quotes:read_all (Owner/Admin only)

List all active users (vendors/collaborators) in the tenant. Used to populate the vendor filter dropdown in the pipeline view.

Response 200 OK:

{
  "data": [
    { "id": "clxyz...", "name": "Carlos Méndez", "email": "carlos@empresa.mx" },
    { "id": "clxyz...", "name": "Ana Rodríguez", "email": "ana@empresa.mx" }
  ]
}

Errors:

Status Error When
403 "Sin permisos" Collaborator role cannot access this endpoint
© 2026 Cotizera. All rights reserved.