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

NameTypeRequiredDescription
tenantIdstringYesThe tenant to list.
selectstringNojson-mask — useful for trimming the response.
merchantstring | string[]NoFilter by one or more merchants.
carrierstring | string[]NoFilter by carrier name (e.g. aramex, dhl).
carrier_idstring | string[]NoFilter by carrier id.
account_namestring | string[]NoFilter by carrier account name.
statusstring | string[]NoFilter by status.
account_countrystring | string[]NoFilter by the carrier account's country.
country_access / location_accessstring | string[]NoStandard scope filters.
is_livestring | string[]NoLive vs sandbox accounts.
search_stringstringNoFree-text search.
page, page_size, sort_by, sort_directionNoPagination + sort.
creation_date_from / creation_date_tostringNoFilter by account creation date.
statisticsstring | string[]NoInclude 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"
)
  • 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.