Accounts and sites tools

list_discovery_accounts

Lists the accounts you have access to, sorted alphabetically. Call this first when you don't know which accounts are available, or when another tool reports that several accounts exist and asks you to name one.

The response is a DiscoveryAccountsResponse object rather than a flat list of account name strings. Read each account name from data[].name, and pass that exact value as the account_name parameter to other Search tools.

Every entry also carries an environments list, so you can tell which accounts run in production, in staging, or in both before you call another tool against them. Set environment to staging to see the staging-only accounts before you start working with staging data.

Request parameters

NameTypeRequired?Description
environmentstrNoFilters which accounts the list includes: production (default) or staging. The value is case-insensitive, and surrounding whitespace is trimmed. A staging-only account appears only when you filter by staging.

Response parameters

The tool returns a DiscoveryAccountsResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[DiscoveryAccountInfo]The accounts you're authorized to access.
errorstr | nullError message if the request failed.

The DiscoveryAccountInfo object has the following fields:

FieldTypeDescription
namestrThe account name, for example 'your-account-1'. Pass this exact value as the account_name parameter to other Search tools.
environmentslist[str]The environments this account supports, for example ['production'], ['production', 'staging'], or ['staging'].

list_discovery_sites

Lists the sites configured for an account. A site represents one version of a storefront, usually a region, language, or brand within the same account. Each site carries a domain key that identifies its catalog, an optional view ID, and the site groups it belongs to.

Multi-site accounts organize storefronts in a three-level hierarchy:

  • The account sits at the top.
  • Site groups gather related sites, such as all English-language storefronts.
  • Each site is an individual storefront version.

Rules set at a higher level flow down to everything below them. A site-level rule overrides account- and group-level rules for that site alone.

Use this tool to see which sites and site groups exist, and to retrieve the domain keys and view IDs that other Search tools need. Set account_name to target a specific account, or omit it when you have access to exactly one.

Request parameters

NameTypeRequired?Description
account_namestr | nullNoThe account name. Auto-selected when you have exactly one account. Use list_discovery_accounts to see available accounts.
environmentstrNoThe target environment: production (default) or staging. The value is case-insensitive, and surrounding whitespace is trimmed. Staging-only accounts always resolve to staging, regardless of this value.
site_group_idstr | nullNoFilters results to a single site group. Omit to return all sites for the account.

Response parameters

The tool returns a DiscoverySitesResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[DiscoverySite]The sites configured for the account.
sizeint | nullThe total number of sites returned.
errorstr | nullError message if the request failed.
environment_usedstr | nullThe environment actually queried: production or staging. This can differ from the environment you requested, because staging-only accounts always resolve to staging.

The DiscoverySite object has the following fields:

FieldTypeDescription
idint | nullThe site ID.
namestr | nullThe site's display name, for example your_domain_com 472.
externalDomainNamestr | nullThe external domain name.
viewIdstr | nullThe view ID for this site. Null when no view is configured.
domainKeystr | nullThe domain key identifying the catalog, for example your_domain_com.
cmsDomainKeystr | nullThe CMS domain key.
userstr | nullThe user who created or modified the site.
createdAtint | nullUnix timestamp in milliseconds of when the site was created.
modifiedAtint | nullUnix timestamp in milliseconds of when the site was last modified.
accountIdint | nullThe account ID the site belongs to.
sitegroupslist[SiteGroupSummary]The site groups this site belongs to.
visiblebool | nullWhether the site is visible in the dashboard.

The SiteGroupSummary object has the following fields:

FieldTypeDescription
idint | nullThe site group ID.
namestr | nullThe site group name.
createdAtint | nullUnix timestamp in milliseconds of when the site group was created.
modifiedAtint | nullUnix timestamp in milliseconds of when it was last modified.
userstr | nullThe user who created or modified the site group.
accountIdint | nullThe account ID.
userCreatedbool | nullWhether a user created the site group, rather than the system.
merchantNamestr | nullThe merchant name.
externalDomainNamestr | nullThe external domain name for the site group.

Did this page help you?

© Bloomreach, Inc. All rights reserved.