Skip to main content

Quote API

The quote calculator exposes a small set of Next.js API routes under /api/quote/*.

This page gives a high-level overview. For full request/response examples, see:

Endpoints

Currently documented endpoints:

  • POST /api/quote/track – Real-time tracking of calculator interactions.
  • POST /api/quote/submit – Final quote submission, validation, and integrations.
  • GET /api/quote/pdf – PDF quote generation and download.

Details for each endpoint, including payload shapes and example responses, are in:

Data flow

In combination with the wider system:

  1. User interacts with the quote calculator UI.
  2. POST /api/quote/track captures selections and estimated ranges.
  3. POST /api/quote/submit performs validation and persists quote data.
  4. Sanity CMS stores structured quote data.
  5. HubSpot CRM is updated with contact plus quote properties.
  6. A PDF summary can be generated via GET /api/quote/pdf.

See also:

TODO

Verify the exact routes and response contracts in the main application repository to ensure this page and quote-endpoints remain accurate when the API evolves.