get_carrier_accounts
Updated October 29, 20262 min read
List carrier accounts for a tenant via middleware, with merchant-access filtering. Use optional select with json-mask syntax to return only required fields.
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 | — |
account_country | array or string | No | — |
account_name | array or string | No | — |
agg_by | string | No | Count matching carrier accounts per value of this field. Use one of these values exactly as written; do not shorten or rename them: carrier (delivery company), carrier_account_name (carrier account name), country (country of the carrier account), status (carrier account status), is_live (whether the account is live or test), merchant (brand or store the account serves). Values: carrier, carrier_account_name, country, status, is_live, merchant. |
carrier | array or string | No | — |
carrier_id | array or string | No | — |
country_access | array or string | No | — |
creation_date_from | string | No | — |
creation_date_to | string | No | — |
exclude_carrier | string | No | — |
exclude_clicknship_child_accounts | boolean or string | No | — |
is_live | boolean or string | No | — |
location_access | array or string | No | — |
merchant | array or string | No | — |
only_clicknship_child_accounts | boolean or string | No | — |
page | string | No | — |
page_size | string | No | — |
pagination | boolean or string | No | — |
search_string | string | No | — |
select | string | No | — |
sort_by | string | No | — |
sort_direction | string | No | Values: asc, desc. |
statistics | boolean or string | No | — |
status | array or string | No | — |
tzoffset | string | No | — |
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 listed 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). Still, 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.