> ## Documentation Index
> Fetch the complete documentation index at: https://developers.partoo.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Search for reviews

> This endpoint lets you search for the reviews of your businesses.

To access the reviews of a business you need to have `READ` access on it.
The response is paginated (30 results per page).




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml get /reviews
openapi: 3.1.0
info:
  title: Partoo Rest API
  version: v2
  license:
    name: © Copyright Partoo
    url: https://www.partoo.co/en/gtu-api/
  x-logo:
    url: >-
      https://partoo-client-images.s3.amazonaws.com/logo-partoo-restapi-white.png
  description: >
    ## Introduction

    The Partoo Rest API allows you to automate all the actions that are possible
    to do in the Partoo Web Application.


    The Partoo Rest API can be used for many different purposes:
      - Create/update/delete your businesses & users if you are a client.
      - Create/subscribe/manage organizations, businesses & users if you are a reseller.
      - Retrieve data on businesses you have access to if you are a publisher.
      - ...
servers:
  - url: https://api.partoo.co/v2
    description: Production server
  - url: https://api.sandbox.partoo.co/v2
    description: Sandbox server (dev environment for clients & partners)
security:
  - ApiKeyAuth: []
paths:
  /reviews:
    get:
      tags:
        - Reviews
      summary: Search for reviews
      description: >
        This endpoint lets you search for the reviews of your businesses.


        To access the reviews of a business you need to have `READ` access on
        it.

        The response is paginated (30 results per page).
      operationId: searchReviews
      parameters:
        - $ref: '#/components/parameters/query_business__in'
        - $ref: '#/components/parameters/query_business__notin'
        - $ref: '#/components/parameters/query_content__isnull'
        - $ref: '#/components/parameters/query_partner__in'
        - $ref: '#/components/parameters/query_gmb_rating__in'
        - $ref: '#/components/parameters/query_tripadvisor_rating__in'
        - $ref: '#/components/parameters/query_recommended__in'
        - $ref: '#/components/parameters/query_review_update_date__gte'
        - $ref: '#/components/parameters/query_review_update_date__lte'
        - $ref: '#/components/parameters/query_review_state'
        - $ref: '#/components/parameters/query_tag_label_in'
        - $ref: '#/components/parameters/query_review_without_tag'
        - $ref: '#/components/parameters/query_keywords'
        - $ref: '#/components/parameters/query_with_media_links'
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_per_page_1_100'
        - $ref: '#/components/parameters/review_query_order_by'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      reviews:
                        description: Filtered reviews
                        type: array
                        items:
                          $ref: '#/components/schemas/Review'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
components:
  parameters:
    query_business__in:
      in: query
      name: business__in
      description: >-
        Filter by business ids. Use a comma-separated list to provide multiple
        ids.
      schema:
        type: array
        example: >-
          a1c9f37b4deca92f83b61d02,9f4e2a8c0d73b154e621bc97,c73b15e9fa42d60b3a8c21ef
        items:
          $ref: '#/components/schemas/BusinessId'
          description: ''
    query_business__notin:
      in: query
      name: business__notin
      description: Excludes from the request all businesses provided
      schema:
        type: array
        items:
          $ref: '#/components/schemas/BusinessId'
    query_content__isnull:
      in: query
      name: content__isnull
      description: >
        Filter by review's content


        If set to `true`, the endpoint will return all the reviews without
        content.


        **Note:** This is the content of the review and not the content of the
        reply.
      schema:
        type: string
        enum:
          - 'true'
          - 'false'
        example: false
    query_partner__in:
      in: query
      name: partner__in
      description: Filter by publisher
      schema:
        type: array
        items:
          $ref: '#/components/schemas/ReviewPublisherLabel'
        example: google_my_business,facebook
    query_gmb_rating__in:
      in: query
      name: gmb_rating__in
      description: |
        Filter only by Google ratings
      schema:
        type: array
        items:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        example: 4,5
    query_tripadvisor_rating__in:
      in: query
      name: tripadvisor_rating__in
      description: |
        Filter only by Tripadvisor ratings
      schema:
        type: array
        items:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        example: 1,2
    query_recommended__in:
      in: query
      name: recommended__in
      description: |
        Filter only by Facebook recommendation
      schema:
        type: array
        items:
          type: boolean
          enum:
            - true
            - false
        example: false
    query_review_update_date__gte:
      in: query
      name: update_date__gte
      description: >
        Filter by `update_date`


        Return all the reviews whose `update_date` >= `given_date`.


        For example : `update_date__gte=2019-01-01T00:00:00` will return all
        reviews from the first January of 2019

        until today.


        **Note** : The update dates are stored in UTC.
      schema:
        type: string
        format: datetime
        example: '2017-08-01T00:00:00'
    query_review_update_date__lte:
      in: query
      name: update_date__lte
      description: >
        Filter by `update_date`


        Return all the reviews whose `update_date` <= `given_date`.


        For example : `update_date__lte=2020-01-01T00:00:00` will return all
        reviews from the date of the first review

        until the first january of 2020.


        **Note** : The update dates are stored in UTC.
      schema:
        type: string
        format: datetime
        example: '2017-08-02T00:00:00'
    query_review_state:
      in: query
      name: state__in
      description: Filter by state
      schema:
        type: array
        items:
          $ref: '#/components/schemas/ReviewState'
        example: treated,not_treated
    query_tag_label_in:
      in: query
      name: tag_label__in
      description: >
        Filter by Tag label


        Will partially match given labels (ie `foo` will match reviews with tag
        `food`)
      schema:
        type: array
        items:
          $ref: '#/components/schemas/TagLabel'
        example: food,drink
    query_review_without_tag:
      in: query
      name: without_tag
      description: |
        Filter only reviews without tags
      schema:
        type: boolean
        example: true
    query_keywords:
      in: query
      name: keywords
      description: >
        Filter by keywords


        Return all the reviews with not-nullable content, that contain the
        provided list of keywords.


        **Note:** This is the content of the review and not the content of the
        reply.


        The filter accepts both simple and composed words.

        To indicate it's a composed keyword, add the `+` as separator.

        For example:

        - `keywords=bonjour` returns all reviews containing the keyword
        `bonjour`

        - `keywords=good+service` returns all reviews containing the combined
        keyword **good service**, without splitting the keyword. No reviews
        containing just **good** or just **service** will be returned.

        - `keywords=bonjour,good+service`: returns all reviews that contain
        either just **bonjour**, either just **good service** or both keywords
        at the same time.
      schema:
        type: array
        items:
          type: string
        example: bonjour,good+service
    query_with_media_links:
      in: query
      name: with_media_links
      description: >
        When set to true, enriches review responses with associated customer
        media URLs from Google My Business.

        The media links will appear in the field __media_links__ as an array of
        strings.


        - If `with_media_links` is **false** (default): __media_links__ will be
        an empty array `[]`

        - If `with_media_links` is **true**:
          - Reviews with associated photos: __media_links__ will contain Google photo URLs
          - Reviews without photos: __media_links__ will be an empty array `[]`
      required: false
      schema:
        type: boolean
        default: false
        example: true
    query_page:
      in: query
      name: page
      schema:
        type: integer
        default: 1
      description: |
        Page number.
        Starts at 1. Any value lower than 1 will be considered as 1.
        For the number of items per page, see the `per_page` query parameter.
    query_per_page_1_100:
      in: query
      name: per_page
      schema:
        type: integer
        default: 30
        minimum: 1
        maximum: 100
      description: Number of items to return per page. Currently limited to 100.
    review_query_order_by:
      in: query
      name: order_by
      schema:
        type: string
        enum:
          - update_date
          - '-update_date'
        example: update_date
      description: |
        A `-` sign in front of the value indicates a descending order.
  schemas:
    ListResult:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/current_page'
        max_page:
          $ref: '#/components/schemas/max_page'
        count:
          $ref: '#/components/schemas/count'
    Review:
      description: Business Review on partner
      type: object
      properties:
        key:
          type: string
        org_id:
          $ref: '#/components/schemas/OrgId'
        id:
          $ref: '#/components/schemas/ReviewId'
        business_id:
          $ref: '#/components/schemas/BusinessId'
        partner:
          $ref: '#/components/schemas/ReviewPublisherLabel'
        partner_id:
          $ref: '#/components/schemas/ReviewPublisherId'
        author_name:
          $ref: '#/components/schemas/ReviewAuthorName'
        date:
          $ref: '#/components/schemas/ReviewCreateDate'
        update_date:
          $ref: '#/components/schemas/ReviewUpdateDate'
        delete_date:
          $ref: '#/components/schemas/ReviewDeleteDate'
        rating:
          $ref: '#/components/schemas/ReviewRating'
        recommended:
          $ref: '#/components/schemas/ReviewRecommended'
        title:
          $ref: '#/components/schemas/ReviewTitle'
        content:
          $ref: '#/components/schemas/ReviewBody'
        state:
          $ref: '#/components/schemas/ReviewState'
        link:
          $ref: '#/components/schemas/ReviewLink'
        comments:
          $ref: '#/components/schemas/Comment'
        tags:
          type: array
          description: Tags associated to the review
          items:
            $ref: '#/components/schemas/Tag'
        media_links:
          type: array
          description: >
            Array of Google photo URLs associated with the review.


            Populated when `with_media_links=true` query parameter is used.

            Empty array if no associated media found or if
            `with_media_links=false`.
          items:
            type: string
            format: uri
          example:
            - https://lh3.googleusercontent.com/gpms...
            - https://lh3.googleusercontent.com/gpms-cs-s/AB8u6HYwO...
    BusinessId:
      description: Business id
      type: string
      example: 5409c35a97bbc544d8e26737
    ReviewPublisherLabel:
      type: string
      description: Publisher label
      enum:
        - google_my_business
        - facebook
        - tripadvisor
    ReviewState:
      type: string
      description: Reply state
      enum:
        - treated
        - not_treated
        - deleted
    TagLabel:
      description: >
        The label of the tag

        Must be <= 30 characters and cannot contain a comma (commas will be
        ignored)
      type: string
      example: food
    current_page:
      type: integer
      description: Current page number
      example: 1
    max_page:
      type: integer
      description: Last page number
      example: 10
    count:
      type: integer
      description: Number of resources complying with filters
      example: 287
    OrgId:
      description: Unique identifier of an organization in Partoo.
      type: integer
      example: 42
    ReviewId:
      type: integer
      description: Review id
      example: 34
    ReviewPublisherId:
      type: string
      description: Review id on publisher
      example: accounts/114063712393225091258/locations/74805271119400652054
    ReviewAuthorName:
      type: string
      description: |
        The author name of the review.

        **Note:** Replies don't have an author.
      example: Castorche
    ReviewCreateDate:
      type: string
      description: Review creation date
      format: datetime
      example: '2017-07-01T16:10:23.156000+02:00'
    ReviewUpdateDate:
      type: string
      description: Review update date
      format: datetime
      example: '2017-08-01T19:15:54.256000+02:00'
    ReviewDeleteDate:
      type: string
      description: Review deletion date (only specified if the review has been deleted)
      format: datetime
    ReviewRating:
      type: integer
      description: Review rating (can be null)
      maximum: 5
      minimum: 0
      example: 3
    ReviewRecommended:
      type: boolean
      description: Review recommended (can be null)
    ReviewTitle:
      type: string
      description: Review title
    ReviewBody:
      type: string
      description: Review body content
      example: >-
        Magasin un peu vieillot , mais personnel très sympathique, nombreuses
        références en rayons , un très bon choix côté vin...
    ReviewLink:
      type: string
      format: uri
      description: Link to review on publisher platform
    Comment:
      description: Reply to a review
      type: object
      properties:
        id:
          $ref: '#/components/schemas/CommentId'
        partner_id:
          $ref: '#/components/schemas/ReviewPublisherId'
        created:
          $ref: '#/components/schemas/CreatedDate'
        author_name:
          $ref: '#/components/schemas/ReviewAuthorName'
        content:
          $ref: '#/components/schemas/CommentBody'
        date:
          type: string
          description: Comment date
          format: datetime
          example: '2017-08-01T19:15:54.256000+02:00'
        update_date:
          type: string
          format: datetime
          description: |
            Comment update date. Only specified if the comment was updated
          example: '2017-08-01T19:15:54.256000+02:00'
        can_edit:
          type: boolean
          description: |
            If the current user can or cannot edit a reply

            **Note:** This applies on Facebook replies only.
            A reply left by an external user on Facebook cannot be edited.
          example: true
        review_id:
          $ref: '#/components/schemas/ReviewId'
        parent_id:
          $ref: '#/components/schemas/ParentId'
        user_id:
          type: string
          description: |
            User id of the comment author
          example: 123456789abcdef2f60c42ff
        is_reply_suggestion:
          type: boolean
          description: |
            If AI reply suggestion was used to generate this comment
        replies:
          type: array
          items:
            $ref: '#/components/schemas/Comment'
          description: |
            List of replies to this comment
    Tag:
      description: Tag
      type: object
      properties:
        id:
          $ref: '#/components/schemas/TagId'
        label:
          description: The label of the tag
          allOf:
            - $ref: '#/components/schemas/TagLabel'
        color:
          $ref: '#/components/schemas/TagColor'
    CommentId:
      type: integer
      description: Comment id
      example: 82938
    CreatedDate:
      type: string
      description: Creation date on Partoo
      format: datetime
      example: '2019-08-01T19:15:54.256000+02:00'
    CommentBody:
      type: string
      description: Reply content
      example: Merci ❤️
    ParentId:
      type: integer
      description: |
        id of the parent comment.
        Is only specified if the comment is a reply to another comment

        **Note:** This applies on Facebook replies only.
    TagId:
      description: Tag id
      type: integer
      example: 25
    TagColor:
      description: The color of the tag, in hexadecimal representation
      type: string
      enum:
        - '#808080'
        - '#9B7CDB'
        - '#F47FBE'
        - '#4D4D4D'
        - '#9E6957'
        - '#2F8DE4'
        - '#37CED0'
        - '#53C944'
        - '#B1DA34'
        - '#F78234'
        - '#F4BD38'
        - '#992842'
      example: '#808080'
  responses:
    '400':
      description: Your request is incorrect
      content:
        application/json:
          schema:
            description: |
              Error that occcurs when your request is incorrect
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  json:
                    type: object
    '401':
      description: You are not authenticated
      content:
        application/json:
          schema:
            description: Error that occurs when you are not authenticated
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authentication:
                    type: string
                    default: User not authenticated
    '403':
      description: |
        You are not allowed to perform this action
      content:
        application/json:
          schema:
            description: >
              Error that occurs when you are authenticated but you are trying to
              perform an action you are not allowed to perform
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authorization:
                    type: string
                    default: Operation not allowed
  securitySchemes:
    ApiKeyAuth:
      description: >
        The authentication system on Partoo API is using API Key that should be
        put in the header of the request (the name of the header is `x-APIKey`).
        An api_key is linked to a user. This user's role will give you different
        access level to the API features.
      type: apiKey
      in: header
      name: x-APIKey

````