HTTP contract between Fixando (the marketplace) and the external Quotes service.
Endpoints exposed by Fixando and consumed by the Quotes service.
https://api.fixando.com/oauth/validate-tokenValidates the SSO token and returns Pro data.
https://api.fixando.com/users/:id/premium-statusPremium status and validity.
https://api.fixando.com/pedidos/:idFull Request data (Client, category, service, location).
https://api.fixando.com/pedidos/:id/eventsAdds an event to the Request timeline (quote_sent, quote_opened, …).
https://api.fixando.com/notifications/sendNotifies the Client when direct contact is not allowed.
Authenticated endpoints exposed by the Quotes service.
/auth/fixando-tokenExchanges a Fixando token for a local JWT session.
/premium/statusConfirms the authenticated user's Premium eligibility.
/quotes/from-pedidoCreates a draft pre-filled with Request data.
{ "pedido_id": "12345" }/quotesCreates a quote with items, VAT and expiry.
/quotes/:id/pdfGenerates the PDF and a QR-coded verification URL.
/quotes/:id/sendSends by email or via Fixando notifications.
/quotes/:id/whatsappReturns a WhatsApp share URL.
Endpoints called by the /q/:token page (no auth, long random token).
/api/public/quote/:tokenPublic quote view. Records quote_opened on first open.
/api/public/quote/:token/approveMarks as approved and records the event.
/api/public/quote/:token/rejectMarks as rejected.
/api/public/quote/:token/request-changesRecords a change request with the Client's message.
Asynchronous communication between the two systems. Every request is signed with HMAC-SHA256 in the X-Fixando-Signature header over the raw body.
/api/public/webhooks/fixando-emitMock of the Fixando endpoint that receives quote lifecycle events (quote_sent, quote_opened, quote_approved, quote_rejected, quote_changes_requested) and adds them to the Request timeline.
POST /api/public/webhooks/fixando-emit
X-Fixando-Signature: sha256=<hex>
X-Fixando-Event: quote_approved
{
"type": "quote_approved",
"occurred_at": "2025-04-24T10:00:00.000Z",
"fixando_user_id": "fx_abc123",
"fixando_pedido_id": "12345",
"quote_id": "uuid",
"metadata": {}
}/api/public/webhooks/premium-updatedWebhook received from Fixando when a Pro's Premium status changes (renewal, expiry, downgrade). Updates the local profile immediately.
POST /api/public/webhooks/premium-updated
X-Fixando-Signature: sha256=<hex>
{
"fixando_user_id": "fx_abc123",
"premium_status": "active",
"premium_valid_until": "2026-04-24T00:00:00.000Z"
}/api/public/webhooks/notify-sentInternal bridge: the authenticated UI calls this endpoint after marking a quote as sent; the server signs and emits the quote_sent event to Fixando.
{ "token": "<public_token>" }Premium subscription flow. The /premium page calls /api/public/fixando/checkout (with the Pro's Bearer token). The server simulates Fixando billing and fires the signed premium-updated webhook back — the same path that would exist in production.
/api/public/fixando/checkoutMock of the Fixando billing endpoint. Receives { plan: 'monthly' | 'yearly' | 'lifetime' }, simulates the charge and returns the new premium_valid_until. Plans have fixed prices (€19, €149, €499). Renewals extend from the current expiry when still valid.
POST /api/public/fixando/checkout
Authorization: Bearer <supabase-access-token>
{ "plan": "yearly" }
→ {
"ok": true,
"plan": "yearly",
"plan_label": "Yearly Premium",
"price_eur": 149,
"premium_status": "active",
"premium_valid_until": "2027-04-24T...",
"checkout_id": "chk_..."
}