{"openapi":"3.1.0","info":{"title":"Freight Charge Audit","version":"1.0.0","description":"Reprice carrier charges from supplied zone weight bands, a half-up fuel surcharge and explicit accessorial totals, then compare with invoiced freight.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/freight-charge-audit/v1/check":{"post":{"operationId":"freight_charge_audit","summary":"Reprice carrier charges from supplied zone weight bands, a half-up fuel surcharge and explicit accessorial totals, then compare with invoiced freight.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fuel_basis_points":{"type":"integer","minimum":0,"maximum":100000},"tariff":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"zone":{"type":"string","minLength":1,"maxLength":40},"through_grams":{"type":"integer","minimum":1,"maximum":100000000},"base_cents":{"type":"integer","minimum":0,"maximum":100000000}},"required":["zone","through_grams","base_cents"],"additionalProperties":false}},"shipments":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"zone":{"type":"string","minLength":1,"maxLength":40},"billable_grams":{"type":"integer","minimum":1,"maximum":100000000},"accessorial_cents":{"type":"integer","minimum":0,"maximum":100000000},"invoiced_cents":{"type":"integer","minimum":0,"maximum":100000000}},"required":["id","zone","billable_grams","accessorial_cents","invoiced_cents"],"additionalProperties":false}}},"required":["fuel_basis_points","tariff","shipments"],"additionalProperties":false},"example":{"fuel_basis_points":500,"tariff":[{"zone":"A","through_grams":1000,"base_cents":630},{"zone":"A","through_grams":2000,"base_cents":930}],"shipments":[{"id":"x","zone":"A","billable_grams":1000,"accessorial_cents":10,"invoiced_cents":700},{"id":"y","zone":"A","billable_grams":2001,"accessorial_cents":0,"invoiced_cents":1200}]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"rated_shipments":1,"unrated_shipments":1,"rated_variance_cents":28,"shipments":[{"id":"x","base_cents":630,"fuel_cents":32,"expected_cents":672,"variance_cents":28},{"id":"y","issue":"no_matching_band"}]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}