OI
owner-quotes

API Reference

All 28 API endpoints in the Owner Quotes application.

Health & Utilities

GET
/api/health

Service health check

GET
/api/services

List all available inspection services with labels (cached 24h, CORS enabled)

GET
/api/sentry-test

Sentry error reporting test (returns 404 in prod)

Quote Management

POST
/api/quotes/estimate

Calculate quote with pricing, addons, custom line items, and property intelligence

Returns base price, GST, discount, stage pricing, addons breakdown, and quote token.

POST
/api/quotes/extract-property

Extract property details from address using OpenAI / Domain API

POST
/api/quotes/sign-token

Sign quote token for payment authentication

Lead Management

POST
/api/leads/submit

Submit new lead with contact info, service type, address, UTM tracking

Partner lead source forcing via ?partner=code. CORS for multiple Owner Inspections domains.

Email Endpoints

POST
/api/email/welcome

Send welcome email after lead submission (service-specific questions)

POST
/api/email/send-quote

Send formatted quote email to customer (staff whitelist)

POST
/api/email/payment-status

Send payment success/failed/booking/reminder emails

POST
/api/email/quote-view

Send quote summary email with pricing breakdown

SMS Endpoints

POST
/api/sms/booking

Booking confirmation SMS

POST
/api/sms/followup

Quote follow-up SMS with price and payment link

POST
/api/sms/booking-reminder

Reminder to complete booking form after payment

Phone Verification (Twilio)

POST
/api/twilio/send-otp

Send OTP code via SMS (rate limited: 5/IP/10min, 5/phone/10min)

POST
/api/twilio/verify-otp

Verify OTP code against Twilio Verify service

Payment (Stripe)

POST
/api/stripe/payment-intent

Create Stripe Payment Intent (validates quote token and amount)

POST
/api/stripe/checkout-session

Create Stripe Checkout Session (domain restricted to quotes.ownerinspections.com.au)

POST
/api/stripe/cancel-payment-intent

Cancel an active payment intent

GET
/api/stripe/receipt/[id]

Get receipt for a payment intent by charge ID

CRM Integration

POST
/api/crm/leads

Create lead in CRM

POST
/api/crm/leads/[id]/email

Update lead email in CRM

POST
/api/crm/booking

Create booking in CRM

POST
/api/crm/quote

Record quote sent event

POST
/api/crm/note

Add note to CRM record

POST
/api/crm/stage

Update lead stage (verified, custom_quote, property_extracted)

POST
/api/crm/track

Track customer journey events (viewed_quote, accepted, paid, booked)

POST
/api/crm/upload-file

Upload file to CRM item