Turvo Carriers API

Transportation providers hauling freight.

OpenAPI Specification

turvo-carriers-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Turvo Public Accounts Carriers 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: Carriers
  description: Transportation providers hauling freight.
paths:
  /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'
components:
  schemas:
    CarrierList:
      type: object
      properties:
        details:
          type: array
          items:
            $ref: '#/components/schemas/Carrier'
        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
    Pagination:
      type: object
      properties:
        start:
          type: integer
        pageSize:
          type: integer
        totalRecordsInPage:
          type: integer
        moreAvailable:
          type: boolean
    Error:
      type: object
      properties:
        Status:
          type: string
          example: error
        code:
          type: integer
        message:
          type: string
        details:
          type: object
          additionalProperties: true
    Contact:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
        phone:
          type: string
  parameters:
    PageSize:
      name: pageSize
      in: query
      required: false
      description: Maximum number of records to return per page.
      schema:
        type: integer
        default: 50
    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
  responses:
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid Bearer token or API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: The request payload failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  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.