Preflight API

If your account is configured to utilize Personalized Search & Merchandising, this endpoint is required to feed into the feature. In the integration, the moment the data points for "shopper", "cart", or "lastViewed" query string parameters are assigned a value, a Preflight request will need to be sent before a request to the Autocomplete or Search API endpoint is sent. The GET method will support up to 2048 characters, if there are more characters use the POST method.

Query Params
string
required

Unique identifier to associate the Searchspring account making the request to the database. This can be found on the My Account page in the Searchspring Management Console under the Account details section.

string
required

If the cookie "ssUserId" is currently set, use the value as the userId value.

If it doesn't exist yet, generate a new ID and store it in the "ssUserId" cookie.

string

ID of current logged-in shopper from your platform, this is required for personalization features. If the shopper is anonymous this should be omitted. To learn more about personalized search, please refer to this link for more information.

string

Comma seperated list of product SKUs or UIDs that are in the current customers cart. This is required to allow personalization functionality to personalize products in search results as the customer navigates the site. To learn more about personalized search, please refer to this link for more information.

string

Comma seperated list of product SKUs or UIDs that the customer has recently viewed. The most recently viewed product SKU or UID being at the front of the string of product SKUs or UIDs passed. This is required to allow personalization functionality to personalize products in search results as the customer navigates the site. To learn more about personalized search, please refer to this link for more information.

Responses
200
400

If the siteId, userId, or shopper query string parameters are not passed this error code will be returned. If siteId or shopper are not passed the message will be "ShopperContext is invalid". If userId is not passed the message will be "Missing UserID".

Language
URL
Response
Click Try It! to start a request and see the response here!