{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Site API Data Model"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"site-api-data-model","__idx":0},"children":["Site API Data Model"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Site API works with three entities organized in a hierarchy:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"Company (hauler)\n └─ Site\n      └─ Kiosk       (optional — only if your system uses kiosks)\n           └─ Material\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"entities","__idx":1},"children":["Entities"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Site"]}," — a disposal site with address details. Always present."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Kiosk"]}," — a station/point within a site. Optional — only include if your system models kiosks."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Material"]}," — a material type with pricing, linked to a kiosk or directly to a site."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schemas"]}," section of the Site API reference for the full field list of each entity."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"when-to-use-kiosks","__idx":2},"children":["When to use kiosks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["If your system uses kiosks"]}," (stations or points within a site):"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Include the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kiosks"]}," array in the response."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Link each material to its kiosk via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kioskId"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["If your system does not use kiosks:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Return an empty ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kiosks"]}," array, or omit it."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Link each material directly to a site via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["siteId"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"relationships","__idx":3},"children":["Relationships"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Kiosk → Site"]},": every kiosk must include a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["siteId"]}," identifying its parent site."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Material → Kiosk or Site"]},": every material must link to ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["at least one"]}," parent — its ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kioskId"]}," (if your system uses kiosks) or its ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["siteId"]}," (if it doesn't)."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"tracking-changes","__idx":4},"children":["Tracking changes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every entity (site, kiosk, material) must include an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["updatedAt"]}," timestamp in ISO 8601 format. Hauler Hero uses these timestamps to detect changes between syncs — keep them accurate or change detection will break."]}]},"headings":[{"value":"Site API Data Model","id":"site-api-data-model","depth":1},{"value":"Entities","id":"entities","depth":2},{"value":"When to use kiosks","id":"when-to-use-kiosks","depth":2},{"value":"Relationships","id":"relationships","depth":2},{"value":"Tracking changes","id":"tracking-changes","depth":2}],"frontmatter":{"seo":{"title":"Site API Data Model"}},"lastModified":"2026-04-23T21:36:52.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/site-data-model","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}