get_carrier_accounts

Updated September 10, 20261 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

NameTypeRequiredDescription
tenantIdstringYes
account_countryarray or stringNo
account_namearray or stringNo
agg_bystringNo
carrierarray or stringNo
carrier_idarray or stringNo
country_accessarray or stringNo
creation_date_fromstringNo
creation_date_tostringNo
exclude_carrierstringNo
exclude_clicknship_child_accountsboolean or stringNo
is_liveboolean or stringNo
location_accessarray or stringNo
merchantarray or stringNo
only_clicknship_child_accountsboolean or stringNo
pagestringNo
page_sizestringNo
paginationboolean or stringNo
search_stringstringNo
selectstringNo
sort_bystringNo
sort_directionstringNoValues: asc, desc.
statisticsboolean or stringNo
statusarray or stringNo
tzoffsetstringNo

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"
)
  • report_carrier_performance — KPIs for the carrier accounts surfaced here.
  • reassign_shipment — needs a target carrier_account_id.
  • get_shipping_rates — quotes are by carrier account.

Notes

  • The list is typically small (tens of accounts), but use pagination + select for tenants with many accounts or when the agent only needs a subset of fields.
  • country_access / location_access are inherited from the authorizing user's scope — passing them is usually a no-op.