Skip to main content
POST
/
v1
/
companies
/
{company-id}
/
settlements
/
bulk_create
Bulk Create Settlements
curl --request POST \
  --url https://api.tread-horizon.com/v1/companies/{company-id}/settlements/bulk_create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "start_date": "2023-11-07T05:31:56Z",
  "end_date": "2023-11-07T05:31:56Z",
  "bulk_create_for": [
    "customers"
  ],
  "customer_account_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "vendor_account_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "driver_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "settlement_config": {
    "settlement_line_item_type": "order",
    "settlement_line_item_groupings": [
      "material"
    ]
  }
}
'
{}

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.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Accept-Language
string
default:en

The Accept-Language request HTTP header indicates the natural language and locale that the client prefers.

Example:

"en"

Path Parameters

company-id
string<uuid>
required

Company ID

Body

application/json
start_date
string<date-time>
required
end_date
string<date-time>
required
bulk_create_for
enum<string>[]
Available options:
customers,
vendors,
drivers
customer_account_ids
string<uuid>[]

Optional list of customer account IDs to filter settlements by

vendor_account_ids
string<uuid>[]

Optional list of vendor account IDs to filter settlements by

driver_ids
string<uuid>[]

Optional list of driver IDs to filter settlements by

settlement_config
object

Response

Accepted

The response is of type object.