queryReviewRequests( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates a query to retrieve a list of review requests.

The queryReviewRequests() function builds a query to retrieve a list of review requests and returns a ReviewRequestsQueryBuilder object.

The returned object contains the query definition, which is typically used to run the query using the find() function.

You can refine the query by chaining ReviewRequestsQueryBuilder functions onto the query. ReviewRequestsQueryBuilder functions enable you to sort, filter, and control the results that queryReviewRequests() returns.

queryReviewRequests() runs with the following ReviewRequestsBuilder default that you can override:

  • ascending("_createdDate")

The functions that are chained to queryReviewRequests() are applied in the order they are called. For example, if you apply in("items.catalogItemId") and then ("requestedBy.appId"), the results are sorted first by the "items.catalogItem", and then, if there are multiple results with the same "items.catalogItem", the items are sorted by "appId".

The following ReviewRequestsQueryBuilder functions are supported for the queryReviewRequests() function. For a full description of the review request object, see the object returned for the items property in ReviewRequestsQueryResult.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),ne(),in()
_createdDateeq(),ne(),gt(),ge(),lt(),le(),in(),ascending(),descending()
sendDateeq(),ne(),gt(),ge(),lt(),le(),in(),ascending(),descending()
namespaceeq(),ne(),in()
order.ideq(),ne(),in(),exists()
items.catalogItemIdeq(),ne(),in()
items.reviewIdeq(),ne(),in(),exists()
recipient.contactIdeq(),ne(),in()
communicationChanneleq(),ne(),in()
statuseq(),ne(),in(),ascending(),descending()
automationActivationIdeq(),ne(),in(),exists()
requestedBy.wixUserIdeq(),ne(),in()
requestedBy.appIdeq(),ne(),in()
requestedBy.identityTypeeq(),ne(),in()
Authentication
  • When developing websites or building an app with Blocks, this method may require elevated permissions, depending on the identity of the user calling it and the calling user’s permissions.
  • When building apps without Blocks or for headless projects, you can only call this method directly when authenticated as a Wix app or Wix user identity. When authenticated as a different identity, you can call this method using elevation.
  • Elevation permits users to call methods they typically cannot access. Therefore, you should only use it intentionally and securely.
Permissions
Manage Review Requests
Read Review Requests
Learn more about app permissions.
Method Declaration
Copy
Request
This method does not take any parameters
Returns
JavaScript
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?