Use cases

Automatic listing after property approval

As soon as a property reaches active status, a listing should be created - without anyone having to remember to trigger it.

  1. Subscribe to the property.updated event.
  2. Check whether status == "active" and no listing exists for the property yet.
  3. Call POST /listings with your default template.
  4. React to listing.completed and save the PDF to your own storage system.

An extra check pays off: call GET /listings?property_id=… first and stop if a listing with status: completed already exists. Webhooks can be delivered more than once, and without this check you'll end up with duplicates.

Multilingual marketing

For international prospects, generate the same property twice - once with language: "en", once with language: "es". Both listings get their own IDs and their own PDFs; the mandatory-disclosure check runs identically for both.

Which disclosures are legally required can vary by market, so double-check that the disclosures relevant to your audience are covered in both versions before publishing.

Cleanly following through on a price change

When a price is adjusted:

  1. Change the property via PATCH /properties/{id}.
  2. Withdraw the old listing via DELETE /listings/{id}.
  3. Generate and publish a new listing.

It's not a good idea to change the property and leave the old listing standing: the channels would keep showing the old price while the portal already shows the new one.

Template per property type

GET /templates returns the agency's templates along with the sections each one supports. A small mapping table in your system - property type to template - saves you from hardcoding IDs in your code:

{
  "apartment":  "tpl_classic",
  "house":      "tpl_classic",
  "commercial": "tpl_commercial",
  "land":       "tpl_minimal"
}

Check once, at startup, that every stored ID still exists. Otherwise a deleted template only surfaces as a 404 the next time a listing is generated.