tread.io Settlements API

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

Operations 37

POST /v1/companies/{company-id}/settlements Create a Settlement for a Company #
POST /v1/companies/{company-id}/settlements/bulk_create Bulk Create Settlements #
GET /v1/companies/{company-id}/settlements/payables Retrieve payable Settlements visible to a Company #
GET /v1/companies/{company-id}/settlements/receivables Retrieve receivable Settlements visible to a Company #
GET /v1/companies/{company-id}/settlements/{id} Retrieve a Settlement for a Company #
PUT /v1/companies/{company-id}/settlements/{settlement-id}/approve Approve a Settlement as a Company #
PUT /v1/companies/{company-id}/settlements/{settlement-id}/customer_pay Pay a Settlement as the Customer for a Company #
PUT /v1/companies/{company-id}/settlements/{settlement-id}/email_settlement Email a Settlement (Company-scoped) #
POST /v1/companies/{company-id}/settlements/{settlement-id}/export Export Settlement to Agave #
GET /v1/companies/{company-id}/settlements/{settlement-id}/invoices Get Invoices for a Settlement for a Company #
PUT /v1/companies/{company-id}/settlements/{settlement-id}/pay Pay a Settlement as a Company #
POST /v1/companies/{company-id}/settlements/{settlement-id}/rebill Rebill a Settlement for a Company #
PUT /v1/companies/{company-id}/settlements/{settlement-id}/send_settlement Send a Settlement as a Company #
GET /v1/companies/{company-id}/settlements/{settlement-id}/settlement_email_deliveries Get SettlementEmailDeliveries for a Settlement as a Company #
GET /v1/companies/{company-id}/settlements/{settlement-id}/settlement_line_items Retrieve all SettlementLineItems that belongs to a Settlement as a Company #
PUT /v1/companies/{company-id}/settlements/{settlement-id}/unapprove Unapprove a Settlement as a Company #
PUT /v1/companies/{company-id}/settlements/{settlement-id}/undo_pay Undo pay on a Settlement as a Company #
PUT /v1/companies/{company-id}/settlements/{settlement-id}/void Void a Settlement as a Company #
POST /v1/settlements Create a Settlement #
GET /v1/settlements/payables Retrieve payable Settlements visible to the current Company #
GET /v1/settlements/receivables Retrieve receivable Settlements visible to the current Company #
GET /v1/settlements/{id} Retrieve a Settlement #
PATCH /v1/settlements/{id} Update a Settlement #
PUT /v1/settlements/{settlement-id}/approve Approve a Settlement #
PUT /v1/settlements/{settlement-id}/customer_approve Approve a Settlement as the Customer #
PUT /v1/settlements/{settlement-id}/customer_pay Pay a Settlement as the Customer #
PUT /v1/settlements/{settlement-id}/email_settlement Email a Settlement #
POST /v1/settlements/{settlement-id}/file_attachments Create a FileAttachment on a Settlement #
GET /v1/settlements/{settlement-id}/file_attachments Retrieve all FileAttachments for a given Settlement #
PATCH /v1/settlements/{settlement-id}/invoices/rebill_rates Rebill Settlement's Invoices Rates #
PUT /v1/settlements/{settlement-id}/pay Pay a Settlement #
POST /v1/settlements/{settlement-id}/rebill Generate new Settlement for Rebill #
PUT /v1/settlements/{settlement-id}/send_settlement Send a Settlement #
GET /v1/settlements/{settlement-id}/settlement_email_deliveries Get SettlementEmailDeliveries for a Settlement #
GET /v1/settlements/{settlement-id}/settlement_line_items Retrieve all SettlementLineItems that belongs to a Settlement #
PUT /v1/settlements/{settlement-id}/unapprove Unapprove a Settlement #
PUT /v1/settlements/{settlement-id}/void Void a Settlement by ID #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/treadio-settlements-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

treadio-settlements-api-openapi.yml Raw ↑
openapi: 3.2.0
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
                  - 'null'
  /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