C
Cotizera
πŸ‡ΊπŸ‡Έ
Back to blog
Cotizera TeamMarch 27, 2026
apigetting-started

Getting Started with the Cotizera API

Building an integration with Cotizera? This guide takes you from zero to your first quote in under 10 minutes.

Get your API key

From the Cotizera dashboard, go to Settings β†’ API Keys and generate a new key. Copy the value β€” it's only shown once.

export COTIZERA_API_KEY="ck_live_abc123..."

Tip: Use test keys (ck_test_...) during development to avoid touching production data.

Authentication

Every request requires the Authorization header:

curl -X GET https://api.cotizera.com/v1/quotes \
  -H "Authorization: Bearer $COTIZERA_API_KEY" \
  -H "Content-Type: application/json"

An invalid key returns 401 Unauthorized. See the errors guide for the full catalog of status codes.

Create your first quote

With your key ready, create a quote programmatically:

curl -X POST https://api.cotizera.com/v1/quotes \
  -H "Authorization: Bearer $COTIZERA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "clientId": "cl_abc123",
    "items": [
      {
        "productId": "prod_xyz",
        "quantity": 2,
        "unitPrice": 1500.00
      }
    ],
    "currency": "MXN",
    "validDays": 30,
    "notes": "Prices subject to availability"
  }'

The response includes the quote id and a link to the generated PDF:

{
  "id": "qt_789",
  "number": "COT-0042",
  "status": "draft",
  "total": 3000.00,
  "pdfUrl": "https://api.cotizera.com/v1/quotes/qt_789/pdf"
}

Next steps

The Cotizera API follows REST conventions with consistent JSON responses. When something goes wrong, error messages include the exact field and a clear description β€” no guesswork required.