> ## 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.

# Qualitative evolution

> This endpoint lets you view the qualitative evolution of the **reviews rating** for all of your businesses
subscribed to **Review Management**. The API returns the reviews average rating by bucket (time range).

You can use the following filters:
  - by date (analytics before and/or after a date)
  - by businesses (businesses id in list or not in list)
  - by keywords




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml get /reviews/qualitative-evolution
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/qualitative-evolution:
    get:
      tags:
        - Review analytics
      summary: Qualitative evolution
      description: >
        This endpoint lets you view the qualitative evolution of the **reviews
        rating** for all of your businesses

        subscribed to **Review Management**. The API returns the reviews average
        rating by bucket (time range).


        You can use the following filters:
          - by date (analytics before and/or after a date)
          - by businesses (businesses id in list or not in list)
          - by keywords
      operationId: getQualitativeEvolution
      parameters:
        - $ref: '#/components/parameters/query_review_bucket'
        - $ref: '#/components/parameters/query_review_cumulative'
        - $ref: '#/components/parameters/query_review_business__in'
        - $ref: '#/components/parameters/query_keywords'
        - $ref: '#/components/parameters/query_review_update_date__gte'
        - $ref: '#/components/parameters/query_review_update_date__lte'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                example:
                  - date: '2019-11-29'
                    average: 4.54
                    added: 50
                    cum_sum: 70
                  - date: '2019-12-05'
                    average: 4.34
                    added: 34
                    cum_sum: 104
                  - date: '2019-12-12'
                    average: 4.41
                    added: 4
                    cum_sum: 108
                items:
                  type: object
                  properties:
                    date:
                      type: string
                      format: datetype
                      description: Start date of the bucket
                    average:
                      type: number
                      format: float
                      description: Average rating.
                    added:
                      type: integer
                      description: Number of reviews added during the current bucket.
                    cum_sum:
                      type: number
                      format: float
                      description: Cumulative sum of the number of reviews.
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
      deprecated: true
components:
  parameters:
    query_review_bucket:
      in: query
      name: bucket
      schema:
        type: string
        default: week
        enum:
          - day
          - week
          - month
          - year
      description: >
        Defining the time range of a data bucket.


        This will determine the precision of the returned data. For example, if
        you choose `day`, you will receive the

        number of reviews for each day.
    query_review_cumulative:
      in: query
      name: cumulative
      schema:
        type: string
        default: 'true'
        enum:
          - 'true'
          - 'false'
      description: >
        If `cumulative` = `false`, return the average rating of reviews from the
        current bucket only.


        If `cumulative` = `true`, return the average rating of reviews from all
        the buckets until the current one

        (included). The cumulative representation show the evolution of the
        average rating over time.
    query_review_business__in:
      in: query
      name: business__in
      description: |
        Filter by business ids

        Return the reviews of the businesses given in list.
      schema:
        type: array
        items:
          $ref: '#/components/schemas/BusinessId'
    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_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'
  responses:
    '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
    '404':
      description: Resource does not exist
      content:
        application/json:
          schema:
            description: >-
              Error that occcurs when you are trying to reach a resource that
              does not exist
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  json:
                    type: string
                    default: Resource not found
  schemas:
    BusinessId:
      description: Business id
      type: string
      example: 5409c35a97bbc544d8e26737
  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

````