Skip to content
Last updated

Vision API Integration Guide

The Vision API is implemented by camera and vision integration partners on their own infrastructure. Hauler Hero calls the partner's endpoints to request, list, and download truck-camera video — both on-demand clips tied to specific stops or work orders, and continuous recordings covering full routes.

Prerequisites

You'll build and host this API on your own infrastructure, then share the URL and credentials with Hauler Hero.

  • A public URL reachable from the internet, subject to appropriate security controls.
  • An API-KEY that you issue to Hauler Hero. See Authentication.

Endpoints

Three endpoints across two workflows:

EndpointWorkflowPurpose
POST /video-hero/v1/videos/requestsOn-demandInitiate video preparation for a specific clip
GET /video-hero/v1/videosOn-demandList available (prepared) videos — used to poll request status
GET /video-hero/v1/videos/continuousContinuousList continuous recordings for a truck over a time range

On-demand video workflow

Used when Hauler Hero needs a specific clip — for example, video tied to a stop or a work order.

  1. Hauler Hero calls POST /video-hero/v1/videos/requests with customerId, truckId, cameraId, startTime, and endTime.
  2. Your system begins discovery and preparation, returning 202 Accepted with a requestId and status: processing.
  3. Hauler Hero polls GET /video-hero/v1/videos?requestId={requestId} to check whether the video is ready.
  4. Once prepared, your response lists the video with a temporary downloadUrl and an expiresAt timestamp.
  5. Hauler Hero downloads the file before the URL expires.

Continuous video workflow

Used when a customer needs the full-route recording — continuous video chunked into constant time durations.

  1. Hauler Hero calls GET /video-hero/v1/videos/continuous with customerId, truckId, startTime, and endTime.
  2. Your system returns a paginated list of recording chunks, each with its own temporary downloadUrl and expiresAt.
  3. Hauler Hero downloads the recordings before the URLs expire.

Implementation requirements

Your implementation must:

  • Be reachable from the internet on a public IP, with appropriate security controls.
  • Authenticate requests via the API-KEY header.
  • Support precise video source specification — customer, truck, and (where applicable) camera.
  • Accept time ranges in ISO 8601 format.
  • Return temporary download URLs with an expiresAt giving Hauler Hero ample time to fetch the file.
  • Paginate list responses (page, pageSize, plus totalItems / totalPages in the response).

Request parameters

POST /video-hero/v1/videos/requests

FieldRequiredNotes
customerIdYesCustomer identifier
truckIdYesTruck identifier — ideally the same ID used for work-order and routing specification
cameraIdYesCamera identifier. Use placement names (front, rear, left, right) or a numbering scheme (1, 2, 3) — Hauler Hero accepts either
startTimeYesISO 8601 timestamp
endTimeYesISO 8601 timestamp

GET /video-hero/v1/videos

ParameterInRequiredNotes
customerIdqueryYesCustomer identifier
truckIdqueryNoFilter by truck
cameraIdqueryNoFilter by camera
requestIdqueryNoFilter by a specific video request — used for polling a single request's status
startTimequeryNoISO 8601 lower bound
endTimequeryNoISO 8601 upper bound
pagequeryNoDefault 1
pageSizequeryNoDefault 20, max 100

GET /video-hero/v1/videos/continuous

ParameterInRequiredNotes
customerIdqueryYesCustomer identifier
truckIdqueryYesTruck identifier
cameraIdqueryNoFilter by camera
startTimequeryYesISO 8601 start of range
endTimequeryYesISO 8601 end of range
pagequeryNoDefault 1
pageSizequeryNoDefault 20, max 100

See the Schemas section of the Vision API reference for the exact response shapes.

Response codes

Shared across all three endpoints:

CodeError codeMeaningWhen your implementation should return this
200 / 202Success202 for accepted video requests, 200 for list endpoints
400INVALID_PAYLOADInvalid parametersRequired field missing or malformed (e.g., startTime after endTime)
401UNAUTHORIZEDAPI key invalid or missingAPI-KEY header is missing or doesn't match what you issued
404NOT_FOUNDCustomer, truck, or camera not foundNo matching entity in your system
500INTERNAL_ERRORUnexpected errorLog the incident for your own investigation

Download URLs

Download URLs are temporary — give Hauler Hero ample time to fetch the file and include an expiresAt timestamp on every URL so the caller knows how long it's valid.

Support