{"openapi":"3.0.1","info":{"title":"Brokerage TMS","description":"Dummy TMS for scenario 1. OAuth 2.0 client credentials:\nclient_id=tms-demo, client_secret=tms-demo-secret, token tms-demo-token.\nImport /v3/api-docs/tms. No database — values are hardcoded or generated.\n","version":"1.0.0"},"servers":[{"url":"/","description":"This test server"}],"security":[{"oauth2":[]}],"tags":[{"name":"TMS","description":"Dummy brokerage TMS (OAuth 2.0 client credentials). No database — demo load is Midwest Grocers Dallas→Atlanta."}],"paths":{"/tms/shipments":{"post":{"tags":["TMS"],"summary":"Create a shipment from an order row","description":"Builds an uncovered load. The Midwest Grocers Dallas→Atlanta row is always SH-1001.","operationId":"createShipment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShipmentRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ShipmentResponse"}}}}}}},"/tms/shipments/{shipmentId}/tender":{"post":{"tags":["TMS"],"summary":"Tender / assign the winning carrier","description":"Marks the load covered with linehaul, fuel, and all-in. Dummy response — nothing is stored.","operationId":"tenderShipment","parameters":[{"name":"shipmentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenderRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ShipmentResponse"}}}}}}},"/tms/shipments/import":{"post":{"tags":["TMS"],"summary":"Create a shipment from a CSV Excel row","description":"Header + one data row: customer,poNumber,equipment,weightLbs,pallets,miles,originCity,originState,originFacility,destCity,destState,destFacility.","operationId":"importShipmentFromCsv","requestBody":{"content":{"text/csv":{"schema":{"type":"string"}},"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ShipmentResponse"}}}}}}},"/tms/oauth/token":{"post":{"tags":["TMS"],"summary":"Issue an OAuth 2.0 access token","description":"Client credentials only. client_id=tms-demo, client_secret=tms-demo-secret.","operationId":"issueTmsToken","parameters":[{"name":"grant_type","in":"query","required":false,"schema":{"type":"string","default":"client_credentials"}},{"name":"client_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"client_secret","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}}}},"/tms/shipments/{shipmentId}":{"get":{"tags":["TMS"],"summary":"Get a shipment","description":"SH-1001 is the hardcoded Midwest Grocers load. Other ids are generated from the id.","operationId":"getShipment","parameters":[{"name":"shipmentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ShipmentResponse"}}}}}}},"/tms/lanes/history":{"get":{"tags":["TMS"],"summary":"Lane history — who hauled this recently","description":"Dallas–Atlanta dry van returns Heartland Express and Swift Dedicated. Other lanes get two dummy carriers.","operationId":"getLaneHistory","parameters":[{"name":"originCity","in":"query","description":"Pickup city","required":true,"schema":{"type":"string"}},{"name":"originState","in":"query","description":"Pickup state","required":true,"schema":{"type":"string"}},{"name":"destCity","in":"query","description":"Delivery city","required":true,"schema":{"type":"string"}},{"name":"destState","in":"query","description":"Delivery state","required":true,"schema":{"type":"string"}},{"name":"equipment","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LaneHistoryResponse"}}}}}}}},"components":{"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/tms/oauth/token","scopes":{"tms":"TMS access"}}}}}}}