Retrieving Feedback using Return API - Example Queries
When you make a request using the return API, your results will depend on how you build your query. You can:
Retrieve feedback details endpoint
The feedback-details endpoint allows you to retrieve information about feedback based on a date range or column values, e.g. store location.
Date range queries
When querying feedback for a given period, e.g. feedback received last month, you need to create a from&to argument in the URL.
Example: /feedback-details?from=2021-07-13%2001:00:00&to=2021-07-13%2022:00:00
Dates are in the UTC time zone and of the format YYYY-MM-dd HH:mm:ss.
Column value queries
To search against feedback criteria other than date, you can specify a column on the feedback table and the data within that column to retrieve, i.e. ?query=column:data.
Queries to the feedback-details endpoint should be written in Lucene query syntax.
Example: Query for all feedback related to the London office.
/feedback-details?query=Office:London
Example: Query for feedback related to a specific UUID.
/feedback-details?query=uuid:XXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
You can combine column queries with date ranges (or other parameters) to filter your results using the AND keyword or ampersand (&) symbol.
Example: Query for very negative feedback related to the London office.
/feedback-details?query=score:1%20AND%20Office:London
Example: Query for feedback related to the London office received in September 2022.
/feedback-details?query=Office:London&from=2022-09-01%2000:00:00&to=2022-09-30%2023:59:59
You can also use an asterisk (*) wildcard in place of a from or to date, e.g. to select all feedback up to or from a given date.
Example: query for feedback related to the London office updated since 01-September 2022.
/feedback-details?query=Office:London&from=2022-09-01%2000:00:00&to=*
Note: If a query includes a string with multiple words, e.g. London Hounslow, London Hammersmith, etc., you will need to enclose the words in double quotes, e.g. Office:"London Hammersmith".
Notes queries
The return API includes the ability to query any item that has had a note added within a time period using ?query=(notes:time:...).
Example: query for feedback with notes added since 01-September 2022.
/feedback-details?query=(notes.time:[2022-09-01T00:00:00%20TO%20*])
Retrieve deleted feedbacks endpoint
When feedback is deleted, it will no longer appear in the feedback details endpoint. To retrieve information on deleted feedbacks, use the deleted feedbacks endpoint, i.e. https://<USER>:<PASS>@app.rantandrave.com/RapideIntegrationn/feedback-details/deleted.
The only query processed by this endpoint is the date range as a from&to argument.
Example: /feedback-details/deleted?from=2019-03-20%2000:00:00&to=2019-03-21%2023:59:59.
Dates are in the UTC time zone and of the format YYYY-MM-dd HH:mm:ss.
Example: Retrieve details of feedback deleted from 01-January-2022 to 28-February-2022.
/feedback-details/deleted?from=2022-01-01%2000:00:00&to=2022-02-28%2023:59:59
Result: IDs of feedback deleted between the queried dates displayed in a list along with timestamps and details of who deleted the feedback.