# Get Sites, Kiosks, and materials Retrieve all sites, kiosks, and materials for a specific hauler Endpoint: GET /scale-hero/v1/sites Version: 1.0.0 Security: apiKey ## Query parameters: - `haulerId` (string, required) Unique identifier for the hauler Example: "123e4567-e89b-12d3-a456-426614174000" ## Response 200 fields (application/json): - `success` (boolean, required) Whether the request was successful Example: true - `data` (object, required) - `data.sites` (array) List of sites for the hauler - `data.sites.id` (string, required) Unique identifier for the site Example: "64318450-1ce2-499d-8a70-f313aabe1831" - `data.sites.name` (string, required) Name of the site Example: "GTest Site 11" - `data.sites.address` (object) - `data.sites.address.line1` (string, required) Primary address line Example: "1250 Riverside Drive" - `data.sites.address.city` (string, required) City name Example: "Austin" - `data.sites.address.state` (string, required) State or province Example: "Texas" - `data.sites.address.country` (string, required) Country name Example: "United States" - `data.sites.address.zipCode` (string, required) Postal/ZIP code Example: "78701" - `data.sites.active` (boolean) Whether the site is currently active Example: true - `data.sites.updatedAt` (string) ISO 8601 timestamp when the site was last updated Example: "2024-10-21T15:30:00Z" - `data.kiosks` (array) List of kiosks associated with the sites - `data.kiosks.id` (string, required) Unique identifier for the kiosk Example: "d3f3f3e3-1f2e-4f2b-8f7a-5e3b6c4d2a1b" - `data.kiosks.siteId` (string, required) Foreign key reference to the parent site Example: "64318450-1ce2-499d-8a70-f313aabe1831" - `data.kiosks.name` (string, required) Name of the kiosk Example: "GTest Kiosk 11" - `data.kiosks.active` (boolean) Whether the kiosk is currently active Example: true - `data.kiosks.updatedAt` (string) ISO 8601 timestamp when the kiosk was last updated Example: "2024-10-21T15:30:00Z" - `data.materials` (array) List of materials available at the kiosks / sites - `data.materials.id` (string, required) Unique identifier for the material Example: "a51b814b-1b23-4f28-8c2a-b90030340eea" - `data.materials.siteId` (string) Foreign key reference to the parent site. Required if your system does NOT use kiosks and materials are linked directly to sites. Either siteId or kioskId must be provided, not both. Example: "64318450-1ce2-499d-8a70-f313aabe1831" - `data.materials.kioskId` (string) Foreign key reference to the parent kiosk. Required if your system uses kiosks and materials are linked to kiosks. Either siteId or kioskId must be provided, not both. Example: "d3f3f3e3-1f2e-4f2b-8f7a-5e3b6c4d2a1b" - `data.materials.materialType` (string, required) Type/category of material Example: "Appliance" - `data.materials.measureUnit` (string, required) Unit of measurement for the material Enum: "Item", "Ton", "Pound", "Kilogram", "Cubic Yard", "Cubic Meter" - `data.materials.active` (boolean) Whether the material is currently active/available Example: true - `data.materials.updatedAt` (string) ISO 8601 timestamp when the material was last updated Example: "2024-10-21T15:30:00Z" ## Response 400 fields (application/json): - `success` (boolean, required) Always false for errors - `error` (object, required) - `error.code` (string, required) Machine-readable error code Enum: "INVALID_PAYLOAD", "UNAUTHORIZED", "INTERNAL_ERROR", "VALIDATION_ERROR", "NOT_FOUND" - `error.message` (string, required) Human-readable error message Example: "Missing required field: eventId" - `error.details` (object) Additional error details (optional) ## Response 401 fields (application/json): - `success` (boolean, required) Always false for errors - `error` (object, required) - `error.code` (string, required) Machine-readable error code Enum: "INVALID_PAYLOAD", "UNAUTHORIZED", "INTERNAL_ERROR", "VALIDATION_ERROR", "NOT_FOUND" - `error.message` (string, required) Human-readable error message Example: "Missing required field: eventId" - `error.details` (object) Additional error details (optional) ## Response 404 fields (application/json): - `success` (boolean, required) Always false for errors - `error` (object, required) - `error.code` (string, required) Machine-readable error code Enum: "INVALID_PAYLOAD", "UNAUTHORIZED", "INTERNAL_ERROR", "VALIDATION_ERROR", "NOT_FOUND" - `error.message` (string, required) Human-readable error message Example: "Missing required field: eventId" - `error.details` (object) Additional error details (optional) ## Response 500 fields (application/json): - `success` (boolean, required) Always false for errors - `error` (object, required) - `error.code` (string, required) Machine-readable error code Enum: "INVALID_PAYLOAD", "UNAUTHORIZED", "INTERNAL_ERROR", "VALIDATION_ERROR", "NOT_FOUND" - `error.message` (string, required) Human-readable error message Example: "Missing required field: eventId" - `error.details` (object) Additional error details (optional)