REST API

The /v1 reference.

Every resource below is org-scoped by the API key and follows the same success/error envelope. Send Authorization: Bearer trk_live_XXXX on every request.

Org scoping
All data is scoped to the org that owns the key. A key only ever sees its own org's data — there is no org parameter anywhere in the API.

Products

EndpointScopeBehavior
GET /v1/productsproducts:readList active products with stock quantity and status.
GET /v1/products/:skuproducts:readOne product by SKU (case-insensitive).
POST /v1/productsproducts:writeCreate a product — sku and name required.
PATCH /v1/products/:skuproducts:writeUpdate name, description, status, stock_qty, bin_location.

Setting stock_qty derives stock_status from the org's configurable threshold rules (default: ≤0 backorder, ≤8 low_stock, otherwise in_stock).

curl
curl https://middleware.treadready.com/v1/products/TR-265-70R17 \
  -H "Authorization: Bearer trk_live_XXXX"
200 response
{
  "ok": true,
  "product": {
    "sku": "TR-265-70R17",
    "name": "OTR All-Terrain 265/70R17",
    "status": "active",
    "stock_qty": 12,
    "stock_status": "in_stock",
    "bin_location": "A-14"
  }
}

Orders

EndpointScopeBehavior
GET /v1/orders?status=orders:readLast 50 sales orders with lines; optional status filter.
GET /v1/orders/:idOrPoNumberorders:readOrder detail (lines + totals) by id or PO number.
POST /v1/ordersorders:writeCreate an order → 201 { ok, order }. Lines resolve against the catalog by SKU.
POST /v1/orders/:idOrPoNumber/ackorders:writeAcknowledge: submitted → confirmed.
PATCH /v1/orders/:idOrPoNumber/statusorders:writeBody { status }: confirmed, processing, shipped, delivered, cancelled.
POST /v1/orders
curl -X POST https://middleware.treadready.com/v1/orders \
  -H "Authorization: Bearer trk_live_XXXX" \
  -H "Content-Type: application/json" \
  -d '{
    "po_number": "PO-1001",
    "ship_to": "123 Main St …",
    "notes": "optional",
    "lines": [{ "sku": "TR-265-70R17", "quantity": 8, "unit_price": 189.99 }]
  }'
Queued delivery
Orders are staged in the Gateway and forwarded to the hub. If the hub is unreachable the delivery is queued and retried automatically — the API call still succeeds.

Inventory

EndpointScopeBehavior
POST /v1/inventoryinventory:writeBulk set stock quantities. Returns 202 with queued: true when delivery to the hub is queued.
Request body
{ "rows": [{ "sku": "TR-265-70R17", "qty": 12 }] }

Warranty claims

EndpointScopeBehavior
GET /v1/warranty-claims?status=warranty:readList claims. Statuses: submitted, under_review, approved, denied, closed.
GET /v1/warranty-claims/:idOrNumberwarranty:readTrack one claim by id or claim number.
POST /v1/warranty-claimswarranty:writeFile a claim → 201 { ok, claim } with claim number. description required; sku, dot_number, quantity, customer_ref optional.
PATCH /v1/warranty-claims/:idOrNumberwarranty:writeUpdate { status?, resolution? }.
File a claim
curl -X POST https://middleware.treadready.com/v1/warranty-claims \
  -H "Authorization: Bearer trk_live_XXXX" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Sidewall separation at 40% tread remaining",
    "sku": "TR-265-70R17",
    "dot_number": "DOT XXXX XXX 2325",
    "quantity": 1,
    "customer_ref": "WO-88213"
  }'

Telematics

Read-only health for the org's machine-data connections, plus on-demand runs. Credentials are never returned — only a masked hint.

EndpointScopeBehavior
GET /v1/telematics/connectionstelematics:readConnections with health: provider, status, poll interval, cursors, circuit-breaker state, last run/error, last hub rejections.
GET /v1/telematics/connections/:connectionIdtelematics:readOne connection's health detail.
POST /v1/telematics/connections/:id/runtelematics:writePoll now instead of waiting for the schedule; returns events enqueued and resulting cursors.
POST /v1/telematics/connections/:id/replaytelematics:writeBody { from, to } ISO timestamps, window ≤ 31 days. Re-ingests a range; cursors never move and the hub dedupes.

EDI

EndpointScopeBehavior
POST /v1/ediedi:writeSubmit a raw X12 interchange as the request body (must start with ISA).

The Gateway stores the message, resolves the trading partner from ISA identity, processes it (850 → purchase order + lines), and generates a 997 acknowledgment. Returns 400 if the body is not X12, or 422 with details if parsing fails. Outbound documents generated by the platform: 855, 856, 810, 997.

curl
curl -X POST https://middleware.treadready.com/v1/edi \
  -H "Authorization: Bearer trk_live_XXXX" \
  -H "Content-Type: text/plain" \
  --data-binary @purchase-order-850.edi

Dynamic objects

Operator-configured resources, each declaring its own read/write scopes and fields. Which objects exist is org-specific configuration — ask your platform contact which objects are enabled for your key.

EndpointScopeBehavior
GET /v1/objects/:key?field=valueper-objectFilterable per object configuration.
POST /v1/objects/:keyper-objectBody { rows: [{ … }] }. Writable only if the object is configured writable.