openapi: 3.0.3 info: title: Turvo Public API description: >- The Turvo Public API is a JSON REST interface to the Turvo collaborative transportation management system (TMS). It exposes the core logistics objects - shipments, orders, locations, accounts (customers), and carriers - plus real-time tracking via location updates and event-driven webhooks. ACCESS MODEL: The API is self-service but tenant-gated. Credentials (Client ID, Client Secret, API Key) are provisioned from the API profile inside a customer's Turvo tenant, and the live interactive reference sits behind a Turvo login at app.turvo.com/lobby/documentation. A sandbox tenant is available for testing. MODELING NOTE: Because Turvo's interactive reference is tenant-gated, the endpoint paths, parameters, and schemas in this document are HONESTLY MODELED from Turvo's publicly described resource set and its documented OAuth 2.0 + x-api-key authentication pattern. They are a faithful structural model of the v1 API, not a verbatim copy of the live specification; confirm exact fields against your tenant's own reference. version: '1.0' contact: name: Turvo url: https://turvo.com servers: - url: https://publicapi.turvo.com/v1 description: Turvo Public API (production) - url: https://my-sandbox.turvo.com/v1 description: Sandbox tenant (per-tenant host; replace with your sandbox subdomain) security: - bearerAuth: [] apiKeyAuth: [] tags: - name: Authentication description: OAuth 2.0 token exchange for the Public API. - name: Shipments description: Freight loads - the core shipment object in Turvo. - name: Orders description: Customer demand records planned into shipments. - name: Locations description: Facility and address master used as shipment stops. - name: Accounts description: Customers, shippers, and business partners. - name: Carriers description: Transportation providers hauling freight. - name: Tracking description: Real-time location updates and status milestones on a shipment. paths: /oauth/token: post: operationId: createToken tags: - Authentication summary: Exchange credentials for an access token description: >- Exchanges tenant API credentials for an OAuth 2.0 Bearer access token. Send the x-api-key header along with the grant. Turvo documents a password grant for tenant users; the returned access_token is then passed as Authorization: Bearer on subsequent calls. security: [] parameters: - $ref: '#/components/parameters/ApiKeyHeader' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TokenRequest' responses: '200': description: A new OAuth 2.0 access token. content: application/json: schema: $ref: '#/components/schemas/TokenResponse' '401': $ref: '#/components/responses/Unauthorized' /shipments/list: get: operationId: listShipments tags: - Shipments summary: List shipments description: Lists shipments in the tenant, with pagination and filtering. parameters: - $ref: '#/components/parameters/Start' - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/StatusFilter' responses: '200': description: A page of shipments. content: application/json: schema: $ref: '#/components/schemas/ShipmentList' '401': $ref: '#/components/responses/Unauthorized' /shipments: post: operationId: createShipment tags: - Shipments summary: Create a shipment description: Creates a new shipment (load) with stops, items, and costs. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Shipment' responses: '200': description: The created shipment. content: application/json: schema: $ref: '#/components/schemas/Shipment' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /shipments/{id}: parameters: - $ref: '#/components/parameters/Id' get: operationId: getShipment tags: - Shipments summary: Retrieve a shipment description: Retrieves a single shipment by its Turvo ID. responses: '200': description: The requested shipment. content: application/json: schema: $ref: '#/components/schemas/Shipment' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: updateShipment tags: - Shipments summary: Update a shipment description: Updates an existing shipment - stops, status, carrier, or costs. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Shipment' responses: '200': description: The updated shipment. content: application/json: schema: $ref: '#/components/schemas/Shipment' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' delete: operationId: cancelShipment tags: - Shipments summary: Cancel a shipment description: Cancels (soft-deletes) a shipment. responses: '200': description: Cancellation result. content: application/json: schema: $ref: '#/components/schemas/DeleteResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /orders/list: get: operationId: listOrders tags: - Orders summary: List orders description: Lists orders in the tenant, with pagination and filtering. parameters: - $ref: '#/components/parameters/Start' - $ref: '#/components/parameters/PageSize' responses: '200': description: A page of orders. content: application/json: schema: $ref: '#/components/schemas/OrderList' '401': $ref: '#/components/responses/Unauthorized' /orders: post: operationId: createOrder tags: - Orders summary: Create an order description: Creates a new order with line items and ship-from / ship-to detail. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Order' responses: '200': description: The created order. content: application/json: schema: $ref: '#/components/schemas/Order' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /orders/{id}: parameters: - $ref: '#/components/parameters/Id' get: operationId: getOrder tags: - Orders summary: Retrieve an order description: Retrieves a single order by its Turvo ID. responses: '200': description: The requested order. content: application/json: schema: $ref: '#/components/schemas/Order' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: updateOrder tags: - Orders summary: Update an order description: Updates an existing order. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Order' responses: '200': description: The updated order. content: application/json: schema: $ref: '#/components/schemas/Order' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /locations/list: get: operationId: listLocations tags: - Locations summary: List locations description: Lists locations (facilities) in the tenant. parameters: - $ref: '#/components/parameters/Start' - $ref: '#/components/parameters/PageSize' responses: '200': description: A page of locations. content: application/json: schema: $ref: '#/components/schemas/LocationList' '401': $ref: '#/components/responses/Unauthorized' /locations: post: operationId: createLocation tags: - Locations summary: Create a location description: Creates a new location with address, geocoordinates, and contacts. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Location' responses: '200': description: The created location. content: application/json: schema: $ref: '#/components/schemas/Location' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /locations/{id}: parameters: - $ref: '#/components/parameters/Id' get: operationId: getLocation tags: - Locations summary: Retrieve a location description: Retrieves a single location by its Turvo ID. responses: '200': description: The requested location. content: application/json: schema: $ref: '#/components/schemas/Location' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: updateLocation tags: - Locations summary: Update a location description: Updates an existing location. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Location' responses: '200': description: The updated location. content: application/json: schema: $ref: '#/components/schemas/Location' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /accounts/list: get: operationId: listAccounts tags: - Accounts summary: List accounts description: Lists accounts (customers) in the tenant. parameters: - $ref: '#/components/parameters/Start' - $ref: '#/components/parameters/PageSize' responses: '200': description: A page of accounts. content: application/json: schema: $ref: '#/components/schemas/AccountList' '401': $ref: '#/components/responses/Unauthorized' /accounts: post: operationId: createAccount tags: - Accounts summary: Create an account description: Creates a new account (customer or business partner). requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Account' responses: '200': description: The created account. content: application/json: schema: $ref: '#/components/schemas/Account' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /accounts/{id}: parameters: - $ref: '#/components/parameters/Id' get: operationId: getAccount tags: - Accounts summary: Retrieve an account description: Retrieves a single account by its Turvo ID. responses: '200': description: The requested account. content: application/json: schema: $ref: '#/components/schemas/Account' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: updateAccount tags: - Accounts summary: Update an account description: Updates an existing account. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Account' responses: '200': description: The updated account. content: application/json: schema: $ref: '#/components/schemas/Account' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /carriers/list: get: operationId: listCarriers tags: - Carriers summary: List carriers description: Lists carriers in the tenant. parameters: - $ref: '#/components/parameters/Start' - $ref: '#/components/parameters/PageSize' responses: '200': description: A page of carriers. content: application/json: schema: $ref: '#/components/schemas/CarrierList' '401': $ref: '#/components/responses/Unauthorized' /carriers: post: operationId: createCarrier tags: - Carriers summary: Create a carrier description: Creates a new carrier with compliance, equipment, and contact detail. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Carrier' responses: '200': description: The created carrier. content: application/json: schema: $ref: '#/components/schemas/Carrier' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /carriers/{id}: parameters: - $ref: '#/components/parameters/Id' get: operationId: getCarrier tags: - Carriers summary: Retrieve a carrier description: Retrieves a single carrier by its Turvo ID. responses: '200': description: The requested carrier. content: application/json: schema: $ref: '#/components/schemas/Carrier' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: updateCarrier tags: - Carriers summary: Update a carrier description: Updates an existing carrier. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Carrier' responses: '200': description: The updated carrier. content: application/json: schema: $ref: '#/components/schemas/Carrier' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /shipments/{id}/locationUpdates: parameters: - $ref: '#/components/parameters/Id' get: operationId: listLocationUpdates tags: - Tracking summary: List tracking updates for a shipment description: Retrieves the recorded location updates and status milestones for a shipment. responses: '200': description: A list of location updates. content: application/json: schema: type: object properties: details: type: array items: $ref: '#/components/schemas/LocationUpdate' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' post: operationId: createLocationUpdate tags: - Tracking summary: Post a tracking update for a shipment description: Records a real-time GPS location ping or status milestone against a shipment for in-transit visibility. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LocationUpdate' responses: '200': description: The recorded location update. content: application/json: schema: $ref: '#/components/schemas/LocationUpdate' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' components: securitySchemes: bearerAuth: type: http scheme: bearer description: >- OAuth 2.0 Bearer access token obtained from POST /oauth/token. Passed as Authorization: Bearer YOUR_ACCESS_TOKEN. apiKeyAuth: type: apiKey in: header name: x-api-key description: Per-tenant API key from the Turvo tenant API profile, sent on every request. parameters: ApiKeyHeader: name: x-api-key in: header required: true description: Per-tenant API key from the Turvo tenant API profile. schema: type: string Id: name: id in: path required: true description: The Turvo resource ID. schema: type: string Start: name: start in: query required: false description: Zero-based offset of the first record to return. schema: type: integer default: 0 PageSize: name: pageSize in: query required: false description: Maximum number of records to return per page. schema: type: integer default: 50 StatusFilter: name: status in: query required: false description: Filter by shipment lifecycle status code. schema: type: string responses: Unauthorized: description: Missing or invalid Bearer token or API key. content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' ValidationError: description: The request payload failed validation. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Error: type: object properties: Status: type: string example: error code: type: integer message: type: string details: type: object additionalProperties: true DeleteResponse: type: object properties: id: type: string deleted: type: boolean TokenRequest: type: object required: - grant_type - client_id - client_secret properties: grant_type: type: string description: OAuth 2.0 grant type. Turvo documents a password grant for tenant users. example: password client_id: type: string client_secret: type: string username: type: string description: Tenant user for the password grant. password: type: string scope: type: string example: read+trust+write TokenResponse: type: object properties: access_token: type: string token_type: type: string example: bearer expires_in: type: integer example: 86400 refresh_token: type: string scope: type: string Pagination: type: object properties: start: type: integer pageSize: type: integer totalRecordsInPage: type: integer moreAvailable: type: boolean Shipment: type: object properties: id: type: string customId: type: string description: Human-readable shipment/load number. status: type: object properties: code: type: string description: type: string startDate: type: string format: date-time endDate: type: string format: date-time lane: type: object properties: start: type: string end: type: string globalRoute: type: array description: Ordered stops (pickup and delivery) for the shipment. items: $ref: '#/components/schemas/Stop' items: type: array items: $ref: '#/components/schemas/ShipmentItem' carrier: type: object properties: id: type: string name: type: string costs: type: object additionalProperties: true Stop: type: object properties: sequence: type: integer stopType: type: string description: Pickup or delivery. location: $ref: '#/components/schemas/LocationRef' appointment: type: object properties: date: type: string format: date-time timezone: type: string LocationRef: type: object properties: id: type: string name: type: string ShipmentItem: type: object properties: name: type: string quantity: type: number weight: type: number weightUnits: type: string ShipmentList: type: object properties: details: type: array items: $ref: '#/components/schemas/Shipment' pagination: $ref: '#/components/schemas/Pagination' Order: type: object properties: id: type: string customId: type: string status: type: object properties: code: type: string description: type: string customer: $ref: '#/components/schemas/AccountRef' shipFrom: $ref: '#/components/schemas/LocationRef' shipTo: $ref: '#/components/schemas/LocationRef' items: type: array items: $ref: '#/components/schemas/ShipmentItem' OrderList: type: object properties: details: type: array items: $ref: '#/components/schemas/Order' pagination: $ref: '#/components/schemas/Pagination' AccountRef: type: object properties: id: type: string name: type: string Location: type: object properties: id: type: string name: type: string type: type: string description: Facility type, such as warehouse or distribution center. address: $ref: '#/components/schemas/Address' geo: type: object properties: lat: type: number lng: type: number contacts: type: array items: $ref: '#/components/schemas/Contact' hoursOfOperation: type: string Address: type: object properties: line1: type: string line2: type: string city: type: string state: type: string zip: type: string country: type: string Contact: type: object properties: name: type: string email: type: string phone: type: string LocationList: type: object properties: details: type: array items: $ref: '#/components/schemas/Location' pagination: $ref: '#/components/schemas/Pagination' Account: type: object properties: id: type: string name: type: string type: type: string description: Account type, such as customer, shipper, or partner. address: $ref: '#/components/schemas/Address' contacts: type: array items: $ref: '#/components/schemas/Contact' billing: type: object additionalProperties: true AccountList: type: object properties: details: type: array items: $ref: '#/components/schemas/Account' pagination: $ref: '#/components/schemas/Pagination' Carrier: type: object properties: id: type: string name: type: string mcNumber: type: string dotNumber: type: string scac: type: string equipmentTypes: type: array items: type: string contacts: type: array items: $ref: '#/components/schemas/Contact' compliance: type: object additionalProperties: true CarrierList: type: object properties: details: type: array items: $ref: '#/components/schemas/Carrier' pagination: $ref: '#/components/schemas/Pagination' LocationUpdate: type: object properties: id: type: string shipmentId: type: string timestamp: type: string format: date-time latitude: type: number longitude: type: number milestone: type: string description: Status milestone such as arrived, departed, or in-transit. notes: type: string