--- openapi: 3.0.0 servers: - url: https://judge.me/api/v1 description: 'Judge.me API server' info: x-logo: url: 'https://s3.amazonaws.com/me.judge.public-static-assets/jm-logo-green.png' altText: 'Judge.me Logo' href: 'https://help.judge.me/en/' description: | Our REST API lets you access to resources and perform actions on behalf of a store. For more information, read our [integration guidelines](https://help.judge.me/en/articles/8278390-integrating-with-judge-me) and [FAQs](https://help.judge.me/en/articles/8278477-faqs-for-integration-partners), or contact partnerships@judge.me for help. # Authentication [Judge.me](http://judge.me/) uses OAuth2 to grant App Developers access to [Judge.me](http://judge.me/) API. You need to use the OAuth api_token generated from the Judge.me app [following this guide](https://help.judge.me/en/articles/8283047-setting-up-the-oauth-flow-for-your-app-in-judge-me). Example of how to authenticate with OAuth: ``` GET https://judge.me/oauth/authorize?client_id=[your_client_id]&redirect_uri=[your_redirect_uri]&response_type=code&scope=[list_of_permissions_you_are_asking]&state=[state] ``` x-tagGroups: - name: '' tags: - Judge.me ID vs External ID - Find by ID or other fields - name: Displaying Widgets tags: - Main Widgets - Other Widgets - name: Reviews management tags: - Reviews - Webhooks - name: General tags: - Reviewers - Shops - Settings - Replies - Private Replies tags: - name: 'Judge.me ID vs External ID' description: | You can the resource from our API using two types of id: - `id`: ID of the resource identified in Judge.me. - `external_id`: ID of the resource identified in the e-commerce platform (e.g. Shopify). Refer to each endpoint’s document to see which type of id is used in each case. In Judge.me's responses and in query parameters, `id` is Judge.me internal ID and `external_id` is the external ID of the resource. Meanwhile, in the request body of your update/create requests', `id` is the external ID of the resource. - name: 'Find by ID or other fields' description: | In many endpoints, we allow to find a resource not only by `id`, but also by other fields (e.g. product's handle, reviewer's email, external_id). See each endpoint's document for more details. When `id` is a required param (usually required in the request URL), and you want to find by another field, please set `id` to any negative number,-1, and then set value to the other field by which you want to find. - name: 'Main Widgets' description: In this section, you can find main [Judge.me widgets](https://help.judge.me/en/articles/8415708-overview-of-the-judge-me-widgets) used to display Judge.me published reviews on the storefront. Response of the following widget endpoints contains the complete, sanitized, XSS-safe HTML for each widget, that can be embedded inside a storefront page. - name: 'Other Widgets' description: 'In this section, you can find other widget information that is not commonly used alone but can be combined in different ways to make a more meaningful widget.' - name: 'Reviews' description: | You can use the reviews endpoints to access review information. Common use cases include: - Synchronize and display reviews in your admin dashboard. - Get event of new reviews (via webhook) to perform an action on your side. - Let users manage reviews (publish/hide) on your side. *Note: these endpoints respond **raw** review information, which may include **unpublished reviews**, or review content that is **not sanitized** yet (so risks of XSS). To render review content on storefront, please use widget endpoints instead. - name: 'Webhooks' description: | Subscribe to an event happens in Judge.me. Judge.me will send a POST request to the registered URL containing relevant information for each event. Common webhook keys: 1. **review/created** or **review/created_fail**: to know when a review is created, or not. 2. **review/updated**: to know when a review is updated in Judge.me. In particular, when a review is: - curated or mass curated - pinned/featured in carousel - moved to another product - edited from admin or user profile - verified review via request emails - added/hidden/shown review photos from admin or user profile 3. Widgets update webhooks (e.g. **widget/settings/updated**): to know when Judge.me updates a widget. ***Note**: You can learn how to verify webhooks from Judge.me following this [guide](https://help.judge.me/en/articles/8299679-verifying-webhooks-from-judge-me). paths: '/widgets/product_review': get: security: - PrivateAPIKey: [] ShopDomain: [] - PublicAPIKey: [] ShopDomain: [] - OAuthAPIKey: [read_widgets] summary: Product Review Widget description: | Review Widget is usually placed at the bottom of each product page, displaying all reviews of a product. You can use product handle, external ID, or [Judge.me](http://judge.me/) internal ID to specify the product. operationId: 'widgets#product_review' parameters: - $ref: '#/components/parameters/product__handle' - $ref: '#/components/parameters/product__external_id' - $ref: '#/components/parameters/product__id' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/per_page_5' responses: '200': description: '' headers: {} tags: - Main Widgets '/widgets/preview_badge': get: security: - PrivateAPIKey: [] ShopDomain: [] - PublicAPIKey: [] ShopDomain: [] - OAuthAPIKey: [read_widgets] summary: Product Preview Badge description: | Preview Badge is usually placed below product titles on product pages or inside product thumbnails on collection pages. This widget display the average star rating and review count of each product. You can use product handle, external ID, or [Judge.me](http://judge.me/) internal ID to specify the product. operationId: 'widgets#preview_badge' parameters: - $ref: '#/components/parameters/product__handle' - $ref: '#/components/parameters/product__external_id' - $ref: '#/components/parameters/product__id' responses: '200': description: '' headers: {} tags: - Main Widgets '/widgets/featured_carousel': get: security: - PrivateAPIKey: [] ShopDomain: [] - PublicAPIKey: [] ShopDomain: [] - OAuthAPIKey: [read_widgets] summary: Featured Reviews Carousel description: | Reviews Carousel is usually placed on the homepage to showcase specific reviews featured by the store. operationId: 'widgets#featured_carousel' responses: '200': { $ref: '#/components/responses/success_200', } tags: - Main Widgets '/widgets/reviews_tab': get: security: - PrivateAPIKey: [] ShopDomain: [] - PublicAPIKey: [] ShopDomain: [] - OAuthAPIKey: [read_widgets] summary: Floating Reviews Tab description: | Floating Reviews Tab display all product and store reviews via a floating button on any pages. operationId: 'widgets#reviews_tab' parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/per_page_5' - $ref: '#/components/parameters/widget_review_type' responses: '200': description: '' headers: {} tags: - Main Widgets '/widgets/all_reviews_page': get: security: - PrivateAPIKey: [] ShopDomain: [] - PublicAPIKey: [] ShopDomain: [] - OAuthAPIKey: [read_widgets] summary: All Reviews Page description: | All Reviews Page is a dedicated page to showcase all product and store reviews all in one place. operationId: 'widgets#all_reviews_page' parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/widget_review_type' responses: '200': { $ref: '#/components/responses/success_200', } tags: - Main Widgets '/widgets/verified_badge': get: security: - PrivateAPIKey: [] ShopDomain: [] - PublicAPIKey: [] ShopDomain: [] - OAuthAPIKey: [read_widgets] summary: Verified Reviews Count Badge description: | Verified Reviews Count Badge displays the number of verified published reviews. Stores need at least 20 verified reviews to use this widget. operationId: 'widgets#verified_badge' responses: '200': { $ref: '#/components/responses/success_200', } tags: - Main Widgets '/widgets/all_reviews_count': get: security: - PrivateAPIKey: [] ShopDomain: [] - PublicAPIKey: [] ShopDomain: [] - OAuthAPIKey: [read_widgets] summary: Total number of all reviews description: | Return a single total number of product and store reviews. operationId: 'widgets#all_reviews_count' responses: '200': { $ref: '#/components/responses/success_200', } tags: - Other Widgets '/widgets/all_reviews_rating': get: security: - PrivateAPIKey: [] ShopDomain: [] - PublicAPIKey: [] ShopDomain: [] - OAuthAPIKey: [read_widgets] summary: Average rating of all reviews description: | Return a single number of average rating of product reviews and store reviews. operationId: 'widgets#all_reviews_rating' responses: '200': { $ref: '#/components/responses/success_200', } tags: - Other Widgets '/widgets/shop_reviews_count': get: security: - PrivateAPIKey: [] ShopDomain: [] - PublicAPIKey: [] ShopDomain: [] - OAuthAPIKey: [read_widgets] summary: Total number of shop-level reviews description: | Return a single total number of store reviews. operationId: 'widgets#shop_reviews_count' responses: '200': { $ref: '#/components/responses/success_200', } tags: - Other Widgets '/widgets/shop_reviews_rating': get: security: - PrivateAPIKey: [] ShopDomain: [] - PublicAPIKey: [] ShopDomain: [] - OAuthAPIKey: [read_widgets] summary: Average rating of shop-level reviews description: | Return a single number of average rating of store reviews. operationId: 'widgets#shop_reviews_rating' responses: '200': { $ref: '#/components/responses/success_200', } tags: - Other Widgets '/widgets/settings': get: security: - PrivateAPIKey: [] ShopDomain: [] - PublicAPIKey: [] ShopDomain: [] - OAuthAPIKey: [read_widgets] summary: Widget settings of the shop description: | Return widget settings of the shop, under HTML format, containing a `