Autosuggest tools

list_autosuggest_exclusion_rules

Lists the autosuggest exclusion rules in an account. Exclusion rules keep specific keywords out of the autosuggest dropdown, so shoppers never see terms you want to hide.

The response gives you a paginated set of rule summaries, each with the rule name, excluded keywords, domain key, enabled status, and sync status. Use get_autosuggest_exclusion_rule when you need the full detail of one rule.

Request parameters

NameTypeRequired?Description
account_namestr | nullNoThe account name. Required if you have access to more than one account.
site_group_idstr | int | nullNoA site group ID or site name. Defaults to the account level (-1).
pageintNoThe page number, zero-based. Defaults to 0.
limitintNoThe number of results per page. Defaults to 10.
sort_bystrNoThe field to sort by, such as MODIFIED_AT, CREATED_AT, RULE_NAME, or ENABLED. Defaults to MODIFIED_AT.
sort_orderstrNoThe sort direction, ASC or DESC. Defaults to DESC.
qstr | nullNoA text search to filter rules by name, user, or keywords.

Response parameters

The tool returns an AutosuggestRulesResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[AutosuggestRule]The exclusion rules in the account.
errorstr | nullError message if the request failed.

The AutosuggestRule object has the following fields:

FieldTypeDescription
idintThe rule's unique ID.
accountIdint | nullThe account this rule belongs to.
domainKeystr | nullThe domain key the rule applies to. A null value means account-wide.
ruleNamestr | nullThe rule's display name.
keywordslist[str]The keywords excluded from autosuggest.
enabledboolWhether the rule is enabled.
notestr | nullAn optional note, up to 255 characters.
userstr | nullThe user who last modified the rule.
createdAtint | nullUnix timestamp in milliseconds of when the rule was created.
modifiedAtint | nullUnix timestamp in milliseconds of the last modification.
deletedbool | nullWhether the rule has been soft-deleted.
deletedAtint | nullUnix timestamp in milliseconds of when the rule was deleted.
syncStatusstr | nullThe sync status: PENDING, IN_PROGRESS, SUCCESS, or FAILED.

get_autosuggest_exclusion_rule

Returns the full detail of a single autosuggest exclusion rule, including its excluded keywords, domain key, enabled status, note, and sync status. Use list_autosuggest_exclusion_rules first to find the rule ID you want.

Request parameters

NameTypeRequired?Description
rule_idintYesThe rule ID returned by list_autosuggest_exclusion_rules.
account_namestr | nullNoThe account name. Required if you have access to more than one account.
site_group_idstr | int | nullNoA site group ID or site name. Defaults to the account level (-1).

Response parameters

The tool returns an AutosuggestRuleResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
dataAutosuggestRule | nullThe full exclusion rule record.
errorstr | nullError message if the request failed.

The AutosuggestRule object has the fields documented under list_autosuggest_exclusion_rules.

get_autosuggest_results

Returns the search terms that would appear in the autosuggest dropdown when a shopper starts typing a query. Use this to test how autosuggest behaves for a given term, confirm that your exclusion rules work, or explore what terms surface for a partial query.

Request parameters

NameTypeRequired?Description
qstrYesThe search term to get suggestions for.
domain_keystr | nullNoThe domain key to query. Omit to use the merchant default.

Response parameters

The tool returns an AutosuggestSuggestionsResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[str]The suggested search terms.
errorstr | nullError message if the request failed.

© Bloomreach, Inc. All rights reserved.