get_carrier_accounts
Updated May 19, 20262 min read
List carrier accounts for a tenant via middleware, with merchant-access
filtering. Use select (json-mask) to return only the fields the
agent needs.
The right tool when an agent needs to know which carriers the tenant works with — typically before reassigning a shipment, before quoting rates, or for any reporting that splits by carrier.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | Yes | The tenant to list. |
select | string | No | json-mask — useful for trimming the response. |
merchant | string | string[] | No | Filter by one or more merchants. |
carrier | string | string[] | No | Filter by carrier name (e.g. aramex, dhl). |
carrier_id | string | string[] | No | Filter by carrier id. |
account_name | string | string[] | No | Filter by carrier account name. |
status | string | string[] | No | Filter by status. |
account_country | string | string[] | No | Filter by the carrier account's country. |
country_access / location_access | string | string[] | No | Standard scope filters. |
is_live | string | string[] | No | Live vs sandbox accounts. |
search_string | string | No | Free-text search. |
page, page_size, sort_by, sort_direction | — | No | Pagination + sort. |
creation_date_from / creation_date_to | string | No | Filter by account creation date. |
statistics | string | string[] | No | Include account-level statistics in the response. |
Plus a few specialised filters (exclude_carrier,
only_clicknship_child_accounts, exclude_clicknship_child_accounts)
for niche cases.
Returns
An array of carrier account records — id, name, carrier, status,
country, merchant scope, and (if statistics requested) usage
metrics.
Example agent prompts
"Which carriers do we use in this tenant?"
get_carrier_accounts(
tenantId="…",
select="carrier,account_name,status"
)
"Show me only the live DHL accounts."
get_carrier_accounts(
tenantId="…",
carrier="dhl",
is_live="true"
)
Related tools
report_carrier_performance— KPIs for the carrier accounts surfaced here.reassign_shipment— needs a targetcarrier_account_id.get_shipping_rates— quotes are by carrier account.
Notes
- The list is typically small (tens of accounts), but use
pagination +
selectfor tenants with many accounts or when the agent only needs a subset of fields. country_access/location_accessare inherited from the authorizing user's scope — passing them is usually a no-op.