{"openapi":"3.1.0","info":{"title":"Portlandia Logistics public API","version":"1.0.0","description":"Unauthenticated planning endpoints. Estimates are planning ranges, not booked rates. The rate confirmation is the binding number. No endpoint here creates a tender or invoice.","contact":{"name":"Portlandia Logistics dispatch","url":"https://portlandialogistics.com/dispatch"}},"servers":[{"url":"https://portlandialogistics.com"}],"paths":{"/api/estimate":{"post":{"summary":"Planning estimate for a shipment","description":"Mileage-based planning range with transit days and an explainable rate basis. No PII is stored by this endpoint.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["origin_zip","dest_zip","equipment","weight_lb"],"properties":{"origin_zip":{"type":"string","pattern":"^\\d{5}$"},"dest_zip":{"type":"string","pattern":"^\\d{5}$"},"equipment":{"type":"string","enum":["LTL","FTL","PARTIAL","INTERMODAL","DRAYAGE"]},"weight_lb":{"type":"number","minimum":1},"pallets":{"type":"integer","minimum":1},"pieces":{"type":"integer","minimum":1},"freight_class":{"type":"string","description":"NMFC class, e.g. 70"},"accessorials":{"type":"array","items":{"type":"string"}},"pickup_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Planning estimate","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"quote":{"type":"object","properties":{"miles":{"type":"number"},"transit_days":{"type":"integer"},"estimate_low_cents":{"type":"integer"},"estimate_high_cents":{"type":"integer"},"basis":{"type":"string"},"approximate":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid shipment payload"},"422":{"description":"Lane could not be resolved (ZIP out of coverage)"},"429":{"description":"Rate limited"}}}},"/api/rate-index":{"get":{"summary":"Public rate index (stored-quote aggregates)","description":"Aggregates of stored shipper quotes in the window. Internal and QA traffic is excluded. Aggregates only — never shipper identity, address or quote number.","parameters":[{"name":"days","in":"query","schema":{"type":"integer","minimum":7,"maximum":3650,"default":365},"description":"Window in days, clamped to 7–3650"}],"responses":{"200":{"description":"Rate index","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"index":{"type":"object","properties":{"generated_at":{"type":"string","format":"date-time"},"window_days":{"type":"integer"},"sample_count":{"type":"integer"},"excluded_qa_count":{"type":"integer"},"overall":{"type":"object","properties":{"n":{"type":"integer"},"median_per_mile_cents":{"type":["number","null"]},"p25_per_mile_cents":{"type":["number","null"]},"p75_per_mile_cents":{"type":["number","null"]}}}}},"note":{"type":"string"}}}}}}}}},"/api/agency":{"get":{"summary":"Authority / tender gate status","description":"Machine-readable authority status: mode, whether tenders are accepted, and the disclosure string.","responses":{"200":{"description":"Authority status","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"mode":{"type":"string","enum":["none","pending","agency","own"]},"can_tender":{"type":"boolean"},"disclosure":{"type":"string"}}}}}}}}}}}