Skip to content
Last updated

Scale API Integration Guide

The Scale API lets partners push scale tickets — with materials, quantities, and inbound/outbound flow data — into the Hauler Hero platform. Call this API whenever a scale ticket is created or updated in your system.

Prerequisites

  • A HERO-API-KEY issued by Hauler Hero. Each Hauler Hero account has a unique API key. See Authentication.
  • Base URL: https://api.haulerhero.com

Workflow

  1. Build the ticket payload with site identification, at least one material, and optional inbound/outbound flow data.
  2. Send POST /hero-api/v1/tickets with the payload and your HERO-API-KEY header. Call this endpoint every time a scale ticket is created or updated in your system.
  3. Store the returned disposalTicketId — it's the Hauler Hero identifier for the ticket and is required to reference it later.
  4. Handle errors per the response code table below.

Required fields

FieldRequiredNotes
siteIdYesUUID of the disposal site
materialsYesArray with at least one item
materials[].idYesUUID of the material
materials[].nameYesMaterial name (e.g., "Paper")
materials[].quantityYesQuantity as a number
materials[].unitOfMeasureYesOne of: Ton, Gallon, Pound, Kilogram, Cubic Yard, Cubic Meter, Item
materials[].unitPriceCentsNoUnit price in cents (per the spec: 15.50 represents $0.155)
inboundFlowNoProvide if the ticket has inbound flow data
inboundFlow.ticketNumberYes, if inboundFlow is presentYour system's unique inbound ticket number
inboundFlow.updatedAtYes, if inboundFlow is presentISO 8601 timestamp
outboundFlowNoProvide if the ticket has outbound flow data
outboundFlow.ticketNumberYes, if outboundFlow is presentYour system's unique outbound ticket number
outboundFlow.updatedAtYes, if outboundFlow is presentISO 8601 timestamp
customFieldsNoMap of string key/value pairs for integration-specific data (driver name, route, vehicle ID, customer reference, etc.)

For full schema definitions and example payloads see the Schemas section of the Scale API reference.

Response codes

CodeError codeMeaningAction
200Ticket created successfullyStore disposalTicketId
400INVALID_PAYLOADMissing or malformed fieldsFix the field named in the error message and retry
401UNAUTHORIZEDAPI key invalid or missingVerify the HERO-API-KEY header is present and correct
422VALIDATION_ERRORBusiness-rule violation (e.g., referenced material ID doesn't exist)Check that siteId and materials[].id exist in Hauler Hero
500INTERNAL_ERRORHauler Hero encountered an unexpected errorRetry with backoff; if persistent, contact support

Support