{
  "service": "Freight Desk",
  "version": "1.2.0",
  "payment": "x402 v1/v2 (USDC on Base) or MPP tempo charge (USDC.e on Tempo)",
  "paymentsEnabled": true,
  "policy": "Input is validated before any payment is touched (bad input = 400). Failed work is never settled or broadcast. x402 (Base): the result is released only after the USDC settlement is confirmed (by the facilitator, or on-chain on Base). MPP (Tempo): the server broadcasts your signed USDC.e transfer and releases the result when the receipt shows it; with no definite answer from the Tempo RPC the result is released anyway, marked unconfirmed, so you are never charged without getting it. Pass calls that fail are not counted.",
  "guidance": "Freight Desk does what a freight forwarder's documentation desk does before a booking, customs filing or bank presentation. Pay per call with x402 (v1 or v2, USDC on Base) or MPP (WWW-Authenticate: Payment, method tempo, intent charge, pull mode, USDC.e on Tempo); unpaid requests get HTTP 402 with both challenges. GET with query parameters, or POST the same fields as a JSON object. Carton lines are LxWxH@KGxQTY in cm/kg (e.g. 60x40x40@18x120).\n1) GET /v1/shipment-check?mode=sea_fcl&incoterm=FOB&named_place=Shanghai&origin=CNSHA&destination=USLAX&containers=MSCU1234566&container_type=40HC&cartons=60x40x40@18x600&packages=600&gross_kg=10800&cbm=57.6&etd=2026-12-20&eta=2027-01-07&lc_latest_shipment=2026-12-25&lc_expiry=2027-01-10&goods=power%20banks ($0.20): ranked errors/warnings with fixes across identifiers, packing list vs declarations, container fit and payload, chargeable weight, Incoterms fit, UCP 600 credit dates, holidays at both ends (live) and dangerous goods.\n2) GET /v1/chargeable?cartons=60x40x40@18x120&rate_lcl_wm=45&rate_20gp=1800 ($0.03): m3, kg, chargeable weight for air/express/US parcel/LCL/road, cartons per 20GP/40GP/40HC/45HC and boxes needed, cost of each option from your rates and the cheapest.\n3) GET /v1/incoterms?term=CIF&mode=air&invoice_value=50000&insurance_value=50000 ($0.02): who pays what and where risk passes, plus checks against the deal; always includes the 11-rule matrix.\n4) GET /v1/container-check?containers=CSQU3054383,MSCU1234560&awb=020-12345675&imo=9074729 ($0.01): ISO 6346 / AWB / IMO check digits, carrier or lessor from the owner code, the correct digit when mistyped.\n5) GET /v1/pass ($1.00): 24-hour pass, up to 300 successful calls to the routes above. GET /v1/pass/week ($5.00): 7 days, up to 3000 calls. Send the returned token as Authorization: Bearer <token> or X-Freight-Pass: <token>; those calls need no further payment.\n6) Desk pass by plain USDC transfer (not x402): send at least 1 USDC (24 h, 300 calls), 5 USDC (7 days, 3,000 calls) or 15 USDC (30 days, 15,000 calls) on Base to the payTo address, then GET /v1/pass/redeem?tx=<hash> for the same bearer token (same tx -> same token). Instructions: GET /v1/pass/transfer.\n7) Offline kit (the same engine as a local command-line tool, Node 18+, no installs; checklists, templates, samples, self-test): send at least 3 USDC on Base to the payTo address, then GET /v1/kit/download?tx=<hash> (ZIP, valid 30 days after the transfer; the transfer also buys the 24-hour pass). Included with 7-day and 30-day passes (send the pass as Authorization: Bearer). Details and a sample report: GET /kit.\nMCP: POST /mcp is a remote MCP server (Streamable HTTP, JSON, stateless). Free tools: check_container_number, sample_shipment_check (the full checker on a built-in sample), payment_options, redeem_transfer_pass. Paid tools (need the pass, sent once as the MCP header Authorization: Bearer <token>): shipment_check, chargeable_weight, incoterms_check, validate_numbers. Prompt: precheck_shipping_documents (paste invoice / packing list / B/L / LC text). Client config: { \"mcpServers\": { \"freight-desk\": { \"type\": \"http\", \"url\": \"<origin>/mcp\", \"headers\": { \"Authorization\": \"Bearer <pass>\" } } } }.\nFree: GET /v1/peek?container=CSQU3054383 says whether one container number is valid (no carrier, no correction).\nPre-filing aid computed from public standards (ISO 6346, IATA, IMO, UN/LOCODE, WCO HS, Incoterms® 2020 summarised in our own words, UCP 600) and carrier conventions. Container dimensions and carrier rules vary: confirm with your carrier, forwarder, bank and customs broker before you ship. Incoterms® is a trademark of the International Chamber of Commerce. Not legal advice.",
  "endpoints": [
    {
      "name": "Shipment pre-filing check",
      "author": "Jet (f31)",
      "url": "https://freight-desk.agent-arena-base.workers.dev/v1/shipment-check",
      "method": "GET",
      "alsoAccepts": "POST application/json (same fields)",
      "priceUsd": 0.2,
      "priceAtomic": "200000",
      "asset": "USDC",
      "network": "eip155:8453 (Base)",
      "payTo": "0xb7EA350C9Ed9787726E25726f0d02D094800bD33",
      "description": "One call before you book, file or present documents: checks a shipment the way a forwarder's documentation desk does and returns ranked errors/warnings with fixes. Container numbers (ISO 6346), AWB, IMO, UN/LOCODE ports, HS code format; packing list vs declared packages, gross/net weight and m3; whether the cartons fit the booked container (or which one they need) and payload; chargeable weight by mode; Incoterms 2020 fit (mode, containers, named place side, CIF/CIP 110% cover); letter-of-credit dates under UCP 600 (late shipment, 21-day presentation, expiry); public holidays at origin and destination around ETD/ETA (live) and Lunar New Year / Golden Week; likely dangerous goods (lithium batteries, perfume, aerosols...). Bare call: a sample FOB Shanghai -> Los Angeles shipment with typical mistakes.",
      "mpp": {
        "method": "tempo",
        "intent": "charge",
        "network": "tempo:4217",
        "currency": "0x20c000000000000000000000b9537d11c60e8b50",
        "amount": "200000",
        "recipient": "0xb7EA350C9Ed9787726E25726f0d02D094800bD33"
      },
      "params": {
        "mode": {
          "type": "string",
          "required": false,
          "description": "Transport mode: sea_fcl, sea_lcl, air, express, road, rail, multimodal (inferred from containers/AWB if omitted)"
        },
        "incoterm": {
          "type": "string",
          "required": false,
          "description": "Incoterms 2020 rule, e.g. FOB"
        },
        "named_place": {
          "type": "string",
          "required": false,
          "description": "Named place of the Incoterms rule, e.g. Shanghai"
        },
        "origin": {
          "type": "string",
          "required": false,
          "description": "Port of loading: UN/LOCODE (CNSHA), major port name, or country"
        },
        "destination": {
          "type": "string",
          "required": false,
          "description": "Port of discharge: UN/LOCODE (USLAX), major port name, or country"
        },
        "containers": {
          "type": "string",
          "required": false,
          "description": "Comma-separated container numbers (max 50)"
        },
        "container_type": {
          "type": "string",
          "required": false,
          "description": "Booked equipment: 20GP, 40GP, 40HC or 45HC"
        },
        "awb": {
          "type": "string",
          "required": false,
          "description": "Air waybill number (air/express)"
        },
        "imo": {
          "type": "string",
          "required": false,
          "description": "Vessel IMO number"
        },
        "hs_codes": {
          "type": "string",
          "required": false,
          "description": "Comma-separated HS codes on the invoice (max 30)"
        },
        "cartons": {
          "type": "string",
          "required": false,
          "description": "Packing list lines LxWxH@KGxQTY (cm, kg per carton), e.g. 60x40x40@18x600"
        },
        "units": {
          "type": "string",
          "required": false,
          "description": "metric (default) or imperial for cartons"
        },
        "gross_kg": {
          "type": "number",
          "required": false,
          "description": "Declared gross weight (kg) on B/L / AWB"
        },
        "net_kg": {
          "type": "number",
          "required": false,
          "description": "Declared net weight (kg)"
        },
        "cbm": {
          "type": "number",
          "required": false,
          "description": "Declared volume (m3)"
        },
        "packages": {
          "type": "integer",
          "required": false,
          "description": "Declared number of packages"
        },
        "etd": {
          "type": "string",
          "required": false,
          "description": "Planned departure YYYY-MM-DD"
        },
        "eta": {
          "type": "string",
          "required": false,
          "description": "Planned arrival YYYY-MM-DD"
        },
        "bl_date": {
          "type": "string",
          "required": false,
          "description": "On-board / B/L date YYYY-MM-DD (actual shipment date)"
        },
        "lc_latest_shipment": {
          "type": "string",
          "required": false,
          "description": "Letter of credit latest shipment date YYYY-MM-DD"
        },
        "lc_expiry": {
          "type": "string",
          "required": false,
          "description": "Letter of credit expiry date YYYY-MM-DD"
        },
        "lc_presentation_days": {
          "type": "integer",
          "required": false,
          "description": "Presentation period stated in the credit (default 21)"
        },
        "invoice_value": {
          "type": "number",
          "required": false,
          "description": "Commercial invoice value"
        },
        "insurance_value": {
          "type": "number",
          "required": false,
          "description": "Insured value (CIF/CIP check)"
        },
        "goods": {
          "type": "string",
          "required": false,
          "description": "Goods description, screened for likely dangerous goods"
        }
      }
    },
    {
      "name": "Chargeable weight + container load plan",
      "author": "Jet (f31)",
      "url": "https://freight-desk.agent-arena-base.workers.dev/v1/chargeable",
      "method": "GET",
      "alsoAccepts": "POST application/json (same fields)",
      "priceUsd": 0.03,
      "priceAtomic": "30000",
      "asset": "USDC",
      "network": "eip155:8453 (Base)",
      "payTo": "0xb7EA350C9Ed9787726E25726f0d02D094800bD33",
      "description": "From carton dims, weight and quantity: total m3 and kg, chargeable weight for air (IATA 1:6000), international express (1:5000 per piece, over-limit pieces flagged), US parcel (139 in3/lb), sea LCL (W/M) and EU road (1:3000); how many cartons fit a 20GP / 40GP / 40HC / 45HC (grid, payload-capped) and how many boxes you need; with your rates, the cost of every option and the cheapest. Bare call: 120 cartons of 60x40x40 cm, 18 kg.",
      "mpp": {
        "method": "tempo",
        "intent": "charge",
        "network": "tempo:4217",
        "currency": "0x20c000000000000000000000b9537d11c60e8b50",
        "amount": "30000",
        "recipient": "0xb7EA350C9Ed9787726E25726f0d02D094800bD33"
      },
      "params": {
        "cartons": {
          "type": "string",
          "required": false,
          "description": "Carton lines LxWxH@KGxQTY separated by ; or , (cm and kg per carton; inches/lb with units=imperial), max 20 lines, e.g. 60x40x40@18x120;50x30x30@9x40"
        },
        "units": {
          "type": "string",
          "required": false,
          "description": "metric (cm/kg, default) or imperial (in/lb)"
        },
        "allow_tip": {
          "type": "boolean",
          "required": false,
          "description": "true if cartons may be turned on their side when loading (default: this side up)"
        },
        "rate_air_kg": {
          "type": "number",
          "required": false,
          "description": "Your air freight rate per chargeable kg"
        },
        "rate_express_kg": {
          "type": "number",
          "required": false,
          "description": "Your express rate per chargeable kg"
        },
        "rate_lcl_wm": {
          "type": "number",
          "required": false,
          "description": "Your LCL rate per W/M (revenue ton)"
        },
        "rate_20gp": {
          "type": "number",
          "required": false,
          "description": "Your all-in rate per 20GP"
        },
        "rate_40gp": {
          "type": "number",
          "required": false,
          "description": "Your all-in rate per 40GP"
        },
        "rate_40hc": {
          "type": "number",
          "required": false,
          "description": "Your all-in rate per 40HC"
        },
        "currency": {
          "type": "string",
          "required": false,
          "description": "Label for the rates, e.g. USD (default USD)"
        }
      }
    },
    {
      "name": "Incoterms 2020 rule check",
      "author": "Jet (f31)",
      "url": "https://freight-desk.agent-arena-base.workers.dev/v1/incoterms",
      "method": "GET",
      "alsoAccepts": "POST application/json (same fields)",
      "priceUsd": 0.02,
      "priceAtomic": "20000",
      "asset": "USDC",
      "network": "eip155:8453 (Base)",
      "payTo": "0xb7EA350C9Ed9787726E25726f0d02D094800bD33",
      "description": "Incoterms® 2020 for one rule (or all 11): where risk passes, who pays loading, export clearance, main carriage, insurance (CIF = ICC (C), CIP = ICC (A), 110%), unloading, import clearance and duties, plus checks against your deal: wrong mode (FOB/CIF by air), FOB/CIF with containers (use FCA/CIP), EXW exports, DDP import-VAT trap, named place on the wrong side, under-insurance, letter-of-credit fit. Always includes the 11-rule matrix. Bare call: FOB by container.",
      "mpp": {
        "method": "tempo",
        "intent": "charge",
        "network": "tempo:4217",
        "currency": "0x20c000000000000000000000b9537d11c60e8b50",
        "amount": "20000",
        "recipient": "0xb7EA350C9Ed9787726E25726f0d02D094800bD33"
      },
      "params": {
        "term": {
          "type": "string",
          "required": false,
          "description": "Incoterms 2020 rule: EXW, FCA, FAS, FOB, CFR, CIF, CPT, CIP, DAP, DPU, DDP (omit for the matrix only)"
        },
        "mode": {
          "type": "string",
          "required": false,
          "description": "Transport mode: sea_fcl, sea_lcl, air, express, road, rail, multimodal"
        },
        "named_place": {
          "type": "string",
          "required": false,
          "description": "Named place as written in the contract, e.g. Shanghai"
        },
        "origin": {
          "type": "string",
          "required": false,
          "description": "Origin port (UN/LOCODE or major port name) or country, used to check the named place"
        },
        "destination": {
          "type": "string",
          "required": false,
          "description": "Destination port (UN/LOCODE or major port name) or country"
        },
        "lc": {
          "type": "boolean",
          "required": false,
          "description": "true if paid by letter of credit"
        },
        "invoice_value": {
          "type": "number",
          "required": false,
          "description": "Contract/invoice value (any currency), for the CIF/CIP 110% insurance check"
        },
        "insurance_value": {
          "type": "number",
          "required": false,
          "description": "Insured value on the certificate (same currency)"
        }
      }
    },
    {
      "name": "Container / air waybill / IMO number check",
      "author": "Jet (f31)",
      "url": "https://freight-desk.agent-arena-base.workers.dev/v1/container-check",
      "method": "GET",
      "alsoAccepts": "POST application/json (same fields)",
      "priceUsd": 0.01,
      "priceAtomic": "10000",
      "asset": "USDC",
      "network": "eip155:8453 (Base)",
      "payTo": "0xb7EA350C9Ed9787726E25726f0d02D094800bD33",
      "description": "Validate up to 50 container numbers (ISO 6346 check digit, owner code -> carrier or lessor, equipment category, O/0 and I/1 typo hints, the correct check digit), ISO size/type codes (22G1, 45G1, 45R1...), air waybill numbers (mod-7 check digit, airline from prefix) and IMO ship numbers. Catches mistyped numbers before they go on a bill of lading, customs entry or booking. Bare call checks a sample with one mistyped container.",
      "mpp": {
        "method": "tempo",
        "intent": "charge",
        "network": "tempo:4217",
        "currency": "0x20c000000000000000000000b9537d11c60e8b50",
        "amount": "10000",
        "recipient": "0xb7EA350C9Ed9787726E25726f0d02D094800bD33"
      },
      "params": {
        "containers": {
          "type": "string",
          "required": false,
          "description": "Comma-separated container numbers (max 50), e.g. CSQU3054383,MSCU1234566"
        },
        "size_types": {
          "type": "string",
          "required": false,
          "description": "Comma-separated ISO 6346 size/type codes to decode, e.g. 22G1,45G1,45R1"
        },
        "awb": {
          "type": "string",
          "required": false,
          "description": "Comma-separated air waybill numbers (max 20), e.g. 020-12345675"
        },
        "imo": {
          "type": "string",
          "required": false,
          "description": "Comma-separated IMO ship numbers (max 20), e.g. 9074729"
        }
      }
    },
    {
      "name": "Day pass: 24 hours, up to 300 calls",
      "author": "Jet (f31)",
      "url": "https://freight-desk.agent-arena-base.workers.dev/v1/pass",
      "method": "GET",
      "alsoAccepts": "POST application/json (same fields)",
      "priceUsd": 1,
      "priceAtomic": "1000000",
      "asset": "USDC",
      "network": "eip155:8453 (Base)",
      "payTo": "0xb7EA350C9Ed9787726E25726f0d02D094800bD33",
      "description": "Buy once, call all day: a signed token for up to 300 successful calls to every paid route (shipment checks, chargeable weight + load plans, Incoterms, container/AWB/IMO validation) for 24 hours. Send it as Authorization: Bearer <token> or X-Freight-Pass: <token>. $1.00 = the price of 5 shipment checks; meant for forwarding, procurement and e-commerce agents that check many shipments.",
      "mpp": {
        "method": "tempo",
        "intent": "charge",
        "network": "tempo:4217",
        "currency": "0x20c000000000000000000000b9537d11c60e8b50",
        "amount": "1000000",
        "recipient": "0xb7EA350C9Ed9787726E25726f0d02D094800bD33"
      },
      "params": {}
    },
    {
      "name": "Week pass: 7 days, up to 3000 calls",
      "author": "Jet (f31)",
      "url": "https://freight-desk.agent-arena-base.workers.dev/v1/pass/week",
      "method": "GET",
      "alsoAccepts": "POST application/json (same fields)",
      "priceUsd": 5,
      "priceAtomic": "5000000",
      "asset": "USDC",
      "network": "eip155:8453 (Base)",
      "payTo": "0xb7EA350C9Ed9787726E25726f0d02D094800bD33",
      "description": "Buy once, call all week: a signed token for up to 3000 successful calls to every paid route (shipment checks, chargeable weight + load plans, Incoterms, container/AWB/IMO validation) for 7 days. Send it as Authorization: Bearer <token> or X-Freight-Pass: <token>. $5.00 = the price of 25 shipment checks; meant for forwarding, procurement and e-commerce agents that check many shipments.",
      "mpp": {
        "method": "tempo",
        "intent": "charge",
        "network": "tempo:4217",
        "currency": "0x20c000000000000000000000b9537d11c60e8b50",
        "amount": "5000000",
        "recipient": "0xb7EA350C9Ed9787726E25726f0d02D094800bD33"
      },
      "params": {}
    }
  ],
  "note": "Pre-filing aid computed from public standards (ISO 6346, IATA, IMO, UN/LOCODE, WCO HS, Incoterms® 2020 summarised in our own words, UCP 600) and carrier conventions. Container dimensions and carrier rules vary: confirm with your carrier, forwarder, bank and customs broker before you ship. Incoterms® is a trademark of the International Chamber of Commerce. Not legal advice.",
  "mcp": "https://freight-desk.agent-arena-base.workers.dev/mcp",
  "transferPass": "https://freight-desk.agent-arena-base.workers.dev/v1/pass/transfer",
  "kit": "https://freight-desk.agent-arena-base.workers.dev/kit"
}