tread.io Settlements API

The Settlements API from tread.io — 35 operation(s) for settlements.

OpenAPI Specification

treadio-settlements-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Horizon API V1 AccountExternalTruckIdentifier Settlements API
  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: Settlements
paths:
  /v1/companies/{company-id}/settlements:
    parameters:
    - schema:
        type: string
        format: uuid
      name: company-id
      in: path
      required: true
      description: Company ID
    - $ref: '#/components/parameters/Accept-Language'
    post:
      summary: Create a Settlement for a Company
      tags:
      - Settlements
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/Settlement-Read'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-companies-company-id-settlements
      description: Create a `Settlement` from approved `Invoices` for the specified company
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Settlement-Create'
  /v1/companies/{company-id}/settlements/bulk_create:
    parameters:
    - schema:
        type: string
        format: uuid
      name: company-id
      in: path
      required: true
      description: Company ID
    - $ref: '#/components/parameters/Accept-Language'
    post:
      summary: Bulk Create Settlements
      tags:
      - Settlements
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-companies-company-id-settlements-bulk_create
      x-stoplight:
        id: ifkdc9k6820h4
      description: Bulk Create `Settlements` for `Customers`, `Vendors` and `Drivers`.
      x-internal: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkSettlement-Create'
  /v1/companies/{company-id}/settlements/payables:
    parameters:
    - schema:
        type: string
        format: uuid
      name: company-id
      in: path
      required: true
      description: Company ID
    - $ref: '#/components/parameters/Accept-Language'
    get:
      summary: Retrieve payable Settlements visible to a Company
      tags:
      - Settlements
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    x-stoplight:
                      id: i6vzymuu302mc
                    items:
                      $ref: '#/components/schemas/Settlement-Read'
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: get-v1-companies-company-id-settlements-payables
      x-stoplight:
        id: pkvgp8wknoiqs
      description: Retrieve payable `Settlements` visible to a `Company`
      parameters:
      - $ref: '#/components/parameters/page-limit'
      - $ref: '#/components/parameters/page-after'
      - $ref: '#/components/parameters/page-before'
      - $ref: '#/components/parameters/filter-states'
      - $ref: '#/components/parameters/filter-start_date'
      - $ref: '#/components/parameters/filter-end_date'
      - $ref: '#/components/parameters/filter-rate_types'
      - $ref: '#/components/parameters/filter-project_ids'
      - $ref: '#/components/parameters/filter-vendor_account_ids'
      - $ref: '#/components/parameters/filter-pickup_site_ids'
      - $ref: '#/components/parameters/sort-created_at'
      - $ref: '#/components/parameters/search-datagrid'
  /v1/companies/{company-id}/settlements/receivables:
    parameters:
    - schema:
        type: string
        format: uuid
      name: company-id
      in: path
      required: true
      description: Company ID
    - $ref: '#/components/parameters/Accept-Language'
    get:
      summary: Retrieve receivable Settlements visible to a Company
      tags:
      - Settlements
      responses:
        '200':
          description: OK
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    x-stoplight:
                      id: 3wjskwjrh0nc4
                    items:
                      $ref: '#/components/schemas/Settlement-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: get-v1-companies-company-id-settlements-receivables
      x-stoplight:
        id: ls3p88yevhoia
      description: Retrieve receivable `Settlements` visible to a `Company`
      parameters:
      - $ref: '#/components/parameters/page-limit'
      - $ref: '#/components/parameters/page-after'
      - $ref: '#/components/parameters/page-before'
      - $ref: '#/components/parameters/filter-states'
      - $ref: '#/components/parameters/filter-start_date'
      - $ref: '#/components/parameters/filter-end_date'
      - $ref: '#/components/parameters/filter-rate_types'
      - $ref: '#/components/parameters/filter-project_ids'
      - $ref: '#/components/parameters/filter-vendor_account_ids'
      - $ref: '#/components/parameters/filter-pickup_site_ids'
      - $ref: '#/components/parameters/sort-created_at'
      - $ref: '#/components/parameters/search-datagrid'
  /v1/companies/{company-id}/settlements/{id}:
    parameters:
    - schema:
        type: string
        format: uuid
      name: company-id
      in: path
      required: true
      description: Company ID
    - schema:
        type: string
      name: id
      in: path
      required: true
      description: Settlement ID
    - $ref: '#/components/parameters/Accept-Language'
    get:
      summary: Retrieve a Settlement for a Company
      tags:
      - Settlements
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/Settlement-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
      operationId: get-v1-companies-company-id-settlements-id
      description: Retrieve a `Settlement` by ID for the specified company
  /v1/companies/{company-id}/settlements/{settlement-id}/approve:
    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'
    put:
      summary: Approve a Settlement as a Company
      tags:
      - Settlements
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/Settlement-Read'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/StateError'
        '415':
          $ref: '#/components/responses/Error'
      operationId: put-v1-companies-company-id-settlements-settlement-id-approve
      x-stoplight:
        id: wl5hgxeou1fug
      x-internal: true
      description: Approve a `Settlement` by ID as a `Company`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties: {}
  /v1/companies/{company-id}/settlements/{settlement-id}/customer_pay:
    parameters:
    - schema:
        type: string
        format: uuid
      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'
    put:
      summary: Pay a Settlement as the Customer for a Company
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/Settlement-Read'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/StateError'
        '415':
          $ref: '#/components/responses/Error'
      operationId: put-v1-companies-company-id-settlements-settlement-id-customer_pay
      description: Pay a `Settlement` as the `Customer` by ID for a `Company`
      tags:
      - Settlements
      x-internal: true
  /v1/companies/{company-id}/settlements/{settlement-id}/email_settlement:
    parameters:
    - schema:
        type: string
      name: company-id
      in: path
      required: true
      description: Company ID
    - schema:
        type: string
      name: settlement-id
      in: path
      required: true
      description: Settlement ID
    - $ref: '#/components/parameters/Accept-Language'
    put:
      summary: Email a Settlement (Company-scoped)
      tags:
      - Settlements
      responses:
        '204':
          description: No Content
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: put-v1-companies-company-id-settlements-settlement-id-email_settlement
      x-internal: true
      description: 'Email a `Settlement` using company-scoped endpoint


        This requires `edit_settlement` permission.


        This endpoint allows parent companies to email settlements for their child companies.'
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/EmailSettlement-Create'
  /v1/companies/{company-id}/settlements/{settlement-id}/export:
    parameters:
    - schema:
        type: string
        format: uuid
      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'
    post:
      summary: Export Settlement to Agave
      tags:
      - Settlements
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-companies-company-id-settlements-settlement-id-export
      x-stoplight:
        id: k8m2v5rqx9p1a
      description: Export a Settlement to Agave. The export is performed asynchronously.
      x-internal: true
  /v1/companies/{company-id}/settlements/{settlement-id}/invoices:
    parameters:
    - schema:
        type: string
        format: uuid
      name: company-id
      in: path
      required: true
      description: Company ID
    - schema:
        type: string
        format: uuid
      name: settlement-id
      in: path
      required: true
      description: Settlement ID
    - $ref: '#/components/parameters/Accept-Language'
    get:
      summary: Get Invoices for a Settlement for a Company
      tags:
      - Settlements
      responses:
        '200':
          description: OK
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Invoice-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
      operationId: get-v1-companies-company-id-settlements-settlement-id-invoices
      description: Get `Invoices` for a `Settlement` for a `Company`
      parameters:
      - $ref: '#/components/parameters/page-limit'
      - $ref: '#/components/parameters/page-after'
      - $ref: '#/components/parameters/page-before'
  /v1/companies/{company-id}/settlements/{settlement-id}/pay:
    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'
    put:
      summary: Pay a Settlement as a Company
      tags:
      - Settlements
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/Settlement-Read'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/StateError'
        '415':
          $ref: '#/components/responses/Error'
      operationId: put-v1-companies-company-id-settlements-settlement-id-pay
      x-internal: true
      description: Pay a `Settlement` by ID as a `Company`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties: {}
  /v1/companies/{company-id}/settlements/{settlement-id}/rebill:
    parameters:
    - schema:
        type: string
        format: uuid
      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'
    post:
      summary: Rebill a Settlement for a Company
      tags:
      - Settlements
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/Settlement-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-companies-company-id-settlements-settlement-id-rebill
      description: Create a new `Settlement` from a voided `Settlement` for a `Company`
      x-internal: true
  /v1/companies/{company-id}/settlements/{settlement-id}/send_settlement:
    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'
    put:
      summary: Send a Settlement as a Company
      tags:
      - Settlements
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/Settlement-Read'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/StateError'
        '415':
          $ref: '#/components/responses/Error'
      operationId: put-v1-companies-company-id-settlements-settlement-id-send_settlement
      x-internal: true
      description: Send a `Settlement` by ID as a `Company`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties: {}
  /v1/companies/{company-id}/settlements/{settlement-id}/settlement_email_deliveries:
    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:
      summary: Get SettlementEmailDeliveries for a Settlement as a Company
      tags:
      - Settlements
      responses:
        '200':
          description: OK
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SettlementEmailDelivery-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
      operationId: get-v1-companies-company-id-settlements-settlement-id-settlement_email_deliveries
      x-internal: true
      description: Get `SettlementEmailDeliveries` for a `Settlement` as a `Company`
      parameters:
      - $ref: '#/components/parameters/page-limit'
      - $ref: '#/components/parameters/page-after'
      - $ref: '#/components/parameters/page-before'
  /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:
      summary: Retrieve all SettlementLineItems that belongs to a Settlement as a Company
      tags:
      - Settlements
      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'
      operationId: get-v1-companies-company-id-settlements-settlement-id-settlement_line_items
      x-internal: true
      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.'
      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: {}
  /v1/companies/{company-id}/settlements/{settlement-id}/unapprove:
    parameters:
    - schema:
        type: string
        format: uuid
      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'
    put:
      summary: Unapprove a Settlement as a Company
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/Settlement-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/StateError'
      operationId: put-v1-companies-company-id-settlements-settlement-id-unapprove
      x-stoplight:
        id: e2rjh9sk7jp2n
      description: Unapprove a `Settlement` by ID as a `Company`
      tags:
      - Settlements
      x-internal: true
  /v1/companies/{company-id}/settlements/{settlement-id}/undo_pay:
    parameters:
    - schema:
        type: string
        format: uuid
      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'
    put:
      summary: Undo pay on a Settlement as a Company
      tags:
      - Settlements
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/Settlement-Read'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/StateError'
        '415':
          $ref: '#/components/responses/Error'
      operationId: put-v1-companies-company-id-settlements-settlement-id-undo-pay
      x-stoplight:
        id: k8m2nv4xr7p1q
      x-internal: true
      description: Undo pay on a `Settlement` by ID as a `Company`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties: {}
  /v1/companies/{company-id}/settlements/{settlement-id}/void:
    parameters:
    - schema:
        type: string
        format: uuid
      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'
    put:
      summary: Void a Settlement as a Company
      tags:
      - Settlements
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/Settlement-Read'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/StateError'
        '415':
          $ref: '#/components/responses/Error'
      operationId: put-v1-companies-company-id-settlements-settlement-id-void
      x-internal: true
      description: Void a `Settlement` by ID as a `Company`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                void_reason:
                  type: string
                  nullable: true
  /v1/settlements:
    parameters:
    - $ref: '#/components/parameters/Accept-Language'
    post:
      summary: Create a Settlement
      deprecated: true
      tags:
      - Settlements
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/Settlement-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-settlements
      x-stoplight:
        id: edybmu707nwwg
      x-internal: true
      description: Create a new `Settlement`
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Settlement-Create'
  /v1/settlements/payables:
    parameters:
    - $ref: '#/components/parameters/Accept-Language'
    get:
      summary: Retrieve payable Settlements visible to the current Company
      tags:
      - Settlements
      responses:
        '200':
          description: OK
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    x-stoplight:
                      id: a2ov7z6wnk7ng
                    items:
                      $ref: '#/components/schemas/Settlement-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '406':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: get-v1-settlements-payables
      x-stoplight:
        id: osrfk6yuj1410
      x-internal: true
      description: Retrieve payable `Settlements` visible to the current `Company`
      parameters:
      - $ref: '#/components/parameters/page-limit'
      - $ref: '#/components/parameters/page-after'
      - $ref: '#/components/parameters/page-before'
      - $ref: '#/components/parameters/filter-states'
      - $ref: '#/components/parameters/filter-start_date'
      - $ref: '#/components/parameters/filter-end_date'
      - $ref: '#/components/parameters/filter-rate_types'
      - $ref: '#/components/parameters/filter-project_ids'
      - $ref: '#/components/parameters/filter-vendor_account_ids'
      - $ref: '#/components/parameters/filter-pickup_site_ids'
      - $ref: '#/components/parameters/search-datagrid'
  /v1/settlements/receivables:
    parameters:
    - $ref: '#/components/parameters/Accept-Language'
    get:
      summary: Retrieve receivable Settlements visible to the current Company
      tags:
      - Settlements
      responses:
        '200':
          description: OK
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
          content:
            application/json:
              schema:
                type: object
                required:
                - data
              

# --- truncated at 32 KB (142 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/treadio/refs/heads/main/openapi/treadio-settlements-api-openapi.yml