Search synonym groups expand recognized words or phrases to the alternatives in that group. Expansion is case-insensitive and scoped to the store and search language. Other query words, product visibility, and active filters still apply; equivalent terms do not guarantee identical ranking. Changes are read by new search requests without a synonym reindex.
Use GET /search-synonyms/locales to discover enabled languages for these groups. Reads require read_search; writes require write_search, which also grants read access. The token must be valid and the store must have an active or trialing subscription. Use Authentication, Rate limits, and Errors for the shared request rules.
Group response fields
A group has the following fields in list, create, and update responses. Create and update also return a top-level success code and message. All six endpoints return HTTP 200 on success.
| Field | Type | Meaning |
|---|---|---|
id |
string | Group UUID. Always present. |
store_id |
string | Owning store UUID. Always present and resolved from the token. |
locale |
string | Enabled store language code. Always present; there is no wildcard group. |
terms |
array of strings | Complete set of 2–25 terms. Always present. Leading and trailing whitespace is removed, repeated spaces become one, and Unicode text is normalized. Case and order are preserved. |
created_at |
string | Creation time as an RFC 3339 timestamp, with fractional seconds when present. Always present. |
updated_at |
string | Last successful update time as an RFC 3339 timestamp, with fractional seconds when present. Always present. |
Use the offset in each response timestamp; do not assume it matches the store timezone.
Webhooks and language removal
Subscribe to search_synonyms/create, search_synonyms/update, and search_synonyms/delete below when maintaining a copy. Each requires write_search for app subscriptions. The update event contains the resulting group; the delete event contains its deletion snapshot. Webhook payload timestamps are UTC and store_id is carried on the delivery envelope.
Removing a language from the store deletes its groups, without a separate group-delete event for each one. A mirror must also handle store/locales/deleted; adding the language again does not restore those groups. See Languages for the language-deletion event and its subscription requirements.
Endpoints#
List search synonym languages
List enabled languages for synonym groups.
Returns the enabled language codes, display labels, and default-language flag using Search read access. Use the returned locale code when creating or moving a group.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Bearer header or token prefix is malformed.
-
401STORE_ADMIN_TOKEN_RUNTIME_UNAUTHORIZEDThe token was not accepted: it is unknown, expired, revoked, or replaced, or its app was uninstalled. Returned for app, App Bridge session, and Store Admin tokens alike.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
-
403STORE_API_SCOPE_REQUIREDThe token does not grant the required resource scope. A write_search grant also permits reads.
Search synonym limits
Get search synonym limits.
Returns validation and list controls. list_page_size is the default page size; list_max_limit is the maximum accepted size. page_size_options suggests UI choices, but any integer from 1 to list_max_limit is accepted. max_terms_per_group limits terms in one group, not the number of groups in a store. max_term_length and search_max_length count Unicode code points. sort_columns lists the accepted sort keys. All fields shown in the response are present.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Bearer header or token prefix is malformed.
-
401STORE_ADMIN_TOKEN_RUNTIME_UNAUTHORIZEDThe token was not accepted: it is unknown, expired, revoked, or replaced, or its app was uninstalled. Returned for app, App Bridge session, and Store Admin tokens alike.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
-
403STORE_API_SCOPE_REQUIREDThe token does not grant the required resource scope. A write_search grant also permits reads.
List search synonyms
List the store's search synonym groups.
Omit locale to list groups across the store's languages. A supplied locale must be enabled on the store. data.groups is an array of complete group objects; data.total is the number of groups matching the filters before pagination. An empty result or a page beyond the end returns groups: [] and the matching total. The default order is created_at descending; ties use ID descending. See the group response fields above.
Query parameters
| Name | Type | Description |
|---|---|---|
page
|
integer |
Positive page number. Missing or empty uses the default; zero, negative and non-integer values are rejected. |
per_page
|
integer |
Any integer from 1 to 100. Missing or empty uses the default. |
search
|
string |
Case-insensitive substring of a term or locale code; at most 100 Unicode code points. Percent and underscore are treated literally. |
locale
|
string |
Enabled store language code, matched without case sensitivity. Omit or leave empty for all languages. The wildcard * is not supported. |
sort_by
|
string |
created_at, updated_at, or locale; other values are rejected. |
sort_direction
|
string |
Lowercase asc or desc; other values are rejected. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Bearer header or token prefix is malformed.
-
401STORE_ADMIN_TOKEN_RUNTIME_UNAUTHORIZEDThe token was not accepted: it is unknown, expired, revoked, or replaced, or its app was uninstalled. Returned for app, App Bridge session, and Store Admin tokens alike.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
-
403STORE_API_SCOPE_REQUIREDThe token does not grant the required resource scope. A write_search grant also permits reads.
-
400INVALID_INPUTA query value or JSON body has an invalid type or format.
-
400SEARCH_SYNONYM_LOCALE_INVALIDThe language code is unsupported or is not enabled on the store.
Create search synonyms
Create a search synonym group.
Send JSON with an enabled language code and 2–25 terms. Leading and trailing whitespace is removed, repeated spaces become one, and Unicode text is normalized. Saved case and order are preserved. Each trimmed term can contain at most 64 Unicode code points. Empty terms and case-insensitive duplicates are rejected. A trimmed term cannot already belong to another group in the same store and language; that conflict returns 409. The same term can be used in another language. Success returns the complete group plus code: SEARCH_SYNONYM_CREATED and an English message, and emits search_synonyms/create.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
locale
required
|
string |
Enabled store language code, matched without case sensitivity. Surrounding whitespace is trimmed; * is not supported. |
terms
required
|
array<string> |
Complete group of 2–25 distinct, nonempty words or phrases; at most 64 Unicode code points per trimmed term. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Bearer header or token prefix is malformed.
-
401STORE_ADMIN_TOKEN_RUNTIME_UNAUTHORIZEDThe token was not accepted: it is unknown, expired, revoked, or replaced, or its app was uninstalled. Returned for app, App Bridge session, and Store Admin tokens alike.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
-
403STORE_API_SCOPE_REQUIREDThe token does not grant the required resource scope. A write_search grant also permits reads.
-
400INVALID_INPUTA query value or JSON body has an invalid type or format.
-
400SEARCH_SYNONYM_LOCALE_INVALIDThe language code is unsupported or is not enabled on the store.
-
400SEARCH_SYNONYM_LOCALE_REQUIREDThe required or supplied locale is blank.
-
400SEARCH_SYNONYM_TERMS_REQUIREDThe required or supplied term array is empty.
-
400SEARCH_SYNONYM_TERMS_MINThe term array contains fewer than two terms.
-
400SEARCH_SYNONYM_TERMS_MAXThe term array contains more than 25 terms; params.max gives the limit.
-
400SEARCH_SYNONYM_TERM_EMPTYA term is blank after Unicode normalization and whitespace normalization.
-
400SEARCH_SYNONYM_TERM_TOO_LONGA trimmed term exceeds 64 Unicode code points; params.max gives the limit.
-
400SEARCH_SYNONYM_TERM_DUPLICATETwo terms in the request match case-insensitively after Unicode normalization and whitespace normalization; params.term identifies the duplicate.
-
409SEARCH_SYNONYM_TERM_IN_USEA term belongs to another group in this store and language; params.term identifies a conflicting term.
Update search synonyms
Update a search synonym group.
This PUT merges the supplied fields. Omitted or null fields retain their current values. A supplied terms array replaces the whole group; it does not append. The create validation rules still apply, so an empty array cannot clear a group. Changing locale moves the group to that enabled language and checks term ownership there. Even {} is accepted: it preserves the locale and terms, refreshes updated_at, and emits search_synonyms/update. The response contains the complete saved group with code: SEARCH_SYNONYM_UPDATED and an English message. A well-formed ID absent from the token's store returns 404.
Path parameters
| Name | Type | Description |
|---|---|---|
synonymId
required
|
string |
The group's UUID, returned by list or create. Use an ID from the token's store. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
locale
|
string |
New enabled store language code. Omit or use null to retain the current language. |
terms
|
array<string> |
Complete replacement group, using the create limits. Omit or use null to retain the current terms. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Bearer header or token prefix is malformed.
-
401STORE_ADMIN_TOKEN_RUNTIME_UNAUTHORIZEDThe token was not accepted: it is unknown, expired, revoked, or replaced, or its app was uninstalled. Returned for app, App Bridge session, and Store Admin tokens alike.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
-
403STORE_API_SCOPE_REQUIREDThe token does not grant the required resource scope. A write_search grant also permits reads.
-
400INVALID_INPUTA query value or JSON body has an invalid type or format.
-
400SEARCH_SYNONYM_LOCALE_INVALIDThe language code is unsupported or is not enabled on the store.
-
400SEARCH_SYNONYM_LOCALE_REQUIREDThe required or supplied locale is blank.
-
400SEARCH_SYNONYM_TERMS_REQUIREDThe required or supplied term array is empty.
-
400SEARCH_SYNONYM_TERMS_MINThe term array contains fewer than two terms.
-
400SEARCH_SYNONYM_TERMS_MAXThe term array contains more than 25 terms; params.max gives the limit.
-
400SEARCH_SYNONYM_TERM_EMPTYA term is blank after Unicode normalization and whitespace normalization.
-
400SEARCH_SYNONYM_TERM_TOO_LONGA trimmed term exceeds 64 Unicode code points; params.max gives the limit.
-
400SEARCH_SYNONYM_TERM_DUPLICATETwo terms in the request match case-insensitively after Unicode normalization and whitespace normalization; params.term identifies the duplicate.
-
409SEARCH_SYNONYM_TERM_IN_USEA term belongs to another group in this store and language; params.term identifies a conflicting term.
-
404SEARCH_SYNONYM_NOT_FOUNDThe well-formed group ID does not exist in the token's store.
Delete search synonyms
Delete a search synonym group.
Removes the group from the token's store and emits search_synonyms/delete. Success has a code and message, with no data object. Repeating the deletion of a well-formed ID returns 404 once the group is absent; there is no restore endpoint.
Path parameters
| Name | Type | Description |
|---|---|---|
synonymId
required
|
string |
The group's UUID, returned by list or create. Use an ID from the token's store. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Bearer header or token prefix is malformed.
-
401STORE_ADMIN_TOKEN_RUNTIME_UNAUTHORIZEDThe token was not accepted: it is unknown, expired, revoked, or replaced, or its app was uninstalled. Returned for app, App Bridge session, and Store Admin tokens alike.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
-
403STORE_API_SCOPE_REQUIREDThe token does not grant the required resource scope. A write_search grant also permits reads.
-
404SEARCH_SYNONYM_NOT_FOUNDThe well-formed group ID does not exist in the token's store.