← nettrux.net

The first 3PL on x402

How an AI agent quotes, books, and pays.

Nettrux LLC is a California freight broker and forwarder in Fremont. This page is the agent guide. The machine API is nettrux-edge.fly.dev, and the field contract is the OpenAPI document.

Instructions updated 2026-11-09

Deploy gates

Each name is an environment variable read at build time. The value below is the one this deployment baked in. Only the exact string true turns a gate on.

  • EDGE_X402_DISCOVERY_PUBLISHED false

    This site serves its own /.well-known/x402 pointer and does not redirect.

  • X402_REAL_MONEY_SETTLEMENT_LIVE false

    Copy describes the documented 402 handshake and does not claim that a payment has settled.

  • GUEST_X402_CHECKOUT_ENABLED false

    Guest checkout routes stay in the OpenAPI only. These instructions do not call them.

Discover

Fetch this site's /.well-known/x402 first. While EDGE_X402_DISCOVERY_PUBLISHED is false, that URL is a pointer: the resources array on this origin is empty, and the payable URLs are under x402Resources on the freight API host. The pointer does not redirect.

The freight API discovery URL is named in the pointer and is not published by this site. A 404 there means the API host has not published its own document yet. The pointer on this site is still the catalog.

The OpenAPI is the field contract for every call below. This page names the routes and the required top-level fields. It does not restate nested schemas.

GET /.well-known/x402

Auth. None. Served on this site.

JSON pointer to the freight API. application/json.

GET /openapi.json

Auth. None. On the freight API host.

https://nettrux-edge.fly.dev/openapi.json

Get a freight quote

Authenticated rating uses a bearer token. The OpenAPI security scheme calls it a JWT or API key. This site does not issue tokens and does not describe a signup for them. GET /v1/me returns the principal for a token you already hold.

Rate-shop when you need ranked options. It does not create the quote id the booking route requires. Price-lock a quote to get that id. The lock is idempotent on the quote number you send.

POST /v1/rates/shop

Auth. Bearer token (JWT or API key). This site does not issue one.

Ranked options, cheapest first. Modes on related rate calls include LTL, AIR, SPOT, and FTL. See the OpenAPI for the request body.

POST /v1/quotes

Auth. Bearer token (JWT or API key). This site does not issue one.

Required JSON: quoteNumber, validUntil, rateInput. Response data.quote.id is the quote id. data.quote.lockedTotal is the locked price. data.quote.status is active, converted, expired, or withdrawn.

Book and pay via x402

Call the commit route with the bearer and a JSON body of exactly { quote_id }, and omit the X-PAYMENT header. The OpenAPI summary documents that call as an x402 v1 HTTP 402 challenge. The published response schema on the operation is HTTP 200, so handle both.

A retry sends the same request with the X-PAYMENT header an x402 v1 client built from the challenge. The summary describes that retry as verify, then settle, then book.

This site does not name a token, a chain, or a payee address. Those fields, when the route returns a challenge, are in that challenge. A 200 includes data.booking.money_mode and data.settlement (network and transaction). Read those fields on the response you actually get. X402_REAL_MONEY_SETTLEMENT_LIVE is false, so this page does not claim that a payment has settled or that settlement books the freight.

POST /v1/immediate-bookings/commit

Auth. Bearer token (JWT or API key). This site does not issue one.

JSON body { "quote_id": "<data.quote.id>" } and no other fields. First call omits X-PAYMENT. Paid retry sets X-PAYMENT.

GET /v1/immediate-bookings/{booking_id}

Auth. Bearer token (JWT or API key). This site does not issue one.

Tenant-scoped receipt: the booking plus the settlement projection.

Guest checkout

The OpenAPI lists POST /v1/guest/session, POST /v1/guest/quote-locks/v2, the guest cart, POST /v1/guest/checkout, and POST /v1/guest/orders/{reference}/x402-settle. GUEST_X402_CHECKOUT_ENABLED is false. Do not call those routes from these instructions.