Search API
Search for products
Authorizations
Body
strategystring · enumRequiredExample:
Strategy to use for search
SEMANTIC
Possible values: schemaIdstringRequiredExample:
ID of the product schema you're querying against
ticketed-events
querystringRequiredExample:
The search term
speakeasy venues to listen to live music and have a cocktail
topNintegerRequiredExample:
Number of results to retrieve
10
fullTextSearchFieldsstring[]OptionalExample:
Array of product property paths to use in a full-text and hybrid search. Note that only properties marked as full-text searchable in the product schema will be able to be used here.
["name","description"]
profileIdstringOptionalExample:
Unique identifier of the anonymous or known profile. Only required when using a geo filter on the profile's location.
abcd-1234-abcd-1234
Responses
200
Fetched search results successfully
No content
400
Bad Request - Invalid input parameters
401
Unauthorized - Authentication credentials are missing or invalid
403
Forbidden - Insufficient permissions to perform the operation
500
Internal Server Error - Unexpected server error occurred
post
POST /search HTTP/1.1
Host: product-api.userflux.co
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 615
{
"strategy": "SEMANTIC",
"schemaId": "ticketed-events",
"query": "speakeasy venues to listen to live music and have a cocktail",
"topN": 10,
"fullTextSearchFields": [
"name",
"description"
],
"filter": {
"propertyFiltersJoin": "AND",
"propertyFilters": [
{
"property": "category",
"operator": "EQUAL",
"dataType": "STRING",
"value": "music"
}
],
"geoFilter": {
"type": "RADIUS",
"radius": {
"source": "CUSTOM",
"distance": 25,
"distanceUnit": "KILOMETERS",
"latitude": 51.5074,
"longitude": -0.1278
},
"geoBox": {
"pair": "NE_SW",
"northLatitude": 51.5074,
"northLongitude": -0.1278,
"southLatitude": 51.5074,
"southLongitude": -0.1278
}
}
},
"profileId": "abcd-1234-abcd-1234"
}
No content
Last updated