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

# User preferences

> This endpoint lets you retrieve all the information about a user's preferences on notifications. You need to have `READ` access to this user.

Here are the default values for newly created users
```json
  {
    "reports": {
      "review_management_daily": true,
      "review_management_weekly": true,
      "review_management_monthly": true,
      "daily_review_preferences": {
        "partners": [
          "google_my_business",
          "facebook"
        ],
        "review_type": 2
      }
    },
    "receive_negative_reviews_email_notifications": false
  }
```




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml get /user/{user_id}/preferences
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:
  /user/{user_id}/preferences:
    get:
      tags:
        - Users
      summary: User preferences
      description: >
        This endpoint lets you retrieve all the information about a user's
        preferences on notifications. You need to have `READ` access to this
        user.


        Here are the default values for newly created users

        ```json
          {
            "reports": {
              "review_management_daily": true,
              "review_management_weekly": true,
              "review_management_monthly": true,
              "daily_review_preferences": {
                "partners": [
                  "google_my_business",
                  "facebook"
                ],
                "review_type": 2
              }
            },
            "receive_negative_reviews_email_notifications": false
          }
        ```
      operationId: getUserPreferences
      parameters:
        - $ref: '#/components/parameters/path_user_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  reports:
                    $ref: '#/components/schemas/UserReports'
                  receive_negative_reviews_email_notifications:
                    $ref: >-
                      #/components/schemas/ReceiveNegativeReviewsEmailNotifications
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
components:
  parameters:
    path_user_id:
      in: path
      required: true
      name: user_id
      schema:
        type: string
      description: User id
  schemas:
    UserReports:
      description: Daily, weekly and monthly reports preferences
      type: object
      properties:
        review_management_daily:
          description: The user's preference on receiving a daily review management email.
          type: boolean
        review_management_weekly:
          description: The user's preference on receiving a weekly review management email.
          type: boolean
        review_management_monthly:
          description: >-
            The user's preference on receiving a monthly review management
            email.
          type: boolean
        daily_review_preferences:
          $ref: '#/components/schemas/DailyReviewPreferences'
    ReceiveNegativeReviewsEmailNotifications:
      description: Receive a notification when there is a negative review.
      type: boolean
    DailyReviewPreferences:
      description: Daily report preferences
      type: object
      properties:
        partners:
          description: list of partners to receive daily reviews notifications from.
          type: array
          items:
            description: >-
              The partner to receive daily reviews notification from.
              "facebook", "google_my_business" or "tripadvisor"
            type: string
            enum:
              - facebook
              - google_my_business
              - tripadvisor
          example:
            - facebook
            - google_my_business
            - tripadvisor
        review_type:
          description: >-
            Review type. 1 to receive negative reviews, 2 for negative and
            neutral reviews, 3 for all reviews.
          type: integer
          enum:
            - 1
            - 2
            - 3
          example: 2
  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
    '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
  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

````