The SearchSpring Suggest Legacy API is designed to generate helpful query and product suggestions based on a shopper's input text. This is the legacy version of this endpoint, which replicates the behavior of the older AutoComplete API while using our newest systems. This endpoint is not planned to be deprecated.
See Also: Legacy Response Format
API Endpoint URL
https://[siteId].a.searchspring.io/api/suggest/legacy
Request Parameters
Uses POST. Parameters cannot be passed in the URL.
siteId (Required)
Format | String |
Description | The siteId parameter identifies your site. You can find your siteId on the My Account page. |
Example Value | "scmq7n" |
query (Required)
Format | String |
Description | Searches the search database for the terms in the query. |
Example Value | "dres" |
callback
Format | String |
Description | The JSONP callback function name. The SearchSpring API will pass the JSON-encoded response as an argument to the function specified. |
Example Values | "buildAutocompleteResults" "buildHTML" |
termCount
Format | Integer |
Description | The number of suggestions to be returned to show the end user. |
Default Value | 4 |
productCount
Format | Integer |
Description | The number of products on a site to scan (Name and SKU core fields) in order to find matches against the query. |
Default Value | 20 |
Example Request
cURL
curl -X POST https://scmq7n.a.searchspring.io/api/suggest/legacy -H 'Content-Type: application/json' -d '{"siteId": "scmq7n", "query": "dres"}'
Comments
0 comments
Please sign in to leave a comment.