> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # QueryReviewRequests # Package: reviews # Namespace: ReviewRequestsV2 # Method link: https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/reviews/review-requests/query-review-requests.md ## Permission Scopes: Read Review Requests: SCOPE.DC_REVIEWS.READ-REVIEW_REQUESTS ## Introduction Retrieves a list of review requests, give the provided paging, filtering, and sorting. Query Review Requests runs with these defaults, which you can override: + `createdDate` in `ASC` order To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/getting-started/field-projection.md). --- ## REST API ### Schema ``` Method: queryReviewRequests Description: Retrieves a list of review requests, give the provided paging, filtering, and sorting. Query Review Requests runs with these defaults, which you can override: + `createdDate` in `ASC` order To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/getting-started/field-projection.md). URL: https://www.wixapis.com/reviews/v2/review-requests/query Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: query Method parameters: param name: query | type: CursorQuery | required: true - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. - name: limit | type: integer | description: Maximum number of items to return in the results. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` - name: sort | type: array | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` - name: fieldName | type: string | description: Name of the field to sort by. - name: order | type: SortOrder | description: Sort order. - enum: ASC, DESC Return type: QueryReviewRequestsResponse - name: reviewRequests | type: array | description: Retrieved review requests. - name: id | type: string | description: Review request GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the review request is updated. To prevent conflicting changes, the current revision must be passed when updating the review request. Ignored when creating a review request. - name: createdDate | type: string | description: Date and time the review request was created. - name: updatedDate | type: string | description: Date and time the review request was last updated. - name: sendDate | type: string | description: Date and time the review request was, or will be, sent. This field is only informational and does not trigger a send action. - name: namespace | type: string | description: Name of the Wix app whose catalog the items being reviewed belong to. Supported values: + Wix Stores: `stores` Currently, only Wix Stores is fully integrated with the Wix Reviews app. - name: order | type: Order | description: Order that a review is requested for. - name: id | type: string | description: Order GUID. - name: items | type: array | description: Items that a review is requested for. - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to. For example, `product.id` for items from the Stores Catalog API. - name: reviewId | type: string | description: GUID of the review created for this item by the review request recipient. - name: recipient | type: Recipient | description: Customer to send a review request to. - name: contactId | type: string | description: Recipient contact GUID. See the Contacts API for more information. - name: communicationChannel | type: CommunicationChannel | description: Communication channel for sending the review request. - enum: EMAIL - name: status | type: ReviewRequestStatus | description: Review request status. - enum: - UNKNOWN_REVIEW_REQUEST_STATUS: Unknown review request status. - SCHEDULED: Review request scheduled. - CANCELED: Review request canceled. - FAILED: Review request failed to send. - SENT: Review request sent. - name: automationActivationId | type: string | description: GUID of the automation action that triggered the review request to be created. This field is only used if a review request was created by the [automation included with Wix Reviews](https://support.wix.com/en/article/wix-stores-adding-and-setting-up-wix-reviews#step-3-optional-customize-review-requests). Also see the Automations API for more information. - name: requestedBy | type: IdentificationData | description: GUID of the user or app that generated the review request. - ONE-OF: - name: wixUserId | type: string | description: Wix user GUID. - name: appId | type: string | description: Wix app GUID. - name: identityType | type: IdentityType | description: Identity type. - enum: WIX_USER, APP - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata. - name: count | type: integer | description: Number of items returned in the response. - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page. + `true`: Another page of results can be retrieved. + `false`: This is the last page. ``` ### Examples ### Query Review Requests ```curl curl -X POST \ 'https://www.wixapis.com/reviews/v2/review-requests/query' \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Authorization: ' \ -d '{ "query": { "filter": { "namespace": "stores" } } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.reviews.ReviewRequestsV2.queryReviewRequests(query) Description: Retrieves a list of review requests, give the provided paging, filtering, and sorting. Query Review Requests runs with these defaults, which you can override: + `createdDate` in `ASC` order To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/getting-started/field-projection.md). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: query Method parameters: param name: query | type: ReviewRequestQuery | required: true - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. - name: limit | type: integer | description: Maximum number of items to return in the results. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` - name: sort | type: array | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` - name: fieldName | type: string | description: Name of the field to sort by. - name: order | type: SortOrder | description: Sort order. - enum: ASC, DESC Return type: PROMISE - name: reviewRequests | type: array | description: Retrieved review requests. - name: _id | type: string | description: Review request GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the review request is updated. To prevent conflicting changes, the current revision must be passed when updating the review request. Ignored when creating a review request. - name: _createdDate | type: Date | description: Date and time the review request was created. - name: _updatedDate | type: Date | description: Date and time the review request was last updated. - name: sendDate | type: Date | description: Date and time the review request was, or will be, sent. This field is only informational and does not trigger a send action. - name: namespace | type: string | description: Name of the Wix app whose catalog the items being reviewed belong to. Supported values: + Wix Stores: `stores` Currently, only Wix Stores is fully integrated with the Wix Reviews app. - name: order | type: Order | description: Order that a review is requested for. - name: _id | type: string | description: Order GUID. - name: items | type: array | description: Items that a review is requested for. - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to. For example, `product.id` for items from the Stores Catalog API. - name: reviewId | type: string | description: GUID of the review created for this item by the review request recipient. - name: recipient | type: Recipient | description: Customer to send a review request to. - name: contactId | type: string | description: Recipient contact GUID. See the Contacts API for more information. - name: communicationChannel | type: CommunicationChannel | description: Communication channel for sending the review request. - enum: EMAIL - name: status | type: ReviewRequestStatus | description: Review request status. - enum: - UNKNOWN_REVIEW_REQUEST_STATUS: Unknown review request status. - SCHEDULED: Review request scheduled. - CANCELED: Review request canceled. - FAILED: Review request failed to send. - SENT: Review request sent. - name: automationActivationId | type: string | description: GUID of the automation action that triggered the review request to be created. This field is only used if a review request was created by the [automation included with Wix Reviews](https://support.wix.com/en/article/wix-stores-adding-and-setting-up-wix-reviews#step-3-optional-customize-review-requests). Also see the Automations API for more information. - name: requestedBy | type: IdentificationData | description: GUID of the user or app that generated the review request. - ONE-OF: - name: wixUserId | type: string | description: Wix user GUID. - name: appId | type: string | description: Wix app GUID. - name: identityType | type: IdentityType | description: Identity type. - enum: WIX_USER, APP - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata. - name: count | type: integer | description: Number of items returned in the response. - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page. + `true`: Another page of results can be retrieved. + `false`: This is the last page. ``` ### Examples ### queryReviewRequests ```javascript import { reviewRequests } from '@wix/reviews'; async function queryReviewRequests(query) { const response = await reviewRequests.queryReviewRequests(query); }; ``` ### queryReviewRequests (with elevated permissions) ```javascript import { reviewRequests } from '@wix/reviews'; import { auth } from '@wix/essentials'; async function myQueryReviewRequestsMethod(query) { const elevatedQueryReviewRequests = auth.elevate(reviewRequests.queryReviewRequests); const response = await elevatedQueryReviewRequests(query); } ``` ### queryReviewRequests (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { reviewRequests } from '@wix/reviews'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { reviewRequests }, // Include the auth strategy and host as relevant }); async function queryReviewRequests(query) { const response = await myWixClient.reviewRequests.queryReviewRequests(query); }; ``` ---