How can I use the Search API?

Search API of Fast Response allows you to search for any piece of content created by your customers.
You can search for:

  • product reviews,
  • brand reviews (another name: customer experience reviews)
  • Ask an Owner content (another name: conversations).

Whenever you do an API call to the api/v1/search endpoint, you will receive a JSON response with "summary" and "documents".
"Summary" - will contain information about pagination, sorting and number of documents found.
"Documents" - will contain an array of search results with their unique ids that can be used in Response API to create a response.

Filters

The search is based on "filters". It's an array in which you must specify how the content should be filtered out. You can use many filters to get precise search results.
Adding a search filter means that you give a name (predefined) and 1 of 3 filter types: match, include or range.

❗️

Filters and sorting vary based on content type!

Each content type (product reviews / brand reviews / AAO content) has different types of filters available for search. The same applies for sorting.

Pagination

You can paginate the search results (documents) by using "page" and "per_page" params.

Examples

Request to search product reviews by sku and reviewer's name

Request:
POST https://fr-api.reevoo.com/api/v1/search/product_reviews

Request raw body:

{
    "filters": [        
        {
            "field": "product.sku",
            "include": [
                "SKU-123"
            ]
        }
    ],
    "page": 1,
    "per_page": "10",
    "query_string": "Lucas",
    "sort": [
        {
            "published_at": "desc"
        }
    ]
}

Response JSON

{
    "summary": {
        "per_page": 10,
        "page": 1,
        "total_pages": 1,
        "sort_order": [
            {
                "published_at": "desc"
            },
            {
                "id": "desc"
            }
        ],
        "total_count": 2
    },
    "documents": [
        {
            ...
        },
        {
            ...
        }
    ]
}