> ## 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 all SettlementLineItems that belongs to a Settlement as a Company

> Retrieve all `SettlementLineItems` that belongs to a `Settlement` as a `Company`.

Notes:
- if the `Settlement`'s configuration has no grouping, then the array response would just contain a single grouped result without the `group` field and the `line_items` would be all the line items.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/companies/{company-id}/settlements/{settlement-id}/settlement_line_items
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/companies/{company-id}/settlements/{settlement-id}/settlement_line_items:
    parameters:
      - schema:
          type: string
        name: settlement-id
        in: path
        required: true
        description: Settlement ID
      - schema:
          type: string
          format: uuid
        name: company-id
        in: path
        required: true
        description: Company ID
      - $ref: '#/components/parameters/Accept-Language'
    get:
      tags:
        - Settlements
      summary: >-
        Retrieve all SettlementLineItems that belongs to a Settlement as a
        Company
      description: >-
        Retrieve all `SettlementLineItems` that belongs to a `Settlement` as a
        `Company`.


        Notes:

        - if the `Settlement`'s configuration has no grouping, then the array
        response would just contain a single grouped result without the `group`
        field and the `line_items` would be all the line items.
      operationId: >-
        get-v1-companies-company-id-settlements-settlement-id-settlement_line_items
      parameters:
        - schema:
            type: string
          in: query
          name: settlement_line_item_type
          description: >-
            Override `Settlement`'s `settlement_line_item_type` for rendering
            `SettlementLineItems`. See `SettlementLineItemType` enum for values.
      requestBody:
        content: {}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SettlementLineItem-Group-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
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. 
  schemas:
    SettlementLineItem-Group-Read:
      title: SettlementLineItem-Group-Read
      x-stoplight:
        id: 4g8m7uf1tq39l
      type: object
      required:
        - line_items
      properties:
        group:
          type: string
          x-stoplight:
            id: 8mce1y8dhbj19
        line_items:
          type: array
          x-stoplight:
            id: i39l6ua43811g
          items:
            $ref: '#/components/schemas/SettlementLineItem-Read'
        subtotal:
          type: string
          x-stoplight:
            id: 9efcuir1c290j
      additionalProperties: false
    SettlementLineItem-Read:
      title: SettlementLineItem-Read
      x-stoplight:
        id: 5yii67a6dj4do
      type: object
      x-internal: true
      required:
        - date
        - truck_external_ids
        - equipment_types
        - services
        - materials
        - quantities
        - ids
        - total_quantity
        - rate_value
        - rate_types
        - total_amount
        - loads_count
        - equipment_names
        - rebill_rate_value
        - rebill_total_amount
      properties:
        date:
          x-stoplight:
            id: to9ocq8299m0q
          type: string
          format: date-time
        truck_external_ids:
          type: array
          x-stoplight:
            id: hqzxigknkhvq1
          items:
            x-stoplight:
              id: 4pz26v03yrala
            type: string
        equipment_types:
          type: array
          x-stoplight:
            id: xj7xxlv1e9ls8
          items:
            x-stoplight:
              id: 1oq1lm3yta92v
            type: string
        services:
          type: array
          x-stoplight:
            id: rvnxewkix1pr3
          items:
            x-stoplight:
              id: x0tg9ln814h8c
            type: string
        materials:
          type: array
          x-stoplight:
            id: z7yqebwq0oiai
          items:
            x-stoplight:
              id: 19uerojbcz0g0
            type: string
        quantities:
          type: array
          x-stoplight:
            id: da6uifgybmtc2
          items:
            x-stoplight:
              id: jepfcq7latefe
            type: object
            required:
              - quantity
              - unit_of_measure
            properties:
              quantity:
                type: string
                x-stoplight:
                  id: xq75n02nyaxmq
              unit_of_measure:
                $ref: '#/components/schemas/OrderUnitOfMeasure'
        ids:
          type: array
          x-stoplight:
            id: e18k9i0kt37bx
          items:
            x-stoplight:
              id: mcxokl9cd66qb
            type: object
            required:
              - order_id
              - job_id
              - friendly_job_id
              - friendly_order_id
              - load_id
              - friendly_load_id
              - load_ordinality
            properties:
              order_id:
                type: string
                x-stoplight:
                  id: ip1tkvwsube86
              job_id:
                type: string
                x-stoplight:
                  id: pdmm7opkvys2p
              friendly_job_id:
                type: string
                x-stoplight:
                  id: e8y6wduasdhd8
              friendly_order_id:
                type: string
                x-stoplight:
                  id: souq7yd12kdko
              load_id:
                type: string
                x-stoplight:
                  id: ghqiz7xuc600u
                nullable: true
              friendly_load_id:
                type: string
                x-stoplight:
                  id: 73vmp5d4hfzhx
                nullable: true
              load_ordinality:
                type: number
                x-stoplight:
                  id: 44otsffgk1117
                nullable: true
        total_quantity:
          type: string
          x-stoplight:
            id: knbackeowp5h0
        rate_value:
          type: string
          x-stoplight:
            id: ooix402cieta9
        rate_types:
          type: array
          x-stoplight:
            id: besocvr26lazt
          items:
            x-stoplight:
              id: 0kt7k3vp6p34v
            type: string
        total_amount:
          type: string
          x-stoplight:
            id: pfahafcfmvp09
        loads_count:
          type: integer
          x-stoplight:
            id: h594q6m2gaa1u
        ticket_numbers:
          type: array
          x-stoplight:
            id: 1e10yvjytrh9w
          description: >-
            Currently only exists when the `Settlement.settlement_line_item_type
            == "load"` which would only have 1 record
          items:
            x-stoplight:
              id: 8wbucdsxq3hyd
            type: string
        pay_start_time:
          type: string
          x-stoplight:
            id: rihq5b0hbiqvn
          format: date-time
          description: >-
            Exists when the `Settlement.settlement_line_item_type == "job"` and
            the corresponding `SettlementLineItem` is based on a `RatePerHour`
            `Invoice`
          nullable: true
        pay_end_time:
          type: string
          x-stoplight:
            id: n4ia01fqjjbh8
          format: date-time
          description: >-
            Exists when the `Settlement.settlement_line_item_type == "job"` and
            the corresponding `SettlementLineItem` is based on a `RatePerHour`
            `Invoice`
          nullable: true
        billing_adjustment_minutes:
          type: integer
          x-stoplight:
            id: vgtrh0lh1p5oi
          description: >-
            Exists when the `Settlement.settlement_line_item_type == "job"` and
            the corresponding `SettlementLineItem` is based on a `RatePerHour`
            `Invoice`
        equipment_names:
          type: array
          x-stoplight:
            id: hspioilyjdfux
          items:
            x-stoplight:
              id: 71nd1nr9ad25f
            type: string
        rebill_rate_value:
          type: string
          x-stoplight:
            id: metmhpxycbiun
          nullable: true
        rebill_total_amount:
          type: string
          x-stoplight:
            id: 0r8hgbuf21sba
        vendor_job_assignment:
          type: object
          x-stoplight:
            id: gl08waphcqgzp
          required:
            - id
          properties:
            id:
              type: string
              x-stoplight:
                id: lnc7plez0xqwg
              format: uuid
            vendor_account:
              type: object
              x-stoplight:
                id: djqyl0s6snug7
              required:
                - id
                - name
              properties:
                id:
                  type: string
                  x-stoplight:
                    id: ivic77v14lidw
                  format: uuid
                name:
                  type: string
                  x-stoplight:
                    id: sxegfgj3f0tme
        driver:
          type: object
          x-stoplight:
            id: 6a2huzjuz2ic4
          required:
            - id
            - first_name
            - last_name
          properties:
            id:
              type: string
              x-stoplight:
                id: wnlx1uua0glrn
              format: uuid
            first_name:
              type: string
              x-stoplight:
                id: z46eggoyih5e7
            last_name:
              type: string
              x-stoplight:
                id: unwb5vq86nanl
        material_rate_unit_of_measure:
          $ref: '#/components/schemas/NullableOrderUnitOfMeasure'
          x-stoplight:
            id: m8k2r5x9p7v3w
        line_item_type:
          $ref: '#/components/schemas/InvoiceLineItemType'
          x-stoplight:
            id: k9m4t2x7p5r8n
      additionalProperties: false
    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
    ModelError-Response:
      title: ModelError-Response
      x-stoplight:
        id: payf9ndh3l6np
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ModelError'
      additionalProperties: false
    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
    NullableOrderUnitOfMeasure:
      title: NullableOrderUnitOfMeasure
      x-stoplight:
        id: rtlna368z495u
      allOf:
        - $ref: '#/components/schemas/OrderUnitOfMeasure'
      type: string
      nullable: true
    InvoiceLineItemType:
      title: InvoiceLineItemType
      x-stoplight:
        id: clkyxnscmds4j
      enum:
        - InvoiceLineItem
        - MaterialRateLineItem
        - FreightRateLineItem
      default: InvoiceLineItem
    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
    ModelError:
      title: ModelError
      x-stoplight:
        id: nhp6714o4j1qt
      description: A Model-specific error
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          required:
            - errors
          properties:
            errors:
              type: array
              x-stoplight:
                id: m4ul9vcq2deh6
              items:
                $ref: '#/components/schemas/ModelError-Item'
    ModelError-Item:
      title: ModelError-Item
      x-stoplight:
        id: b93chwval2t8d
      type: object
      required:
        - model
        - field
        - message
      properties:
        model:
          type: string
          x-stoplight:
            id: 30myfyjkno8ao
          description: The Model associated with this Error
        field:
          type: string
          x-stoplight:
            id: 8gl4ed3uxhdws
          description: The field associated with this Error
        message:
          type: string
          x-stoplight:
            id: bmgbrtmw17qsj
          description: The Error message
      additionalProperties: false
  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
    ModelError:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ModelError-Response'
            type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````