> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tread.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Projects that belong to the current Company

> Retrieve `Projects` for a `Company`.

Datagrid search (`search[datagrid]`) queries against the following properties:
 * `name`
 * `po_job_number`
 * `project_id`
 * `company.legal_name`
 * `account.name`
 * `external_id`



## OpenAPI

````yaml /api-reference/openapi.json get /v1/projects
openapi: 3.0.3
info:
  title: Horizon API V1
  version: '1.0'
  contact:
    name: Tread
    url: https://tread.io
    email: developers@tread.io
  description: >-
    This is the Version 1 implementation.


    When in doubt we default to the practices outlined
    [here](https://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#advanced-queries)
  license:
    name: Private
    url: https://tread.io
servers:
  - description: production
    url: https://api.tread-horizon.com
security:
  - bearerAuth: []
tags:
  - name: Projects
  - name: Orders
  - name: Loads
  - name: Jobs
  - name: JobAssignments
  - name: ApprovalAssignments
  - name: Equipment
  - name: FuelSurcharges
  - name: Materials
  - name: Accounts
  - name: Tickets
  - name: Users
  - name: Sites
  - name: Companies
  - name: Departments
  - name: Rates
  - name: Services
  - name: EquipmentType
  - name: FileAttachments
  - name: MaterialType
  - name: LineItemType
  - name: DriverStateEvent
  - name: Authentication
  - name: IamRoles
  - name: Typeaheads
  - name: Integrations
  - name: Reflection
  - name: LoadCycles
  - name: AddOns
  - name: ServiceClass
  - name: Invoices
  - name: JobSummaries
  - name: LoadSummaries
  - name: CompanyShares
  - name: UserDevicePermission
  - name: Drivers
  - name: Settlements
  - name: LocationHistories
  - name: Telematics
  - name: OmniReports
  - name: DriverDays
  - name: Agave
  - name: AddOnCharges
  - name: ResourceUsageLogs
  - name: ResourceScopes
  - name: TravelledDistances
  - name: MaterialRates
  - name: CompanyDayJobStats
  - name: KMLFiles
  - name: AutoAddOnAssignments
  - name: SiteRateSchedules
  - name: TwilioIntegrations
  - name: Foremen
  - name: AccountExternalTruckIdentifier
  - name: GeofenceTriggers
  - name: Labels
  - name: Compliance
  - name: ComplianceDocuments
paths:
  /v1/projects:
    parameters:
      - $ref: '#/components/parameters/Accept-Language'
    get:
      tags:
        - Projects
      summary: Retrieve Projects that belong to the current Company
      description: >-
        Retrieve `Projects` for a `Company`.


        Datagrid search (`search[datagrid]`) queries against the following
        properties:
         * `name`
         * `po_job_number`
         * `project_id`
         * `company.legal_name`
         * `account.name`
         * `external_id`
      operationId: get-v1-projects
      parameters:
        - $ref: '#/components/parameters/page-limit'
        - $ref: '#/components/parameters/page-after'
        - $ref: '#/components/parameters/page-before'
        - $ref: '#/components/parameters/search-datagrid'
        - $ref: '#/components/parameters/filter-requester_ids'
        - $ref: '#/components/parameters/filter-external_ids'
        - $ref: '#/components/parameters/filter-account_ids'
        - $ref: '#/components/parameters/filter-department_ids'
        - $ref: '#/components/parameters/filter-dispatch_number_ids'
        - $ref: '#/components/parameters/filter-po_job_numbers'
        - $ref: '#/components/parameters/filter-service_class_ids'
        - $ref: '#/components/parameters/filter-equipment_type_ids'
        - $ref: '#/components/parameters/filter-foreman_ids'
        - $ref: '#/components/parameters/filter-collaborator_ids'
        - $ref: '#/components/parameters/filter-salesperson_ids'
        - $ref: '#/components/parameters/filter-pickup_site_ids'
        - $ref: '#/components/parameters/filter-dropoff_site_ids'
      responses:
        '200':
          description: OK
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    x-stoplight:
                      id: 596sx9n2ju902
                    type: array
                    items:
                      $ref: '#/components/schemas/Project-Read'
                required:
                  - data
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '406':
          $ref: '#/components/responses/Error'
components:
  parameters:
    Accept-Language:
      name: Accept-Language
      in: header
      schema:
        type: string
        default: en
        example: en
      description: >-
        The Accept-Language request HTTP header indicates the natural language
        and locale that the client prefers. 
    page-limit:
      name: page[limit]
      in: query
      schema:
        type: integer
        format: int32
        default: 25
        maximum: 100
      description: The maximum number of paginated results to return
    page-after:
      name: page[after]
      in: query
      required: false
      schema:
        type: string
      description: The cursor to start paginating after
    page-before:
      name: page[before]
      in: query
      required: false
      schema:
        type: string
      description: The cursor to stop paginating at
    search-datagrid:
      name: search[datagrid]
      in: query
      required: false
      schema:
        type: string
      description: Search string for datagrid queries
    filter-requester_ids:
      name: filter[requester_ids]
      in: query
      required: false
      schema:
        type: array
      description: The associated Requester IDs
    filter-external_ids:
      name: filter[external_ids]
      in: query
      required: false
      schema:
        type: string
      description: The associated External IDs
    filter-account_ids:
      name: filter[account_ids]
      in: query
      required: false
      schema:
        type: string
      description: Account IDs filter
    filter-department_ids:
      name: filter[department_ids]
      in: query
      required: false
      schema:
        type: array
      description: >-
        The associated Department IDs. Use 'none' to filter for records without
        a Department.
    filter-dispatch_number_ids:
      name: filter[dispatch_number_ids]
      in: query
      required: false
      schema:
        type: array
      description: The associated DispatchNumber IDs
    filter-po_job_numbers:
      name: filter[po_job_numbers]
      in: query
      required: false
      schema:
        type: array
        items:
          type: string
      description: The associated PO/Job Numbers
      x-stoplight:
        id: k8mj3nxp2r7t1
    filter-service_class_ids:
      name: filter[service_class_ids]
      in: query
      required: false
      schema:
        type: array
      description: The associated ServiceClass IDs
      x-stoplight:
        id: r5tp9qwm4j2n8
    filter-equipment_type_ids:
      name: filter[equipment_type_ids]
      in: query
      required: false
      schema:
        type: array
      description: The associated EquipmentType IDs
    filter-foreman_ids:
      name: filter[foreman_ids]
      in: query
      required: false
      schema:
        type: array
      description: The associated Foreman IDs
    filter-collaborator_ids:
      name: filter[collaborator_ids]
      in: query
      required: false
      schema:
        type: array
      description: The associated Collaborator IDs
    filter-salesperson_ids:
      name: filter[salesperson_ids]
      in: query
      required: false
      schema:
        type: array
      description: The associated Salesperson IDs
    filter-pickup_site_ids:
      name: filter[pickup_site_ids]
      in: query
      required: false
      schema:
        type: array
      description: The associated Pickup Site IDs
    filter-dropoff_site_ids:
      name: filter[dropoff_site_ids]
      in: query
      required: false
      schema:
        type: array
      description: The associated Dropoff Site IDs
  schemas:
    Project-Read:
      title: Project-Read
      x-stoplight:
        id: 4p869ign045x0
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - $ref: '#/components/schemas/Timestamps'
        - type: object
          x-stoplight:
            id: gfks0fnwa815x
          required:
            - expires_at
            - effective_at
            - name
            - notes
            - order_notes
            - job_notes
            - internal_notes
            - po_job_number
            - external_id
            - state
            - project_id
            - company
            - account
            - phases
            - project_material_totals
            - foremen
            - collaborators
            - salespeople
            - hauler_rate_type
            - job_time
            - order_quantity
            - loads_per_truck
            - truck_count
            - units_per_hour
            - job_quantity
            - customer_rate_value
            - customer_rate_type
            - vendor_rate_value
            - vendor_rate_type
            - driver_rate_value
            - driver_rate_type
            - equipment_type_gross_capacity
            - load_unit_of_measure
            - job_unit_of_measure
            - order_unit_of_measure
            - recurring_loads
            - equipment_type_gross_capacity_unit_of_measure
            - charge_to_account
            - chase_missing_tickets
            - tax_rate
            - tax_freight
            - tax_material
            - tax_add_ons
          properties:
            expires_at:
              type: string
              x-stoplight:
                id: ypo4xculi788q
              nullable: true
            effective_at:
              type: string
              x-stoplight:
                id: fcnvg73e1j3v8
              nullable: true
            name:
              type: string
              x-stoplight:
                id: tld4cn3fzcmf3
            notes:
              type: string
              x-stoplight:
                id: vuyc4o4l7g54t
              nullable: true
            order_notes:
              type: string
              x-stoplight:
                id: 5hb0rlyvc15ao
              nullable: true
            job_notes:
              type: string
              x-stoplight:
                id: qh5hnt19uq4wm
              nullable: true
            internal_notes:
              type: string
              x-stoplight:
                id: s2osoxby50u29
              nullable: true
            po_job_number:
              type: string
              x-stoplight:
                id: ty2kf0ueaq3sw
              nullable: true
            external_id:
              type: string
              x-stoplight:
                id: q22ozbvyys81t
              nullable: true
            state:
              $ref: '#/components/schemas/ProjectState'
            project_id:
              type: string
              x-stoplight:
                id: v0vird4qt9luv
            company:
              $ref: '#/components/schemas/Company-Read-Nested'
            account:
              $ref: '#/components/schemas/Account-Read-Nested'
            contact:
              $ref: '#/components/schemas/Contact-Read-Nested'
            site:
              $ref: '#/components/schemas/Site-Read-Nested'
            phases:
              type: array
              x-stoplight:
                id: v7naa00rm6sdg
              items:
                $ref: '#/components/schemas/Phase-Read'
            project_material_totals:
              type: array
              x-stoplight:
                id: mhaw3k0gg8icd
              items:
                $ref: '#/components/schemas/ProjectMaterialTotal-Read'
            foremen:
              type: array
              x-stoplight:
                id: bln4zo5e9k0cz
              items:
                $ref: '#/components/schemas/Foreman-Read-Nested'
            collaborators:
              type: array
              x-stoplight:
                id: cln4zo5e9k0cz
              items:
                $ref: '#/components/schemas/User-Read-Nested'
            salespeople:
              type: array
              x-stoplight:
                id: zzz4zo5e9k0cz
              items:
                $ref: '#/components/schemas/User-Read-Nested'
            sales_contact:
              $ref: '#/components/schemas/Contact-Read-Nested'
            foreman_contact:
              $ref: '#/components/schemas/Contact-Read-Nested'
            supervisor_contact:
              $ref: '#/components/schemas/Contact-Read-Nested'
            collaborator_contact:
              $ref: '#/components/schemas/Contact-Read-Nested'
            department:
              $ref: '#/components/schemas/Department-Read-Nested'
            customer_rate:
              x-stoplight:
                id: hv0x4x84xjhgv
              anyOf:
                - $ref: '#/components/schemas/RateTime-Read-Nested'
                - $ref: '#/components/schemas/RatePerUnit-Read-Nested'
                - $ref: '#/components/schemas/RateCommission-Read-Nested'
                - $ref: '#/components/schemas/RateFlatCommission-Read-Nested'
                - $ref: '#/components/schemas/RateFlatRate-Read-Nested'
            vendor_rate:
              x-stoplight:
                id: zqw55oqzxbjcf
              anyOf:
                - $ref: '#/components/schemas/RateTime-Read-Nested'
                - $ref: '#/components/schemas/RatePerUnit-Read-Nested'
                - $ref: '#/components/schemas/RateCommission-Read-Nested'
                - $ref: '#/components/schemas/RateFlatCommission-Read-Nested'
                - $ref: '#/components/schemas/RateFlatRate-Read-Nested'
            driver_rate:
              x-stoplight:
                id: qrkqbxhb0691m
              anyOf:
                - $ref: '#/components/schemas/RateTime-Read-Nested'
                - $ref: '#/components/schemas/RatePerUnit-Read-Nested'
                - $ref: '#/components/schemas/RateCommission-Read-Nested'
                - $ref: '#/components/schemas/RateFlatCommission-Read-Nested'
                - $ref: '#/components/schemas/RateFlatRate-Read-Nested'
            hauler_rate_type:
              type: string
              nullable: true
            service:
              $ref: '#/components/schemas/Service-Read-Nested'
            service_class:
              $ref: '#/components/schemas/ServiceClass-Read-Nested'
            job_time:
              type: integer
              x-stoplight:
                id: bpeck1k9rmjb3
              nullable: true
            order_quantity:
              type: string
              x-stoplight:
                id: bn2qwdatmex3n
              nullable: true
            equipment_type:
              $ref: '#/components/schemas/EquipmentType-Read-Nested'
            loads_per_truck:
              type: integer
              x-stoplight:
                id: xdjk8r7yzz2jz
              nullable: true
            truck_count:
              type: integer
              x-stoplight:
                id: p54rz53gbe36g
              nullable: true
            units_per_hour:
              type: integer
              x-stoplight:
                id: h4kh0tcu82ni0
              nullable: true
            job_quantity:
              type: string
              x-stoplight:
                id: rkr9r14aihvjs
              nullable: true
            waypoints:
              type: array
              x-stoplight:
                id: dwje8rido05xg
              items:
                $ref: '#/components/schemas/Waypoint-Read-Nested'
            customer_rate_value:
              type: string
              x-stoplight:
                id: syjmuphzgurad
              nullable: true
            customer_rate_type:
              $ref: '#/components/schemas/NullableRateType'
            vendor_rate_value:
              type: string
              x-stoplight:
                id: yhuvkn7bmgb6x
              nullable: true
            vendor_rate_type:
              $ref: '#/components/schemas/NullableRateType'
            driver_rate_value:
              type: string
              x-stoplight:
                id: kirj1xga7eraa
              nullable: true
            driver_rate_type:
              $ref: '#/components/schemas/NullableRateType'
            requester:
              $ref: '#/components/schemas/User-Read-Nested'
            equipment_type_gross_capacity:
              type: string
              x-stoplight:
                id: mad4zg9xtr51h
              nullable: true
            load_unit_of_measure:
              $ref: '#/components/schemas/NullableOrderUnitOfMeasure'
            dispatch_number:
              $ref: '#/components/schemas/DispatchNumber-Read-Nested'
            job_unit_of_measure:
              $ref: '#/components/schemas/NullableOrderUnitOfMeasure'
            order_unit_of_measure:
              $ref: '#/components/schemas/NullableOrderUnitOfMeasure'
            recurring_loads:
              type: boolean
              x-stoplight:
                id: ahlw8o6o6riym
            equipment_type_gross_capacity_unit_of_measure:
              $ref: '#/components/schemas/NullableOrderUnitOfMeasure'
            charge_to_account:
              type: string
              x-stoplight:
                id: 1roxm3r1g2kdb
              nullable: true
            chase_missing_tickets:
              type: boolean
              x-stoplight:
                id: c5wkp8dn6jl9r
              description: Enable ticket chasing for jobs in orders with this project
            default_digital_ticket_view:
              type: boolean
              default: false
              x-stoplight:
                id: ddtv4prjread00
              description: Use the default digital ticket view for orders in this project
            tax_rate:
              x-stoplight:
                id: d5x8a2f4h6k9n
              type: string
              nullable: true
              description: Tax rate percentage (up to 4 decimal places)
            tax_freight:
              x-stoplight:
                id: p1r3t5v7y9b2d
              type: boolean
              default: false
              description: Whether freight line items and FSC are taxable
            tax_material:
              x-stoplight:
                id: e4g6i8l0n2q4s
              type: boolean
              default: false
              description: Whether material line items are taxable
            tax_add_ons:
              x-stoplight:
                id: u6w8z0c2f4h7j
              type: boolean
              default: false
              description: >-
                Whether add-on charges are taxable (dual-confirm with
                add_on.taxable)
      description: Read model for `Project`
    Identifier:
      title: Identifier
      x-stoplight:
        id: gnd39lue5v7ol
      type: object
      required:
        - id
      properties:
        id:
          type: string
          x-stoplight:
            id: 2e38hjk4zd58m
          format: uuid
      additionalProperties: false
    Timestamps:
      title: Timestamps
      x-stoplight:
        id: t82ecgfu0oj00
      type: object
      required:
        - created_at
        - updated_at
      properties:
        created_at:
          type: string
          x-stoplight:
            id: gjj950jpq0ga9
          format: date-time
          description: ISO8601 timestamp with local timezone
        updated_at:
          type: string
          x-stoplight:
            id: bwcuyfwc7aj0e
          format: date-time
          description: ISO8601 timestamp with local timezone
      additionalProperties: false
    ProjectState:
      title: ProjectState
      x-stoplight:
        id: ro1rcsiogqrmt
      enum:
        - active
        - inactive
      example: active
      default: active
    Company-Read-Nested:
      title: Company-Read-Nested
      x-stoplight:
        id: cb2kn77qmf1l7
      description: Compact Company model for nested reads.
      allOf:
        - $ref: '#/components/schemas/Identifier'
          x-stoplight:
            id: jwsufva4znm91
        - $ref: '#/components/schemas/TreadId'
        - type: object
          properties:
            legal_name:
              type: string
              x-stoplight:
                id: yc10t8hieecwk
              description: The Company's name. Must be globally unique.
            company_type:
              $ref: '#/components/schemas/CompanyType'
          required:
            - legal_name
            - company_type
    Account-Read-Nested:
      title: Account-Read-Nested
      x-stoplight:
        id: zo8r3gsz1tm5h
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - $ref: '#/components/schemas/Discardable'
        - type: object
          x-stoplight:
            id: gl7hua7pv8xka
          required:
            - name
            - account_types
            - external_id
            - accounting_id
            - company
            - schedule_on
          properties:
            name:
              type: string
              x-stoplight:
                id: a7g065w5byfcf
            account_types:
              type: array
              x-stoplight:
                id: a0e9c3lpr1wad
              items:
                $ref: '#/components/schemas/AccountType'
            external_id:
              type: string
              x-stoplight:
                id: yfrec4y0a90cb
              nullable: true
            accounting_id:
              type: string
              x-stoplight:
                id: yfsec5y0a91cb
              nullable: true
            company:
              type: object
              x-stoplight:
                id: 9loqtu14mvlnq
              required:
                - id
              properties:
                id:
                  type: string
                  x-stoplight:
                    id: udjkdjrz08pzr
                  format: uuid
            billing_address:
              $ref: '#/components/schemas/Address-Read-Nested'
            schedule_on:
              type: boolean
              x-stoplight:
                id: 0g9kx77zym4ok
            connected_company:
              $ref: '#/components/schemas/Company-Read-Nested'
            billing_contact:
              $ref: '#/components/schemas/Contact-Read-Nested'
    Contact-Read-Nested:
      title: Contact-Read-Nested
      x-stoplight:
        id: 3u6d8qhsz5ehn
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          required:
            - name
            - email
            - phone
          properties:
            name:
              type: string
              x-stoplight:
                id: sd80y9pbgvkok
              nullable: true
            email:
              type: string
              x-stoplight:
                id: 883fmt34pdeaj
              nullable: true
            phone:
              type: string
              x-stoplight:
                id: wdtqyju4t4u06
              example: '+18885551234'
              nullable: true
      description: ''
    Site-Read-Nested:
      title: Site-Read-Nested
      x-stoplight:
        id: rt6xqxsfzf4iv
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          required:
            - name
            - lat
            - lon
            - full_address
            - routable
          properties:
            name:
              type: string
              x-stoplight:
                id: 7r0x7wicrvwyy
            lat:
              type: string
              x-stoplight:
                id: cr6y5v0hdl5oo
              nullable: true
            lon:
              type: string
              x-stoplight:
                id: f23mkvamncbuw
              nullable: true
            address:
              $ref: '#/components/schemas/Address-Read-Nested'
            full_address:
              type: string
              x-stoplight:
                id: uxixxnmgfi47i
              nullable: true
            routable:
              type: boolean
              x-stoplight:
                id: uobfxkm0hujhv
            next_billion_geofence:
              $ref: '#/components/schemas/NextBillionGeofence-Read'
        - $ref: '#/components/schemas/Discardable'
    Phase-Read:
      title: Phase-Read
      x-stoplight:
        id: t87rtwp61n8ry
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          required:
            - name
            - code
            - primary
          properties:
            name:
              type: string
              x-stoplight:
                id: joxj6kldpdok8
            code:
              type: string
              x-stoplight:
                id: mtoxuvguckczq
              nullable: true
            primary:
              type: boolean
              x-stoplight:
                id: ww6q56py1x5wq
        - $ref: '#/components/schemas/Timestamps'
    ProjectMaterialTotal-Read:
      title: ProjectMaterialTotal-Read
      x-stoplight:
        id: fesdm0wakcpf5
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          required:
            - total_quantity
            - unit_of_measure
            - material
          properties:
            total_quantity:
              type: string
              x-stoplight:
                id: 1pwkfmzchwx3b
              nullable: true
            unit_of_measure:
              $ref: '#/components/schemas/NullableOrderUnitOfMeasure'
            material:
              $ref: '#/components/schemas/Material-Read-Nested'
        - $ref: '#/components/schemas/Timestamps'
    Foreman-Read-Nested:
      title: Foreman-Read-Nested
      x-stoplight:
        id: f9iqzaesw4aij
      allOf:
        - $ref: '#/components/schemas/Foreman-Read-Typeahead'
        - type: object
          x-stoplight:
            id: m5idk3cd24zti
          required:
            - email
            - company
          properties:
            email:
              type: string
              x-stoplight:
                id: ft77ezeftemb1
              nullable: true
            company:
              $ref: '#/components/schemas/Company-Read-Nested'
        - $ref: '#/components/schemas/Discardable'
    User-Read-Nested:
      title: User-Read-Nested
      x-stoplight:
        id: llvhpyfas0ekp
      allOf:
        - $ref: '#/components/schemas/User-Read-Typeahead'
        - $ref: '#/components/schemas/Discardable'
        - type: object
          x-stoplight:
            id: 6i4ku1oj5jnjs
          required:
            - email
            - phone
            - external_id
            - schedule_on
          properties:
            email:
              type: string
              x-stoplight:
                id: lyetvi4zixhq9
              nullable: true
            phone:
              type: string
              x-stoplight:
                id: 5dyog3jwd9m72
              description: User's E.164 formatted phone number
              nullable: true
            external_id:
              type: string
              x-stoplight:
                id: nk3qk35smj1ej
              nullable: true
            schedule_on:
              type: boolean
              x-stoplight:
                id: 5l8bajmm29c31
    Department-Read-Nested:
      title: Department-Read-Nested
      x-stoplight:
        id: gv9tfg4scr2yx
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          x-stoplight:
            id: 4y3gfdgq1brqf
          properties:
            name:
              type: string
              x-stoplight:
                id: 3718c2tvwwqsn
              description: Department name.
          required:
            - name
    RateTime-Read-Nested:
      title: RateTime-Read-Nested
      x-stoplight:
        id: k3z13rbtdojcq
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          required:
            - name
            - type
            - time_rate
          properties:
            name:
              type: string
              x-stoplight:
                id: s5zmmpgpw8ykn
            type:
              $ref: '#/components/schemas/RateType'
            time_rate:
              type: number
              x-stoplight:
                id: yzbg76z9oflup
    RatePerUnit-Read-Nested:
      title: RatePerUnit-Read-Nested
      x-stoplight:
        id: 5kl2dre6otz74
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          required:
            - name
            - type
            - unit_rate
          properties:
            name:
              type: string
              x-stoplight:
                id: 7wb8p1ffoz1wz
            type:
              $ref: '#/components/schemas/RateType'
            unit_rate:
              type: number
              x-stoplight:
                id: szqf3p2vkmb0x
    RateCommission-Read-Nested:
      title: RateCommission-Read-Nested
      x-stoplight:
        id: rfosxiu0rajbx
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          required:
            - name
            - type
            - commission_percentage
          properties:
            name:
              type: string
              x-stoplight:
                id: uquhf0pc3ydpf
            type:
              $ref: '#/components/schemas/RateType'
            commission_percentage:
              type: number
              x-stoplight:
                id: 44e2kldfzbxdj
    RateFlatCommission-Read-Nested:
      title: RateFlatCommission-Read-Nested
      x-stoplight:
        id: wtdgoiw8tlpl3
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          required:
            - name
            - type
            - commission_amount
          properties:
            name:
              type: string
              x-stoplight:
                id: yt5g1alyyd6fu
            type:
              $ref: '#/components/schemas/RateType'
            commission_amount:
              type: number
              x-stoplight:
                id: 14a1jkho85lpw
    RateFlatRate-Read-Nested:
      title: RateFlatRate-Read-Nested
      x-stoplight:
        id: l2to0mrxz6ndu
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          x-stoplight:
            id: khly9g5a3tgap
          required:
            - name
            - type
            - flat_amount
          properties:
            name:
              type: string
              x-stoplight:
                id: 0h0s2w3tathgv
            type:
              $ref: '#/components/schemas/RateType'
            flat_amount:
              type: number
              x-stoplight:
                id: 3s2pycb09j6ph
    Service-Read-Nested:
      title: Service-Read-Nested
      x-stoplight:
        id: 4bry9oy16sin9
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          properties:
            name:
              type: string
              x-stoplight:
                id: tsb5b63pzas6h
          required:
            - name
    ServiceClass-Read-Nested:
      title: ServiceClass-Read-Nested
      x-stoplight:
        id: ahk4knwjgo1di
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          properties:
            name:
              type: string
              description: ServiceClass name.
          required:
            - name
    EquipmentType-Read-Nested:
      title: EquipmentType-Read-Nested
      x-stoplight:
        id: em46i5kysysdh
      type: object
      required:
        - id
        - name
        - system
        - external_id
        - accounting_id
      properties:
        id:
          type: string
          x-stoplight:
            id: 835oy22o6h24z
          format: uuid
        name:
          type: string
          x-stoplight:
            id: tnszefd7lypln
        system:
          type: boolean
          x-stoplight:
            id: vimoqz5e8x6gx
        external_id:
          type: string
          x-stoplight:
            id: ttaijg77qmbgk
          nullable: true
        accounting_id:
          type: string
          x-stoplight:
            id: s4rscgptv68x3
          nullable: true
      additionalProperties: false
    Waypoint-Read-Nested:
      title: Waypoint-Read-Nested
      x-stoplight:
        id: s7xrqujvsvhq0
      allOf:
        - type: object
          properties:
            type:
              $ref: '#/components/schemas/WaypointType'
            ordinality:
              type: integer
              x-stoplight:
                id: fn4w5zg9n1hyl
            contact:
              $ref: '#/components/schemas/Contact-Read-Nested'
            site:
              $ref: '#/components/schemas/Site-Read-Nested'
          required:
            - type
            - ordinality
            - site
        - $ref: '#/components/schemas/Identifier'
    NullableRateType:
      title: NullableRateType
      x-stoplight:
        id: rajiobym5ovlp
      allOf:
        - $ref: '#/components/schemas/RateType'
      nullable: true
      type: string
    NullableOrderUnitOfMeasure:
      title: NullableOrderUnitOfMeasure
      x-stoplight:
        id: rtlna368z495u
      allOf:
        - $ref: '#/components/schemas/OrderUnitOfMeasure'
      type: string
      nullable: true
    DispatchNumber-Read-Nested:
      title: DispatchNumber-Read-Nested
      x-stoplight:
        id: 5oe6kw6t82gnr
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          required:
            - name
          properties:
            name:
              type: string
    UnauthenticatedError-Response:
      title: UnauthenticatedError-Response
      x-stoplight:
        id: o477eph7ttbzt
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/UnauthenticatedError'
      additionalProperties: false
    Error-Response:
      title: Error-Response
      x-stoplight:
        id: 52cydhphee3qe
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
      additionalProperties: false
    TreadId:
      title: TreadId
      x-stoplight:
        id: 43k4t5tl359m4
      type: object
      required:
        - tread_id
      properties:
        tread_id:
          type: string
          x-stoplight:
            id: zi3ld7djflw6f
          pattern: ^[0-9A-F]{6}$
          minLength: 6
          maxLength: 6
          example: ABC123
          description: Tread ID
      additionalProperties: false
    CompanyType:
      title: CompanyType
      x-stoplight:
        id: dkzo7gjbtb1b3
      enum:
        - broker
        - contractor
        - hauler
        - owner_operator
        - producer
        - super
      example: hauler
      description: Company Type
    Discardable:
      title: Discardable
      x-stoplight:
        id: 46axlb8u5wjay
      type: object
      required:
        - discarded_at
      properties:
        discarded_at:
          type: string
          x-stoplight:
            id: cy8t6fecoyxbo
          format: date-time
          nullable: true
      additionalProperties: false
    AccountType:
      title: AccountType
      x-stoplight:
        id: i4vfmd4rwrq8p
      enum:
        - customer
        - vendor
      example: customer
    Address-Read-Nested:
      title: Address-Read-Nested
      x-stoplight:
        id: cvym2dzuo375q
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - $ref: '#/components/schemas/Address-Read'
    NextBillionGeofence-Read:
      title: NextBillionGeofence-Read
      x-stoplight:
        id: 60y0z4bb3pu6m
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - $ref: '#/components/schemas/Geofence-Data'
    Material-Read-Nested:
      title: Material-Read-Nested
      x-stoplight:
        id: 5hvekq1lnr9ku
      type: object
      required:
        - id
        - name
        - external_id
      properties:
        id:
          type: string
          x-stoplight:
            id: c6nool5iljv3l
          format: uuid
        name:
          type: string
          x-stoplight:
            id: bsd3m2c74jis8
        external_id:
          type: string
          description: Material external_id
          x-stoplight:
            id: ab0l0yvuz5u6d
          nullable: true
      additionalProperties: false
    Foreman-Read-Typeahead:
      title: Foreman-Read-Typeahead
      x-stoplight:
        id: kdwiblw3n3qtm
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          x-stoplight:
            id: mhsvzlxjbapan
          required:
            - first_name
            - last_name
            - phone
          properties:
            first_name:
              type: string
              x-stoplight:
                id: 8fst58e2tam8v
              description: First name
            last_name:
              type: string
              x-stoplight:
                id: av8z4dxam69hi
              description: Last name
            company_share:
              $ref: '#/components/schemas/CompanyShare-Read-Nested'
            phone:
              type: string
              x-stoplight:
                id: 7b5vdi0y2qt5m
              description: User's E.164 formatted phone number
              nullable: true
    User-Read-Typeahead:
      title: User-Read-Typeahead
      x-stoplight:
        id: ttbbss5b5k66f
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          required:
            - first_name
            - last_name
          properties:
            first_name:
              type: string
              description: First name
              x-stoplight:
                id: gwo999rcdahmg
            last_name:
              type: string
              description: Last name
              x-stoplight:
                id: l9omnnsq644bh
      description: ''
    RateType:
      title: RateType
      x-stoplight:
        id: zn2jb7gsifkk3
      enum:
        - RatePerHour
        - RatePerDay
        - RatePerLoad
        - RatePerTon
        - RatePerTonne
        - RatePerYard
        - RatePerBushel
        - RateCommission
        - RateFlatCommission
        - RateFlatRate
      example: RatePerHour
    WaypointType:
      title: WaypointType
      x-stoplight:
        id: a8567v0zl3pi3
      enum:
        - pickup
        - drop_off
        - weigh_point
      example: pickup
    OrderUnitOfMeasure:
      title: OrderUnitOfMeasure
      x-stoplight:
        id: kahcgn7w8swdv
      enum:
        - Load
        - Tonne
        - Ton
        - Yard
        - Meter
        - Foot
        - Liter
        - Hour
        - Bushel
        - Gallon
        - CubicMeter
        - Mile
        - Kilometer
        - Barrel
        - Bag
        - Pallet
      example: Load
    UnauthenticatedError:
      title: UnauthenticatedError
      x-stoplight:
        id: 202o69l0fs40h
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          x-stoplight:
            id: tg10dt7s0l6bw
          properties:
            error_type:
              type: string
              x-stoplight:
                id: wvq8c0qsym4hz
          required:
            - error_type
    Error:
      title: Error
      x-stoplight:
        id: 3g57kkik3l464
      type: object
      description: An Error.
      required:
        - code
      properties:
        code:
          type: string
          x-stoplight:
            id: 7o9x1t8v0bgfo
      additionalProperties: false
    Address-Read:
      title: Address-Read
      x-stoplight:
        id: v1mcd2qgns2tf
      type: object
      required:
        - thoroughfare
        - premise
        - locality
        - administrative_area
        - postal_code
        - country
        - lat
        - lon
        - place_id
      properties:
        thoroughfare:
          type: string
          x-stoplight:
            id: 8wrr7qkc9ilqn
        premise:
          type: string
          x-stoplight:
            id: z4jth408out1q
          nullable: true
        locality:
          type: string
          x-stoplight:
            id: kfby6wqpgvxbz
        administrative_area:
          type: string
          x-stoplight:
            id: c9bkrloxf4t8d
        postal_code:
          type: string
          x-stoplight:
            id: 7zq51k1mof3o3
        country:
          type: string
          x-stoplight:
            id: iydw9q619ya01
          pattern: ^[A-Z]{2}
          example: US
          minLength: 2
          maxLength: 2
        lat:
          type: string
          x-stoplight:
            id: kqu1qtf9rivh1
          description: |-
            latitude of the `Address`. 

            Must be a stringified number between -90 and 90 inclusive.

            Required if `lon` is present.
          nullable: true
        lon:
          type: string
          x-stoplight:
            id: oly2yabkzpk9g
          description: |-
            longitude of the `Address`. 

            Must be a stringified number between -180 and 180 inclusive.

            Required if `lat` is present.
          nullable: true
        place_id:
          type: string
          x-stoplight:
            id: im1fdq7qqxdij
          description: NextBillion placeID
          nullable: true
      additionalProperties: false
    Geofence-Data:
      title: Geofence-Data
      x-stoplight:
        id: ay73k76oae8gm
      type: object
      properties:
        id:
          type: string
          format: uuid
          x-stoplight:
            id: m9n8p7q6r5s4t
          description: NextBillionGeofence ID
        geofence:
          type: object
          x-stoplight:
            id: bo67u046r1ibk
          required:
            - name
            - type
          properties:
            id:
              type: string
              x-stoplight:
                id: nm2o97jli2zqm
              format: uuid
              description: NextBillion Geofence ID
            name:
              type: string
              x-stoplight:
                id: x5sp8wq8d2ack
            type:
              type: string
              x-stoplight:
                id: d91rv1gbtfkm0
              description: '`circle` or `polygon`'
            geojson:
              type: object
              x-stoplight:
                id: vk7dx7ipdbuxa
              required:
                - type
                - coordinates
              properties:
                type:
                  type: string
                  x-stoplight:
                    id: 65qatpxdox3e9
                  description: type should be `Polygon`
                coordinates:
                  type: array
                  x-stoplight:
                    id: 3an8g587wblcs
                  description: >-
                    This should be an enclosed polygon.


                    Example format:

                    [[[-118.226140484,34.048200454],[-118.22616052,34.046872766],[-118.226198738,34.04952736],[-118.226140484,34.048200454]]]
                  items:
                    x-stoplight:
                      id: 2kltvjxl5xks6
                    type: array
                    items:
                      x-stoplight:
                        id: k93dt39dghru4
                      type: array
                      items: {}
            circle_center:
              type: object
              x-stoplight:
                id: 6xr3h683f7cl9
              required:
                - lat
                - lon
              properties:
                lat:
                  type: number
                  x-stoplight:
                    id: y70xc1ptapv1g
                lon:
                  type: number
                  x-stoplight:
                    id: uy3twrpcueq9m
            circle_radius:
              type: number
              x-stoplight:
                id: qrnq301sqfl3d
            tag:
              x-stoplight:
                id: debfy3x1l48zc
              enum:
                - pickup
                - loading
                - drop_off
                - unloading
                - check_in
                - scaling
                - ticketing
              deprecated: true
        moving_geofence:
          type: boolean
          x-stoplight:
            id: y15533dbr62js
          default: false
        tag:
          $ref: '#/components/schemas/GeofenceTag'
        geofence_type:
          $ref: '#/components/schemas/NullableGeofenceType'
      additionalProperties: false
    CompanyShare-Read-Nested:
      title: CompanyShare-Read-Nested
      x-stoplight:
        id: makajouqsb7jq
      allOf:
        - $ref: '#/components/schemas/Identifier'
        - type: object
          x-stoplight:
            id: s6h0nfzt2fjry
          required:
            - external_id
            - ticket_match_id
            - sender_company
            - dispatchable
            - schedule_on
            - rate_override
            - expires_at
          properties:
            external_id:
              type: string
              x-stoplight:
                id: c9ls3nrhbih3v
              nullable: true
            ticket_match_id:
              type: string
              x-stoplight:
                id: a1cd3nrhbih3v
              nullable: true
            sender_company:
              $ref: '#/components/schemas/Company-Read-Nested'
            dispatchable:
              type: boolean
              x-stoplight:
                id: kd884ihz6qi6w
            schedule_on:
              type: boolean
              x-stoplight:
                id: kd884ihz61234
            rate_override:
              type: boolean
              x-stoplight:
                id: mq4osazzielxo
            expires_at:
              type: string
              x-stoplight:
                id: aaa111jpq0ga9
              format: date-time
              description: ISO8601 timestamp with local timezone
              nullable: true
    GeofenceTag:
      title: GeofenceTag
      x-stoplight:
        id: anytkmb3ydi6c
      enum:
        - scaling
        - site
        - loading
        - unloading
        - check_in
        - ticketing
    NullableGeofenceType:
      title: NullableGeofenceType
      x-stoplight:
        id: ii94t82oqh5xo
      allOf:
        - $ref: '#/components/schemas/GeofenceType'
      nullable: true
      type: string
    GeofenceType:
      title: GeofenceType
      x-stoplight:
        id: geahowr9r8ly1
      nullable: true
      enum:
        - moving
        - circle
        - polygon
      readOnly: true
  responses:
    UnauthenticatedError:
      description: Example response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthenticatedError-Response'
            type: object
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error-Response'
            type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````