HitchMargin API / v1 beta

Useful towing math without a black-box rating claim.

Build worksheets, intake tools, and identity helpers on explicit data classes. Vehicle identity comes from NHTSA vPIC. A response can point to a documented manufacturer VIN tool, but ratings remain caller-supplied and unverified until a separately reviewed catalog exists.

OpenAPI JSON
ENDPOINTSJSON OVER HTTPS
GET/api/v1/health

Service status and published capability boundaries.

GET/api/v1/vehicles/makes

NHTSA-backed make identities for truck, MPV/SUV, and passenger-car types.

GET/api/v1/vehicles/models?makeId=460&year=2024

Exact-make model names for a model year.

POST/api/v1/vehicles/decode

VIN identity plus an official rating path when documented; full VIN is masked in the response.

POST/api/v1/calculate

The same deterministic, user-supplied math used by the public worksheet.

Calculation example

Send the numbers you already verified.

curl -X POST https://hitchmargin.com/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{
    "payloadRatingLb": 1650,
    "maxTrailerRatingLb": 8000,
    "loadedTrailerWeightLb": 6500,
    "tongueWeightMode": "percent",
    "tongueWeightPercent": 13,
    "measuredTongueWeightLb": null,
    "occupantsLb": 400,
    "cargoAndAccessoriesLb": 120,
    "hitchHardwareLb": 70
  }'
01

Unverified inputs stay labeled

The API does arithmetic. It does not authenticate caller-supplied ratings or weights.

02

A source path is not a rating

VIN responses can identify an official next step but deliberately exclude an unreviewed towing-capacity number or range.

03

Conventional trailers only

Version 1 math is for bumper-pull behavior. Fifth-wheel and gooseneck need a reviewed specification.