Skip to content
Last updated

Site API Data Model

The Site API works with three entities organized in a hierarchy:

Company (hauler)
 └─ Site
      └─ Kiosk       (optional — only if your system uses kiosks)
           └─ Material

Entities

  • Site — a disposal site with address details. Always present.
  • Kiosk — a station/point within a site. Optional — only include if your system models kiosks.
  • Material — a material type with pricing, linked to a kiosk or directly to a site.

See the Schemas section of the Site API reference for the full field list of each entity.

When to use kiosks

If your system uses kiosks (stations or points within a site):

  • Include the kiosks array in the response.
  • Link each material to its kiosk via kioskId.

If your system does not use kiosks:

  • Return an empty kiosks array, or omit it.
  • Link each material directly to a site via siteId.

Relationships

  • Kiosk → Site: every kiosk must include a siteId identifying its parent site.
  • Material → Kiosk or Site: every material must link to at least one parent — its kioskId (if your system uses kiosks) or its siteId (if it doesn't).

Tracking changes

Every entity (site, kiosk, material) must include an updatedAt timestamp in ISO 8601 format. Hauler Hero uses these timestamps to detect changes between syncs — keep them accurate or change detection will break.