API reference

DutyStack REST API v1

Authentication

Pass your API key in the Authorization header:

Authorization: Bearer ds_live_xxxxxxxx

Widget embeds use X-DutyStack-Widget-Key instead.

POST /api/v1/calculate

Returns stamp duty, government fees, FHOG, and funds-to-complete for a deposit tier (5% Scheme / 10% / 20%), including LVR and whether LMI typically applies.

Request body

{
  "state": "NSW",
  "propertyValue": 850000,
  "isOwnerOccupier": true,
  "isFirstHomeBuyer": true,
  "isNewBuild": false,
  "isForeignPurchaser": false,
  "depositPercent": 10,
  "use5PctScheme": false,
  "isMetro": true
}

depositPercent: 5, 10, or 20 (default 20). use5PctScheme: FHB + owner-occupier only — forces 5% deposit and waives typical LMI when under Housing Australia price caps. isMetro: capital city / designated regional centre vs other areas (Scheme caps). LMI dollar premiums are not estimated (lender-specific); cash FTC excludes capitalised LMI.

Example

curl -X POST https://dutystack.com.au/api/v1/calculate \
  -H "Authorization: Bearer ds_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state":"NSW","propertyValue":850000,"isFirstHomeBuyer":true}'

POST /api/v1/leads

Capture a lead from the widget after a calculation. Requires widget or API key + consent. Delivers to broker email and optional CRM webhook.

{
  "name": "Alex Smith",
  "email": "alex@email.com",
  "phone": "0400 000 000",
  "consent": true,
  "calculationId": "uuid",
  "state": "NSW",
  "propertyValue": 850000,
  "depositPercent": 10,
  "fundsToComplete": 120000,
  "stampDuty": 25000,
  "lmiApplies": true
}

POST /api/v1/pdf

Same request body as /calculate. Returns a branded PDF attachment. Requires API Pro plan.

Example

curl -X POST https://dutystack.com.au/api/v1/pdf \
  -H "Authorization: Bearer ds_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state":"VIC","propertyValue":650000,"isFirstHomeBuyer":true}' \
  --output duty-estimate.pdf

States

NSW, VIC, QLD, WA, SA, TAS, ACT, NT

Errors

  • 401 — Invalid or missing API key
  • 403 — PDF requires API Pro plan
  • 429 — Monthly quota exceeded
  • 400 — Invalid request body
  • 503 — Server not fully configured

Plans & quotas

PlanQuotaPDF
Widget ($49/mo)500/mo
API Pro ($149/mo)5,000/mo

Generate an API key →