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:
  /api_keys:
    get:
      summary: List user API keys
      deprecated: false
      description: |-
        This endpoint lets you list all the API keys you have access to.

        For more details on how API keys work, and how to handle them securely, see the [Security and API Key Usage](/guides/api/resources/settings/security_and_api_key_usage) guide.
      operationId: getApiKeys
      tags:
        - ApiKeys
      parameters:
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_per_page_1_100'
        - in: query
          name: status
          schema:
            type: string
            example: active
            enum:
              - active
              - inactive
              - disabled
              - expired
          description: Filter API keys by status. A key is `inactive` when its status is either `expired` or `disabled`.
        - in: query
          name: type
          schema:
            type: string
            example: user
            enum:
              - bot
              - user
          description: Filter API keys by the type of user the key belongs to.
        - in: query
          name: search_text
          schema:
            type: string
          description: |
            Free-text search filter matched against:
            - `api_key` — the actual API key string value
            - `label` — the human-readable label/name assigned to the key
        - $ref: '#/components/parameters/query_api_key_include_all_permissions'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      api_keys:
                        type: array
                        description: List of API keys
                        items:
                          $ref: '#/components/schemas/ApiKey'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
    post:
      summary: Create API key
      deprecated: false
      description: |-
        This endpoint lets you create a new API key.

        For more details on how API keys work, and how to handle them securely, see the [Security and API Key Usage](/guides/api/resources/settings/security_and_api_key_usage) guide.
      operationId: createApiKey
      tags:
        - ApiKeys
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiKeyBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /api_keys/{key_id}:
    get:
      summary: API key information
      deprecated: false
      description: |-
        Given an API key ID, this endpoint gives you information about one key.

        For more details on how API keys work, and how to handle them securely, see the [Security and API Key Usage](/guides/api/resources/settings/security_and_api_key_usage) guide.
      operationId: getApiKey
      tags:
        - ApiKeys
      parameters:
        - in: path
          name: key_id
          required: true
          schema:
            $ref: '#/components/schemas/id'
          description: Key ID
        - $ref: '#/components/parameters/query_api_key_include_all_permissions'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    put:
      summary: Update API key
      deprecated: false
      description: |-
        This endpoint lets you update an API key you have access to.

        For more details on how API keys work, and how to handle them securely, see the [Security and API Key Usage](/guides/api/resources/settings/security_and_api_key_usage) guide.
      operationId: updateApiKey
      tags:
        - ApiKeys
      parameters:
        - in: path
          name: key_id
          required: true
          schema:
            $ref: '#/components/schemas/id'
          description: Key ID
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiKeyBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /api_keys/revoke/{key_id}:
    post:
      summary: Revoke API key
      description: |-
        This endpoint lets you revoke an API key you have access to.

        For more details on how API keys work, and how to handle them securely, see the [Security and API Key Usage](/guides/api/resources/settings/security_and_api_key_usage) guide.
      operationId: revokeApiKey
      tags:
        - ApiKeys
      parameters:
        - in: path
          name: key_id
          required: true
          schema:
            $ref: '#/components/schemas/id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/search:
    get:
      operationId: searchBusinesses
      tags:
        - Businesses
      summary: Search for businesses
      description: |
        This lets you search among the businesses you have `READ` access to. You can use several filters. The response is paginated (30 results per page).
      parameters:
        - $ref: '#/components/parameters/query_filter_by_fuzzy_query_on_business'
        - $ref: '#/components/parameters/query_business__in'
        - $ref: '#/components/parameters/query_code__in'
        - $ref: '#/components/parameters/query_filter_by_org_id'
        - $ref: '#/components/parameters/query_filter_by_groups'
        - $ref: '#/components/parameters/query_filter_by_country'
        - $ref: '#/components/parameters/query_filter_by_business_name'
        - $ref: '#/components/parameters/query_filter_by_business_status'
        - $ref: '#/components/parameters/query_filter_by_zipcode'
        - $ref: '#/components/parameters/query_filter_by_city'
        - $ref: '#/components/parameters/query_filter_by_business_code'
        - $ref: '#/components/parameters/query_filter_by_business_modification_timestamp'
        - $ref: '#/components/parameters/query_filter_by_business_features__in'
        - $ref: '#/components/parameters/query_filter_by_business_features__notin'
        - $ref: '#/components/parameters/query_filter_by_business_subscription_to_review_management'
        - $ref: '#/components/parameters/query_filter_by_business_subscription_to_presence_management'
        - $ref: '#/components/parameters/query_filter_by_business_subscription_to_review_booster'
        - $ref: '#/components/parameters/query_filter_by_business_subscription_to_messages'
        - $ref: '#/components/parameters/query_filter_by_business_completion_rate__gte'
        - $ref: '#/components/parameters/query_filter_by_business_completion_rate__lte'
        - $ref: '#/components/parameters/query_filter_by_business_completion_rate'
        - $ref: '#/components/parameters/query_filter_by_business_promo'
        - $ref: '#/components/parameters/query_filter_by_connected_to_gmb_location'
        - $ref: '#/components/parameters/query_filter_by_connected_to_facebook_location'
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_per_page_1_100'
        - in: query
          name: order_by
          schema:
            type: string
            enum:
              - id
              - name
              - code
              - created
              - modified
              - country
              - city
              - zipcode
              - completion_rate
              - -id
              - -name
              - -code
              - -created
              - -modified
              - -country
              - -city
              - -zipcode
              - -completion_rate
            default: id
          required: false
          description: |
            Order result by given attribute.
            Reverse order can as well be obtained by using a `-` (minus sign) before the attribute name, e.g. `order_by=-name`
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      businesses:
                        type: array
                        description: List of Businesses
                        items:
                          $ref: '#/components/schemas/BusinessWithCustomFields'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
  /business/search/stats:
    get:
      operationId: searchBusinessesStats
      tags:
        - Businesses
      summary: Get completion rate stats from your businesses
      description: |
        This endpoint works in the same way as the [operation/searchBusinesses](/api-reference/businesses/search-for-businesses) endpoint, but instead of returning data on all returned businesses, this endpoint returns completion rate statistics aggregated across all businesses.

        The statistics returned are the average completion rate for all businesses that fit the given filters, as well as the count of businesses with a low, medium, and high respectively. The thresholds for low, medium, and high can be found below in the response details.

        Note that this endpoint works in the exact same way as [operation/searchBusinesses](/api-reference/businesses/search-for-businesses) (with the exception of parameters that format the output, such as `order_by` and pagination), but the return value is different.
      parameters:
        - $ref: '#/components/parameters/query_filter_by_fuzzy_query_on_business'
        - $ref: '#/components/parameters/query_business__in'
        - $ref: '#/components/parameters/query_filter_by_org_id'
        - $ref: '#/components/parameters/query_filter_by_groups'
        - $ref: '#/components/parameters/query_filter_by_country'
        - $ref: '#/components/parameters/query_filter_by_business_name'
        - $ref: '#/components/parameters/query_filter_by_business_status'
        - $ref: '#/components/parameters/query_filter_by_zipcode'
        - $ref: '#/components/parameters/query_filter_by_city'
        - $ref: '#/components/parameters/query_filter_by_business_code'
        - $ref: '#/components/parameters/query_filter_by_business_modification_timestamp'
        - $ref: '#/components/parameters/query_filter_by_business_features__in'
        - $ref: '#/components/parameters/query_filter_by_business_features__notin'
        - $ref: '#/components/parameters/query_filter_by_business_subscription_to_review_management'
        - $ref: '#/components/parameters/query_filter_by_business_subscription_to_presence_management'
        - $ref: '#/components/parameters/query_filter_by_business_subscription_to_review_booster'
        - $ref: '#/components/parameters/query_filter_by_business_subscription_to_messages'
        - $ref: '#/components/parameters/query_filter_by_business_completion_rate__gte'
        - $ref: '#/components/parameters/query_filter_by_business_completion_rate__lte'
        - $ref: '#/components/parameters/query_filter_by_business_completion_rate'
        - $ref: '#/components/parameters/query_filter_by_business_promo'
        - $ref: '#/components/parameters/query_filter_by_connected_to_gmb_location'
        - $ref: '#/components/parameters/query_filter_by_connected_to_facebook_location'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  average_completion_rate:
                    description: The average completion rate of all businesses that fit the filters given in paramers.
                    type: integer
                    example: 72
                  counts:
                    type: object
                    properties:
                      low:
                        type: integer
                        example: 2
                        description: The number of businesses that fit the filters given in paramers with a completion score of <=33.
                      mid:
                        type: integer
                        example: 10
                        description: The number of businesses that fit the filters given in paramers with a completion score of >33 and <=66.
                      high:
                        type: integer
                        example: 22
                        description: The number of businesses that fit the filters given in paramers with a completion score of >66.
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
  /business/connections_stats:
    get:
      tags:
        - Businesses
      operationId: getBusinessConnectionsStats
      summary: Statistics for your connected businesses
      description: |
        This endpoint lets you access the number of businesses connected to different platforms.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    description: |
                      Total number of businesses.
                  linked_to_gmb_count:
                    type: integer
                    description: |
                      Number of businesses linked to Google.
                  linked_to_facebook_count:
                    type: integer
                    description: |
                      Number of businesses linked to Facebook.
                  linked_to_tripadvisor_count:
                    type: integer
                    description: |
                      Number of businesses linked to Tripadvisor.
                  linked_to_instagram_count:
                    type: integer
                    description: |
                      Number of businesses linked to Instagram.
        '401':
          $ref: '#/components/responses/401'
  /business:
    post:
      tags:
        - Businesses
      summary: Create business
      description: |
        This API allows the creation of a new business in the context of your organization.
      operationId: createBusiness
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request object
              type: object
              required:
                - name
                - country
                - categories
                - contacts
              properties:
                name:
                  $ref: '#/components/schemas/BusinessName'
                org_id:
                  $ref: '#/components/schemas/BusinessCreateUpdateOrgId'
                groups:
                  $ref: '#/components/schemas/groups'
                reach:
                  $ref: '#/components/schemas/BusinessReach'
                country:
                  $ref: '#/components/schemas/BusinessCountry'
                zipcode:
                  $ref: '#/components/schemas/BusinessZipcode'
                city:
                  $ref: '#/components/schemas/RequiredBusinessCity'
                region:
                  $ref: '#/components/schemas/BusinessRegion'
                categories:
                  $ref: '#/components/schemas/BusinessCategories'
                code:
                  $ref: '#/components/schemas/BusinessCode'
                status:
                  $ref: '#/components/schemas/BusinessStatus'
                opening_date:
                  $ref: '#/components/schemas/BusinessOpeningDate'
                address_full:
                  $ref: '#/components/schemas/AddressFull'
                address2:
                  $ref: '#/components/schemas/Address2'
                lat:
                  $ref: '#/components/schemas/BusinessLatitude'
                long:
                  $ref: '#/components/schemas/BusinessLongitude'
                website_url:
                  $ref: '#/components/schemas/BusinessWebsite'
                facebook_url:
                  $ref: '#/components/schemas/BusinessFacebookPage'
                twitter_url:
                  $ref: '#/components/schemas/BusinessTwitter'
                description_short:
                  $ref: '#/components/schemas/BusinessShortDescription'
                description_long:
                  $ref: '#/components/schemas/BusinessLongDescription'
                open_hours:
                  $ref: '#/components/schemas/OpenHours'
                specific_hours:
                  $ref: '#/components/schemas/SpecificHours'
                contacts:
                  $ref: '#/components/schemas/BusinessContactsCreate'
                photos:
                  $ref: '#/components/schemas/Photos'
                national_identification_number:
                  $ref: '#/components/schemas/BusinessNationalIdentificationNumber'
                custom_fields:
                  $ref: '#/components/schemas/CustomFields.Update'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
                  id:
                    $ref: '#/components/schemas/BusinessId'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /business/{business_id}:
    get:
      tags:
        - Businesses
      operationId: getBusiness
      summary: Business information
      description: |
        This endpoint lets you access to the information of a business. You need to have `READ`access on this business.
      parameters:
        - $ref: '#/components/parameters/business_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessWithCustomFields'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      tags:
        - Businesses
      operationId: updateBusiness
      summary: Update business
      description: |
        This endpoint lets you access to the information of a business. You need to have `WRITE` access on this business. Only indicated values are taken into account (it works like a `PATCH`). You cannot push fields disabled for your org.
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request object
              type: object
              properties:
                name:
                  $ref: '#/components/schemas/BusinessName'
                org_id:
                  $ref: '#/components/schemas/BusinessCreateUpdateOrgId'
                groups:
                  $ref: '#/components/schemas/groups'
                country:
                  $ref: '#/components/schemas/BusinessCountry'
                zipcode:
                  $ref: '#/components/schemas/BusinessZipcode'
                city:
                  $ref: '#/components/schemas/BusinessCity'
                region:
                  $ref: '#/components/schemas/BusinessRegion'
                categories:
                  $ref: '#/components/schemas/BusinessCategories'
                code:
                  $ref: '#/components/schemas/BusinessCode'
                status:
                  $ref: '#/components/schemas/BusinessStatus'
                opening_date:
                  $ref: '#/components/schemas/BusinessOpeningDate'
                address2:
                  description: Row address string
                  type: string
                address_full:
                  $ref: '#/components/schemas/AddressFull'
                lat:
                  $ref: '#/components/schemas/BusinessLatitude'
                long:
                  $ref: '#/components/schemas/BusinessLongitude'
                website_url:
                  $ref: '#/components/schemas/BusinessWebsite'
                facebook_url:
                  $ref: '#/components/schemas/BusinessFacebookPage'
                twitter_url:
                  $ref: '#/components/schemas/BusinessTwitter'
                description_short:
                  $ref: '#/components/schemas/BusinessShortDescription'
                description_long:
                  $ref: '#/components/schemas/BusinessLongDescription'
                open_hours:
                  $ref: '#/components/schemas/OpenHours'
                specific_hours:
                  $ref: '#/components/schemas/SpecificHours'
                contacts:
                  $ref: '#/components/schemas/BusinessContacts'
                photos:
                  $ref: '#/components/schemas/Photos'
                national_identification_number:
                  $ref: '#/components/schemas/BusinessNationalIdentificationNumber'
                custom_fields:
                  $ref: '#/components/schemas/CustomFields.Update'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
                  id:
                    $ref: '#/components/schemas/BusinessId'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '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:
                        additionalProperties:
                          type: string
                          default: Operation not allowed
              example:
                errors:
                  authorization:
                    name: edit_not_allowed
                    open_hours: edit_not_allowed
                    photos.primary: edit_not_allowed
                    photos.secondary: edit_not_allowed
        '404':
          $ref: '#/components/responses/404'
    delete:
      tags:
        - Businesses
      operationId: deleteBusiness
      summary: Delete business
      description: |
        This endpoint lets you delete a business. You need to have `WRITE`access on this business.
      parameters:
        - $ref: '#/components/parameters/business_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: Response object
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/BusinessId'
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/additional_data:
    get:
      tags:
        - Businesses
      operationId: getBusinessAdditionalData
      summary: Additional data for your business
      description: |
        This endpoint lets you access to the additional data of business. You need to have `READ`access on this business.
      parameters:
        - $ref: '#/components/parameters/business_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Business additional data
                properties:
                  additionnal_data_1:
                    type: string
                    example: Some data
                  additionnal_data_2:
                    type: number
                    example: 3.1415
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      tags:
        - Businesses
      operationId: setBusinessAdditionalData
      summary: Set additional data for your business
      description: |
        This endpoint lets you set additional data on a business. You need to have `WRITE` access on this business. Additional is a flat object with at most 10 keys.
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: A flat object (ie. without nested value) with at most 10 keys
              properties:
                additionnal_data_1:
                  type: string
                  example: Some data
                additionnal_data_2:
                  type: number
                  example: 3.1415
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/BusinessId'
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/attributes:
    get:
      summary: Google attributes for your business
      description: |
        This endpoint allows you to view the **Google attributes** set for your business.
      operationId: getBusinessAttributes
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
        - $ref: '#/components/parameters/category_name_optional'
        - $ref: '#/components/parameters/country'
          description: |
            Country for which available attributes will be fetched - use ISO 3166 alpha2 code ("FR", "EN", "IT"). Defaults to the country of the business' address.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessAttributesResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      summary: Set Google attributes for your business
      description: |
        This endpoint allows you to set **Google attributes** for your business.
      operationId: postBusinessAttributes
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessPostAttributesBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          description: Wrong request Body
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/BusinessPostWrongAttributesValuesError'
                  - $ref: '#/components/schemas/BusinessPostUnknownAttributesError'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/lodging:
    get:
      summary: Google Lodging attributes for your business
      description: |
        This endpoint allows you to view the **Google Lodging attributes** set for your business.
        The business must be accessible by the authenticated user and the user must have the `business_edit_attributes` permission.
        If the business Google location cannot operate Lodging data, `lodging` is `null`. If the location can operate Lodging data but no Lodging attribute value is set yet, `lodging` is an empty array.
      operationId: getBusinessLodging
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessLodgingResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      summary: Set Google Lodging attributes for your business
      description: |
        This endpoint allows you to partially set or update **Google Lodging attributes** for your business.
        Only lodging attributes included in the request body are updated. Other existing lodging attributes are left unchanged.
        The business Google location must be able to operate Lodging data. For each lodging attribute, provide either a `value` or an `exception`, but not both.
        Attributes returned by `GET /v2/lodging/list` with `read_only: true` cannot be modified. Sending a read-only lodging attribute in this request returns a `400` error.
      operationId: postBusinessLodging
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessPostLodgingBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          description: Wrong request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LodgingBadRequestError'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/more_hours:
    get:
      summary: More hours for your business
      description: |
        This endpoint allows you to view the **More Hours** set for your business.
      operationId: getBusinessMoreHours
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
        - $ref: '#/components/parameters/category_more_hours_business'
        - $ref: '#/components/parameters/country_more_hours_business'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoreHoursBusinessGetResponse'
        '400':
          description: Wrong or missing parameters
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/MoreHoursListInvalidCategoryError'
                  - $ref: '#/components/schemas/MoreHoursListInvalidCountryError'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      summary: Set more hours for your business
      description: |
        This endpoint allows you to set the **More Hours** for your business.
      operationId: postBusinessMoreHours
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoreHoursBusinessPostBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoreHoursBusinessPostResponse'
        '400':
          description: Wrong or missing parameters
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/MoreHoursBusinessPostInvalidCategory'
                  - $ref: '#/components/schemas/MoreHoursBusinessPostOverlappingHours'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/services:
    get:
      summary: Google Services for your business
      description: |
        This endpoint allows you to view the Google Services set for your business.
      operationId: getBusinessServices
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessServicesResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/services/{service_id}:
    delete:
      summary: Delete Google Services for your business
      description: |
        This endpoint allows you to delete the Google Services set for your business.
      operationId: deleteBusinessServices
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
        - $ref: '#/components/parameters/path_service_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/structured_services:
    post:
      summary: Set Google Services for your business
      description: |
        This endpoint allows you to set or update Google Services for your business. When you set a service of type STRUCTURED_SERVICE_ITEM for a category, every category that have this service available will also have it set for them.
      operationId: postBusinessStructuredServices
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StructuredServicesCreateUpdate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessServicesResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/free_form_services:
    post:
      summary: Set custom Google Services for your business
      description: |
        This endpoint allows you to set or update custom Google Services for your business.
      operationId: postBusinessFreeFormServices
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/FreeFormServicesCreate'
                - $ref: '#/components/schemas/FreeFormServicesUpdate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessServicesResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/food_menus:
    get:
      summary: Google Food Menus for your business
      description: |
        This endpoint allows you to view the Google Food Menus set for your business.
      operationId: getBusinessFoodMenus
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessFoodMenus'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    delete:
      summary: Delete Google Food Menus for your business
      description: |
        This endpoint allows you to delete the Google Food Menus for your business.
      operationId: deleteBusinessFoodMenus
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      summary: Set Google Food Menus for your business
      description: |
        This endpoint allows you to set or update Google Food Menus for your business.
      operationId: postBusinessFoodMenus
      tags:
        - Businesses
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessFoodMenus'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessFoodMenus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/place_action_links:
    get:
      tags:
        - Businesses
      summary: Get Place Action Links
      description: |
        Retrieve a list of place action links for a given business_id.  Only the available gmb_id links for the business are returned in the GET request.  Additionally, the business must be connected to a Google location.  For more details, refer to the [Partner Connection](https://app.partoo.co/settings/platforms/connection) page.
      operationId: getPlaceActionLinks
      parameters:
        - $ref: '#/components/parameters/business_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaceActionLinksResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      tags:
        - Businesses
      summary: Set Place Action Links
      description: |
        This endpoint enables you to manage place action links for a given business.  Create, update, or delete place action links by modifying the urls array for each gmb_id.
        - Create: Include a place action link in urls without an id.
        - Update: Include the given place action link in urls with an existing id.
        - Delete: Omit the specific link object from urls or provide an empty urls array to remove all for the gmb_id .
        For the POST method, ensure you send the complete list of desired links to retain or update per gmb_id.
      operationId: postPlaceActionLink
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaceActionLinksPostBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          description: Wrong request Body
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PlaceActionLinksNonExistingGmbIdsError'
                  - $ref: '#/components/schemas/PlaceActionLinksNonUniqueGmbIdsError'
                  - $ref: '#/components/schemas/PlaceActionLinksNonUniqueUrlsError'
                  - $ref: '#/components/schemas/PlaceActionLinksMultiplePreferredUrlsError'
                  - $ref: '#/components/schemas/PlaceActionLinksMissingIdsError'
                  - $ref: '#/components/schemas/PlaceActionLinksNonUniqueIdsError'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/business_fields:
    get:
      deprecated: true
      tags:
        - Business Fields
      operationId: getBusinessFieldsForBusiness
      summary: Business fields configuration for a business
      description: |
        **⚠️ DEPRECATED** This endpoint is deprecated in favor of the new Custom Roles system; for migration information, see the [Custom Roles & Permissions guide](/guides/api/guides/custom-roles-and-permissions).
        This endpoint gives you the list of all the fields that are available for a given Business.     
        It also tells you, for each field, if you have the permission to edit it or not, depending of the permission configured by your ORG_ADMIN and your PROVIDER. 
      parameters:
        - $ref: '#/components/parameters/business_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessFields.SectionArray'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /org/{org_id}/business_fields:
    get:
      deprecated: true
      tags:
        - Business Fields
      operationId: getBusinessFieldsForOrg
      summary: Business fields configuration for an organization
      description: |
        **⚠️ DEPRECATED** This endpoint is deprecated in favor of the new Custom Roles system; for migration information, see the [Custom Roles & Permissions guide](/guides/api/guides/custom-roles-and-permissions).
        This endpoint provides the list of all fields available for a given organization.
        For each field, it also indicates: - Whether you have permission to edit it, depending on the permissions configured by the `PROVIDER`. - Whether you have granted permission to edit it for `BUSINESS_MANAGER` and `GROUP_MANAGER` roles who have access to the organization's businesses.
        Only users with the `ORG_ADMIN` or `PROVIDER` roles can access this information.
      parameters:
        - $ref: '#/components/parameters/path_org_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessFields.SectionArray'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /categories:
    get:
      summary: List Partoo categories
      tags:
        - Categories
      description: |
        This endpoint lets you read and filter through Partoo categories.
      operationId: getCategories
      parameters:
        - $ref: '#/components/parameters/query_category_country'
        - $ref: '#/components/parameters/query_category_lang'
        - $ref: '#/components/parameters/query_category_state'
        - $ref: '#/components/parameters/query_category_block_push_long'
        - $ref: '#/components/parameters/query_category_search_query'
        - $ref: '#/components/parameters/query_category_order_by'
        - $ref: '#/components/parameters/query_category_live__isnull'
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_per_page_1_100'
        - $ref: '#/components/parameters/query_category_with_names_categories'
        - $ref: '#/components/parameters/query_category_with_countries'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      categories:
                        type: array
                        description: List of categories
                        items:
                          $ref: '#/components/schemas/CategorySql'
              examples:
                with default parameters:
                  value:
                    page: 1
                    max_page: 10
                    count: 287
                    categories:
                      - id: 4018
                        gmb_id: gcid:wood_industry
                        name: Industrie du bois
                        state: OK
                        block_push_long_description_on_gmb: false
                        live_id: null
                with_countries=true:
                  value:
                    page: 1
                    max_page: 10
                    count: 287
                    categories:
                      - id: 4018
                        gmb_id: gcid:wood_industry
                        name: Industrie du bois
                        state: OK
                        block_push_long_description_on_gmb: false
                        countries:
                          - RU
                          - FR
                        live_id: null
                with_names=true:
                  value:
                    page: 1
                    max_page: 10
                    count: 287
                    categories:
                      - id: 4018
                        gmb_id: gcid:wood_industry
                        name: Industrie du bois
                        state: OK
                        block_push_long_description_on_gmb: false
                        names:
                          - name: Wood industry
                            lang: de
                          - name: Wood industry
                            lang: es
                        live_id: null
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
  /categories/{category_id}:
    get:
      summary: Category information
      tags:
        - Categories
      description: |
        This endpoint lets you retrieve the data of a specific category.
      operationId: getCategory
      parameters:
        - in: path
          required: true
          name: category_id
          schema:
            $ref: '#/components/schemas/CategoryId'
        - $ref: '#/components/parameters/query_category_lang'
        - $ref: '#/components/parameters/query_category_return_live'
        - $ref: '#/components/parameters/query_category_with_names'
        - $ref: '#/components/parameters/query_category_with_countries'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategorySql'
              examples:
                with default parameters:
                  value:
                    id: 4018
                    gmb_id: gcid:wood_industry
                    name: Industrie du bois
                    state: OK
                    block_push_long_description_on_gmb: false
                    live_id: null
                with_countries=true:
                  value:
                    id: 4018
                    gmb_id: gcid:wood_industry
                    name: Industrie du bois
                    state: OK
                    block_push_long_description_on_gmb: false
                    live_id: null
                    countries:
                      - RU
                      - FR
                with_names=true:
                  value:
                    id: 4018
                    gmb_id: gcid:wood_industry
                    name: Industrie du bois
                    state: OK
                    block_push_long_description_on_gmb: false
                    live_id: null
                    names:
                      - name: Wood industry
                        lang: de
                      - name: Wood industry
                        lang: es
                      - name: Wood industry
                        lang: ar
                      - name: Industrie du bois
                        lang: fr
                      - name: Wood industry
                        lang: en
                      - name: Wood industry
                        lang: it
                      - name: Wood industry
                        lang: pt-BR
                deprecated category with return_live=false:
                  value:
                    id: 7652
                    gmb_id: gcid:bailiff
                    name: ''
                    state: DEPRECATED
                    block_push_long_description_on_gmb: false
                    live_id: gcid:business_to_business_service
                deprecated category with return_live=true:
                  value:
                    id: 6715
                    gmb_id: gcid:business_to_business_service
                    name: Services aux entreprises
                    state: OK
                    block_push_long_description_on_gmb: false
                    live_id: null
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
  /categories/{category_id}/suggestions:
    get:
      summary: Suggested additional categories
      tags:
        - Categories
      description: |
        This endpoint lets you retrieve Partoo's suggestions for additional categories, based on a given category.
      operationId: getSuggestedCategories
      parameters:
        - in: path
          required: true
          name: category_id
          schema:
            $ref: '#/components/schemas/CategoryId'
        - $ref: '#/components/parameters/query_category_lang'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  categories:
                    type: array
                    items:
                      $ref: '#/components/schemas/SuggestedAdditionalCategoriesObject'
                    example:
                      - id: 7984
                        gmb_id: gcid:atm
                        name: ATM
                        state: OK
                        block_push_long_description_on_gmb: false
                        live_id: null
                      - id: 4917
                        gmb_id: gcid:savings_bank
                        name: Savings bank
                        state: OK
                        block_push_long_description_on_gmb: false
                        live_id: null
                      - id: 5742
                        gmb_id: gcid:home_insurance_agency
                        name: Home insurance agency
                        state: OK
                        block_push_long_description_on_gmb: false
                        live_id: null
                      - id: 6678
                        gmb_id: gcid:auto_insurance_agency
                        name: Auto insurance agency
                        state: OK
                        block_push_long_description_on_gmb: false
                        live_id: null
                      - id: 5520
                        gmb_id: gcid:life_insurance_agency
                        name: Life insurance agency
                        state: OK
                        block_push_long_description_on_gmb: false
                        live_id: null
                      - id: 5339
                        gmb_id: gcid:motorcycle_insurance_agency
                        name: Motorcycle insurance agency
                        state: OK
                        block_push_long_description_on_gmb: false
                        live_id: null
                      - id: 7133
                        gmb_id: gcid:insurance_agency
                        name: Insurance agency
                        state: OK
                        block_push_long_description_on_gmb: false
                        live_id: null
                      - id: 7012
                        gmb_id: gcid:investment_service
                        name: Investment service
                        state: OK
                        block_push_long_description_on_gmb: false
                        live_id: null
                      - id: 6026
                        gmb_id: gcid:financial_consultant
                        name: Financial consultant
                        state: OK
                        block_push_long_description_on_gmb: false
                        live_id: null
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
  /connection/generate_token:
    post:
      tags:
        - Connection Tokens
      summary: Generate connection token
      description: |
        This endpoint lets you generate a connection token to authenticate a user without having to indicate its credentials. To be able to generate a connection token for a user, you need to have `WRITE` access on that user and that user cannot have `PROVIDER` role. A connection token is valid only once and has a time to live of maximum one day.
      operationId: generateConnectionToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - user_id
              properties:
                user_id:
                  $ref: '#/components/schemas/UserId'
                ttl:
                  type: integer
                  maximum: 86400
                  default: 86400
                  example: 3600
                  description: Token time to live in seconds. It can be maximum 1 day.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    description: New connection token
                    type: string
                    example: \xaf3e8951c1f4c42f9cc53116b3fc855bd44bce01cf27604b
                  expiration_date:
                    type: string
                    description: Expiration date of the newly created token
                    format: date-time
                    example: '2019-08-01T19:15:54.256000+02:00'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /connection/revoke_token:
    post:
      tags:
        - Connection Tokens
      summary: Revoke connection token
      description: |
        This endpoint lets you revoke a connection token.      To be able to revoke a connection token for a user, you need to have `WRITE` access on that user and the connection token must be valid (not expired, not revoked and not consumed).
      operationId: revokeConnectionToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - user_id
              properties:
                user_id:
                  $ref: '#/components/schemas/UserId'
                token:
                  type: string
                  example: \xaf3e8951c1f4c42f9cc53116b3fc855bd44bce01cf27604b
                  description: Token to revoke
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /connection/check_token:
    get:
      tags:
        - Connection Tokens
      summary: Check connection token
      description: |
        This endpoint lets you check the status of a connection token.       To be able to check a connection token of a user, you need to have `WRITE` access on that user.
      operationId: checkConnectionToken
      parameters:
        - in: query
          name: user_id
          description: User id
          required: true
          schema:
            $ref: '#/components/schemas/UserId'
        - in: query
          name: token
          description: User connection token
          required: true
          schema:
            type: string
            example: \xaf3e8951c1f4c42f9cc53116b3fc855bd44bce01cf27604b
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    description: New connection token
                    type: string
                    example: \xaf3e8951c1f4c42f9cc53116b3fc855bd44bce01cf27604b
                  expiration_date:
                    type: string
                    description: Expiration date of the token
                    format: date-time
                    example: '2019-08-02T19:15:54.256000+02:00'
                  generated_by:
                    type: string
                    description: Id of the user that created the token
                    example: 5309c3a237bbc544d8e26737
                  creation_date:
                    type: string
                    description: Creation date of the token
                    format: date-time
                    example: '2019-08-01T19:15:54.256000+02:00'
                  consumption_date:
                    type: string
                    description: Date the token was consumed, ie. used to log in
                    format: date-time
                    example: '2019-08-01T23:15:54.256000+02:00'
                  status:
                    type: string
                    example: consumed
                    enum:
                      - revoked
                      - consumed
                      - expired
                      - valid
                    description: |
                      Status of the token:

                       - `valid` means it can be use to log in
                       - `consumed` means it has been used to log in
                       - `revoked` means it has been revoked before being used or expired
                       - `expired` means it has expired before being used
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /conversations:
    get:
      tags:
        - Messages
      summary: List conversations
      operationId: listConversations
      description: |
        This endpoint lets you list all the Conversations you have access to.

        You can filter the conversations based on the Organization or the Business
        that they are related to.

        If you want to keep an up-to-date list of ongoing conversations for your
        businesses, we recommend using the [Message Received](/api-reference/webhooks-events/message-created) and
        [Message Deleted](#operation/message_deleted) Webhooks instead of periodically calling this endpoint.

        ⚠️ This endpoint is paginated using cursor pagination. This means that in
        order to get the next page of results, you need to provide the cursor
        returned in the previous call.
      parameters:
        - $ref: '#/components/parameters/PerPage'
        - $ref: '#/components/parameters/Cursor'
        - $ref: '#/components/parameters/query_business__in'
        - $ref: '#/components/parameters/LastMessageDateGte'
        - $ref: '#/components/parameters/LastMessageDateLte'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: Response object
                type: object
                properties:
                  conversations:
                    type: array
                    description: The list of conversations, paginated.
                    items:
                      $ref: '#/components/schemas/Conversation'
                  count:
                    $ref: '#/components/schemas/Count'
                  next_cursor:
                    $ref: '#/components/schemas/NextCursor'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /conversations/{conversation_id}:
    get:
      tags:
        - Messages
      summary: Conversation information
      operationId: getConversation
      description: |
        This endpoint returns all information on a specific Conversation.
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: integer
            description: The id of the conversation to fetch
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - description: The detail of a conversation.
                  - $ref: '#/components/schemas/Conversation'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    post:
      tags:
        - Messages
      summary: Update conversation
      operationId: updateConversationDeprecated
      deprecated: true
      description: |
        Please use POST /conversations/{conversation_id}/read or PATCH /conversations/{conversation_id} instead.

        The only updatable field is "is_read". It will be set for the user
        that performs the request ("is_read" may have different values for different
        users).
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: integer
            description: The id of the conversation to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to update a Post
              type: object
              properties:
                is_read:
                  type: boolean
                  description: |
                    Whether the last message received was read.       
                    This property is scoped to the user who performs the request.     
                    Multiple users can have a different is_read status for the same conversation.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    patch:
      tags:
        - Messages
      summary: Update conversation
      operationId: updateConversation
      description: |
        This endpoint lets you change the status of the conversation to "open"/"closed" or to assign it to a user.
        ⚠️ You can only perform one action at a time: either change the status or assign a user.
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: integer
            description: The id of the conversation to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to update a Conversation
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - open
                    - closed
                  description: |
                    You can close or re-open the conversation.    
                    It will change the "is_solved" boolean of the conversation but it won't change the `is_expired`.      
                    If the conversation is expired we can't re-open it.
                assigned_user_id:
                  type: string
                  enum:
                    - USER_ID
                    - unassigned
                  description: |
                    Only for enterprise organizations.
                    The user will be assigned to the conversation.

                    You can only assign a conversation to a user that:
                    - is active
                    - is of type human (not bot)
                    - has access to the conversation
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /conversations/{conversation_id}/read:
    post:
      tags:
        - Messages
      summary: Read conversation
      operationId: readConversation
      description: |
        This endpoint lets you mark a conversation as read.
        It will be set for the user that performs the request 
        ("is_read" may have different values for different
        users).
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: integer
            description: The id of the conversation to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to mark a Conversation as read
              type: object
              properties:
                is_read:
                  type: boolean
                  description: |
                    Whether the last message received was read.       
                    This property is scoped to the user who performs the request.     
                    Multiple users can have a different "is_read" status for the same conversation.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /messages:
    get:
      tags:
        - Messages
      summary: List messages
      operationId: listMessages
      description: |
        This endpoint lets you retrieve the messages for a specific conversation.

        ⚠️ This endpoint is paginated using cursor pagination. This means that in
        order to get the next page of results, you need to provide the cursor
        returned in the previous call.
      parameters:
        - name: conversation_id
          in: query
          schema:
            type: integer
            description: The id of the conversation
          required: true
        - $ref: '#/components/parameters/PerPage'
        - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: Response object
                type: object
                properties:
                  messages:
                    type: array
                    description: The list of messages for a specific conversation, paginated.
                    items:
                      $ref: '#/components/schemas/Message'
                  count:
                    $ref: '#/components/schemas/Count'
                  next_cursor:
                    $ref: '#/components/schemas/NextCursor'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    post:
      tags:
        - Messages
      summary: Send message
      operationId: postMessage
      description: |
        This endpoint allows you to send a message as a business, in an existing
        conversation.

        The supported content types when sending messages are :
        - Text
        - Image
        - Video
        - Audio
        - Document

        ⚠️ Due to underlying channel limitations, some media content_types are not
        supported on all channels :
        <table>
          <thead>
            <tr>
              <th scope="col">Channel</th>
              <th scope="col">Image</th>
              <th scope="col">Video</th>
              <th scope="col">Audio</th>
              <th scope="col">Document</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <th scope="row">Facebook</th>
              <td>✅</td>
              <td>✅</td>
              <td>✅</td>
              <td>✅</td>
            </tr>
            <tr>
              <th scope="row">Instagram</th>
              <td>✅</td>
              <td>✅</td>
              <td>✅</td>
              <td>❌</td>
            </tr>
            <tr>
              <th scope="row">SMS</th>
              <td>❌</td>
              <td>❌</td>
              <td>❌</td>
              <td>❌</td>
            </tr>
            <tr>
              <th scope="row">Whatsapp</th>
              <td>✅</td>
              <td>✅</td>
              <td>✅</td>
              <td>✅</td>
            </tr>
          </tbody>
        </table>

        When dealing with media messages (`Image`, `Video`, `Audio`, `Document`), there are some
        additionnal file type and file size limitations.
        - Image size should not exceed <strong>5 MB</strong>.
        - Video size should not exceed <strong>16 MB</strong>.
        - Audio size should not exceed <strong>16 MB</strong>.
        - Document size should not exceed <strong>100 MB</strong>.

        For optimal support, you should target the following file types :
        - Image : `jpeg`, `png`.
        - Video : `mp4`.
        - Audio : `aac`, `mp4`.
        - Document : `xls`, `xlsx`, `docx`, `pdf`, `ppt`, `pptx`.     

        A successful HTTP response to this endpoint (code 200) does not necessarily mean that the
        message has been correctly delivered to the consumer, only that it has been created on
        Partoo.
        To ensure that the message has been delivered successfully, we recommend subscribing to the
        [Message Updated](/api-reference/webhooks-events/message-updated) Webhook, and checking that the `status` field
        of the message has switched to `Success`.

        If the answer has failed to be sent, you can send it again by using the
        [/retry endpoint](/api-reference/messages/retry-send-message)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/PostTextMessage'
                - $ref: '#/components/schemas/PostImageUrlMessage'
                - $ref: '#/components/schemas/PostAudioMessage'
                - $ref: '#/components/schemas/PostVideoMessage'
                - $ref: '#/components/schemas/PostDocumentMessage'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PostImageMessage'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  message_id:
                    type: integer
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /messages/{message_id}/retry:
    post:
      operationId: retrySendMessage
      tags:
        - Messages
      summary: Retry send message
      description: |
        This endpoint let you retry sending a message that has failed to be sent.
      parameters:
        - name: message_id
          in: path
          schema:
            type: integer
            description: The id of the message to send
          required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
  /custom-channels/{channel_id}/messages:
    post:
      tags:
        - Custom Channels
      summary: Ingest message
      operationId: customChannelMessages
      description: |
        This endpoint lets you ingest messages in conversations that use custom channels. When called, it creates a new message in the specified conversation. If the conversation does not exist, the endpoint will automatically create the conversation before adding the message.

        You must use an API key with `ORG_ADMIN` or `PROVIDER` rights for this endpoint.

        ⚠️ A `200 OK` response does not guarantee that the message was successfully created. 
        It only means the request was received and accepted for processing. ⚠️
      parameters:
        - name: channel_id
          in: path
          required: true
          schema:
            type: string
            description: The id of the custom channel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to ingest a new message in a conversation
              type: object
              required:
                - business_id
                - external_conversation_id
                - external_message_id
                - content
                - sender_type
              properties:
                business_id:
                  type: string
                  description: The id of the business.
                external_conversation_id:
                  type: string
                  description: The unique id of the conversation in your system. Messages with the same `external_conversation_id` & `channel_id` will be grouped within the same Partoo Conversation.
                external_message_id:
                  type: string
                  description: The unique id of the message in your system. Messages with the same `external_message_id` & `channel_id` will be considered as duplicates and will be ignored.
                content:
                  type: string
                  description: The message content.
                sender_type:
                  type: string
                  enum:
                    - User
                    - Consumer
                consumer_name:
                  type:
                    - string
                    - 'null'
                  default: 'null'
                  description: Display name of the consumer. This property is only used at the creation of the conversation.
                consumer_image:
                  type:
                    - string
                    - 'null'
                  default: 'null'
                  description: Profile image URL of the consumer. This property is only used at the creation of the conversation.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '403':
          $ref: '#/components/responses/403'
  /messaging/templates:
    get:
      operationId: listMessageTemplates
      tags:
        - Message Reply Templates
      summary: List message templates
      description: |
        This endpoint retrieves the list of message templates for the current user's organization.
      responses:
        '200':
          description: A list of message templates
          content:
            application/json:
              schema:
                type: array
                description: The list of message reply templates.
                items:
                  $ref: '#/components/schemas/MessageReplyTemplate'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    post:
      operationId: createMessageTemplates
      tags:
        - Message Reply Templates
      summary: Create message template
      description: |
        This endpoint lets you create a new message template.

        ⚠️ The content should be a valid __stringified JSON__ object. It has to include both the `"text"` key with the message content
        and the pair `"_version": "0.1"`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageTemplateCreateRequest'
      responses:
        '200':
          description: The message template created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageReplyTemplate'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /messaging/templates/{template_id}:
    put:
      operationId: updateTemplate
      tags:
        - Message Reply Templates
      summary: Update message template
      description: |
        This endpoint allows updating an existing message template by its ID.
      parameters:
        - $ref: '#/components/parameters/path_template_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageTemplateUpdateRequest'
      responses:
        '200':
          description: The message template created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageReplyTemplate'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    delete:
      operationId: deleteMessageTemplate
      tags:
        - Message Reply Templates
      summary: Delete message template
      description: |
        This endpoint lets you delete a message template given its ID.
      parameters:
        - $ref: '#/components/parameters/path_template_id'
      responses:
        '200':
          description: Template deleted successfully
          content:
            application/json:
              schema:
                type: boolean
                example: true
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /messaging/settings:
    get:
      operationId: settings
      tags:
        - Messaging Settings
      summary: List messaging settings
      description: |
        This endpoint lets you list all the Messaging Settings you have access to.

        You can filter the Messaging Settings based on the Organization or the
        Business that they are related to.
      parameters:
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PerPage'
        - $ref: '#/components/parameters/query_business__in'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: Response object
                type: object
                properties:
                  settings:
                    type: array
                    description: The list of Messaging Settings, paginated.
                    items:
                      $ref: '#/components/schemas/MessagingSetting'
                  page:
                    $ref: '#/components/schemas/Page'
                  count:
                    $ref: '#/components/schemas/Count'
                  max_page:
                    $ref: '#/components/schemas/MaxPage'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /messaging/settings/{setting_id}:
    post:
      tags:
        - Messaging Settings
      summary: Update messaging settings
      operationId: updateMessagingSettings
      description: |
        This endpoint lets you update a specific Messaging Settings.
      parameters:
        - name: setting_id
          in: path
          required: true
          schema:
            type: integer
            description: The id of the Messaging Settings to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to update a Post
              type: object
              properties:
                welcome_message:
                  $ref: '#/components/schemas/MessagingSettingWelcomeMessage'
                offline_message:
                  $ref: '#/components/schemas/MessagingSettingOfflineMessage'
                uses_business_hours:
                  $ref: '#/components/schemas/MessagingSettingUsesBusinessHours'
                custom_chat_hours:
                  $ref: '#/components/schemas/ChatHours'
                is_launched:
                  $ref: '#/components/schemas/MessagingSettingIsLaunched'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessagingSetting'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /custom_fields:
    get:
      tags:
        - Custom Fields
      summary: Get custom fields
      description: |
        This endpoint enables you to get custom fields for your organization, including their names, descriptions, types, constraints, section associations, and slugs.
      operationId: getCustomFields
      parameters:
        - $ref: '#/components/parameters/query_filter_by_org_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  custom_fields:
                    type: array
                    items:
                      $ref: '#/components/schemas/CustomFieldTypeGet'
                example:
                  custom_fields:
                    - id: 1
                      name: Is Active
                      description: Whether the business is currently active
                      type: BOOLEAN
                      order: 1
                      section_id: null
                      section_name: null
                      slug: is-active
                    - id: 2
                      name: Description
                      description: Business description text
                      type: TEXT
                      max_len: 500
                      order: 2
                      section_id: 1
                      section_name: Section 1
                      slug: description
                    - id: 3
                      name: Employee Count
                      description: Number of employees
                      type: INTEGER
                      min: 0
                      max: 10000
                      order: 3
                      section_id: 1
                      section_name: Section 1
                      slug: employee-count
                    - id: 4
                      name: Rating
                      description: Business rating score
                      type: FLOAT
                      min: 0
                      max: 5
                      order: 4
                      section_id: 2
                      section_name: Section 2
                      slug: rating
                    - id: 5
                      name: Category
                      description: Business category type
                      type: SINGLE_SELECT
                      possible_values:
                        - Premium
                        - Standard
                        - Basic
                      order: 5
                      section_id: 2
                      section_name: Section 2
                      slug: category
                    - id: 6
                      name: Tags
                      description: Business tags for classification
                      type: MULTIPLE_SELECT
                      possible_values:
                        - Featured
                        - New
                        - Sale
                        - Popular
                      max_selected_values: 3
                      order: 6
                      section_id: 3
                      section_name: Section 3
                      slug: tags
                    - id: 7
                      name: Product Images
                      description: Product image selections
                      type: MULTIPLE_SELECT_IMAGE
                      possible_values:
                        - image1
                        - image2
                        - image3
                      possible_images_urls:
                        - https://example.com/img1.jpg
                        - https://example.com/img2.jpg
                        - https://example.com/img3.jpg
                      possible_images_labels:
                        - Image 1
                        - Image 2
                        - Image 3
                      max_selected_values: 2
                      order: 7
                      section_id: 3
                      section_name: Section 3
                      slug: product-images
                    - id: 8
                      name: Gallery
                      description: Image gallery uploader
                      type: IMAGES_UPLOADER
                      text_fields:
                        - text_field: Caption
                          max_length: 100
                        - text_field: Alt Text
                          max_length: 50
                      order: 8
                      section_id: 4
                      section_name: Section 4
                      slug: gallery
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      tags:
        - Custom Fields
      summary: Create custom fields
      description: |
        This endpoint enables you to create custom fields for your organization. You can specify the field name, description, slug, type-specific constraints, order, and optionally assign it to a section. `PROVIDER` users can pass `org_id` to create custom fields for a managed organization.
      operationId: postCreateCustomFields
      parameters:
        - $ref: '#/components/parameters/query_org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - title: Boolean Field
                  $ref: '#/components/schemas/CustomFieldBool'
                - title: Text Field
                  $ref: '#/components/schemas/CustomFieldText'
                - title: Integer Field
                  $ref: '#/components/schemas/CustomFieldInteger'
                - title: Float Field
                  $ref: '#/components/schemas/CustomFieldFloat'
                - title: Single Select Field
                  $ref: '#/components/schemas/CustomFieldSingleSelect'
                - title: Multiple Select Field
                  $ref: '#/components/schemas/CustomFieldMultipleSelect'
                - title: Multiple Select Image Field
                  $ref: '#/components/schemas/CustomFieldMultipleSelectImage'
                - title: Images Uploader Field
                  $ref: '#/components/schemas/CustomFieldImagesUploader'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  custom_field_id:
                    $ref: '#/components/schemas/CustomFieldId'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /custom_fields/{custom_field_id}:
    put:
      tags:
        - Custom Fields
      summary: Update custom field
      description: |
        This endpoint enables you to update a specific custom field of your organization by specifying its ID.
        You can update the **name**, **description**, **slug**, **constraints**, and **section assignment** of the custom field. However, the **type** of a custom field cannot be modified. Use the `force` parameter to apply changes that might conflict with existing business data. `PROVIDER` users can pass `org_id` to update a custom field for a managed organization.
      operationId: putUpdateCustomFields
      parameters:
        - $ref: '#/components/parameters/custom_field_id'
        - $ref: '#/components/parameters/query_org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - title: Boolean Field
                  $ref: '#/components/schemas/CustomFieldEditTypeBool'
                - title: Text Field
                  $ref: '#/components/schemas/CustomFieldEditTypeText'
                - title: Integer Field
                  $ref: '#/components/schemas/CustomFieldEditTypeInteger'
                - title: Float Field
                  $ref: '#/components/schemas/CustomFieldEditTypeFloat'
                - title: Single Select Field
                  $ref: '#/components/schemas/CustomFieldTypeEditSingleSelect'
                - title: Multiple Select Field
                  $ref: '#/components/schemas/CustomFieldTypeEditMultipleSelect'
                - title: Multiple Select Image Field
                  $ref: '#/components/schemas/CustomFieldTypeEditMultipleSelectImage'
                - title: Images Uploader Field
                  $ref: '#/components/schemas/CustomFieldTypeEditImagesUploader'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          description: New constraints are not respected for some businesses
          content:
            application/json:
              schema:
                anyOf:
                  - title: Text Field Error
                    type: object
                    properties:
                      errors:
                        type: object
                        properties:
                          json:
                            type: object
                            properties:
                              businesses_count:
                                type: integer
                                description: Number of businesses in error
                                example: 2
                              description:
                                type: string
                                description: Error description
                                example: At least one business does not respect the new constraints, please send forced_update=true to force update.
                              constraints:
                                type: array
                                description: Constraints in error
                                items:
                                  type: string
                                example:
                                  - max_len
                  - title: Number Field Error
                    type: object
                    properties:
                      errors:
                        type: object
                        properties:
                          json:
                            type: object
                            properties:
                              businesses_count:
                                type: integer
                                description: Number of businesses in error
                                example: 2
                              description:
                                type: string
                                description: Error description
                                example: At least one business does not respect the new constraints, please send forced_update=true to force update.
                              constraints:
                                type: array
                                description: Constraints in error
                                items:
                                  type: string
                                example:
                                  - min
                                  - max
                  - title: Select Field Error
                    type: object
                    properties:
                      errors:
                        type: object
                        properties:
                          json:
                            type: object
                            properties:
                              businesses_count:
                                type: integer
                                description: Number of businesses in error
                                example: 2
                              description:
                                type: string
                                description: Error description
                                example: At least one business had one of these values, please send forced_update=true to force update.
                              options:
                                type: array
                                description: Options in error
                                items:
                                  type: string
                                example:
                                  - free parking
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    delete:
      tags:
        - Custom Fields
      summary: Delete custom field
      description: |
        This endpoint enables you to delete a specific custom field of your organization by specifying its ID. Use the `force` parameter to delete fields that have values assigned to businesses. `PROVIDER` users can pass `org_id` to delete a custom field for a managed organization.
      operationId: deleteCustomFields
      parameters:
        - $ref: '#/components/parameters/custom_field_id'
        - $ref: '#/components/parameters/query_org_id'
        - name: force
          in: query
          required: false
          schema:
            type: boolean
          description: If true, destructive modification will be performed and businesses values will be deleted accordingly
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          description: Custom field value is defined for a business
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      json:
                        type: object
                        properties:
                          businesses_count:
                            type: integer
                            description: Number of businesses in error
                            example: 2
                          description:
                            type: string
                            description: Error description
                            example: At least one business has this custom field, please send forced_update=true to force update.
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /custom_fields/order:
    post:
      tags:
        - Custom Fields
      summary: Order custom fields
      description: |
        This endpoint enables you to reorganize the order of custom fields and custom field sections within your organization. You can also move custom fields between sections by specifying a different section_id. `PROVIDER` users can pass `org_id` to reorder custom fields for a managed organization.
      operationId: postOrderCustomFields
      parameters:
        - $ref: '#/components/parameters/query_org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request object to reorder custom fields and optionally sections
              type: object
              required:
                - orders
              properties:
                orders:
                  $ref: '#/components/schemas/CustomFieldOrders'
                section_orders:
                  $ref: '#/components/schemas/CustomFieldSectionOrders'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /custom_fields/section:
    get:
      tags:
        - Custom Fields Section
      summary: Get custom field sections
      description: |
        Retrieve list of custom fields sections for a given organization, including their names, descriptions, slugs, and ordering information.
      operationId: getCustomFieldsSection
      parameters:
        - $ref: '#/components/parameters/query_filter_by_org_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  sections:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          $ref: '#/components/schemas/CustomFieldSectionId'
                        name:
                          $ref: '#/components/schemas/CustomFieldSectionName'
                        description:
                          $ref: '#/components/schemas/CustomFieldSectionDescription'
                        order:
                          $ref: '#/components/schemas/CustomFieldSectionOrder'
                        slug:
                          $ref: '#/components/schemas/CustomFieldSectionSlug'
                    example:
                      - id: 1
                        name: Section A
                        description: Primary information section
                        order: 3
                        slug: section-a
                      - id: 2
                        name: Section B
                        description: null
                        order: 4
                        slug: section-b
                      - id: 3
                        name: Section C
                        description: Additional details section
                        order: 5
                        slug: null
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      tags:
        - Custom Fields Section
      summary: Create custom field sections
      description: |
        This endpoint enables you to create custom field sections for your organization. You can specify a name, optional description, slug, and order. If no order is provided, it will be set to max(all current sections orders) + 1. `PROVIDER` users can pass `org_id` to create custom field sections for a managed organization.
      operationId: postCustomFieldsSection
      parameters:
        - $ref: '#/components/parameters/query_org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  $ref: '#/components/schemas/CustomFieldSectionName'
                description:
                  $ref: '#/components/schemas/CustomFieldSectionDescription'
                slug:
                  $ref: '#/components/schemas/CustomFieldSectionSlug'
                order:
                  $ref: '#/components/schemas/CustomFieldSectionOrder'
              example:
                name: Primary Information
                description: Contains essential business details
                order: 1
                slug: primary-info
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  section_id:
                    $ref: '#/components/schemas/CustomFieldSectionId'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /custom_fields/section/{section_id}:
    put:
      tags:
        - Custom Fields Section
      summary: Update custom field sections
      description: |
        This endpoint enables you to update a specific custom field section of their organization. You can update the name, description, and slug of the section. `PROVIDER` users can pass `org_id` to update custom field sections for a managed organization.
      operationId: putCustomFieldsSection
      parameters:
        - $ref: '#/components/parameters/section_id'
        - $ref: '#/components/parameters/query_org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  $ref: '#/components/schemas/CustomFieldSectionName'
                description:
                  $ref: '#/components/schemas/CustomFieldSectionDescription'
                slug:
                  $ref: '#/components/schemas/CustomFieldSectionSlug'
              example:
                name: Updated Section Name
                description: Updated description for the section
                slug: updated-section-slug
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    delete:
      tags:
        - Custom Fields Section
      summary: Delete custom field section
      description: |
        This endpoint enables you to delete a specific custom field section of your organization. All custom fields in the section will be moved to no section (section_id = null). `PROVIDER` users can pass `org_id` to delete custom field sections for a managed organization.
      operationId: deleteCustomFieldsSection
      parameters:
        - $ref: '#/components/parameters/section_id'
        - $ref: '#/components/parameters/query_org_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /custom_role:
    get:
      operationId: customRoles
      tags:
        - Custom Roles
      summary: List Custom Roles
      description: |
        Get all Custom Roles for your organization.
      parameters:
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_per_page_1_100'
        - $ref: '#/components/parameters/query_org_id'
        - name: only_available_roles
          in: query
          description: |
            If `true`: only return roles for which the requesting user has *all* required permissions (Custom Fields permissions are also taken into account).
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRoleGetResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    post:
      tags:
        - Custom Roles
      summary: Create Custom Role
      description: |
        This endpoint enables you to create custom roles for organizations within your scope.
      operationId: createCustomRole
      parameters:
        - $ref: '#/components/parameters/query_org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomRoleCreationBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRoleCreationResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /custom_role/{custom_role_api_id}:
    get:
      tags:
        - Custom Roles
      summary: Get Custom Role
      description: |
        Get the details of a specific Custom Role.
      operationId: getCustomRoleDetail
      parameters:
        - $ref: '#/components/parameters/query_org_id'
        - $ref: '#/components/parameters/path_custom_role_api_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRoleDetail'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      tags:
        - Custom Roles
      summary: Update Custom Role
      description: |
        Update a Custom Role, allowing you to set the `name`, `api_id`, `description`, and `permissions` of an already existing Custom Role.
      operationId: updateCustomRole
      parameters:
        - $ref: '#/components/parameters/query_org_id'
        - $ref: '#/components/parameters/path_custom_role_api_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomRoleUpdateBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRoleUpdateResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    delete:
      tags:
        - Custom Roles
      summary: Delete Custom Role
      description: |
        This endpoint enables you to delete custom roles for organizations within your scope.
      operationId: deleteCustomRole
      parameters:
        - $ref: '#/components/parameters/query_org_id'
        - $ref: '#/components/parameters/path_custom_role_api_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRoleDeletionResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /custom_role/duplicate:
    post:
      tags:
        - Custom Roles
      summary: Duplicate Custom Role
      description: |
        Duplicate a Custom Role.
        A new Custom Role with (almost) the same `name` and `api_id`, and identical `description` and `permissions` will be created in your organization.

        The new `name` will be the same as the original role, with an added suffix
          - `"My Custom Role"` → `"My Custom Role - 2"`

        And similar for the `api_id`:
          - `"my_custom_role"` → `"my_custom_role_2"`
      operationId: duplicateCustomRole
      parameters:
        - $ref: '#/components/parameters/query_org_id'
        - $ref: '#/components/parameters/path_custom_role_api_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRoleDuplicateResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /permissions:
    get:
      tags:
        - Custom Roles
      summary: Get Permissions
      description: |
        This endpoint will give you all of the permissions available to your organization. The permissions are categorized by section, and by subsection. The permissions available to your organization are based on the plans your organization subscribes to; and thus the features included in those plans.
      operationId: getPermissions
      parameters:
        - $ref: '#/components/parameters/query_org_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permissions.GetSuccessResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /org/{org_id}/switch_to_custom_roles:
    get:
      summary: Get Custom Roles switch status
      description: |
        Get the current status of the organization's switch to Custom Roles.
        This endpoint returns information about whether the organization has switched to Custom Roles and whether they are allowed to switch.
      operationId: getSwitchToCustomRoles
      tags:
        - Custom Roles
      parameters:
        - $ref: '#/components/parameters/path_org_id'
      responses:
        '200':
          description: Successfully retrieved switch status
          content:
            application/json:
              schema:
                type: object
                properties:
                  org_id:
                    $ref: '#/components/schemas/OrgId'
                  has_switched:
                    type: boolean
                    description: Whether the organization has switched to Custom Roles
                    example: true
                  can_switch:
                    type: boolean
                    description: Whether the organization is allowed to switch to Custom Roles
                    example: false
                required:
                  - org_id
                  - has_switched
                  - can_switch
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      summary: Switch to Custom Roles
      description: |
        Update the organization's Custom Roles switch status.
        This endpoint allows you to enable or disable the Custom Roles feature for the organization, provided the organization is allowed to make this change.
      operationId: switchCustomRoles
      tags:
        - Custom Roles
      parameters:
        - $ref: '#/components/parameters/path_org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - switch_to_custom_roles
              properties:
                switch_to_custom_roles:
                  type: boolean
                  description: Whether to switch to Custom Roles (true) or revert to standard roles (false)
                  example: true
      responses:
        '200':
          description: Successfully updated Custom Roles switch status
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Request status
                    example: success
                  org_id:
                    type: integer
                    description: |
                      Unique identifier for the organization you want to switch. Only `PROVIDER` users can use this field. If you are not a `PROVIDER`, this will default to the ID of your organization.
                    example: 123
                required:
                  - status
                  - org_id
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          description: |
            You are not allowed to switch your organization to the new Custom Roles system.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: You are not allowed to switch
        '404':
          $ref: '#/components/responses/404'
  /attributes/list:
    get:
      summary: List Google Attributes
      description: |
        Get all Google Attributes available for a Category in a given language.  
        ⚠️ **What are Google Attributes?**   Google Attributes are highly visible statements about your business that appear on your Google listing.
        They indicate things like Payment Options, Amenities, Accessibility and Highlights.   
        Does a business provide parking? Does it have a fireplace? Can customers pay with a debit card?   
        To recover attributes values set for a business, [see get attributes business endpoints](/api-reference/businesses/google-attributes-for-your-business).    
        To handle attributes values for businesses, [see set attributes business endpoints](/api-reference/businesses/set-google-attributes-for-your-business).   
        This endpoint allows you to view the **Google** attributes available for a given Category.   
      operationId: getAttributes
      tags:
        - Google
      parameters:
        - $ref: '#/components/parameters/category_name'
        - $ref: '#/components/parameters/country'
        - $ref: '#/components/parameters/lang'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttributesGroupResponse'
        '400':
          description: Wrong or missing parameters
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/AttributesMissingParametersError'
                  - $ref: '#/components/schemas/AttributesWrongCategoryError'
                  - $ref: '#/components/schemas/AttributesWrongLangError'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /more_hours/list:
    get:
      summary: List Google more hours
      description: |
        ⚠️ **What are Google More Hours?**   More Hours is a feature in *Google* that allows the business owner to display hours for specific services available.
        Examples of such services include opening hours for the kitchen, for breakfast, for happy hour, etc.
        Notice that the available More Hour IDs vary between both business categories and countries.   For example, a restaurant will have different More Hour IDs available than a bank, and a restaurant in France will have different IDs available than a restaurant in the USA.
        To recover More Hours set for a business, see [Get More Hours for your Business endpoints](/api-reference/businesses/more-hours-for-your-business).
        To handle More Hours for businesses, see [Update More Hours for your Business endpoints](/api-reference/businesses/set-more-hours-for-your-business).
        This endpoint allows you to get all the different **More Hour IDs** available for a given business category, including their translated names for the given language.
      operationId: moreHours
      tags:
        - Google
      parameters:
        - $ref: '#/components/parameters/category_more_hours_list'
        - $ref: '#/components/parameters/country_more_hours_list'
        - $ref: '#/components/parameters/lang_more_hours'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoreHoursListResponse'
        '400':
          description: Wrong or missing parameters
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/MoreHoursListMissingParametersError'
                  - $ref: '#/components/schemas/MoreHoursListInvalidCategoryError'
                  - $ref: '#/components/schemas/MoreHoursListInvalidCountryError'
                  - $ref: '#/components/schemas/AttributesWrongLangError'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /lodging/list:
    get:
      summary: List Google Lodging attributes
      description: |
        Get all Google Lodging attributes available in Partoo.
        Google Lodging attributes describe hotel-specific information such as property features, services, policies, amenities, and guest unit details.
        The response is grouped by lodging section. Each attribute definition gives the Google attribute id, its type, display order, available enum options when relevant, whether an exception code can be used instead of a value, and whether the attribute is read-only.
        Attributes marked with `read_only: true` are returned for display purposes only and cannot be modified through `POST /v2/business/{business_id}/lodging`.
      operationId: getLodgingList
      tags:
        - Google
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LodgingListResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /services/suggestions:
    get:
      summary: List Google Services
      description: |
        Get all Google Services available for your business categories.     
        ⚠️ **What are Google Services?**        Google Services are highly visible statements about your business that appear on your Google listing.     
        They indicate the different services available for your business, to which you can also add a price and a description.      
        For example, the category `gcid:bakery` has several suggested services available, such as catering or delivery.     
        Not satisfied with those? You can add your very own custom services and link them to the category of your business of your choice!    
        To recover service values set for a business, see [get services business endpoints](/api-reference/businesses/google-services-for-your-business).      
        To handle service values for businesses, see [set structured services business endpoints](/api-reference/businesses/set-google-attributes-for-your-business).     
        To handle custom service values for businesses, see [set free form services business endpoints](/api-reference/businesses/set-custom-google-services-for-your-business).     
        This endpoint allows you to view the Google Services available for your business.     
        The services available depend on the categories of the business, not only the main one.     
      operationId: getServicesSuggestions
      tags:
        - Google
      parameters:
        - $ref: '#/components/parameters/query_business__in'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServicesSuggestionResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /google-oauth-accounts/locations/{google_location_id}:
    get:
      summary: Details on a specific Google Location
      description: |
        Returns a Google location object that corresponds to the given google_location_id. The google_location_id is a unique identifier on Partoo for each location. This endpoint requires authentication, and only authorized users with the appropriate permissions can access it.
      operationId: getGoogleLocation
      tags:
        - Google
      parameters:
        - $ref: '#/components/parameters/google_location_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleLocation'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /google-oauth-accounts/locations/search:
    get:
      summary: Search for Google locations
      description: |
        Performs a search for Google locations based on the provided query parameters. This endpoint requires authentication, and only authorized users with the appropriate permissions can access it.
      operationId: searchGoogleLocations
      tags:
        - Google
      parameters:
        - name: query
          in: query
          description: |
            The search query string. It searches on the following fields of the Google location: 
              - `locality` (e.g., https://api.partoo.co/v2/google-oauth-accounts/locations/search?query=Paris)
              - `postal_code` (e.g., https://api.partoo.co/v2/google-oauth-accounts/locations/search?query=75018)
              - `location_name` (e.g., https://api.partoo.co/v2/google-oauth-accounts/locations/search?query=Annie%20-%20HQ)
              - `address_details` (e.g., https://api.partoo.co/v2/google-oauth-accounts/locations/search?query=130%20rue%20mont%20cenis)
              - `store_code` (e.g., https://api.partoo.co/v2/google-oauth-accounts/locations/search?query=annie-hq)
          required: false
          schema:
            type: string
        - name: google_location_id
          in: query
          description: The ID of the Google location stored in Partoo.
          required: false
          schema:
            type: string
        - name: oauth_account_id
          in: query
          description: The ID of the OAuth account stored in Partoo.
          required: false
          schema:
            type: string
        - name: not_connected_only
          in: query
          description: Filter for locations not connected to any business.
          required: false
          schema:
            type: boolean
        - name: verification_status
          in: query
          description: Filter by verification status.
          required: false
          schema:
            type: string
        - name: page
          in: query
          description: The page number for pagination.
          required: false
          schema:
            type: integer
            default: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleLocations'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /verifications/google-locations/{google_location_id}/options:
    get:
      summary: Fetch Google Location Verification Options
      description: |
        This endpoint retrieves verification options for a specific Google location identified by `google_location_id`. It  requires authentication and authorization to access. The user must have at least the role of a `BUSINESS_MANAGER` to use this endpoint.

        Note that the response can return an empty options list, this can mean two things:
           - There are really no verification options available for this location.
           - Video verification is possible but not implemented through the API. In this case, you should ask the user to manually verify.
      operationId: fetchGoogleLocationVerificationOptions
      tags:
        - Google
      parameters:
        - $ref: '#/components/parameters/google_location_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  status:
                    description: The status of the response `success`, `warning` or `error`.
                    type: string
                    example: success
                  options:
                    description: List of available verification options returned.
                    type: array
                    items:
                      type: object
                      properties:
                        method:
                          type: string
                          description: The method of verification, can be `PHONE_CALL`, `SMS`, `EMAIL` or `ADDRESS`.
                          example: PHONE_CALL
                        phone_number:
                          type: string
                          description: |
                            *OPTIONAL* Depending on the status: 
                              - `AVAILABLE`: The phone number to which the code will be sent, either through an automated call or a text message.
                              - `PENDING`: The phone number where the code has been sent in case of `PENDING` status.
                            Note that this attribute is only returned for `PHONE_CALL` and `SMS` methods.
                          example: '+33187662490'
                        email:
                          type: string
                          description: |
                            *OPTIONAL* The email address to which the code will be or has been sent. Note that this attribute is only returned for `EMAIL` method.
                          example: email.api@partoo.fr
                        full_name:
                          type: string
                          description: |
                            **OPTIONAL and only with `PENDING` status:** The full name to which the postcard has been sent to. Note that this attribute is only returned for `ADDRESS` method.
                          example: John Doe
                        full_address:
                          type: string
                          description: |
                            *OPTIONAL* The full address to which the postcard will be or has been sent to. Note that this attribute is only returned for `ADDRESS` method.
                          example: 190 Rue Championnet, 75018 Paris
                        expected_delivery_days:
                          type: integer
                          description: |
                            *OPTIONAL* The expected of business days it will take for the postcard to be delivered. Note that this attribute is only returned for `ADDRESS` method.
                          example: 2
                        status:
                          type: string
                          description: The status of the verification option, can be `PENDING` or `AVAILABLE`.
                          example: AVAILABLE
                  message:
                    type: string
                    description: |
                      *OPTIONAL* Details of the message. Can be one of the following:
                        - `listing_verified`: The location is already verified (returned with a `success` status).
                        - `listing_in_review`: The location is already in review for verification (returned with a `warning` status).
                        - `listing_disabled`: The location is disabled (returned with a `error` status).
                        - `listing_suspended`: The location is suspended (returned with a `error` status).
                        - `listing_status_not_found`: The location is not found (returned with a `error` status).
                    example: null
                    enum:
                      - listing_verified
                      - listing_in_review
                      - listing_disabled
                      - listing_suspended
                      - listing_status_not_found
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /verifications/google-locations/{google_location_id}/start:
    post:
      summary: Start Google Location Verification Process
      description: |
        This endpoint initiates the verification process for a specific Google location identified by `google_location_id`. It requires authentication and authorization to access. The user must have at least the role of a `BUSINESS_MANAGER` to use this endpoint.

        The endpoint ensures that the chosen verification method has all the necessary information for the specific method chosen. If any required information is missing, it raises an error with the associated error message.
      operationId: startGoogleLocationVerification
      tags:
        - Google
      parameters:
        - $ref: '#/components/parameters/google_location_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  enum:
                    - SMS
                    - PHONE_CALL
                    - EMAIL
                    - ADDRESS
                phone_number:
                  type: string
                  description: |
                    **REQUIRED** for `SMS` and `PHONE_CALL` methods. The phone number to which the code will be send.
                  example: '+33187662490'
                email:
                  type: string
                  description: |
                    **REQUIRED** for `EMAIL` method. The email address to which the code will be send.
                  example: email.api@partoo.fr
                full_name:
                  type: string
                  description: |
                    **REQUIRED** for `ADDRESS` method. The full name to which the postcard will be send.
                  example: John Doe
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: The status of the response `success` or `error`.
                    example: success
                  message:
                    type: string
                    example: null
                    description: |
                      *OPTIONAL* Details of the error encountered. Can be one of the following:
                        - `start_no_verification_found`: No verification request has been started.
                        - `start_error`: An error occured during the start of the verification process.
                    enum:
                      - start_no_verification_found
                      - start_error
        '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
                        properties:
                          method:
                            type: string
                            description: |
                              Details of the error encountered. Can be one of the following:
                                - `sms_phone_call_method_without_phone_number`: The phone number is required for `SMS` and `PHONE_CALL` methods.
                                - `email_method_without_email`: The email address is required for `EMAIL` method.
                                - `address_method_without_full_name`: The full name is required for `ADDRESS` method.
                                - `not_supported`: The method is not supported.
                            example: sms_phone_call_method_without_phone_number
                            enum:
                              - sms_phone_call_method_without_phone_number
                              - email_method_without_email
                              - address_method_without_full_name
                              - not_supported
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /verifications/google-locations/{google_location_id}/complete:
    post:
      summary: Complete Google Location Verification Process
      description: |
        This endpoint completes the Google location verification process identified by `google_location_id`. It requires  authentication and authorization with at least the role of `BUSINESS_MANAGER`.

        If the verification process is not in the `PENDING` status, or if the PIN code is invalid, an error response will be returned. If the completion is successful, the verification status of the location will be updated.
      operationId: completeGoogleLocationVerification
      tags:
        - Google
      parameters:
        - $ref: '#/components/parameters/google_location_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  enum:
                    - PHONE_CALL
                    - SMS
                    - EMAIL
                    - ADDRESS
                pin_code:
                  type: string
                  description: The PIN code provided by the user during the verification process.
                  example: '1234'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: The status of the response `success` or `error`.
                    example: success
                  message:
                    type: string
                    example: null
                    description: |
                      Details of the message. Can be one of the following:
                        - `complete_success`: The verification process has been completed successfully (returned with a `success` status).
                        - `complete_in_review`: The verification process has been completed successfully but the verification is still in review (returned with a `success` status).
                        - `complete_only_pending`: The verification process can be completed only on a `PENDING` verification (returned with a `error` status).
                        - `complete_invalid_pin`: The PIN code provided is invalid (returned with a `error` status).
                        - `complete_error`: An error occurred during the completion of the verification process (returned with a `error` status).
                    enum:
                      - complete_success
                      - complete_in_review
                      - complete_only_pending
                      - complete_invalid_pin
                      - complete_error
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /sections:
    post:
      tags:
        - Groups and Sections
      operationId: createGroupSection
      summary: Create Section
      description: |
        Create a new section.     
        This endpoint endpoint let's you create a new section. Only Group Managers and above can use this endpoint. Business Managers are restricted from accessing this endpoint. For more information about the group system, see [the Groups and Sections description](/guides/api/resources/organizations/groups).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to create a section
              type: object
              required:
                - name
              properties:
                name:
                  $ref: '#/components/schemas/SectionName'
                org_id:
                  $ref: '#/components/schemas/SectionCreateOrgId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SectionCreateSuccessResponse'
        '400':
          description: Section name already exists
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/SectionCreateNameConflictResponse'
                  - $ref: '#/components/schemas/SectionCreateForbiddenCharactersResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    get:
      tags:
        - Groups and Sections
      operationId: getGroupSections
      summary: Get Sections
      description: |
        Get all the sections for an organization.  
        For more information about the group system, see [the Groups and Sections description](/guides/api/resources/organizations/groups).
      parameters:
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_filter_by_org_id'
        - in: query
          name: group_name_query
          schema:
            type: string
          required: false
          description: Filter sections to only those containing at least one group whose name contains this value (case-insensitive substring match).
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SectionsGetSuccessResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /sections/{section_id}:
    delete:
      tags:
        - Groups and Sections
      operationId: deleteGroupSection
      summary: Delete Section
      description: |
        Delete a section.     
        This endpoint endpoint let's you delete an existing section. Only Group Managers and above can use this endpoint. Business Managers are restricted from accessing this endpoint. For more information about the group system, see [the Groups and Sections description](/guides/api/resources/organizations/groups).
      parameters:
        - $ref: '#/components/parameters/path_section_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SectionDeleteSuccessResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      tags:
        - Groups and Sections
      operationId: updateGroupSection
      summary: Update Section
      description: |
        Update the name of a section.     
        This endpoint endpoint let's you update an existing section. Only Group Managers and above can use this endpoint. Business Managers are restricted from accessing this endpoint. For more information about the group system, see [the Groups and Sections description](/guides/api/resources/organizations/groups).
      parameters:
        - $ref: '#/components/parameters/path_section_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to update a section
              type: object
              required:
                - name
              properties:
                name:
                  $ref: '#/components/schemas/SectionName'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SectionUpdateSuccessResponse'
        '400':
          description: Section name already exists
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/SectionCreateNameConflictResponse'
                  - $ref: '#/components/schemas/SectionCreateForbiddenCharactersResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    get:
      tags:
        - Groups and Sections
      operationId: getGroupSectionById
      summary: Get Section by ID
      description: |
        Get a single section.     
        For more information about the group system, see [the Groups and Sections description](/guides/api/resources/organizations/groups).
      parameters:
        - $ref: '#/components/parameters/path_section_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SectionItem'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /sections/{section_id}/groups:
    post:
      tags:
        - Groups and Sections
      operationId: createGroup
      summary: Create Group and set businesses
      description: |
        Create a new group.
        This endpoint allows `Group Managers` to create new groups within the system.   For more information about the group system, see [the Groups and Sections description](/guides/api/resources/organizations/groups).
        ⚠️ You must specify which businesses are part of the group using the `business__in` parameter.
        - If you don't specify any businesses, the group will be created with **all** businesses. - To create an empty group, provide an empty array in the `business__in` parameter.
      parameters:
        - $ref: '#/components/parameters/path_section_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to create a group
              type: object
              required:
                - name
                - business__in
              properties:
                name:
                  $ref: '#/components/schemas/GroupV2Name'
                business__in:
                  $ref: '#/components/schemas/business_ids'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupCreateSuccessResponse'
        '400':
          description: Group name already exists
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/SectionCreateNameConflictResponse'
                  - $ref: '#/components/schemas/SectionCreateForbiddenCharactersResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /sections/{section_id}/groups/{group_id}:
    post:
      tags:
        - Groups and Sections
      operationId: updateGroup
      summary: Update Group and set businesses
      description: |
        Update a group.
        This endpoint allows you to modify the details of an existing group within the system.   Only `Group Managers` and higher roles can use this endpoint. `Business Managers` are restricted from accessing it.   For more information about the group system, see [the Groups and Sections description](/guides/api/resources/organizations/groups).
        ⚠️ You must specify which businesses are part of the group using the `business__in` parameter.
        - If you don't specify any businesses, the group will be updated to include **all** businesses. - To update a group to be empty, provide an empty array in the `business__in` parameter.
      parameters:
        - $ref: '#/components/parameters/path_section_id'
        - $ref: '#/components/parameters/path_group_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to update a group
              type: object
              required:
                - name
                - business__in
              properties:
                name:
                  $ref: '#/components/schemas/GroupV2Name'
                business__in:
                  $ref: '#/components/schemas/business_ids'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupCreateSuccessResponse'
        '400':
          description: Group name already exists
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/SectionCreateNameConflictResponse'
                  - $ref: '#/components/schemas/SectionCreateForbiddenCharactersResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    get:
      tags:
        - Groups and Sections
      operationId: getGroup
      summary: Get Group
      description: |
        Get a group and it's associated business IDs.   
        For more information about the group system, see [the Groups and Sections description](/guides/api/resources/organizations/groups).
      parameters:
        - $ref: '#/components/parameters/path_section_id'
        - $ref: '#/components/parameters/path_group_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetGroupItem'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    delete:
      tags:
        - Groups and Sections
      operationId: deleteGroup
      summary: Delete Group
      description: |
        Delete a group.   
        This endpoint endpoint let's you delete an existing group. Only Group Managers and above can use this endpoint. Business Managers are restricted from accessing this endpoint. For more information about the group system, see [the Groups and Sections description](/guides/api/resources/organizations/groups).
      parameters:
        - $ref: '#/components/parameters/path_section_id'
        - $ref: '#/components/parameters/path_group_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupDeleteSuccessResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /holidays/{country}:
    get:
      tags:
        - Holidays
      operationId: getHolidays
      summary: Get holidays
      description: |
        This endpoint allows you to retrieve a list of upcoming bank holidays for a specified country within the next 365 days.  The holidays are ordered based on their occurrence dates.
      parameters:
        - name: country
          in: path
          required: true
          schema:
            type: string
          example: FR
          description: Country code from ISO 3166 international standard - https://www.iban.com/country-codes
        - name: lang
          in: query
          schema:
            description: Preferred language for holiday names. If no language is provided, the user's default language will be used. If the user's default language is unavailable, the country's primary language will be used.
            type: string
            enum:
              - fr
              - en
              - es
              - it
              - pt-br
              - de
              - ar
            example: fr
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  holidays:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Name of bank holiday
                        date:
                          type: string
                          format: date
                          description: Date of bank holiday
                example:
                  holidays:
                    - name: Armistice
                      date: '2023-11-11'
                    - name: Noël
                      date: '2023-12-25'
                    - name: Jour de l'an
                      date: '2024-01-01'
                    - name: Lundi de Pâques
                      date: '2024-04-01'
                    - name: Fête du Travail
                      date: '2024-05-01'
                    - name: Fête de la Victoire
                      date: '2024-05-08'
                    - name: Ascension
                      date: '2024-05-09'
                    - name: Lundi de Pentecôte
                      date: '2024-05-20'
                    - name: Fête nationale
                      date: '2024-07-14'
                    - name: Assomption
                      date: '2024-08-15'
                    - name: Toussaint
                      date: '2024-11-01'
                    - name: Christmas
                      date: '2024-12-25'
                    - name: New Year's Day
                      date: '2025-01-01'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
  /org/search:
    get:
      tags:
        - Organizations
      summary: Search for organizations
      operationId: searchOrganizations
      description: |
        This endpoint lets you search for organizations using filters. The response is paginated (30 results per page).
      parameters:
        - $ref: '#/components/parameters/query_filter_by_org_id'
        - in: query
          name: query
          schema:
            type: string
          required: false
          description: Parameter to fuzzy search organizations on name or id
        - name: alias
          in: query
          schema:
            type: string
          required: false
          description: Parameter to search an organization by its alias
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_per_page_1_100'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Result object return by the API
                properties:
                  page:
                    $ref: '#/components/schemas/current_page'
                  max_page:
                    $ref: '#/components/schemas/max_page'
                  count:
                    $ref: '#/components/schemas/count'
                  orgs:
                    type: array
                    description: The organizations complying with filter (30 max per page)
                    items:
                      $ref: '#/components/schemas/Org'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /org:
    post:
      tags:
        - Organizations
      summary: Create organization
      operationId: createOrganization
      description: |
        This endpoint lets you create an organization. You have `WRITE` access on your provider (ie. only possible if you have `PROVIDER` role).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: JSON to create an organization
              required:
                - name
              properties:
                name:
                  $ref: '#/components/schemas/OrgName'
                alias:
                  $ref: '#/components/schemas/OrgAlias'
                max_businesses:
                  $ref: '#/components/schemas/OrgMaxBusinesses'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Result object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
                  org_id:
                    $ref: '#/components/schemas/OrgId'
                  alias:
                    $ref: '#/components/schemas/OrgAlias'
                  max_businesses:
                    $ref: '#/components/schemas/OrgMaxBusinesses'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /org/{org_id}:
    get:
      tags:
        - Organizations
      summary: Organization information
      operationId: getOrganization
      description: |
        This endpoint lets you retrieve all the detail about a specific organization. You need to have `READ` access to this organization.
      parameters:
        - $ref: '#/components/parameters/path_org_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Org'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      tags:
        - Organizations
      summary: Update organization
      operationId: updateOrganization
      description: |
        This endpoint lets you update the information of an organization. You need to have `WRITE` access on the organization.
      parameters:
        - $ref: '#/components/parameters/path_org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: The object to send to update an organization
              properties:
                name:
                  $ref: '#/components/schemas/OrgName'
                alias:
                  $ref: '#/components/schemas/OrgAlias'
                max_businesses:
                  $ref: '#/components/schemas/OrgMaxBusinesses'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Result object
                properties:
                  org_id:
                    $ref: '#/components/schemas/OrgId'
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    delete:
      tags:
        - Organizations
      summary: Delete organization
      operationId: deleteOrganization
      description: |
        This endpoint lets you delete an organization. You need to have `WRITE` access on your provider. When an organization gets deleted all the resources linked to it are deleted (users and businesses). If the organization still has businesses or users, it would raise an error if you do not indicate `force="True"` in the JSON body.
      parameters:
        - $ref: '#/components/parameters/path_org_id'
        - $ref: '#/components/parameters/organization_force_delete'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Response object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
                  org_id:
                    $ref: '#/components/schemas/OrgId'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /posts:
    get:
      summary: Search for post
      description: |
        This endpoint lets you browse through all your posts.
      operationId: searchPost
      tags:
        - Posts
      parameters:
        - $ref: '#/components/parameters/query_business__in'
        - $ref: '#/components/parameters/query_post_start_datetime'
        - $ref: '#/components/parameters/query_post_end_datetime'
        - $ref: '#/components/parameters/query_post_summary'
        - $ref: '#/components/parameters/query_post_state_in'
        - $ref: '#/components/parameters/query_post_topic_type'
        - $ref: '#/components/parameters/query_post_topic_type_in'
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_per_page_1_100'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      posts:
                        type: array
                        description: List of Post
                        items:
                          $ref: '#/components/schemas/Post'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      summary: Create a post
      description: |
        This endpoint lets you create a post or a draft post on Google / Facebook / Instagram.

        The creation of a post will not happen in real time and might take a few minutes.

        A draft post can only be created by Org Admins and is not immediately published. 
        An expiration date must be specified when creating a draft post.
        In order to be published, a draft needs to be updated by a BM/GM user before the expiration date.
      operationId: createPost
      tags:
        - Posts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to create a Post
              type: object
              required:
                - business_search
                - data
                - publishers
              properties:
                business_search:
                  $ref: '#/components/schemas/PostBusinessSearch'
                publishers:
                  $ref: '#/components/schemas/PostPublishers'
                data:
                  $ref: '#/components/schemas/PostData'
                is_draft:
                  description: If true, the post will be created as a draft. You must then also specify an `expiration_time` in the body's data.
                  type: boolean
                  default: false
                send_notifications:
                  description: If true, a notification email will be sent to all BM/GM users that have access to this draft post
                  type: boolean
                  default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/requestResponsePost'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /posts/{post_id}:
    put:
      summary: Update a post
      description: |
        This endpoint lets you update a post.

        When used by a BM or GM user, this endpoint also serves to validate and publish a draft post.  

        The update will not happen in real time and might take a few minutes

        ⚠️ Due to Instagram API limitations, **this operation has no effect on Instagram posts**.
      operationId: updatePost
      tags:
        - Posts
      parameters:
        - $ref: '#/components/parameters/path_post_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostUpdateData'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Post'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    delete:
      summary: Delete a post
      description: |
        This endpoint lets you delete a post.

        The deletion will not happen in real time and might take a few minutes.

        ⚠️ Due to Instagram API limitations, **this operation has no effect on Instagram posts.**
      operationId: deletePost
      tags:
        - Posts
      parameters:
        - $ref: '#/components/parameters/path_post_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: Response object
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /place_action_links:
    get:
      tags:
        - Place Action Links
      summary: Get Place Action Links
      description: |
        Retrieve a list of available place action links. 
      operationId: getAvailablePlaceActionLinks
      parameters:
        - $ref: '#/components/parameters/query_place_action_link_lang'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPlaceActionLinksResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /publisher_states:
    get:
      summary: PublisherStates
      description: |
        Method to retrieve businesses diffusions states on publishers.

        Can be filtered by:
        - Business IDs
        - Publishers
        - States
      operationId: getPublisherStates
      tags:
        - Presence
      parameters:
        - $ref: '#/components/parameters/query_business__in'
        - name: publishers
          in: query
          required: false
          description: List of requested publisher names
          schema:
            type: array
            items:
              type: string
            example: facebook,google_my_business
        - name: states
          in: query
          required: false
          description: List of the requested states
          schema:
            type: array
            items:
              $ref: '#/components/schemas/state'
            example: success,to_configure,pending
        - name: per_page
          in: query
          schema:
            type: integer
            default: 5
            minimum: 1
            maximum: 100
          description: Number of items to return per page. Currently limited to 100.
        - name: page
          in: query
          required: false
          description: Page requested
          schema:
            type: integer
            example: 3
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getPublisherStatesResponse'
              examples:
                publishers=[facebook, apple_direct]&states=[success,to_configure,pending]&page=1&per_page=1:
                  value:
                    businesses:
                      56465qz56d4q65zd4:
                        business_formatted_address: 1 Rue du Général de Gaulle, 52330 Colombey-les-Deux-Églises
                        business_id: 56465qz56d4q65zd4
                        business_name: La Boisserie
                        publishers:
                          apple_direct:
                            error_type: null
                            state: success
                            url_on_publisher: null
                          facebook:
                            error_type: PUBLISHER_CONNEXION
                            state: to_configure
                            url_on_publisher: http://facebook/boisserie
                    count: 1
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /publisher_errors/{business_id}:
    post:
      summary: PublisherErrors (DEPRECATED)
      deprecated: true
      description: |
        ⚠️ **DEPRECATED** - Please use [`POST /v2/diffusion_errors/{business_id}`](/api-reference/presence/get-diffusion-errors-for-a-business) instead.

        This method retrieve a list of known errors associated with a publisher for a business, including detailed descriptions.

        The request body is mandatory.

        Providing an empty request body will return errors based on the business information stored in the database.

        Providing a populated request body will return errors related to the specified fields and their values only.
      operationId: postPublisherErrors
      tags:
        - Presence
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request object
              type: object
              properties:
                name:
                  $ref: '#/components/schemas/BusinessName'
                org_id:
                  $ref: '#/components/schemas/OrgId'
                country:
                  $ref: '#/components/schemas/BusinessCountry'
                zipcode:
                  $ref: '#/components/schemas/BusinessZipcode'
                city:
                  $ref: '#/components/schemas/BusinessCity'
                region:
                  $ref: '#/components/schemas/BusinessRegion'
                categories:
                  $ref: '#/components/schemas/BusinessCategories'
                code:
                  $ref: '#/components/schemas/BusinessCode'
                status:
                  $ref: '#/components/schemas/BusinessStatus'
                address_full:
                  $ref: '#/components/schemas/AddressFull'
                address2:
                  $ref: '#/components/schemas/Address2'
                manual_lat:
                  $ref: '#/components/schemas/BusinessLatitude'
                manual_long:
                  $ref: '#/components/schemas/BusinessLongitude'
                lat:
                  $ref: '#/components/schemas/BusinessLatitude'
                long:
                  $ref: '#/components/schemas/BusinessLongitude'
                website_url:
                  $ref: '#/components/schemas/BusinessWebsite'
                facebook_url:
                  $ref: '#/components/schemas/BusinessFacebookPage'
                twitter_url:
                  $ref: '#/components/schemas/BusinessTwitter'
                description_short:
                  $ref: '#/components/schemas/BusinessShortDescription'
                description_long:
                  $ref: '#/components/schemas/BusinessLongDescription'
                open_hours:
                  $ref: '#/components/schemas/OpenHours'
                specific_hours:
                  $ref: '#/components/schemas/SpecificHours'
                contacts:
                  $ref: '#/components/schemas/BusinessContactsCreate'
                photos:
                  $ref: '#/components/schemas/Photos'
                national_identification_number:
                  $ref: '#/components/schemas/BusinessNationalIdentificationNumber'
            examples:
              empty request body:
                description: Providing an empty request body will return errors based on the business information stored in the database.
                value: {}
              filled request body:
                description: Providing a populated request body will return errors related to the specified fields and their values only.
                value:
                  name: Corner Shop
                  country: US
                  zipcode: '90210'
                  city: Beverly Hills
                  region: CA
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/postPublisherErrorsResponse'
              examples:
                without errors:
                  value: {}
                with errors:
                  value:
                    hours:
                      open_hours:
                        le118000: 118000_supports_only_three_time_window_per_day
                        facebook: facebook_supports_only_two_time_window_per_day
                        apple_business_connect: open_hours_less_than_15_min_interval_apple_business_connect
                    description:
                      description_short:
                        facebook: facebook_new_pages_description_short_too_long
                    contact:
                      phone_number:
                        google_my_business: invalid_field
                        snapchat: invalid_field
                        le118000: invalid_field
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /diffusion_errors/{business_id}:
    post:
      summary: Get diffusion errors for a business
      operationId: getDiffusionErrorsForBusiness
      tags:
        - Presence
      description: |
        Get diffusion errors for a given business.

        This endpoint returns diffusion errors grouped by publisher. Diffusion errors are classified into two types:

        - **Pre-check errors**: errors detected *before* sending data to partners, based on the current business data.
        - **Post-check errors**: errors detected *after* sending data to partners, based on partner responses.

        ### Behavior
        - If no input parameters are provided:
          - Returns the **existing** pre-check and post-check errors stored in the database.
        - If input parameters are provided:
          - Applies the provided fields as an in-memory update on the business (without persisting).
          - Recalculates pre-check errors based on these changes.
          - Post-check errors are **not** recalculated in this case.

        ### Example Use Case
        Use this endpoint during a business edit form to validate which publishers would be affected by a change, without saving it yet.
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              description: Partial business update for simulating changes
              type: object
              properties:
                name:
                  $ref: '#/components/schemas/BusinessName'
                org_id:
                  $ref: '#/components/schemas/OrgId'
                country:
                  $ref: '#/components/schemas/BusinessCountry'
                zipcode:
                  $ref: '#/components/schemas/BusinessZipcode'
                city:
                  $ref: '#/components/schemas/BusinessCity'
                region:
                  $ref: '#/components/schemas/BusinessRegion'
                categories:
                  $ref: '#/components/schemas/BusinessCategories'
                code:
                  $ref: '#/components/schemas/BusinessCode'
                status:
                  $ref: '#/components/schemas/BusinessStatus'
                address_full:
                  $ref: '#/components/schemas/AddressFull'
                address2:
                  $ref: '#/components/schemas/Address2'
                manual_lat:
                  $ref: '#/components/schemas/BusinessLatitude'
                manual_long:
                  $ref: '#/components/schemas/BusinessLongitude'
                lat:
                  $ref: '#/components/schemas/BusinessLatitude'
                long:
                  $ref: '#/components/schemas/BusinessLongitude'
                website_url:
                  $ref: '#/components/schemas/BusinessWebsite'
                facebook_url:
                  $ref: '#/components/schemas/BusinessFacebookPage'
                twitter_url:
                  $ref: '#/components/schemas/BusinessTwitter'
                description_short:
                  $ref: '#/components/schemas/BusinessShortDescription'
                description_long:
                  $ref: '#/components/schemas/BusinessLongDescription'
                open_hours:
                  $ref: '#/components/schemas/OpenHours'
                specific_hours:
                  $ref: '#/components/schemas/SpecificHours'
                contacts:
                  $ref: '#/components/schemas/BusinessContactsCreate'
                photos:
                  $ref: '#/components/schemas/Photos'
                national_identification_number:
                  $ref: '#/components/schemas/BusinessNationalIdentificationNumber'
            examples:
              empty request body:
                description: Returns already stored pre-check and post-check errors
                value: {}
              filled request body:
                description: Simulates changes and recalculates pre-check errors
                value:
                  name: Corner Shop
                  country: US
                  zipcode: '90210'
                  city: Beverly Hills
                  region: CA
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Diffusion errors grouped by section and field
                properties:
                  address:
                    type: object
                    description: Errors in the address section
                    additionalProperties:
                      type: array
                      items:
                        type: object
                        properties:
                          publisher:
                            type: string
                            example: google
                            description: The publisher associated with the error
                          errors:
                            type: array
                            items:
                              type: string
                              example: ABC_NAME_ENTIRELY_NUMERIC
                            description: A list of error keys
                          context:
                            type: object
                            description: Optional context for the error
                            nullable: true
                  infos:
                    type: object
                    description: Errors in the infos section
                    additionalProperties:
                      type: array
                      items:
                        type: object
                        properties:
                          publisher:
                            type: string
                          errors:
                            type: array
                            items:
                              type: string
                          context:
                            type: object
                            nullable: true
                  advanced-settings:
                    type: object
                    description: Errors in the advanced settings section
                    additionalProperties:
                      type: array
                      items:
                        type: object
                        properties:
                          publisher:
                            type: string
                          errors:
                            type: array
                            items:
                              type: string
                          context:
                            type: object
                            nullable: true
              examples:
                no errors:
                  value: {}
                with errors:
                  value:
                    infos:
                      name:
                        - publisher: google
                          errors:
                            - ABC_NAME_ENTIRELY_NUMERIC
                            - ABC_TOO_SHORT
                          context: null
                    advanced-settings:
                      national_identification_number:
                        - publisher: apple
                          errors:
                            - ABC_INVALID_ID
                          context:
                            id: '456'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /reviews:
    get:
      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).

        By default, no state filter is applied: the response includes **all** reviews,
        including deleted ones. Use `state__in` / `state__notin` to narrow the result.
      operationId: searchReviews
      tags:
        - Reviews
      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_review_state__notin'
        - $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'
    post:
      tags:
        - Reviews
      summary: Create and update a review from a custom partner
      operationId: upsertReview
      description: |
        This endpoint lets you push into Partoo the reviews you collect on your own platform,
        through a **custom review partner** enabled on your organization.

        A review is identified by the pair (`partner_slug`, `external_id`):
        - the first call with a given pair **creates** the review,
        - every later call with the same pair **updates** it in place.

        Sending the same payload twice is therefore safe: the second call is a no-op and still
        answers `200`. Pushing a review you previously deleted **restores** it.

        You can push for partners that are flagged as `is_custom` by
        [List review partners](/api-reference/reviews/list-review-partners). Reviews created this
        way behave like any other review: they are returned by
        [Search for reviews](/api-reference/reviews/search-for-reviews), they can be replied to,
        and they trigger the `review_created` / `review_updated` webhooks.

        You must use an API key with `ORG_ADMIN` rights and the `review_edit` permission, and the
        business must belong to the organization of the API key's.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: The review to create or update
              type: object
              required:
                - partner_slug
                - external_id
                - business_id
                - rating
                - author
                - date
              properties:
                partner_slug:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: |
                    Slug of the custom partner the review comes from.

                    It must be a partner enabled on your organization, returned with
                    `is_custom: true` by [List review partners](/api-reference/reviews/list-review-partners).
                  example: custom_partner
                external_id:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: |
                    The review's unique id on the source platform. This is the key of the upsert:
                    re-sending the same `external_id` for the same `partner_slug` updates the
                    review instead of creating a new one.

                    It is returned as `key` and `partner_id` on the review. An `external_id`
                    already used by a review of **another** partner is rejected with a `409`.
                  example: ue-review-8f21c0
                business_id:
                  $ref: '#/components/schemas/BusinessId'
                rating:
                  type: integer
                  minimum: 1
                  maximum: 5
                  description: Star rating given by the author.
                  example: 4
                content:
                  type:
                    - string
                    - 'null'
                  maxLength: 4096
                  description: Body of the review. Omit it for a rating-only review.
                  example: Fast delivery, meal was still hot. Thanks !
                author:
                  type: object
                  description: Author of the review, as displayed on the source platform.
                  required:
                    - display_name
                  properties:
                    display_name:
                      type: string
                      minLength: 1
                      maxLength: 255
                      description: |
                        Name displayed for the author. Returned as `author_name` on the review.
                      example: Camille D.
                    is_anonymous:
                      type: boolean
                      default: false
                      description: |
                        Whether the author chose to stay anonymous on the source platform.

                        **Note:** accepted for forward compatibility — it is not stored and not
                        returned on the review today. Use a generic `display_name` for an
                        anonymous author.
                    profile_photo_url:
                      type:
                        - string
                        - 'null'
                      format: uri
                      description: |
                        Public URL of the author's profile picture.

                        **Note:** accepted for forward compatibility — it is not stored and not
                        returned on the review today.
                date:
                  type: string
                  format: date-time
                  description: |
                    When the review was posted on the source platform.

                    The offset is required (for example `+02:00` or `Z`); Partoo stores the date in
                    UTC and renders it in the business timezone.

                    Two reviews of the same business cannot share the same `date` **and**
                    `author.display_name`: such a push answers `409`.
                  example: '2026-09-15T18:32:11+02:00'
                update_date:
                  type: string
                  format: date-time
                  description: |
                    Last update of the review on the source platform. Defaults to `date`, and
                    cannot be earlier than it.
                  example: '2026-09-16T09:04:55+02:00'
                link:
                  type:
                    - string
                    - 'null'
                  format: uri
                  description: Public URL of the review on the source platform.
                  example: https://www.custom_partner.com/reviews/8f21c0
                reply:
                  type:
                    - object
                    - 'null'
                  description: |
                    The reply already published on the source platform, if any. It is created with
                    the review, and updated on a later push carrying a different content or date.

                    Replies written from Partoo are handled by
                    [Post a reply to a review](/api-reference/reviews/post-a-reply-to-a-review)
                    instead.
                  required:
                    - content
                    - date
                  properties:
                    content:
                      type: string
                      minLength: 1
                      maxLength: 4096
                      description: Body of the reply.
                      example: Thank you for your review!
                    date:
                      type: string
                      format: date-time
                      description: |
                        When the reply was posted on the source platform. The offset is required.
                      example: '2026-09-16T09:04:55+02:00'
      responses:
        '200':
          description: The review that was created or updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Review'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          description: |
            You are not allowed to perform this action. Either:
            - the API key's user is not an `ORG_ADMIN`, lacks the `review_edit` permission, or has
              no write access to the business (`errors.authorization`),
            - or your organization is not enabled for this custom partner (`errors.json`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    description: The detail of the error encountered
                    properties:
                      json:
                        type: string
                        example: Your organization cannot push reviews for this partner
                      authorization:
                        type: string
                        example: Operation not allowed
        '404':
          description: |
            Unknown `partner_slug`, a slug that is not a custom partner, unknown `business_id`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewError'
        '409':
          description: |
            The review conflicts with an existing one. Either the business already has a review
            with the same `date` and `author.display_name`, or the `external_id` is already used
            by a review of another partner.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewError'
        '500':
          description: |
            The review, or its reply, could not be saved. The push is safe to retry: it is keyed on
            (`partner_slug`, `external_id`), so a retry never duplicates the review.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewError'
  /reviews/{review_id}:
    put:
      summary: Update a review
      description: |
        Update the state of a review to treated/not_treated
      operationId: updateReview
      tags:
        - Reviews
      parameters:
        - in: path
          name: review_id
          required: true
          schema:
            $ref: '#/components/schemas/ReviewId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to post a reply
              type: object
              required:
                - review_id
                - state
              properties:
                state:
                  description: Reply state
                  type: string
                  enum:
                    - treated
                    - not_treated
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Review'
                  - properties:
                      state:
                        example: treated
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    delete:
      tags:
        - Reviews
      summary: Delete a review from a custom partner
      operationId: deleteReview
      description: |
        This endpoint lets you delete a review your organization pushed through a **custom review
        partner**. Reviews synchronized natively by Partoo (Google, Facebook, TripAdvisor…) cannot
        be deleted this way.

        The deletion is a soft one: the review is kept with `state: deleted` and its author masked,
        which is what lets a later
        [push of the same `external_id`](/api-reference/reviews/push-a-review-from-a-custom-partner)
        bring it back. Deleted reviews are excluded from statistics, and from searches that filter
        them out with `state__notin=deleted`.

        Deleting a review you already deleted answers `204` as well, so a retry is always safe.
        The `review_updated` webhook fires on the first deletion only.

        You must use an API key with `ORG_ADMIN` rights and the `review_edit` permission.
      parameters:
        - in: path
          name: review_id
          required: true
          description: Partoo id of the review, as returned by the push and search endpoints.
          schema:
            $ref: '#/components/schemas/ReviewId'
      responses:
        '204':
          description: The review is deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '401':
          $ref: '#/components/responses/401'
        '403':
          description: |
            You are not allowed to perform this action. Either:
            - the API key's user is not an `ORG_ADMIN` or lacks the `review_edit` permission
              (`errors.authorization`),
            - the review was not pushed by a custom partner, or your organization is no longer
              enabled for that partner (`errors.json`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    description: The detail of the error encountered
                    properties:
                      json:
                        type: string
                        example: This review was not pushed by a custom partner
                      authorization:
                        type: string
                        example: Operation not allowed
        '404':
          description: |
            No such review. A review belonging to another organization answers `404` too, and is
            deliberately indistinguishable from an unknown id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewError'
  /review-partners:
    get:
      tags:
        - Reviews
      summary: List review partners
      operationId: listReviewPartners
      description: |
        This endpoint lists the partners whose reviews you can work with, and is the source of the
        slugs used in the `partner` field of a review and in the `partner__in` search filter.

        It returns:
        - `google_my_business` and `facebook`, always,
        - `tripadvisor`, when at least one business you have access to is connected to TripAdvisor,
        - the **custom partners** enabled on your organization, flagged with `is_custom: true`.

        Only the businesses you have `READ` access to and subscribed to review management are taken
        into account.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  partners:
                    type: array
                    description: Partners available to you
                    items:
                      $ref: '#/components/schemas/ReviewPartner'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /comments:
    post:
      tags:
        - Reviews
      summary: Post a reply to a review
      description: This endpoint lets you reply to a given review.
      operationId: ReplyToReview
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to post a reply
              type: object
              required:
                - review_id
                - content
              properties:
                review_id:
                  description: ID of the review you want to reply
                  type: number
                  example: 34
                parent_id:
                  description: |
                    The id of the parent comment you want to reply

                    Works only for Facebook comments, since it's possible to reply to a comment (depth max is 2).
                    Google and TripAdvisor don't accept this behaviour.
                  type: number
                  example: 1234
                content:
                  description: Content of your reply
                  type: string
                  format: text
                  example: Merci ❤️
                reply_template_id:
                  description: ID of the reply template to use
                  type: number
                  example: 5678
                reply_suggestion:
                  description: Suggestion details for the reply, check how to retrieve values in the [Fetch AI reply suggestion for reviews](/api-reference/reviews/fetch-ai-reply-suggestion-for-reviews) section.
                  type: object
                  properties:
                    reply_suggestion_id:
                      description: ID of the reply suggestion
                      type: number
                      example: 91011
                    reply_suggestion_modified:
                      description: Indicates if the suggestion was modified
                      type: boolean
                      example: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /comments/{comment_id}:
    put:
      tags:
        - Reviews
      summary: Modify a reply to a review
      description: This endpoint lets you modify a given reply to a review.
      operationId: ModifyReplyOfReview
      parameters:
        - in: path
          name: comment_id
          required: true
          schema:
            $ref: '#/components/schemas/CommentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to modify a reply
              type: object
              required:
                - content
              properties:
                content:
                  description: Content of your Reply
                  type: string
                  format: text
                  example: Merci ❤️
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    delete:
      tags:
        - Reviews
      summary: Delete the given reply to a review
      operationId: deleteReply
      description: |
        This endpoint lets you delete the reply to a review
      parameters:
        - in: path
          name: comment_id
          required: true
          schema:
            $ref: '#/components/schemas/CommentId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /reviews/templates/search:
    get:
      summary: Search for review reply templates
      description: |
        This endpoint lets you browse through all your reply review templates.
      operationId: searchTemplate
      tags:
        - Reviews
      parameters:
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_positive_template'
        - $ref: '#/components/parameters/query_neutral_template'
        - $ref: '#/components/parameters/query_negative_template'
        - $ref: '#/components/parameters/query_language__in'
        - $ref: '#/components/parameters/query_title_query'
        - $ref: '#/components/parameters/query_text_query'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      reply_templates:
                        type: array
                        description: List of reply review templates
                        items:
                          $ref: '#/components/schemas/Template'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /reviews/templates/placeholders:
    get:
      summary: All available placeholders
      description: |
        This endpoint lets you access available placeholders for reply review templates.
        A template placeholder is a dynamically updated word within the Partoo app depending on the context.

        Ex: Once used to answer a review, if a template has a `client_first_name` placeholder, the placeholder will take the value of the reviewer's first name.
      operationId: getTemplatePlaceholders
      tags:
        - Reviews
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplatePlaceholder'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /reviews/template:
    post:
      summary: Create a review reply template
      description: |
        This endpoint lets you create a review reply template.
      operationId: createTemplate
      tags:
        - Reviews
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to post/edit a reply
              type: object
              required:
                - language
                - negative
                - neutral
                - positive
                - text
                - title
              properties:
                language:
                  $ref: '#/components/schemas/TemplateLanguage'
                negative:
                  $ref: '#/components/schemas/TemplateNegative'
                neutral:
                  $ref: '#/components/schemas/TemplateNeutral'
                positive:
                  $ref: '#/components/schemas/TemplatePositive'
                text:
                  $ref: '#/components/schemas/TemplateText'
                title:
                  $ref: '#/components/schemas/TemplateTitle'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /reviews/template/{template_id}:
    delete:
      summary: Delete a review reply template
      description: |
        This endpoint lets you delete a review reply template given its id.
      operationId: deleteTemplate
      tags:
        - Reviews
      parameters:
        - $ref: '#/components/parameters/path_template_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: Response object
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /reviews/fetch-suggestion/{review_id}/{index}:
    get:
      summary: Fetch AI reply suggestion for reviews
      description: |
        The AI reply suggestion is a service that generates a response to a review based on the review content.

        <b>⚠️ This feature provides reply SUGGESTIONS, NOT AUTOMATIC REPLIES. 
        It is NOT designed for fully automating conversations. Similar to the app, 
        a human reviewer is expected to validate the suggestion before selecting it
        in order to use [reply to a review](/api-reference/reviews/post-a-reply-to-a-review) endpoint ⚠️</b>

        **How does the AI reply suggestion work?**

        - First, call the Fetch AI reply suggestion service.
        - Then retrieve the values and store them on the caller's side. It is possible to request up to 3 suggestions per reply, 
        and after that, it's no longer possible; the suggestions are retained once they're made, and that they can be found at the `index` (0, 1, or 2) of the parameters
        - Finally, use the suggestion ID and pass it to `reply_suggestion` request body when calling the [reply to a review](/api-reference/reviews/post-a-reply-to-a-review) service to link the response to the suggestion.
      operationId: fetchReviewReplySuggestion
      tags:
        - Reviews
      parameters:
        - in: path
          name: review_id
          required: true
          schema:
            type: integer
            example: 34
            description: ID of the review for which we want an AI suggestion
        - in: path
          name: index
          required: true
          schema:
            type: integer
            minimum: 0
            maximum: 2
            description: Index of the reply suggestion (0, 1, or 2)
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReplySuggestion'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /presence_analytics/metrics:
    get:
      summary: Profile metrics for your business
      description: |
        This endpoint lets you view the **Google Business Profile** analytics for all your businesses subscribed to
        **Presence Management**.
        The API allows you to select what data you're interested in, and how you want it aggregated (daily, monthly,
        by business, etc). You can also filter the results to limit it to a certain date range, and to certain business.

        Google Business Profile doesn't provide reliable data for the most recent 5 days.

        You can choose the analytics you want to get among:
        - impressions: desktop maps impressions, mobile maps impressions, desktop search impressions, and mobile search impressions
        - actions: website link clicks, phone calls, and driving directions

        You can use the following filters:
        - by businesses (businesses id in list or not in list)
        - by date (analytics before and/or after a date)
        - by business query. Will return matches for the business name, zipcode or city
        - by business city.

        The response can be aggregated by:
        - business id
        - by date: either by day, week, month or year
        - by both business id and date

        The response can be ordered in ascending or descending order by any of the selected dimensions or metrics.
        See examples for more details.
      operationId: getPresenceAnalyticsMetrics
      tags:
        - Presence analytics
      deprecated: false
      parameters:
        - $ref: '#/components/parameters/query_metrics_presence'
        - $ref: '#/components/parameters/query_dimensions_presence'
        - $ref: '#/components/parameters/query_order_by_presence'
        - $ref: '#/components/parameters/pa_metrics_query_business__in'
        - $ref: '#/components/parameters/pa_metrics_query_business__notin'
        - $ref: '#/components/parameters/pa_metrics_query_city'
        - $ref: '#/components/parameters/pa_metrics_query_query'
        - $ref: '#/components/parameters/pa_metrics_query_filter_date__gte'
        - $ref: '#/components/parameters/pa_metrics_query_filter_date__lte'
        - $ref: '#/components/parameters/pa_pagination_query_page'
        - $ref: '#/components/parameters/pa_pagination_query_per_page'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresenceAnalyticsMetricsResponse'
              examples:
                metrics=business_impressions_desktop_maps,business_impressions_desktop_search,business_impressions_mobile_maps,business_impressions_mobile_search,business_direction_requests,call_clicks,website_clicks:
                  value:
                    page: 1
                    count: 1
                    max_page: 1
                    metrics:
                      - business_impressions_desktop_maps: 123
                        business_impressions_desktop_search: 123
                        business_impressions_mobile_maps: 123
                        business_impressions_mobile_search: 123
                        business_direction_requests: 123
                        call_clicks: 123
                        website_clicks: 123
                dimensions=business & metrics=call_clicks:
                  value:
                    page: 1
                    count: 3
                    max_page: 1
                    metrics:
                      - call_clicks: 103
                        business_id: 59b2645db12ff60643ef832c
                      - call_clicks: 165
                        business_id: 60b2645fb12ff60643ef8344
                      - call_clicks: 28
                        business_id: 70b2645eb12ff60643ef833c
                dimensions=month & metrics=website_clicks & order_by=website_clicks:
                  value:
                    page: 1
                    count: 2
                    max_page: 1
                    metrics:
                      - website_clicks: 57
                        date: '2019-08-01'
                        bucket: month
                      - website_clicks: 79
                        date: '2019-09-01'
                        bucket: month
                dimensions=day,business & metrics=call_clicks & order_by=-day:
                  value:
                    page: 1
                    count: 6
                    max_page: 1
                    metrics:
                      - call_clicks: 48
                        business_id: 59b2645db12ff60643ef832c
                        date: '2019-09-30'
                        bucket: day
                      - call_clicks: 6
                        business_id: 59b2645fb12ff60643ef8344
                        date: '2019-09-30'
                        bucket: day
                      - call_clicks: 11
                        business_id: 59b2645db12ff60643ef832c
                        date: '2019-09-29'
                        bucket: day
                      - call_clicks: 0
                        business_id: 59b2645fb12ff60643ef8344
                        date: '2019-09-29'
                        bucket: day
                      - call_clicks: 2
                        business_id: 59b2645db12ff60643ef832c
                        date: '2019-09-28'
                        bucket: day
                      - call_clicks: 66
                        business_id: 59b2645fb12ff60643ef8344
                        date: '2019-09-28'
                        bucket: day
                dimensions=week & metrics=website_clicks & filter_date__gte=2019-09-15 & filter_date__lte=2019-09-16:
                  value:
                    page: 1
                    count: 2
                    max_page: 1
                    metrics:
                      - website_clicks: 32
                        date: '2019-09-09'
                        bucket: week
                      - website_clicks: 164
                        date: '2019-09-16'
                        bucket: week
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /presence_analytics/keywords:
    get:
      summary: Profile keywords for your business
      description: |
        This endpoint lets you view the monthly **Google Business Profile** search keywords for all your businesses subscribed to Presence Management.

        To access the analytics of a business, you need to:
        - have `READ` access on it
        - have subscribed to **Presence Management** for this business.
        - You can access the search keywords from **Google Business Profile**.

        The analytics on search keywords are made available by Google Business Profile on a monthly basis.

        You will receive the following metrics:

        - count: The sum of the number of unique users that used the keyword in a month
        - threshold: A threshold value indicating that the actual value is less than the threshold. Google Business Profile typically displays for search keywords that were used less than 15 times in a month.

        You can use the following filters:

        - by businesses (businesses id in list, and restricted to one business when using the keyword dimension.)
        - by date (analytics before and/or after a date)
        - by branded status (branded vs discovery keywords)

        The response can be aggregated by:
        - business id
        - by date: month or year
        - by keyword
        - by branded status (branded vs discovery)

        The response can be ordered by:

        - business id
        - by date: month, or year
        - by keyword
        - by branded status

        The response can be ordered in ascending or descending order by any of the selected dimensions or metrics.
      operationId: getPresenceAnalyticsKeywords
      tags:
        - Presence analytics
      deprecated: false
      parameters:
        - $ref: '#/components/parameters/query_metrics_keywords'
        - $ref: '#/components/parameters/query_dimensions_keywords'
        - $ref: '#/components/parameters/query_order_by_keywords'
        - $ref: '#/components/parameters/pa_keywords_query_business__in'
        - $ref: '#/components/parameters/pa_keywords_query_filter_date__gte'
        - $ref: '#/components/parameters/pa_keywords_query_filter_date__lte'
        - $ref: '#/components/parameters/query_branded'
        - $ref: '#/components/parameters/pa_pagination_query_page'
        - $ref: '#/components/parameters/pa_pagination_query_per_page'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresenceAnalyticsKeywordsResponse'
              examples:
                dimensions=month,keyword,branded:
                  value:
                    page: 1
                    count: 6
                    max_page: 1
                    keywords:
                      - branded: discovery
                        bucket: month
                        date: '2022-03-01'
                        keyword: bar
                        threshold: 42
                      - branded: branded
                        bucket: month
                        count: 9001
                        date: '2022-03-01'
                        keyword: foo
                      - branded: discovery
                        bucket: month
                        date: '2022-02-01'
                        keyword: bar
                        threshold: 42
                      - branded: branded
                        bucket: month
                        count: 9001
                        date: '2022-02-01'
                        keyword: foo
                      - branded: discovery
                        bucket: month
                        date: '2022-01-01'
                        keyword: bar
                        threshold: 42
                      - branded: branded
                        bucket: month
                        count: 9001
                        date: '2022-01-01'
                        keyword: foo
                dimensions=month,keyword,branded&branded=true:
                  value:
                    page: 1
                    count: 3
                    max_page: 1
                    keywords:
                      - branded: branded
                        bucket: month
                        count: 9001
                        date: '2022-03-01'
                        keyword: foo
                      - branded: branded
                        bucket: month
                        count: 9001
                        date: '2022-02-01'
                        keyword: foo
                      - branded: branded
                        bucket: month
                        count: 9001
                        date: '2022-01-01'
                        keyword: foo
                dimensions=month,keyword,branded&branded=false:
                  value:
                    page: 1
                    count: 3
                    max_page: 1
                    keywords:
                      - branded: discovery
                        bucket: month
                        date: '2022-03-01'
                        keyword: bar
                        threshold: 42
                      - branded: discovery
                        bucket: month
                        date: '2022-02-01'
                        keyword: bar
                        threshold: 42
                      - branded: discovery
                        bucket: month
                        date: '2022-01-01'
                        keyword: bar
                        threshold: 42
                dimensions=keyword&branded=true:
                  value:
                    page: 1
                    count: 1
                    max_page: 1
                    keywords:
                      - count: 27003
                        keyword: foo
                dimensions=branded:
                  value:
                    page: 1
                    count: 2
                    max_page: 1
                    keywords:
                      - branded: branded
                        threshold: 126
                      - branded: discovery
                        count: 27003
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /review_analytics/metrics:
    get:
      tags:
        - Review analytics
      summary: Get Review metrics
      operationId: getReviewAnalyticsMetrics
      description: |
        **⚠️ This feature is available only for businesses subscribed to Review Management. ⚠️**

        All the operations to perform Reviews analytics.

        This endpoint lets you view the statistics related to reviews made to your businesses subscribed to
        **Review Management**.

        A request is composed of:
        - One or more `metrics` which is the data you want to return
        - An optional `dimensions` which defines how the data is grouped by
          - If it is omitted, the request will return the metrics over all the data, based on your filters
        - An optional `order_by` to define how the data is sorted
        - Filters, the data can be filtered by:
          - Businesses
          - Groups
          - Tags
          - Review update date

        Here is the list of all **metrics** available:
        - `average_rating`: Average rating
        - `rating_distribution`: Breakdown of the ratings (Number of 1-star reviews, 2-star reviews, 3-star reviews, etc...)
        - `reviews_count`: Number of reviews received
        - `reply_time`: Breakdown of the reviews based on how fast (less or more than 48 hours) they have been replied to (or not replied)
        - `reply_means`: Breakdown of the review replies based on the reply method used (manual reply, reply template, auto reply or AI suggestion)
        - `average_rating_distribution`: Breakdown of your businesses based on their average rating
        - `rank`: Allows you to rank the users, businesses or groups based on their performance on a metric (an order_by is required)

        Here is the list of all **dimensions** available, and for each of them, the list of metrics and sort order available:
        - No dimension
          - This allows you to get global stats across all your businesses
          - Available metrics: `average_rating`, `rating_distribution`, `reviews_count`, `reply_time`, `reply_means`, `average_rating_distribution`
        - Date dimensions: `day`, `week`, `month`, `year`
          - This allows you to get the evolution of your metrics over time
          - Available metrics: `average_rating`, `rating_distribution`, `reviews_count`, `reply_time`, `reply_means`
        - Business and business group dimensions: `business`, `group`
          - This allows you to see the metrics business by business or group by group (Requires group filter)
          - Available metrics: `average_rating`, `rating_distribution`, `reviews_count`, `reply_time`, `reply_means`, `rank`
        - `user`
          - This allows you to see the metrics user by user
          - Available metrics: `reply_time`, `reply_means`, `rank`
        - `tag`
          - This allows you to see the metrics tag by tag
          - Available metrics: `average_rating`, `rating_distribution`, `reviews_count`

        Here is the list of all **order_by** available (Add a minus `-` sign before to order by decreasing order):
        - `average_rating`: Sort by average rating
        - `reviews_count`: Sort by review_count
        - `reply_time__total`: Sort by number of reviews received
        - `reply_means__total`: Sort by number of reviews that have been replied
        - `ratio__rating_distribution__5`: Sort by the ratio of 5 star reviews
        - `ratio__rating_distribution__negative`: Sort by the ratio of negative reviews
        - `ratio__reply_time__fast`: Sort by the ratio of reviews replied in less than 2 days
        - `ratio__reply_time__slow`: Sort by the ratio of reviews replied in more than 2 days
        - `ratio__reply_time__not_replied`: Sort by the ratio of reviews not replied
        - `ratio__reply_means__manual`: Sort by the ratio reviews replied manually
        - `ratio__reply_means__ai_suggestion`: Sort by the ratio reviews replied using AI suggestion
        - `ratio__reply_means__reply_template`: Sort by the ratio reviews replied using reply template
        - `ratio__reply_means__auto_reply`: Sort by the ratio reviews replied using auto reply

        To use an **order_by** parameter, its corresponding metric must be included in the request.
        (i.e.
        to order by `average_rating`, you must include the `average_rating` metric in the `metrics` parameter,
        to order by `ratio__rating_distribution__5`, you must include the `rating_distribution` metric in the `metrics` parameter,
        and so on...)
      parameters:
        - $ref: '#/components/parameters/query_metrics_reviews'
        - $ref: '#/components/parameters/query_dimensions_reviews'
        - $ref: '#/components/parameters/query_order_by_reviews'
        - $ref: '#/components/parameters/ra_query_business__in'
        - $ref: '#/components/parameters/ra_query_business__notin'
        - $ref: '#/components/parameters/ra_query_groups'
        - $ref: '#/components/parameters/query_tags'
        - $ref: '#/components/parameters/query_update_date__gte'
        - $ref: '#/components/parameters/query_update_date__lte'
        - $ref: '#/components/parameters/ra_query_page'
        - $ref: '#/components/parameters/ra_query_per_page'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/ReviewMetricsResponse'
              examples:
                ?metrics=average_rating&dimensions=business:
                  value:
                    page: 1
                    count: 2
                    max_page: 1
                    data:
                      - dimension: 59b2645db12ff60643ef832c
                        dimension_name: Business 1
                        dimension_info:
                          address_full: 190 rue Championnet
                          city: Paris
                          zipcode: '75018'
                          code: PTOCODE1
                        metrics:
                          average_rating: 2.31
                      - dimension: 60b2645fb12ff60643ef8344
                        dimension_name: Business 2
                        dimension_info:
                          address_full: 190 rue Championnet
                          city: Paris
                          zipcode: '75018'
                          code: PTOCODE2
                        metrics:
                          average_rating: 4.31
                ?metrics=average_rating_distribution:
                  value:
                    page: 1
                    count: 1
                    max_page: 1
                    data:
                      - dimension: null
                        metrics:
                          average_rating_distribution:
                            4.3-5: 274
                            3.8-4.3: 124
                            3-3.8: 62
                            0-3: 5
                            'NULL': 4
                ?metrics=average_rating,reviews_count&dimensions=day&filter_date__lte=2024-02-13&filter_date__gte=2024-02-11:
                  value:
                    page: 1
                    count: 3
                    max_page: 1
                    data:
                      - dimension: '2024-02-11'
                        metrics:
                          average_rating: 3.31
                          reviews_count: 123
                      - dimension: '2024-02-12'
                        metrics:
                          average_rating: 3.34
                          reviews_count: 123
                      - dimension: '2024-02-13'
                        metrics:
                          average_rating: 3.77
                          reviews_count: 123
                ?metrics=reply_time,reply_means&dimensions=user:
                  value:
                    page: 1
                    count: 1
                    max_page: 1
                    data:
                      - dimension: 64477ae0264810a01c0a4edf
                        dimension_name: User 1
                        metrics:
                          reply_time:
                            fast: 11
                            slow: 32
                            not_replied: 0
                            total: 43
                          reply_means:
                            ai_suggestion: 20
                            manual: 3
                            auto_reply: 0
                            reply_template: 20
                            total: 43
                ?metrics=rank,rating_distribution&dimensions=group&order_by=-ratio__rating_distribution__5&groups=1244,1245,1246:
                  value:
                    page: 1
                    count: 3
                    max_page: 1
                    data:
                      - dimension: 1244
                        dimension_name: Group 1244
                        metrics:
                          rank: 1
                          rating_distribution:
                            '1': 0
                            '2': 0
                            '3': 0
                            '4': 0
                            '5': 65
                      - dimension: 1245
                        dimension_name: Group 1245
                        metrics:
                          rank: 1
                          rating_distribution:
                            '1': 0
                            '2': 0
                            '3': 11
                            '4': 32
                            '5': 65
                      - dimension: 60b2645fb12ff60643ef8344
                        dimension_name: Group 1246
                        metrics:
                          rank: 3
                          rating_distribution:
                            '1': 19
                            '2': 0
                            '3': 0
                            '4': 0
                            '5': 0
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /reviews/stats:
    get:
      tags:
        - Review analytics
      summary: Global reviews statistics
      operationId: getReviewAnalytics
      deprecated: true
      description: |
        This endpoint let you view the global reviews statistics for all your businesses subscribed to
        **Review Management**.

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

        The response is aggregated according to the previously selected filters.

        In order to get analytics evolution overtime returned by specific time range, please refer to
        **Qualitative Evolution** and **Quantitative Evolution** endpoints.
      parameters:
        - $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:
                $ref: '#/components/schemas/ReviewsStatisticsResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /reviews/qualitative-evolution:
    get:
      tags:
        - Review analytics
      summary: Qualitative evolution
      operationId: getQualitativeEvolution
      deprecated: true
      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
      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'
  /reviews/quantitative-evolution:
    get:
      tags:
        - Review analytics
      summary: Quantitative evolution
      operationId: getQuantitativeEvolution
      deprecated: true
      description: |
        This endpoint lets you view the quantitative evolution of the **number of reviews** for all of your businesses
        subscribed to **Review Management**. The API returns the cumulative sum of the number of reviews by bucket
        (time range) selected overtime.

        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
      parameters:
        - $ref: '#/components/parameters/query_review_bucket'
        - $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'
                    added: 50
                    previous_sum: 20
                    cum_sum: 70
                  - date: '2019-12-05'
                    added: 34
                    previous_sum: 70
                    cum_sum: 104
                  - date: '2019-12-12'
                    added: 4
                    previous_sum: 104
                    cum_sum: 108
                items:
                  type: object
                  properties:
                    date:
                      type: string
                      format: datetype
                      description: Start date of the bucket
                    added:
                      type: integer
                      description: Number of reviews added during the current bucket.
                    previous_sum:
                      type: number
                      description: Cumulative sum of the number of reviews for the previous bucket.
                      format: float
                    cum_sum:
                      type: number
                      format: float
                      description: Cumulative sum of the number of reviews.
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /review_booster/send_invitation:
    post:
      tags:
        - Review Booster
      summary: Send a review invitation
      operationId: sendReviewInvitation
      description: |
        This endpoint lets you send an SMS to a customer to help them leave a message on Google.       You need to have `WRITE` access on the business.      
        You can add `invite_content` in your payload to customize the SMS content that will be received by the recipient.      Otherwise, the template associated with the user will be used.      If no template exists, a new one will be generated.     
        Your business needs to be connected to a Google location and subscribed to the Review Booster product.   Therefore, this cannot be tested in the Sandbox environment.    
        To prevent spamming, a new SMS can be sent to a specific phone number only after 10 days since the last SMS was sent.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - business_id
                - target_phone
              properties:
                business_id:
                  $ref: '#/components/schemas/BusinessId'
                target_phone:
                  type: string
                  description: 'Customer phone number, with the country calling code. Eg: +33601020304'
                target_name:
                  type: string
                  description: Customer fullname
                  maxLength: 255
                template_id:
                  type: integer
                  description: Id of the SMS template you want to use
                  deprecated: true
                invite_content:
                  type: string
                  description: To customize SMS content instead of using the SMS template associated with the user. Cannot be used in combination with template_id. @link must be included in your payload (corresponds to the dynamic link that will allow the SMS recipient to leave a review on the business). Max 286 characters (unicode characters are not accepted - will be removed)
                force:
                  type: string
                  description: To force invitation sending when a SMS has already been sent to the customer
                  enum:
                    - 'True'
                    - 'False'
                  default: 'False'
            examples:
              Using template:
                value:
                  business_id: 5409c35a97bbc544d8e26737
                  target_phone: '+33647385968'
                  target_name: John Doe
                  template_id: 31
              Using invite content:
                value:
                  business_id: 5409c35a97bbc544d8e26737
                  target_phone: '+33647385968'
                  target_name: John Doe
                  invite_content: Hello, thank you for you visit ! Leave a review and tell us more about your experience ! @link Thank you!
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  invitation_id:
                    $ref: '#/components/schemas/InvitationId'
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /review_booster/search-invitation:
    get:
      tags:
        - Review Booster
      operationId: checkDuplicatedReviewInvitation
      summary: Search for an invitation matching a set of criteria
      description: |
        This endpoint allows to fetch previously sent invitations. Your access token must be for an user subscribed to the Review Booster product to access this route. The user must have access to the business. This can be useful to avoid sending multiple invitations to the same user in a defined period.
      parameters:
        - in: query
          name: business_id
          required: true
          schema:
            $ref: '#/components/schemas/BusinessId'
        - in: query
          name: target_phone
          required: true
          schema:
            $ref: '#/components/schemas/TargetPhone'
        - in: query
          name: after
          schema:
            type: number
            example: 1559148288
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      review_invitations:
                        type: array
                        description: List of invitations sent
                        items:
                          type: object
                          properties:
                            user_name:
                              type: string
                              example: Perceval
                            user_id:
                              type: string
                              example: 54b6733b9826bf1dd29af128
                            id:
                              type: string
                              example: 3d90efec-0d7f-4960-98c0-951d58dc14cb
                            sent_time:
                              type: string
                              example: '2019-06-06 11:57:27.274725+00:00'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
  /review_booster/invitation_status:
    get:
      tags:
        - Review Booster
      summary: The status of a review invitation
      operationId: getReviewInvitationStatus
      description: "This endpoint allows to get the status about an invitation sent through the Review Booster. Your access token must be for a user subscribed to the Review\_Booster. The invitation id must be for a business for which the user has access to.\n"
      parameters:
        - in: query
          name: invitation_id
          schema:
            $ref: '#/components/schemas/InvitationId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  invitation_id:
                    $ref: '#/components/schemas/InvitationId'
                  status:
                    type: string
                    description: the current state of the SMS
                    enum:
                      - CREATED
                      - SENT
                      - FAILED_SEND
                      - DELIVERED
                      - FAILED_DELIVERY
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
  /review_booster/template:
    get:
      tags:
        - Review Booster
      summary: Template for a user
      operationId: getInvitationTemplate
      description: |
        This endpoint lets you get your corresponding template.   If no template exists for the user, a template is created and sent back.
        You need to be subscribed to the Review Booster product.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  template_id:
                    description: The id associated to the template
                    type: string
                    example: 3462
                  template:
                    description: The template content, with placeholder(s) not filled
                    type: string
                    example: Hello ${client_name}, please leave a review ${url}
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    put:
      tags:
        - Review Booster
      summary: Update the template of a user
      operationId: setInvitationTemplate
      description: |
        This endpoint lets you update the template associated with the user.
        3 placeholders are available for the template: `${client_name}`, `${business_name}`, and `${url}`.
        There are 2 main constraints:   - `${url}` must be present in the template sent.   - The text should not contain more than 250 characters (excluding placeholders).  
        The template must exist before the request is sent.
        You need to be subscribed to the Review Booster product.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - template
              properties:
                template:
                  description: the template content, with placeholder(s) not filled
                  type: string
                  example: Hello ${client_name}, please leave a review ${url}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /review_booster/expeditor:
    post:
      tags:
        - Review Booster
      summary: Set the expeditor name of a business
      operationId: setExpeditorName
      description: |
        This endpoint lets you set the expeditor name of a business.
        An expeditor name is the name of the sender used to send the message.   It will be seen instead of the phone number on the destination phone.
        An expeditor name's length must be between 3 and 11 characters. No special characters are allowed.
        Your business must be subscribed to the Review Booster product.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - business_id
                - expeditor_name
              properties:
                business_id:
                  $ref: '#/components/schemas/BusinessId'
                expeditor_name:
                  description: The new expeditor name
                  type: string
                  example: Partoo
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  expeditor_name:
                    description: the updated expeditor name, with no special characters and between 3 and 11 characters
                    type: string
                    example: Partoo
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    get:
      tags:
        - Review Booster
      summary: The expeditor name of a business
      operationId: getExpeditorName
      description: |
        This endpoint lets you get the expeditor name of a business.
        An expeditor name is the name of the sender used to send the message.   It will be seen instead of the phone number on the destination phone.
        Your business must be subscribed to the Review Booster product.
      parameters:
        - in: query
          name: business_id
          required: true
          schema:
            $ref: '#/components/schemas/BusinessId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  expeditor_name:
                    description: The expeditor name used to send message
                    type: string
                    example: Partoo
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/subscription:
    get:
      tags:
        - Businesses
        - Subscriptions
      operationId: getBusinessSubscriptions
      deprecated: true
      summary: Subscriptions for your business
      description: |
        <b>⚠️ This endpoint is deprecated. Please use the new endpoint [`/business/{business_id}/plans`](/api-reference/subscriptions/update-businesss-plans) instead. ⚠️</b>

        This endpoint lets you access the subscription of a business.
        You need to have `READ` access on this business.
      parameters:
        - $ref: '#/components/parameters/business_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Business subscriptions
                properties:
                  presence_management:
                    $ref: '#/components/schemas/SubscriptionDetails'
                  review_management:
                    $ref: '#/components/schemas/SubscriptionDetails'
                  review_booster:
                    $ref: '#/components/schemas/SubscriptionDetails'
                  messages:
                    $ref: '#/components/schemas/SubscriptionDetails'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/subscribe:
    post:
      summary: Subscribe a business
      operationId: subscribeBusiness
      deprecated: true
      description: |
        <b>⚠️ This endpoint is deprecated. Please use the new endpoint [`/business/{business_id}/plans`](/api-reference/subscriptions/update-businesss-plans) instead. ⚠️</b>

        This endpoint lets you subscribe a business to one or several Partoo products.

        You need to have `WRITE` access on the business you want to subscribe.

        You need to have `PROVIDER` to be able to perform this action.
      tags:
        - Businesses
        - Subscriptions
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                subscription_date:
                  type: number
                  description: Timestamp representing the date on which the subscription will start
                  example: 1540628702
                products:
                  type: array
                  description: List of products
                  items:
                    $ref: '#/components/schemas/Product'
                plan:
                  type: string
                  description: Any string that define your offer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  presence_management:
                    oneOf:
                      - $ref: '#/components/schemas/ProductSubscribeResponseObject'
                      - $ref: '#/components/schemas/ProductUnsubscribeResponseObject'
                  review_management:
                    oneOf:
                      - $ref: '#/components/schemas/ProductSubscribeResponseObject'
                      - $ref: '#/components/schemas/ProductUnsubscribeResponseObject'
                  review_booster:
                    oneOf:
                      - $ref: '#/components/schemas/ProductSubscribeResponseObject'
                      - $ref: '#/components/schemas/ProductUnsubscribeResponseObject'
                  messages:
                    oneOf:
                      - $ref: '#/components/schemas/ProductSubscribeResponseObject'
                      - $ref: '#/components/schemas/ProductUnsubscribeResponseObject'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/unsubscribe:
    post:
      summary: Unsubscribe a business
      operationId: unsubscribeBusiness
      deprecated: true
      description: |
        <b>⚠️ This endpoint is deprecated. Please use the new endpoint [`/business/{business_id}/plans`](/api-reference/subscriptions/update-businesss-plans) instead. ⚠️</b>

        This endpoint lets you unsubscribe a business from one or several Partoo products.

        You need to have `WRITE` access on the business you want to subscribe.

        You need to have `PROVIDER` to be able to perform this action.
      tags:
        - Businesses
        - Subscriptions
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                canceling_date:
                  type: number
                  description: Timestamp representing the date on which the subscription will stop to be valid
                  example: 1540628702
                products:
                  type: array
                  description: List of products
                  items:
                    $ref: '#/components/schemas/Product'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  presence_management:
                    oneOf:
                      - $ref: '#/components/schemas/ProductSubscribeResponseObject'
                      - $ref: '#/components/schemas/ProductUnsubscribeResponseObject'
                  review_management:
                    oneOf:
                      - $ref: '#/components/schemas/ProductSubscribeResponseObject'
                      - $ref: '#/components/schemas/ProductUnsubscribeResponseObject'
                  review_booster:
                    oneOf:
                      - $ref: '#/components/schemas/ProductSubscribeResponseObject'
                      - $ref: '#/components/schemas/ProductUnsubscribeResponseObject'
                  messages:
                    oneOf:
                      - $ref: '#/components/schemas/ProductSubscribeResponseObject'
                      - $ref: '#/components/schemas/ProductUnsubscribeResponseObject'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /org/{org_id}/plans:
    get:
      tags:
        - Subscriptions
        - Organizations
      summary: Get Organization's plans
      operationId: organizationPlans
      description: |
        This endpoint lets you retrieve the organization's plans.     
        You need to be a Provider to access this endpoint.
      parameters:
        - $ref: '#/components/parameters/path_org_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgPlans'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    post:
      tags:
        - Subscriptions
        - Organizations
      summary: Update organization's plans
      operationId: updateOrganizationPlans
      description: |
        This endpoint lets you update the plans of an organization.     
        You need to be a Provider to access this endpoint.      
        ⚠️ You need to send **all the plans**, those not sent will be removed. We advise you to call the GET endpoint first. ⚠️
      parameters:
        - $ref: '#/components/parameters/path_org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationPlansUpdate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Result object
                properties:
                  org_id:
                    $ref: '#/components/schemas/OrgId'
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /business/{business_id}/plans:
    get:
      tags:
        - Subscriptions
        - Businesses
      summary: Get Business's plans
      operationId: businessPlans
      description: |
        This endpoint lets you retrieve the business's plans.<br /> You need to be a Provider to access this endpoint.
      parameters:
        - $ref: '#/components/parameters/business_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessPlans'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    post:
      tags:
        - Subscriptions
        - Businesses
      summary: Update business's plans
      operationId: updateBusinessPlans
      description: |
        This endpoint lets you update the plans of a business.<br /> You need to be a Provider to access this endpoint.<br /> ⚠️You need to send <b>all the plans</b>, those not sent will be removed. We advise you to call the GET endpoint first. ⚠️
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessPlansUpdate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Result object
                properties:
                  business_id:
                    $ref: '#/components/schemas/BusinessId'
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /user/search:
    get:
      tags:
        - Users
      summary: Search for users
      description: This endpoint lets you search for users using filters
      operationId: searchUser
      parameters:
        - in: query
          name: email
          schema:
            type: string
            format: email
          description: Filter by user email. Value must be a valid email address. Case-insensitive exact match.
          required: false
        - $ref: '#/components/parameters/query_filter_by_org_id'
        - in: query
          name: query
          schema:
            type: string
          description: Fuzzy search across the full name and email of users. Case-insensitive.
        - in: query
          name: status
          schema:
            $ref: '#/components/schemas/UserStatus'
            description: Filter users by status
        - in: query
          name: disabled
          schema:
            type: boolean
          description: If `true`, return only disabled users. If `false`, return only active users.
        - in: query
          name: has_assigned_businesses
          schema:
            type: boolean
          required: false
          description: |
            Filter users based on whether they have at least one assigned business (`true`) or no assigned businesses (`false`).
        - in: query
          name: has_not_permission
          schema:
            type: string
          required: false
          description: |
            Filter users who do *not* have the specified permission.

            For available permissions and their names, use [GET /api/v2/permissions](/api-reference/custom-roles/get-permissions) to retrieve the full list of available permissions for your organization.
        - in: query
          name: has_permission
          schema:
            type: string
          required: false
          description: |
            Filter users who have the specified permission.

            For available permissions and their names, use [GET /api/v2/permissions](/api-reference/custom-roles/get-permissions) to retrieve the full list of available permissions for your organization.
        - in: query
          name: last_name
          schema:
            type: string
          required: false
          description: Filter users by last name (exact substring match, case-sensitive).
        - in: query
          name: role
          schema:
            $ref: '#/components/schemas/Role'
            description: |
              Filter users by role. Accepts a single value or a comma-separated list.
          required: false
        - $ref: '#/components/parameters/query_display_business_ids'
        - in: query
          name: business_id
          schema:
            type: string
            description: |
              Filter by users having access to the business with the provided id.
            example: 5409c35a97bbc544d8e26737u
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_per_page_1_100'
        - in: query
          name: order_by
          schema:
            type: string
            enum:
              - email
              - first_name
              - group_id
              - id
              - last_activity_date
              - last_name
              - org_id
              - role
              - status
              - -email
              - -first_name
              - -group_id
              - -id
              - -last_activity_date
              - -last_name
              - -org_id
              - -role
              - -status
            default: id
          required: false
          description: |
            Order result by given attribute.
            Reverse order can as well be obtained by using a `-` (minus sign) before the attribute name, e.g. `order_by=-name`
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      users:
                        type: array
                        description: List of users
                        items:
                          $ref: '#/components/schemas/User'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
  /user/me:
    get:
      tags:
        - Users
      summary: My user
      description: This endpoint lets you retrieve all the information about your user
      operationId: getMyUser
      parameters:
        - $ref: '#/components/parameters/query_display_business_ids'
        - name: org_id_custom_fields_permissions
          in: query
          description: If you have access to more than one organization, you can specify the org_id of the organization for which you want to retrieve the `permissions` value.
          required: false
          schema:
            type: integer
          example: 42
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UserWithFeatures'
                  - type: object
                    properties:
                      permissions:
                        description: |
                          The permissions the user has access to.

                          For more information about permissions, see the [Custom Roles guide](/guides/api/guides/custom-roles-and-permissions).
                        type: array
                        items:
                          type: string
                        example:
                          - access_help_center
                          - access_intercom
                          - account_facebook_manage
                          - account_google_manage
                          - bulk_modification
                          - business_edit
                          - business_edit_address
                          - business_edit_address2
                          - business_edit_attributes
                          - business_edit_attributes_url
                          - business_edit_categories
                          - business_edit_city
                          - business_edit_code
                          - business_edit_coordinates
                          - business_edit_country
                          - business_edit_description_long
                          - business_edit_description_short
                          - business_edit_email
                          - business_edit_facebook_url
                          - business_edit_fax
                          - business_edit_full_name
                          - business_edit_menus
                          - business_edit_more_hours
                          - business_edit_name
                          - business_edit_open_hours
                          - business_edit_phone_number
                          - business_edit_photo_cover
                          - business_edit_photo_logo
                          - business_edit_photo_secondary
                          - business_edit_services
                          - business_edit_siret
                          - business_edit_specific_hours
                          - business_edit_status
                          - business_edit_twitter_url
                          - business_edit_website_url
                          - business_edit_zipcode
                          - business_management_create_business
                          - business_management_import_business
                          - business_management_manage_groups
                          - custom_fields_edit
                          - custom_fields_edit__Decimal
                          - custom_fields_edit__Photos de voyage
                          - custom_fields_see_disabled_fields
                          - diffusion
                          - feedback_management
                          - feedback_result_reply
                          - jim_configuration
                          - jim_configuration_manage
                          - lead_collection_manage
                          - listing_status
                          - listing_status_manage
                          - messages
                          - messages_answer_conversation_custom
                          - messages_answer_conversation_facebook
                          - messages_answer_conversation_instagram
                          - messages_answer_conversation_sms
                          - messages_answer_conversation_whatsapp
                          - messages_conversation_assign
                          - messages_conversation_close
                          - messages_conversation_reopen
                          - messages_conversation_starters
                          - messages_conversation_starters_manage
                          - messages_lead_collection_read
                          - messages_templates_manage
                          - messages_templates_use
                          - messages_whatsapp_account
                          - messages_whatsapp_account_manage
                          - messages_widget
                          - messages_widget_manage
                          - partner_connection
                          - partner_connection_manage
                          - posts
                          - posts_manage
                          - posts_manage_bulk
                          - presence_analytics
                          - review_analytics
                          - review_analytics_download
                          - review_booster
                          - review_booster_edit_expeditor_name
                          - review_booster_manage_sms_template
                          - review_booster_share_link
                          - review_booster_show_qr_code
                          - review_download
                          - review_flag
                          - review_manage_auto_reply_with_comments
                          - review_manage_auto_reply_without_comments
                          - review_manage_state
                          - review_management
                          - review_reply_negative_reviews
                          - review_reply_neutral_reviews
                          - review_reply_positive_reviews
                          - review_reply_suggestion
                          - review_reply_template_manage
                          - review_reply_template_use
                          - review_tags_assign
                          - review_tags_manage
                          - user_management
                          - user_management_manage
        '401':
          $ref: '#/components/responses/401'
  /user:
    post:
      tags:
        - Users
      summary: Create user
      description: |
        This endpoint lets you create a user. If no password given, a password will automatically be generated.

        The password will be ignored if `send_invitation` is set to `True`.

        You need to have `WRITE` access on the organization of the user you want to create.

        If you want to have an `invited` user but send the invitation email later, you have to send the `send_invitation` parameter as `False` and a `status` parameter to `invited`.       
        You will then have to call the [invitation endpoint](/api-reference/users/invite-user) to send the invitation email to the user.
      operationId: createUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to create a user
              type: object
              required:
                - email
                - first_name
                - last_name
              properties:
                email:
                  description: User email (must be unique will return otherwise)
                  type: string
                  format: email
                first_name:
                  $ref: '#/components/schemas/UserFirstName'
                last_name:
                  $ref: '#/components/schemas/UserLastName'
                org_id:
                  $ref: '#/components/schemas/UserCreateUpdateOrgId'
                accesses:
                  $ref: '#/components/schemas/accesses'
                business_ids:
                  description: |
                    The list of business to which the user has access to. Will be taken into account only if user has `BUSINESS_MANAGER` role.
                  type: array
                  items:
                    type: string
                role:
                  $ref: '#/components/schemas/RoleWithoutProvider'
                custom_role:
                  $ref: '#/components/schemas/CustomRoleApiId'
                sidebar_pages:
                  deprecated: true
                  allOf:
                    - $ref: '#/components/schemas/SidebarPages'
                  description: |
                    **DEPRECATED**: This parameter is deprecated in favor of the new Custom Roles system. See the [Custom Roles & Permissions guide](/guides/api/guides/custom-roles-and-permissions) for migration information.

                    List of features the user can access from the sidebar.
                    If not provided in the payload or set to `null`, then the user will be given all the available features of their organization.
                send_invitation:
                  description: |
                    Send an invitation email to the User.
                    If you want to have an `invited` user but send the invitation email later, you have to send the `send_invitation` parameter as `False` and a `status` parameter to `invited`.     
                    You will then have to call the [invitation endpoint](/api-reference/users/invite-user) to send the invitation email to the user.
                  type: boolean
                  default: false
                status:
                  $ref: '#/components/schemas/UserStatus'
                password:
                  $ref: '#/components/schemas/Password'
                lang:
                  $ref: '#/components/schemas/Lang'
                sso_only:
                  $ref: '#/components/schemas/SsoOnly'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/UserId'
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /user/{user_id}:
    get:
      tags:
        - Users
      summary: User information
      description: |
        This endpoint lets you retrieve all the information on a user. You need to have `READ` access to this users.
      operationId: getUser
      parameters:
        - $ref: '#/components/parameters/path_user_id'
        - $ref: '#/components/parameters/query_display_business_ids'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserWithFeatures'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      tags:
        - Users
      summary: Update user
      description: |
        This endpoint lets you update a user. You need to have `WRITE` access to this user. It has a patch behaviour which means that only indicated value will be changed.
      operationId: updateUser
      parameters:
        - $ref: '#/components/parameters/path_user_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to update a user.
              type: object
              properties:
                email:
                  $ref: '#/components/schemas/UserEmail'
                first_name:
                  $ref: '#/components/schemas/UserFirstName'
                last_name:
                  $ref: '#/components/schemas/UserLastName'
                org_id:
                  $ref: '#/components/schemas/UserCreateUpdateOrgId'
                accesses:
                  $ref: '#/components/schemas/accesses'
                business_ids:
                  description: |
                    The list of business to which the user has access to. Will be taken into account only if user has `BUSINESS_MANAGER` role.
                  type: array
                  items:
                    type: string
                role:
                  $ref: '#/components/schemas/RoleWithoutProvider'
                custom_role:
                  $ref: '#/components/schemas/CustomRoleApiId'
                sidebar_pages:
                  deprecated: true
                  allOf:
                    - $ref: '#/components/schemas/SidebarPages'
                  description: |
                    **DEPRECATED**: This parameter is deprecated in favor of the new Custom Roles system. See the [Custom Roles & Permissions guide](/guides/api/guides/custom-roles-and-permissions) for migration information.

                    List of features the user can access from the sidebar.
                status:
                  $ref: '#/components/schemas/UserStatus'
                disabled:
                  type: boolean
                  description: The state of the User account.
                password:
                  $ref: '#/components/schemas/Password'
                lang:
                  $ref: '#/components/schemas/Lang'
                sso_only:
                  $ref: '#/components/schemas/SsoOnly'
                receive_reviews_email_notifications:
                  description: The parameter decides if the user subscribes to negative reviews email notifications
                  type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/UserId'
                  status:
                    type: string
                    enum:
                      - success
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    delete:
      summary: Delete user
      description: |
        This endpoint lets you delete a user. You need to have `WRITE` access to this user.
      operationId: deleteUser
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/path_user_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/UserId'
                  status:
                    type: string
                    enum:
                      - success
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /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'
    post:
      summary: Set user preferences
      description: |
        This endpoint lets you update all the information about a user's preferences on notifications. You need to have `WRITE` access to this user.
      operationId: updateUserPreferences
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/path_user_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                reports:
                  $ref: '#/components/schemas/UserReports'
                receive_negative_reviews_email_notifications:
                  $ref: '#/components/schemas/ReceiveNegativeReviewsEmailNotifications'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/UserId'
                  status:
                    type: string
                    enum:
                      - success
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /user/{user_id}/invite:
    post:
      tags:
        - Users
      summary: Invite user
      description: |
        This endpoint lets you trigger a new invitation email to an `invited` user. You need to have `WRITE` access to this user. The email can only be sent once every 5 minutes.
      operationId: reinviteUser
      parameters:
        - $ref: '#/components/parameters/path_user_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /user/{user_id}/businesses:
    get:
      tags:
        - Users
      summary: User businesses
      description: |
        This endpoint lets you retrieve the list of businesses which the selected user has `READ` access to.
      operationId: getUserBusinesses
      parameters:
        - $ref: '#/components/parameters/path_user_id'
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_per_page_1_100'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      businesses:
                        description: User businesses
                        type: array
                        items:
                          $ref: '#/components/schemas/Business'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /feedback/email-templates:
    get:
      operationId: listFeedbackEmailTemplates
      summary: List email templates
      tags:
        - Feedback Management
      x-badges:
        - name: Beta
          position: after
      description: |
        <Warning>
        The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

        If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
        </Warning>

        Retrieves the paginated list of feedback email templates for the authenticated user's organization, ordered by most recently updated.

        The response is paginated (default 30 results per page, up to 100).
      parameters:
        - in: query
          name: page
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number (1-indexed)
        - in: query
          name: per_page
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 30
          description: Number of results per page
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      items:
                        type: array
                        description: List of email templates
                        items:
                          $ref: '#/components/schemas/feedback_email_template'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    post:
      operationId: createFeedbackEmailTemplate
      summary: Create an email template
      tags:
        - Feedback Management
      x-badges:
        - name: Beta
          position: after
      description: |
        <Warning>
        The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

        If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
        </Warning>

        Creates a new feedback email template for the authenticated user's organization.

        When `cta_type` is `BUTTON`, the `cta_text` field is required.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeedbackEmailTemplateCreate'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/feedback_email_template'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '422':
          description: Request body validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        loc:
                          type: array
                          items: {}
                        msg:
                          type: string
                        type:
                          type: string
  /feedback/email-templates/{template_id}:
    put:
      operationId: updateFeedbackEmailTemplate
      summary: Update an email template
      tags:
        - Feedback Management
      x-badges:
        - name: Beta
          position: after
      description: |
        <Warning>
        The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

        If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
        </Warning>

        Updates an existing feedback email template belonging to the authenticated user's organization.

        All fields are optional — only the fields present in the request body are updated.

        When the resulting `cta_type` is `BUTTON` (either newly set or already stored), `cta_text` must be non-null.
      parameters:
        - $ref: '#/components/parameters/path_template_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeedbackEmailTemplateUpdate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/feedback_email_template'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          description: Validation error — e.g. `cta_text` is null while the effective `cta_type` is `BUTTON`
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    oneOf:
                      - type: string
                        example: cta_text is required when cta_type is BUTTON
                      - type: array
                        items:
                          type: object
                          properties:
                            loc:
                              type: array
                              items: {}
                            msg:
                              type: string
                            type:
                              type: string
    delete:
      operationId: deleteFeedbackEmailTemplate
      summary: Delete an email template
      tags:
        - Feedback Management
      x-badges:
        - name: Beta
          position: after
      description: |
        <Warning>
        The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

        If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
        </Warning>

        Deletes a feedback email template belonging to the authenticated user's organization.
      parameters:
        - $ref: '#/components/parameters/path_template_id'
      responses:
        '204':
          description: No Content — template deleted successfully
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /feedback/feedback_form:
    get:
      summary: Search for feedback forms
      description: |
        <Warning>
        The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

        If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
        </Warning>

        This endpoint lets you search for the feedback forms of your organization.

        The response is paginated (30 results per page).
      operationId: searchFeedbackForm
      tags:
        - Feedback Management
      x-badges:
        - name: Beta
          position: after
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      items:
                        description: Filtered feedback forms
                        type: array
                        items:
                          $ref: '#/components/schemas/feedback_form'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /feedback/feedback_form/{feedback_form_id}:
    put:
      summary: Update a feedback form
      description: |
        <Warning>
        The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

        If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
        </Warning>

        This endpoint lets you modify the properties of your feedback forms.
      operationId: updateFeedbackForm
      tags:
        - Feedback Management
      x-badges:
        - name: Beta
          position: after
      parameters:
        - in: path
          name: feedback_form_id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to post a reply
              type: object
              required:
                - content
              properties:
                display_name:
                  allOf:
                    - $ref: '#/components/schemas/display_name'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/feedback_form'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /feedback/feedback_form/stats:
    post:
      summary: Push email-delivery stats for a feedback form
      description: |
        <Warning>
        The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

        If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
        </Warning>

        This endpoint lets you push one day of email-delivery funnel metrics (sent, delivered, opened,
        clicked, bounced) for a feedback form and business, typically reported by your Email Service
        Provider (ESP).

        It upserts on `(feedback_form_id, business_id, date)`: `sent` and `clicked` always overwrite
        the row, while the optional metrics (`processed`, `delivered`, `opened`, `bounced`) keep their
        previous value when omitted or `null`, defaulting to `0` only on a brand-new row.

        Rows created here are always stored with `source: external`, and feed the `survey.sent`,
        `survey.delivered`, `survey.opened`, `survey.clicked` and `survey.error_bounces`
        [analytics metrics](/api-reference/feedback-analytics/feedback-analytics-metrics).
      operationId: upsertFeedbackFormStats
      tags:
        - Feedback Management
      x-badges:
        - name: Beta
          position: after
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - feedback_form_id
                - business_id
                - date
                - sent
                - clicked
              properties:
                feedback_form_id:
                  allOf:
                    - $ref: '#/components/schemas/FeedbackFormId'
                business_id:
                  allOf:
                    - $ref: '#/components/schemas/BusinessId'
                date:
                  type: string
                  format: date
                  description: Day these metrics apply to
                  example: '2026-06-01'
                sent:
                  type: integer
                  minimum: 0
                  description: Number of survey emails sent
                  example: 100
                clicked:
                  type: integer
                  minimum: 0
                  description: Number of survey link clicks (from the email)
                  example: 10
                processed:
                  type:
                    - integer
                    - 'null'
                  minimum: 0
                  description: Number of survey emails accepted for delivery by the ESP. Omit or send `null` to leave unchanged.
                  example: 95
                delivered:
                  type:
                    - integer
                    - 'null'
                  minimum: 0
                  description: Number of survey emails successfully delivered. Omit or send `null` to leave unchanged.
                  example: 90
                opened:
                  type:
                    - integer
                    - 'null'
                  minimum: 0
                  description: Number of survey emails opened. Omit or send `null` to leave unchanged.
                  example: 50
                bounced:
                  type:
                    - integer
                    - 'null'
                  minimum: 0
                  description: Number of survey emails that bounced. Omit or send `null` to leave unchanged.
                  example: 5
            example:
              feedback_form_id: 674d791c13c9d976e20001b1
              business_id: 5409c35a97bbc544d8e26737
              date: '2026-06-01'
              sent: 100
              clicked: 10
              processed: 95
              delivered: 90
              opened: 50
              bounced: 5
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/feedback_form_stats'
              example:
                feedback_form_id: 674d791c13c9d976e20001b1
                business_id: 5409c35a97bbc544d8e26737
                date: '2026-06-01'
                source: external
                org_id: 42
                sent: 100
                processed: 95
                delivered: 90
                opened: 50
                clicked: 10
                error_bounces: 5
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
  /feedback/feedback_result:
    get:
      summary: Search for feedback results
      description: |
        <Warning>
        The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

        If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
        </Warning>

        This endpoint lets you search for the feedback results of your businesses.

        The response is paginated (30 results per page).
      operationId: searchFeedbackResults
      tags:
        - Feedback Management
      x-badges:
        - name: Beta
          position: after
      parameters:
        - $ref: '#/components/parameters/query_business__in'
        - $ref: '#/components/parameters/query_business__notin'
        - $ref: '#/components/parameters/state__in'
        - $ref: '#/components/parameters/created__lte'
        - $ref: '#/components/parameters/created__gte'
        - $ref: '#/components/parameters/nps__lte'
        - $ref: '#/components/parameters/nps__gte'
        - $ref: '#/components/parameters/nps__in'
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/optin'
        - $ref: '#/components/parameters/feedback_form_ids'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      items:
                        description: Filtered feedback results
                        type: array
                        items:
                          $ref: '#/components/schemas/feedback_result'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /feedback/feedback_result/{feedback_result_id}:
    get:
      summary: Get a feedback result by ID
      description: |
        <Warning>
        The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

        If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
        </Warning>

        This endpoint lets you retrieve a single feedback result by its ID.
      operationId: getFeedbackResult
      tags:
        - Feedback Management
      x-badges:
        - name: Beta
          position: after
      parameters:
        - in: path
          name: feedback_result_id
          required: true
          schema:
            type: integer
          description: ID of the feedback result
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/feedback_result'
              example:
                id: 1
                business_id: abc
                store_code: STORE-042
                firstname: John
                lastname: Doe
                nps: 9
                content: Great service, will come back!
                state: not_treated
                optin: true
                created: '2024-10-25T15:12:11+00:00'
                feedback_result_fields:
                  - feedback_form_field:
                      id: 674d7aaa13e599deae0001b2
                      field_type: CSAT
                      field_label: How satisfied are you?
                      field_choices: null
                    rating: 5
                    content: null
                    choices: null
                comments: []
                feedback_form:
                  id: 674d791c13c9d976e20001b1
                  display_name: Global Satisfaction
                  custom_hidden_fields: {}
                extra: {}
                issues: null
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /feedback/feedback_result/{feedback_result_id}/reply:
    post:
      summary: Reply to a feedback result
      description: |
        <Warning>
        The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

        If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
        </Warning>

        This endpoint lets you reply to a feedback result.

        In order to be able to reply to a feedback result:
        - The `optin` property of the corresponding feedback result must be true
        - The `email_reply_source` of the corresponding feedback form must be set
        - The `email_reply_subject` of the corresponding feedback form must be set
      operationId: replyFeedbackResult
      tags:
        - Feedback Management
      x-badges:
        - name: Beta
          position: after
      parameters:
        - in: path
          name: feedback_result_id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request body to post a reply
              type: object
              required:
                - content
              properties:
                content:
                  description: Content of your reply
                  type: string
                  format: text
                  example: Merci ❤️
                reply_suggestion:
                  description: Suggestion details for the reply
                  type: object
                  properties:
                    reply_suggestion_id:
                      type: integer
                      description: ID of the reply suggestion
                      example: 123
                    reply_suggestion_modified:
                      type: boolean
                      description: Indicates if the reply suggestion was modified
                      example: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/feedback_result_reply'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /feedback/feedback_result/fetch-suggestion/{feedback_result_id}/{index}:
    get:
      summary: Fetch AI reply suggestion for feedback results
      description: |
        <Warning>
        The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

        If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
        </Warning>

        Fetch a reply suggestion generated by AI for a specific feedback result.
      operationId: fetchFeedbackReplySuggestion
      tags:
        - Feedback Management
      x-badges:
        - name: Beta
          position: after
      parameters:
        - in: path
          name: feedback_result_id
          required: true
          schema:
            type: integer
            description: ID of the feedback result
        - in: path
          name: index
          required: true
          schema:
            type: integer
            minimum: 0
            maximum: 2
            description: Index of the reply suggestion (0, 1, or 2)
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/feedback_result_reply_suggestion'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /feedback/campaign/requirements:
    get:
      operationId: getFeedbackEmailCampaignRequirements
      summary: Get campaign requirements
      tags:
        - Feedback Management
      x-badges:
        - name: Beta
          position: after
      description: |
        <Warning>
        The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

        If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
        </Warning>

        Returns the recipient fields and template variables needed to prepare a feedback email campaign
        for the given feedback form and email template.

        Use this endpoint before [Send a feedback email campaign](/api-reference/feedback-management/send-a-feedback-email-campaign)
        to determine which keys to include in each recipient payload.
      parameters:
        - in: query
          name: feedback_form_id
          required: true
          schema:
            type: string
          description: ID of the feedback form to associate with the campaign
          example: 5a3f8c2e1b4d7f9a0c6e2b18
        - in: query
          name: feedback_email_template_id
          required: true
          schema:
            type: integer
          description: ID of the email template to inspect
          example: 42
      responses:
        '200':
          description: Campaign requirements retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignRequirementsResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          description: Feedback form or email template not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Form not found.
        '422':
          description: Query parameter validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        loc:
                          type: array
                          items: {}
                        msg:
                          type: string
                        type:
                          type: string
  /feedback/campaign/send:
    post:
      operationId: sendFeedbackEmailCampaign
      summary: Send a feedback email campaign
      tags:
        - Feedback Management
      description: |
        Validates the sender email, validates recipients, and sends a feedback email campaign to the provided recipient list.

        Use the [Get campaign requirements](/api-reference/feedback-management/get-campaign-requirements) endpoint
        to retrieve the variables each recipient must provide.

        The sender email domain must be authorized for your organization and validated for email sending.
        If sender validation fails, the entire campaign is rejected and the response includes `sender_validation` details.

        If any recipient fails validation, the entire campaign is rejected and **no emails are sent**.
        The response body details every validation error.

        Set `is_dry_run: true` to validate recipients without sending any emails.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendCampaignRequest'
      responses:
        '200':
          description: Campaign accepted or failed validation. Check the `status` field to distinguish the two outcomes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendCampaignResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          description: Feedback form or email template not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Form not found.
        '422':
          description: Request body validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        loc:
                          type: array
                          items: {}
                        msg:
                          type: string
                        type:
                          type: string
  /feedback/analytics/metrics:
    get:
      summary: Feedback analytics metrics
      description: |
        **⚠️ This feature is available only for organisations subscribed to Feedback Management. ⚠️**

        Retrieve aggregated feedback analytics data for your organisation.

        A request is composed of:
        - One or more **`metrics`** — the data you want to compute (required)
        - An optional **`dimensions`** — how the data is grouped
          - If omitted, the request returns the aggregated totals across all data matching the filters
        - An optional **`order_by`** — how the rows are sorted
        - **Filters** to narrow the data:
          - By business (`business__in`, `business__notin`)
          - By group or group section (`groups`, `group_section_id`)
          - By date range (`filter_date__gte`, `filter_date__lte`)
          - By survey or field (`survey__in`, `survey_field__in`, `survey_field_type__in`)
          - By NPS score (`result_nps_score__in`)
          - By free-text comment (`verbatim_query`)
          - By data quality issues (`issues__in`, `issues__notin`)
          - By business location (`city`, `query`)

        **Metrics** are grouped into five categories:

        | Category | Prefix | Examples |
        |---|---|---|
        | Survey | `survey.` | `survey.response_rate`, `survey.nb__sent` |
        | CSAT | `result.csat.` | `result.csat.score`, `result.csat.avg_score` |
        | NPS | `result.nps.` | `result.nps.score`, `result.nps.promoters` |
        | Response | `response.` | `response.avg_response_time`, `response.method.nb__ai` |
        | Result field | `result_field.` | `result_field.rating`, `result_field.choices` |

        **Dimensions** control how rows are grouped:
        - Entity: `business`, `user`, `feedback_form`, `group`, `group_section`, `feedback_form_field`, `result`
        - Time: `day`, `month`, `year`

        **Excel download**: add `download=true` to receive the data as an `.xlsx` file instead of JSON.
        Use `table_name` to customise the filename.

        **Metadata**: add `metadata=true` to include full entity objects (businesses, forms, users…)
        alongside the `data` array. Useful for resolving IDs to display names without extra API calls.
      operationId: getFeedbackAnalyticsMetrics
      tags:
        - Feedback analytics
      deprecated: false
      parameters:
        - $ref: '#/components/parameters/query_metrics'
        - $ref: '#/components/parameters/query_dimensions'
        - $ref: '#/components/parameters/fm_analytics_query_order_by'
        - $ref: '#/components/parameters/fm_analytics_query_business__in'
        - $ref: '#/components/parameters/fm_analytics_query_business__notin'
        - $ref: '#/components/parameters/query_user__in'
        - $ref: '#/components/parameters/fm_analytics_query_groups'
        - $ref: '#/components/parameters/query_group_section_id'
        - $ref: '#/components/parameters/fm_analytics_query_city'
        - $ref: '#/components/parameters/fm_analytics_query_query'
        - $ref: '#/components/parameters/fm_analytics_query_filter_date__gte'
        - $ref: '#/components/parameters/fm_analytics_query_filter_date__lte'
        - $ref: '#/components/parameters/query_survey__in'
        - $ref: '#/components/parameters/query_survey_field__in'
        - $ref: '#/components/parameters/query_survey_field_type__in'
        - $ref: '#/components/parameters/query_result_nps_score__in'
        - $ref: '#/components/parameters/query_result_id__in'
        - $ref: '#/components/parameters/query_verbatim_query'
        - $ref: '#/components/parameters/query_issues__in'
        - $ref: '#/components/parameters/query_issues__notin'
        - $ref: '#/components/parameters/query_metadata'
        - $ref: '#/components/parameters/query_download'
        - $ref: '#/components/parameters/query_table_name'
        - $ref: '#/components/parameters/fm_analytics_query_page'
        - $ref: '#/components/parameters/fm_analytics_query_per_page'
      responses:
        '200':
          description: |
            OK.

            When `download=true`, the response is an Excel file (`.xlsx`) with a
            `Content-Disposition: attachment` header containing the generated filename,
            instead of the JSON body described below.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeedbackAnalyticsResponse'
              examples:
                ?metrics=result.csat.score,result.csat.avg_score:
                  value:
                    page: 1
                    count: 1
                    max_page: 1
                    data:
                      - result.csat.score: 87.5
                        result.csat.avg_score: 4.38
                    metadata:
                      feedback_form: null
                      feedback_form_field: null
                      result: null
                      business: null
                      group: null
                      group_section: null
                      user: null
                ?metrics=result.csat.score&dimensions=business:
                  value:
                    page: 1
                    count: 2
                    max_page: 1
                    data:
                      - result.csat.score: 91.2
                        business_id: 59b2645db12ff60643ef832c
                      - result.csat.score: 83.4
                        business_id: 60b2645fb12ff60643ef8344
                    metadata:
                      feedback_form: null
                      feedback_form_field: null
                      result: null
                      business: null
                      group: null
                      group_section: null
                      user: null
                ?metrics=result.nps.score,result.nps.promoters&dimensions=month&filter_date__gte=2024-01-01&filter_date__lte=2024-03-31:
                  value:
                    page: 1
                    count: 3
                    max_page: 1
                    data:
                      - result.nps.score: 42
                        result.nps.promoters: 58
                        date: '2024-01-01'
                      - result.nps.score: 45
                        result.nps.promoters: 63
                        date: '2024-02-01'
                      - result.nps.score: 50
                        result.nps.promoters: 71
                        date: '2024-03-01'
                    metadata:
                      feedback_form: null
                      feedback_form_field: null
                      result: null
                      business: null
                      group: null
                      group_section: null
                      user: null
                ?metrics=survey.response_rate,survey.nb__sent&dimensions=feedback_form&metadata=true:
                  value:
                    page: 1
                    count: 2
                    max_page: 1
                    data:
                      - survey.response_rate: 0.72
                        survey.nb__sent: 250
                        feedback_form_id: 674d791c13c9d976e20001b1
                      - survey.response_rate: 0.61
                        survey.nb__sent: 180
                        feedback_form_id: 674d791c13c9d976e20001b2
                    metadata:
                      feedback_form:
                        - id: 674d791c13c9d976e20001b1
                          display_name: Post-visit Survey
                        - id: 674d791c13c9d976e20001b2
                          display_name: Annual NPS Survey
                      feedback_form_field: null
                      result: null
                      business: null
                      group: null
                      group_section: null
                      user: null
                ?metrics=survey.sent,survey.delivered,survey.opened,survey.clicked,survey.error_bounces&dimensions=feedback_form:
                  value:
                    page: 1
                    count: 1
                    max_page: 1
                    data:
                      - survey.sent: 120
                        survey.delivered: 118
                        survey.opened: 89
                        survey.clicked: 42
                        survey.error_bounces: 2
                        feedback_form_id: 674d791c13c9d976e20001b1
                ?metrics=result.csat.score&dimensions=business,month&order_by=-result.csat.score:
                  value:
                    page: 1
                    count: 4
                    max_page: 1
                    data:
                      - result.csat.score: 95
                        business_id: 59b2645db12ff60643ef832c
                        date: '2024-02-01'
                      - result.csat.score: 90
                        business_id: 60b2645fb12ff60643ef8344
                        date: '2024-02-01'
                      - result.csat.score: 88
                        business_id: 59b2645db12ff60643ef832c
                        date: '2024-01-01'
                      - result.csat.score: 75
                        business_id: 60b2645fb12ff60643ef8344
                        date: '2024-01-01'
                    metadata:
                      feedback_form: null
                      feedback_form_field: null
                      result: null
                      business: null
                      group: null
                      group_section: null
                      user: null
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /webhooks:
    get:
      tags:
        - Webhooks
      operationId: getWebhookList
      summary: Get a list of webhook configurations
      description: |
        This endpoint returns the list of webhook configurations.
      parameters:
        - $ref: '#/components/parameters/org_id'
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_per_page_1_100'
      x-badges:
        - name: Beta
          position: after
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      items:
                        type: array
                        description: List of webhook configurations
                        items:
                          $ref: '#/components/schemas/WebhookItem'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    post:
      tags:
        - Webhooks
      operationId: Webhook
      summary: Create webhook configurations
      description: |
        This endpoint create webhook configurations.
      x-badges:
        - name: Beta
          position: after
      parameters:
        - $ref: '#/components/parameters/org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhooksPayload'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      items:
                        type: array
                        description: List of created webhook configurations
                        items:
                          $ref: '#/components/schemas/WebhookItem'
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /webhooks/{webhook_id}:
    get:
      tags:
        - Webhooks
      operationId: getWebhook
      summary: Get a webhook configuration
      description: |
        This endpoint returns the details of a webhook configuration.
      x-badges:
        - name: Beta
          position: after
      parameters:
        - $ref: '#/components/parameters/webhook_id'
        - $ref: '#/components/parameters/org_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookItem'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    patch:
      tags:
        - Webhooks
      operationId: patchWebhook
      summary: Update a webhook configuration
      description: |
        This endpoint updates a webhook configuration.
      x-badges:
        - name: Beta
          position: after
      parameters:
        - $ref: '#/components/parameters/webhook_id'
        - $ref: '#/components/parameters/org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWebhookPayload'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookItem'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    delete:
      tags:
        - Webhooks
      operationId: deleteWebhook
      summary: Delete a webhook configuration
      description: |
        This endpoint deletes a webhook configuration.
      x-badges:
        - name: Beta
          position: after
      parameters:
        - $ref: '#/components/parameters/webhook_id'
        - $ref: '#/components/parameters/org_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookDeleteSuccess'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
  /webhooks/tryout:
    post:
      tags:
        - Webhooks
      operationId: postWebhookTryout
      summary: Send test webhook payloads
      description: |
        This endpoint let you try webhook configurations by sending test payloads.     This currently supports only one webhook configuration per request, entries after the first one will be ignored.       Payloads are created by the latest data of the specified event type, or if not available a default payload will be sent.       The request is similar to a regular webhook, but also contains an additional `X-Partoo-Webhook-Tryout` header.
      x-badges:
        - name: Beta
          position: after
      parameters:
        - $ref: '#/components/parameters/org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhooksPayload'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      items:
                        type: array
                        description: Result of the tests.
                        items:
                          $ref: '#/components/schemas/WebhookTryoutResult'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
  /webhooks/events:
    get:
      tags:
        - Webhooks
      operationId: getWebhooksEvents
      summary: List available webhook events
      description: |
        This endpoint returns the list of the webhook events available to the organization, depending on the subscribed products.
      x-badges:
        - name: Beta
          position: after
      parameters:
        - $ref: '#/components/parameters/org_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEventTypes'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
webhooks:
  businessCreated:
    post:
      operationId: business_created
      tags:
        - Webhooks Events
      summary: New Business Created
      description: |
        This event is triggered when a Business is created in Partoo Database.

        The event payload contains the event type and the business contents.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - business_created
                payload:
                  type: object
                  properties:
                    business:
                      $ref: '#/components/schemas/Business'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  businessUpdated:
    post:
      operationId: business_updated
      tags:
        - Webhooks Events
      summary: Business Updated
      description: |
        This event is triggered when a Business is updated in Partoo Database.

        The event payload contains the event type and the business contents.

        Attention, the hook may be triggered on internal changes that may not reflect on the contents sent.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - business_updated
                payload:
                  type: object
                  properties:
                    business:
                      $ref: '#/components/schemas/Business'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  businessDeleted:
    post:
      operationId: business_deleted
      tags:
        - Webhooks Events
      summary: Business Deleted
      description: |
        This event is triggered when a Business is removed from Partoo Database.

        The event payload contains the event type and the business id.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - business_deleted
                payload:
                  type: object
                  properties:
                    business_id:
                      $ref: '#/components/schemas/BusinessId'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  messageCreated:
    post:
      operationId: message_created
      tags:
        - Webhooks Events
      summary: Message Created
      description: |
        This event is triggered when a conversation has a new message.

        The event payload contains the event type, the content of the message
        created, and additional information about the conversation.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - message_created
                payload:
                  $ref: '#/components/schemas/MessageCreatedEvent'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  messageUpdated:
    post:
      operationId: message_updated
      tags:
        - Webhooks Events
      summary: Message Updated
      description: |
        This event is triggered if the field of a message is updated (example: `status`, `is_deleted`).

        Messages send via Partoo are created with the status `Sending`, and
        propagated to the messaging channel.
        If the message is sent successfully, the status is changed to `Success`.
        If the messaging channel fails to send the message, the status changed to
        `Failed`. A failed message can be retried using the [/retry endpoint](/api-reference/messages/retry-send-message).

        The event payload contains the event type, the content of the updated message and additional information about the conversation.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - message_updated
                payload:
                  $ref: '#/components/schemas/MessageCreatedEvent'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  leadReceived:
    post:
      operationId: lead_received
      tags:
        - Webhooks Events
      summary: Lead Received
      description: |
        This event is triggered when a Lead is added in Partoo Database.

        The event payload contains the event type and the lead contents.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - lead_received
                payload:
                  type: object
                  $ref: '#/components/schemas/LeadWebhook'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  reviewCreated:
    post:
      operationId: review_created
      tags:
        - Webhooks Events
      summary: Review Created
      description: |
        This event is triggered when a business receives a new review.

        The event payload contains the event type and the review contents.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - review_created
                payload:
                  type: object
                  properties:
                    review:
                      $ref: '#/components/schemas/Review'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  reviewUpdated:
    post:
      operationId: review_updated
      tags:
        - Webhooks Events
      summary: Review Updated
      description: |
        This event is triggered when a review is updated. This can happen in one of these cases:
          - One or more attributes of a review have been updated (including a content or rating update from its author) 
          - A tag has been assigned or unassigned to this review on Partoo
          - A review has been deleted - this could happen in two ways (see more info below):
            - Permanently, by the author.
            - Temporarily unavailable due to a bug in Google’s system
          - If a review reappears after being temporarily unavailable


          ⚠️ **More info on review deletes:**

          Because of a bug in Google’s system, some reviews may temporarily disappear from their data as if they were deleted, even though they were not, and then reappear later.

          When a review goes missing, we cannot determine whether it was actually deleted or just affected by this bug.
          We must consider this review as if it can reappear in the future. For that reason, a `review_updated` event will be sent in both cases.

          Here is a sample scenario:
           - September 4: A review is edited by its author. 
             - A `review_update` event is triggered, showing the review updated content.
           - September 10: The review disappears due to the Google bug.
             - Another `review_update` event is triggered, with the review state set at `deleted` 
           - September 15: The review becomes visible again.
             - Another `review_update` is then triggered, showing the review state before the soft delete 
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - review_updated
                payload:
                  type: object
                  properties:
                    review:
                      $ref: '#/components/schemas/Review'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  reviewReplyCreated:
    post:
      operationId: review_reply_created
      tags:
        - Webhooks Events
      summary: Review Reply Created
      description: |
        This event is triggered when a review has been replied to.

        The event payload contains the event type and the reply contents.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - review_reply_created
                payload:
                  type: object
                  properties:
                    comment:
                      $ref: '#/components/schemas/Comment'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  reviewReplyUpdated:
    post:
      operationId: review_reply_updated
      tags:
        - Webhooks Events
      summary: Review Reply Updated
      description: |
        This event is triggered when a review reply has been updated.

        The event payload contains the event type and the reply contents.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - review_reply_updated
                payload:
                  type: object
                  properties:
                    comment:
                      $ref: '#/components/schemas/Comment'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  reviewReplyDeleted:
    post:
      operationId: review_reply_deleted
      tags:
        - Webhooks Events
      summary: Review Reply Deleted
      description: |
        This event is triggered when a review reply has been deleted

        The event payload contains the review reply id.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - review_reply_deleted
                payload:
                  type: object
                  properties:
                    comment_id:
                      $ref: '#/components/schemas/CommentId'
                    review_id:
                      $ref: '#/components/schemas/ReviewId'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  customReplyCreated:
    post:
      operationId: custom_reply_created
      tags:
        - Webhooks Events
      summary: Custom Review Reply Created
      description: |
        This event is triggered when a reply is written in Partoo on a review created for a
        [custom review partner](/guides/api/resources/reviews/retrieve-reviews#custom-review-partners).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - custom_reply_created
                payload:
                  type: object
                  properties:
                    org_id:
                      $ref: '#/components/schemas/OrgId'
                    business_id:
                      $ref: '#/components/schemas/BusinessId'
                    partner_slug:
                      type: string
                      description: Slug of the custom partner the review belongs to.
                      example: my_partner
                    review_external_id:
                      type: string
                      description: |
                        The `external_id` you sent when pushing the review, returned as `key` on the
                        review.
                      example: mp-review-8f21c0
                    reply:
                      type: object
                      description: The reply, as you need it to publish it on your platform.
                      properties:
                        content:
                          type:
                            - string
                            - 'null'
                          description: Text of the reply.
                          example: Merci pour votre retour, à très bientôt !
                        date:
                          type: string
                          description: |
                            When the reply was written, in ISO 8601 with the offset of the business
                            timezone.
                          example: '2026-09-16T09:04:55+02:00'
                        update_date:
                          type:
                            - string
                            - 'null'
                          description: |
                            When the reply was last edited, `null` while it has never been edited.
                          example: '2026-09-16T09:04:55+02:00'
                        author_name:
                          type:
                            - string
                            - 'null'
                          description: |
                            The Partoo user who wrote the reply. Returned as `anonymous` when the
                            review has been deleted since.
                          example: Camille Durand
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  customReplyUpdated:
    post:
      operationId: custom_reply_updated
      tags:
        - Webhooks Events
      summary: Custom Review Reply Updated
      description: |
        This event is triggered when an existing reply is edited in Partoo on a review you pushed
        through a [custom review partner](/guides/api/resources/reviews/retrieve-reviews#custom-review-partners).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - custom_reply_updated
                payload:
                  type: object
                  properties:
                    org_id:
                      $ref: '#/components/schemas/OrgId'
                    business_id:
                      $ref: '#/components/schemas/BusinessId'
                    partner_slug:
                      type: string
                      description: Slug of the custom partner the review belongs to.
                      example: my_partner
                    review_external_id:
                      type: string
                      description: |
                        The `external_id` you sent when pushing the review, returned as `key` on the
                        review.
                      example: mp-review-8f21c0
                    reply:
                      type: object
                      description: The reply, as you need it to publish it on your platform.
                      properties:
                        content:
                          type:
                            - string
                            - 'null'
                          description: Text of the reply.
                          example: Merci pour votre retour, à très bientôt !
                        date:
                          type: string
                          description: |
                            When the reply was written, in ISO 8601 with the offset of the business
                            timezone.
                          example: '2026-09-16T09:04:55+02:00'
                        update_date:
                          type:
                            - string
                            - 'null'
                          description: |
                            When the reply was last edited, `null` while it has never been edited.
                          example: '2026-09-16T09:04:55+02:00'
                        author_name:
                          type:
                            - string
                            - 'null'
                          description: |
                            The Partoo user who wrote the reply. Returned as `anonymous` when the
                            review has been deleted since.
                          example: Camille Durand
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  customReplyDeleted:
    post:
      operationId: custom_reply_deleted
      tags:
        - Webhooks Events
      summary: Custom Review Reply Deleted
      description: |
        This event is triggered when a reply is removed in Partoo from a review you pushed through a
        [custom review partner](/guides/api/resources/reviews/retrieve-reviews#custom-review-partners).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - custom_reply_deleted
                payload:
                  type: object
                  properties:
                    org_id:
                      $ref: '#/components/schemas/OrgId'
                    business_id:
                      $ref: '#/components/schemas/BusinessId'
                    partner_slug:
                      type: string
                      description: Slug of the custom partner the review belongs to.
                      example: my_partner
                    review_external_id:
                      type: string
                      description: |
                        The `external_id` you sent when pushing the review, returned as `key` on the
                        review.
                      example: mp-review-8f21c0
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  emailOptOutCreated:
    post:
      operationId: email_opt_out_created
      tags:
        - Webhooks Events
      summary: Email Opt-Out Created
      description: |
        This event is triggered when a recipient opts out of survey emails.

        The event payload contains the event timestamp and the opted-out email address.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - email_opt_out_created
                payload:
                  type: object
                  properties:
                    email_address:
                      type: string
                      description: The email address that opted out of survey emails.
                      example: jane.doe@example.com
                    created_at:
                      type: string
                      description: An ISO 8601 date-time string representing when the opt-out was recorded.
                      example: '2024-11-27T16:10:44.929678Z'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  postCreated:
    post:
      operationId: post_created
      tags:
        - Webhooks Events
      summary: Post Created
      description: |
        This event is triggered when a post (or draft post) is created or scheduled for one or more
        businesses.

        If it is a scheduled post, the payload will contain a non-null schedule_time.
        If it is a draft post, the payload will have an `is_draft` property set to `true`.

        A bulk creation (multiple businesses at once) fires a single event listing every
        affected business, rather than one event per business.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - post_created
                payload:
                  $ref: '#/components/schemas/PostCreatedPayload'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  postUpdated:
    post:
      operationId: post_updated
      tags:
        - Webhooks Events
      summary: Post Updated
      description: |
        This event is triggered when a post's content is edited.

        A bulk edit (multiple businesses at once) fires a single event listing every
        affected business, rather than one event per business.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - post_updated
                payload:
                  $ref: '#/components/schemas/PostCreatedUpdatedPayload'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  postValidated:
    post:
      operationId: post_validated
      tags:
        - Webhooks Events
      summary: Post Validated
      description: |
        This event is triggered when a draft post is validated (state `to_validate` → live/pending).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - post_validated
                payload:
                  $ref: '#/components/schemas/PostCreatedUpdatedPayload'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  postDeleted:
    post:
      operationId: post_deleted
      tags:
        - Webhooks Events
      summary: Post Deleted
      description: |
        This event is triggered when one or more posts are deleted.

        A bulk deletion fires a single event listing every deleted post id, rather than
        one event per post.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - post_deleted
                payload:
                  $ref: '#/components/schemas/PostDeletedWebhookPayload'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  scheduledPostPushed:
    post:
      operationId: scheduled_post_pushed
      tags:
        - Webhooks Events
      summary: Scheduled Post Pushed
      description: |
        This event is triggered when a scheduled post reaches its scheduled time and is
        pushed to its publisher (Google, Facebook, Instagram, or Store Locator).

        Unlike `post_created`/`post_updated`, this fires on the *attempt* to push, not on
        confirmed success: publishing to Google/Facebook/Instagram happens asynchronously
        afterward and can still fail. 

        One event is also fired per post/business, even when the post is part of a bulk.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - scheduled_post_pushed
                payload:
                  $ref: '#/components/schemas/ScheduledPostPushedWebhookPayload'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
  feedbackResultCreated:
    post:
      operationId: feedback_result_created
      tags:
        - Webhooks Events
      summary: Feedback Result Created
      description: |
        This event is triggered when a business receives a new survey response.

        The event payload contains the event type and the full response: the respondent, the
        survey, and every question with its answer. It has the same format as a feedback result
        returned by `GET /feedback/feedback_result`, plus `org_id` and the respondent's `email`.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - feedback_result_created
                payload:
                  $ref: '#/components/schemas/feedback_result_webhook_payload'
      responses:
        '200':
          description: |
            Return a 200 status to indicate that the event was properly received
        '500':
          description: |
            An error in range 500-599 will trigger a retry from webhook delivery system, up to 5 times, with an exponential backout.

            > ⚠️ You may have to deal with events not received in order
      security: []
components:
  parameters:
    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.
    query_api_key_include_all_permissions:
      in: query
      name: include_all_permissions
      schema:
        type: boolean
        default: false
      description: |
        Controls whether `permissions` are filtered based on what the API key's user is actually allowed to access.
        An API key can have broader permissions than its attached user's own permissions, however they won't be taken into account unless the user has them.
        - `false` (default) — The returned `permissions` list is filtered down with only those the user has access to.
        - `true` — The returned `permissions` list is not filtered. All permissions are included in the response, regardless of what the user has access to.
    query_filter_by_fuzzy_query_on_business:
      in: query
      name: query
      schema:
        type: string
      required: false
      description: Parameter to fuzzy search businesses on city, zipcode and name
    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:
          description: ''
          $ref: '#/components/schemas/BusinessId'
    query_code__in:
      in: query
      name: code__in
      description: Filter by business `code`. Use a comma-separated list to provide multiple codes.
      schema:
        type: array
        example: code1,code2,code3
        items:
          description: ''
          $ref: '#/components/schemas/BusinessCode'
    query_filter_by_org_id:
      in: query
      name: org_id
      schema:
        type: integer
      required: false
      description: |
        Filter by organization ID. Only `PROVIDER` users can use this filter. If you are not a `PROVIDER`, this will default to the ID of your organization.
    query_filter_by_groups:
      in: query
      name: groups
      schema:
        type: array
        items:
          type: integer
      required: false
      description: |
        Filter by groups, using the access logic with the and/or depending on the groups sections

        See [the Groups and Sections description](/guides/api/resources/organizations/groups)
      example: 1,2,3
    query_filter_by_country:
      in: query
      name: country
      schema:
        type: string
      required: false
      description: Filter by country - ISO 3166 alpha2 code (i.e. “FR” for France)
    query_filter_by_business_name:
      in: query
      name: name
      schema:
        type: string
      required: false
      description: Filter by name
    query_filter_by_business_status:
      in: query
      name: status
      schema:
        $ref: '#/components/schemas/BusinessStatusFilter'
    query_filter_by_zipcode:
      in: query
      name: zipcode
      schema:
        type: string
      required: false
      description: Filter by zipcode
    query_filter_by_city:
      in: query
      name: city
      schema:
        type: string
      required: false
      description: Filter by city
    query_filter_by_business_code:
      in: query
      name: code
      schema:
        type: string
      required: false
      description: Filter by code
    query_filter_by_business_modification_timestamp:
      in: query
      name: modified__gte
      deprecated: false
      schema:
        type: number
      required: false
      description: Filter by modified attribute (modified >= modified_gte)
    query_filter_by_business_features__in:
      in: query
      name: features__in
      schema:
        allOf:
          - $ref: '#/components/schemas/FeatureEnum'
        description: |
          Filter businesses that have all the features provided, separated by commas.
        type: string
        example: diffusion,review_management
    query_filter_by_business_features__notin:
      in: query
      name: features__notin
      schema:
        allOf:
          - $ref: '#/components/schemas/FeatureEnum'
        description: |
          Filter businesses that *do not* have all the features provided, separated by commas.
        type: string
        example: diffusion,review_management
    query_filter_by_business_subscription_to_review_management:
      in: query
      deprecated: false
      name: subscribed_to_rm
      schema:
        type: boolean
      required: false
      description: |
        Filter by current subscription to `review_management`.
        - If `true`, only businesses subscribed to `review_management` will be included.
        - If `false`, only businesses *not* subscribed to `review_management` will be included.

        Equivalent to using `features__in=review_management`.
    query_filter_by_business_subscription_to_presence_management:
      in: query
      deprecated: false
      name: subscribed_to_pm
      schema:
        type: boolean
      required: false
      description: |
        Filter by current subscription to `presence_management`.
        - If `true`, only businesses subscribed to `presence_management` will be included.
        - If `false`, only businesses *not* subscribed to `presence_management` will be included.

        Equivalent to using `features__in=diffusion`.
    query_filter_by_business_subscription_to_review_booster:
      in: query
      deprecated: false
      name: subscribed_to_rb
      schema:
        type: boolean
      required: false
      description: |
        Filter by current subscription to `review_booster`.
        - If `true`, only businesses subscribed to `review_booster` will be included.
        - If `false`, only businesses *not* subscribed to `review_booster` will be included.

        Equivalent to using `features__in=review_invite`.
    query_filter_by_business_subscription_to_messages:
      in: query
      deprecated: false
      name: subscribed_to_bm
      schema:
        type: boolean
      required: false
      description: |
        Filter by current subscription to `messages`.
        - If `true`, only businesses subscribed to `messages` will be included.
        - If `false`, only businesses *not* subscribed to `messages` will be included.

        Equivalent to using `features__in=messages`.
    query_filter_by_business_completion_rate__gte:
      in: query
      name: completion_rate__gte
      deprecated: false
      schema:
        type: integer
        minimum: 0
        maximum: 100
      required: false
      description: Filter by `completion_rate` attribute (`completion_rate >= completion_rate__gte`)
    query_filter_by_business_completion_rate__lte:
      in: query
      name: completion_rate__lte
      deprecated: false
      schema:
        type: integer
        minimum: 0
        maximum: 100
      required: false
      description: Filter by `completion_rate` attribute (`completion_rate <= completion_rate__lte`)
    query_filter_by_business_completion_rate:
      in: query
      name: completion_rate
      deprecated: false
      schema:
        type: string
        enum:
          - low
          - mid
          - high
        example: low,mid
      required: false
      description: Filter by `completion_rate` attribute. You can separate the values by a comma, as done in the example.
    query_filter_by_business_promo:
      in: query
      name: has_promo
      deprecated: true
      schema:
        type: boolean
      required: false
      description: |
        - If `true`, include only businesses having promotional offers.
        - If `false`, include only businesses *not* having any promotional offer.
    query_filter_by_connected_to_gmb_location:
      in: query
      name: connected_to_gmb_location
      schema:
        type: boolean
      required: false
      description: |
        - If `true`, only businesses currently linked to a Google location will be included.
        - If `false`, only businesses *not* linked to any Google location will be included.
    query_filter_by_connected_to_facebook_location:
      in: query
      name: connected_to_facebook_location
      schema:
        type: boolean
      required: false
      description: |
        - If `true`, only businesses currently linked to a Facebook location will be included.
        - If `false`, only businesses *not* linked to any Facebook location will be included.
    business_id:
      in: path
      name: business_id
      required: true
      schema:
        type: string
      description: |
        Business id.      

        It may be replaced by `c-{code}` where code is the store code, which should be unique per organization. This can be used only for `ORG_ADMIN`, `GROUP_MANAGER` and `BUSINESS_MANAGER` users.
    category_name_optional:
      in: query
      name: category_name
      required: false
      schema:
        type: string
        example: gcid:restaurant
      description: Category for which availabe attributes will be fetched.
    country:
      in: query
      name: country
      required: false
      schema:
        type: string
      description: |
        Country for which available attributes will be fetched - use ISO 3166 alpha2 code ("FR", "EN", "IT").
      example: FR
    category_more_hours_business:
      in: query
      name: category
      required: false
      schema:
        type: string
        example: gcid:restaurant
      description: If supplied, will only return more hours that are available for the specified business category. If not supplied, the business' main category will be used.
    country_more_hours_business:
      in: query
      name: country
      required: false
      schema:
        type: string
      description: |
        If supplied, will only return more hours that are available in the specified country. - use ISO 3166 alpha2 code ("FR", "EN", "IT"). If not supplied, the country from the business' address will be used.
      example: FR
    path_service_id:
      in: path
      name: service_id
      required: true
      schema:
        type: string
      description: |
        Id of the service (For creation, you can get this id by calling the [get services suggestions endpoint](/api-reference/google/list-google-services)).
    path_org_id:
      in: path
      name: org_id
      required: true
      schema:
        type: integer
      description: |
        Unique ID of the organization to which the resource belongs. Only `PROVIDER` users can access resources from a different organization than their own. If you are not a `PROVIDER`, this will default to the ID of your organization.
    query_category_country:
      in: query
      name: country
      required: false
      description: |
        Filters categories available for businesses in given country.

        If no country is given, then the endpoint returns the list of all existing available categories.

        Use country ISO 3166 alpha2 code.
      schema:
        type: string
      example: FR
    query_category_lang:
      in: query
      name: lang
      required: false
      schema:
        $ref: '#/components/schemas/Lang'
      description: |
        Language to get the category name. If not given, the user's language is used.
    query_category_state:
      in: query
      name: state
      required: false
      schema:
        type: string
        enum:
          - OK
          - DEPRECATED
    query_category_block_push_long:
      in: query
      name: block_push_long_description_on_gmb
      description: Filter on `block_push_long_description_on_gmb` param (boolean indicating if the business long description can be pushed to Google when the business belongs to this category)
      required: false
      schema:
        type: boolean
    query_category_search_query:
      in: query
      name: search_query
      description: Fuzzy search on gmb_id and names translations
      required: false
      schema:
        type: string
    query_category_order_by:
      in: query
      name: order_by
      description: |
        Order results by colum. Add "-" before for ordering by descending order.
      required: false
      schema:
        type: string
        enum:
          - gmb_id
          - -gmb_id
          - impacted_businesses
          - -impacted_businesses
    query_category_live__isnull:
      in: query
      name: live__isnull
      description: |
        Filter on `live_id` parameter value

        - True: Recover categories which `live_id` is null      
        - False: Recover categories which `live_id` is not null     

        Null: Do not filter on `live_id`
      schema:
        type: boolean
    query_category_with_names_categories:
      in: query
      name: with_names
      description: |
        Returns an object representing the list of translations in the available languages for the requested category. See example on the right.

        If `with_names` is true, the translations will appear in the field __names__
      required: false
      schema:
        type: boolean
        default: false
    query_category_with_countries:
      in: query
      name: with_countries
      description: |
        Returns an array of strings representing the list of country codes in which the requested category is available.

        If `with_countries` is true, the country list will appear in the field __countries__
      required: false
      schema:
        type: boolean
        default: false
    query_category_return_live:
      in: query
      name: return_live
      description: Return the corresponding live category instead of the requested category
      required: false
      schema:
        type: boolean
        default: false
    query_category_with_names:
      in: query
      name: with_names
      description: |
        Returns an object representing the list of translations in the available languages for the requested category. See example on the right.

        If `with_names` is true, the translations will appear in the field __names__
      required: false
      schema:
        type: boolean
        default: false
    PerPage:
      in: query
      name: per_page
      schema:
        type: integer
        default: 30
        minimum: 1
        maximum: 100
      description: Number of items to return per page.
    Cursor:
      in: query
      name: cursor
      schema:
        type: string
      description: |
        The cursor identifiying the page of data to fetch.
        If no cursor is provided, the query will return the first page of data.
        A cursor for the next page of data is provided in the response of this request.
    LastMessageDateGte:
      in: query
      name: last_message_date__gte
      schema:
        type: string
        format: datetime
        example: '2023-01-01T00:00:00Z'
      description: |
        Filter by the date of the last message of the conversation.

        Return all the conversations whose last message date >= `given_date`.

        For example: `last_message_date__gte=2023-01-01T00:00:00Z` will return all conversations
        whose last message was sent or received from the first of January 2023 onwards.

        **Note**: the date must include an explicit UTC offset (e.g. the `Z` suffix, or `+00:00`).
        A date with no timezone information is rejected with a `400` error.

        Combining this with `last_message_date__lte` defines a range: `last_message_date__gte`
        must not be later than `last_message_date__lte`, or the request is rejected with a `400`
        error.
    LastMessageDateLte:
      in: query
      name: last_message_date__lte
      schema:
        type: string
        format: datetime
        example: '2023-01-31T23:59:59Z'
      description: |
        Filter by the date of the last message of the conversation.

        Return all the conversations whose last message date <= `given_date`.

        For example: `last_message_date__lte=2023-01-31T23:59:59Z` will return all conversations
        whose last message was sent or received up until the 31st of January 2023.

        **Note**: the date must include an explicit UTC offset (e.g. the `Z` suffix, or `+00:00`).
        A date with no timezone information is rejected with a `400` error.

        Combining this with `last_message_date__gte` defines a range: `last_message_date__gte`
        must not be later than `last_message_date__lte`, or the request is rejected with a `400`
        error.
    path_template_id:
      in: path
      name: template_id
      required: true
      schema:
        type: number
      description: Template id
    Page:
      in: query
      name: page
      schema:
        type: integer
        default: 1
        minimum: 1
      description: Current page number.
    query_org_id:
      in: query
      name: org_id
      schema:
        type: integer
      required: false
      description: |
        Organization ID. Only `PROVIDER` users can specify a different organization. If not provided, defaults to your own organization.
    custom_field_id:
      in: path
      name: custom_field_id
      required: true
      schema:
        $ref: '#/components/schemas/CustomFieldId'
    section_id:
      in: path
      name: section_id
      required: true
      schema:
        $ref: '#/components/schemas/CustomFieldSectionId'
    path_custom_role_api_id:
      in: path
      required: true
      name: custom_role_api_id
      schema:
        type: string
      description: API identifier of the custom role (`api_id`)
    category_name:
      in: query
      name: category_name
      required: true
      schema:
        type: string
        example: gcid:restaurant
      description: Category for which availabe attributes will be fetched.
    lang:
      in: query
      name: lang
      required: false
      schema:
        type: string
        enum:
          - fr
          - es
          - it
          - en
          - de
          - pt
          - pt-BR
      description: |
        Language in which the attributes name and groups name will be translated.
        If language is not specified, by default we take the language of the user.
    category_more_hours_list:
      in: query
      name: category
      required: true
      schema:
        type: string
        example: gcid:restaurant
      description: Category for which availabe More Hour IDs will be fetched.
    country_more_hours_list:
      in: query
      name: country
      required: true
      schema:
        type: string
      description: |
        Country for which available More Hour IDs will be fetched - use ISO 3166 alpha2 code ("FR", "EN", "IT").
      example: FR
    lang_more_hours:
      in: query
      name: lang
      required: false
      schema:
        type: string
        enum:
          - fr
          - es
          - it
          - en
          - de
          - pt
          - pt-BR
      description: |
        Language in which the More Hours names will be translated.
        If language is not specified, by default we take the language of the user.
    google_location_id:
      in: path
      name: google_location_id
      required: true
      schema:
        type: string
      description: Google location unique id on Partoo
    path_section_id:
      in: path
      name: section_id
      required: true
      schema:
        type: integer
      description: Section ID
    path_group_id:
      in: path
      name: group_id
      required: true
      schema:
        type: integer
      description: Group ID
    organization_force_delete:
      in: query
      name: force
      required: false
      schema:
        $ref: '#/components/schemas/OrganizationForceDeletion'
    query_post_start_datetime:
      in: query
      name: start_datetime
      schema:
        type: string
        example: '2020-11-06T23:59:59'
      required: false
      description: |
        Filters Posts based on their start datetime.

        The start datetime represents the moment on which a Post of type **event/offer** will become available. In case of Posts of type **news**, the `start_datetime` it will be compare to the creation date of the Post, as the field is not present in this context.
    query_post_end_datetime:
      in: query
      name: end_datetime
      schema:
        type: string
        example: '2020-11-06T23:59:59'
      required: false
      description: |
        Filter Posts based on their end datetime.

        The end datetime represents the date on which the Post of type **event/offer** will expire. In case of Posts of type **news**, the `end_datetime` it will be compare to exactly one week after the creation date of the Post, as the field is not present in this context.
    query_post_summary:
      in: query
      name: summary
      schema:
        type: string
      required: false
      description: |
        Filter Posts based on their description.

        It returns Posts that contain in their description the given string.
        The text does not have to match perfectly.
    query_post_state_in:
      in: query
      name: state__in
      schema:
        type: string
        enum:
          - live
          - to_configure
          - pending
          - scheduled
          - error
          - expired
          - to_validate
      required: false
      description: Filter Posts based on its state.
    query_post_topic_type:
      in: query
      name: topic_type
      schema:
        type: string
        enum:
          - standard
          - event
          - offer
          - alert
      required: false
      description: Filter Posts based on its type.
    query_post_topic_type_in:
      in: query
      name: topic_type__in
      schema:
        type: string
        enum:
          - standard
          - event
          - offer
          - alert
      required: false
      description: Filter Posts based on a list of different types.
    path_post_id:
      in: path
      name: post_id
      required: true
      schema:
        type: number
      description: Post id
    query_place_action_link_lang:
      in: query
      name: lang
      required: false
      schema:
        $ref: '#/components/schemas/Lang'
      description: Preferred language for place action links. If no language is provided, the user's default language will be used. If the user's default language is unavailable, the country's primary language will be used.
    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. Comma-separated list of review states.
      schema:
        type: array
        items:
          $ref: '#/components/schemas/ReviewState'
        example: treated,not_treated
    query_review_state__notin:
      in: query
      name: state__notin
      description: |
        Exclude reviews in the given states. Comma-separated list of review states.
      schema:
        type: array
        items:
          $ref: '#/components/schemas/ReviewState'
        example: deleted
    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
    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.
    query_positive_template:
      in: query
      name: positive
      description: Filter on templates made to answer positive reviews (ex from 4 to 5 stars on gmb).
      required: false
      schema:
        type: boolean
    query_neutral_template:
      in: query
      name: neutral
      description: Filter on templates made to answer neutral reviews (ex 3 stars on gmb).
      required: false
      schema:
        type: boolean
    query_negative_template:
      in: query
      name: negative
      description: Filter on templates made to answer negative reviews (ex from 1 to 2 stars on gmb).
      required: false
      schema:
        type: boolean
    query_language__in:
      in: query
      name: language__in
      description: Filter on templates in the specified languages.
      required: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/TemplateLanguage'
        example: fr,it
    query_title_query:
      in: query
      name: title_query
      schema:
        type: string
      required: false
      description: Filter on templates based on their title
    query_text_query:
      in: query
      name: text_query
      schema:
        type: string
      required: false
      description: Filter on templates based on their text
    query_metrics_presence:
      in: query
      name: metrics
      required: true
      description: |
        List of analytics to return.
         At least one in that list.
      schema:
        type: string
        enum:
          - business_impressions_desktop_maps
          - business_impressions_desktop_search
          - business_impressions_mobile_maps
          - business_impressions_mobile_search
          - business_direction_requests
          - call_clicks
          - website_clicks
    query_dimensions_presence:
      in: query
      name: dimensions
      required: false
      description: |
        How the returned data will be aggregated.
        At most 'business' and one time dimensions of the list.
        If no dimension is given, the request will return the sum of each metric for all requested days and businesses.
      schema:
        type: string
        enum:
          - business
          - day
          - week
          - month
          - year
    query_order_by_presence:
      in: query
      name: order_by
      required: false
      description: |
        Where the object is either a dimension or a metric and is used in the request. At most one in the list. - before a field to order_by DESC, nothing for ASC
      schema:
        type: string
        enum:
          - <object>
          - -<object>
        example: order_by=-call_clicks
    pa_metrics_query_business__in:
      in: query
      name: business__in
      description: Filter by business ids
      required: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/BusinessID'
    pa_metrics_query_business__notin:
      in: query
      name: business__notin
      required: false
      description: |
        Filter by all allowed businesses except the ones given in `business__notin`
      schema:
        type: array
        items:
          $ref: '#/components/schemas/BusinessID'
    pa_metrics_query_city:
      in: query
      name: city
      required: false
      description: Filter by city
      schema:
        type: string
    pa_metrics_query_query:
      in: query
      name: query
      required: false
      description: |
        Parameter to fuzzy search businesses on city, zipcode and name
      schema:
        type: string
    pa_metrics_query_filter_date__gte:
      in: query
      name: filter_date__gte
      required: false
      description: |
        Filter by `date`

        Return all the analytics whose `date` >= `given_date`.
      schema:
        type: string
        format: datetime
    pa_metrics_query_filter_date__lte:
      in: query
      name: filter_date__lte
      description: |
        Filter by `date`.

        Return all the analytics whose `filter_date` <= `given_date`.
      schema:
        type: string
        format: datetime
    pa_pagination_query_page:
      in: query
      name: page
      required: false
      description: |
        The page number you want to request.
      schema:
        type: integer
        minimum: 1
        default: 1
    pa_pagination_query_per_page:
      in: query
      name: per_page
      required: false
      description: |
        The maximum number of result items to return in a page.

        The value defaults to 500, when it is not included.
      schema:
        type: integer
        maximum: 500
    query_metrics_keywords:
      in: query
      name: metrics
      required: true
      description: |
        List of analytics to return.
         At least one in that list.
      schema:
        type: string
        enum:
          - count
          - threshold
        example: metrics=count,threshold
    query_dimensions_keywords:
      in: query
      name: dimensions
      required: false
      description: |
        How the returned data will be aggregated.
        At most 'business' and one time dimensions of the list.
        If no dimension is given, the request will return the sum of each metric for all requested days and businesses.
      schema:
        type: string
        enum:
          - business
          - keyword
          - month
          - year
          - branded
        example: dimensions=keyword,month,branded
    query_order_by_keywords:
      in: query
      name: order_by
      required: false
      description: |
        Where the object is either a dimension or a metric and is used in the request. At most one in the list. - before a field to order_by DESC, nothing for ASC
        Available dimensions: business, keyword, month, year, branded Available metrics: count, threshold
      schema:
        type: string
        enum:
          - <object>
          - -<object>
        example: order_by=-count
    pa_keywords_query_business__in:
      in: query
      name: business__in
      description: Filter by business ids
      required: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/BusinessID'
    pa_keywords_query_filter_date__gte:
      in: query
      name: filter_date__gte
      required: false
      description: |
        Filter by date.

        Return all the analytics whose `date >= given_date`.
      schema:
        type: string
        format: datetime
    pa_keywords_query_filter_date__lte:
      in: query
      name: filter_date__lte
      required: false
      description: |
        Filter by date.

        Return all the analytics whose `date <= give_date`.
      schema:
        type: string
        format: datetime
    query_branded:
      in: query
      name: branded
      required: false
      description: |
        Filter by branded status.

        - `true`: Return only branded keywords (keywords associated with your brand)
        - `false`: Return only discovery keywords (generic keywords not associated with your brand)

        If not specified, returns both branded and discovery keywords.
      schema:
        type: boolean
        example: branded=true
    query_metrics_reviews:
      in: query
      name: metrics
      required: true
      description: |
        List of analytics to return.
         At least one in that list.
      schema:
        type: string
        enum:
          - average_rating
          - rating_distribution
          - reviews_count
          - reply_time
          - reply_means
          - average_rating_distribution
          - rank
    query_dimensions_reviews:
      in: query
      name: dimensions
      required: false
      description: |
        How the returned data will be aggregated.
        If no dimension is given, the request will return the sum of each metric for all requested days and businesses.
      schema:
        type: string
        enum:
          - day
          - week
          - month
          - year
          - business
          - group
          - user
          - tag
    query_order_by_reviews:
      in: query
      name: order_by
      required: false
      description: |
        See above for the list of all orders available. At most one in the list.
         - `-` before a field to order_by DESC, nothing for ASC
      schema:
        type: string
        example: -average_rating
    ra_query_business__in:
      in: query
      name: business__in
      description: Filter by business ids
      required: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/BusinessID'
    ra_query_business__notin:
      in: query
      name: business__notin
      required: false
      description: |
        Filter by all allowed businesses except the ones given in `business__notin`
      schema:
        type: array
        items:
          $ref: '#/components/schemas/BusinessID'
    ra_query_groups:
      in: query
      name: groups
      description: Filter by groups ids
      required: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/GroupID'
    query_tags:
      in: query
      name: tags
      description: |
        Restrict the data returned on reviews that have been assigned the specified tags.
      schema:
        type: array
        items:
          $ref: '#/components/schemas/TagID'
    query_update_date__gte:
      in: query
      name: update_date__gte
      required: false
      description: |
        Restrict the data returned on reviews which `update_date` are after the given date.
      schema:
        type: string
        format: datetime
    query_update_date__lte:
      in: query
      name: update_date__lte
      description: |
        Restrict the data returned on reviews which `update_date` are before the given date.
      schema:
        type: string
        format: datetime
    ra_query_page:
      in: query
      name: page
      required: false
      description: |
        The page number you want to request.
      schema:
        type: integer
        minimum: 1
        default: 1
    ra_query_per_page:
      in: query
      name: per_page
      required: false
      description: |
        The maximum number of result items to return in a page.
      schema:
        type: integer
        default: 30
    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_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_display_business_ids:
      in: query
      name: display_business_ids
      schema:
        type: boolean
        default: true
      required: false
      description: |
        - If `true`, response includes `business_ids`; a list of businesses the user has access to.
        - If `false`, response does *not* include `business_ids`.

        ⚠️ Note: The `business_ids` list is only populated for users with the `BUSINESS_MANAGER` role.
    path_user_id:
      in: path
      required: true
      name: user_id
      schema:
        type: string
      description: User id
    state__in:
      in: query
      name: state__in
      schema:
        type: array
        items:
          allOf:
            - $ref: '#/components/schemas/FeedbackResultState'
        example: treated,not_treated
      description: State of the feedback result
    created__lte:
      in: query
      name: created__lte
      schema:
        type: string
        format: datetime
        example: '2024-10-01T00:00:00Z'
      description: Max date the feedback result was created on
    created__gte:
      in: query
      name: created__gte
      schema:
        type: string
        format: datetime
        example: '2024-11-01T00:00:00Z'
      description: Min date the feedback result was created on
    nps__lte:
      in: query
      name: nps__lte
      schema:
        allOf:
          - $ref: '#/components/schemas/nps'
      description: Max NPS of the feedback result
    nps__gte:
      in: query
      name: nps__gte
      schema:
        allOf:
          - $ref: '#/components/schemas/nps'
      description: Min NPS of the feedback result
    nps__in:
      in: query
      name: nps__in
      schema:
        type: array
        items:
          allOf:
            - $ref: '#/components/schemas/nps'
        example: 0,1,2,8,9,10
      description: The possible NPS values of the feedback result
    search:
      in: query
      name: search
      schema:
        type: array
        maxItems: 6
        items:
          type: string
      description: The possible words contained in the text field of the feedback result
    optin:
      in: query
      name: optin
      schema:
        type: boolean
        enum:
          - true
          - false
      description: Whether the respondent accepts to be contacted
    feedback_form_ids:
      in: query
      name: feedback_form_ids
      schema:
        type: array
        items:
          allOf:
            - $ref: '#/components/schemas/FeedbackFormId'
      description: The forms for which the feedback result is for
    query_metrics:
      in: query
      name: metrics
      required: true
      description: |
        Comma-separated list of analytics metrics to return. At least one value is required.

        **Survey metrics**
        - `survey.response_rate`: Response rate (submissions / sends)
        - `survey.nb__sent`: Number of surveys sent
        - `survey.nb__with_comments`: Number of responses with a comment
        - `survey.nb__without_comments`: Number of responses without a comment
        - `survey.total_surveys`: Total number of survey submissions
        - `survey.clicks`: Number of survey link clicks
        - `survey.respondents`: Number of unique respondents
        - `survey.verbatims`: Number of verbatim comments
        - `survey_details`: Full per-result survey details

        **Survey form stats metrics** (email-delivery stats, best used with the `feedback_form`, `business`, or date dimensions)
        - `survey.sent`: Number of survey emails sent
        - `survey.delivered`: Number of survey emails delivered
        - `survey.opened`: Number of survey emails opened
        - `survey.clicked`: Number of survey link clicks (from the email)
        - `survey.error_bounces`: Number of survey emails that bounced

        **CSAT metrics**
        - `result.csat.score`: CSAT score (percentage of ratings 4-5)
        - `result.csat.avg_score`: Average CSAT rating
        - `result.csat.pct__rating_5`: Percentage of 5-star ratings
        - `result.csat.pct__rating_4`: Percentage of 4-star ratings
        - `result.csat.pct__rating_3`: Percentage of 3-star ratings
        - `result.csat.pct__rating_2`: Percentage of 2-star ratings
        - `result.csat.pct__rating_1`: Percentage of 1-star ratings
        - `result.csat.pct__rating_1_2`: Percentage of 1-2 star ratings combined
        - `result.csat.rating_5`: Count of 5-star ratings
        - `result.csat.rating_1_2`: Count of 1-2 star ratings combined
        - `result.csat.total_responses`: Total number of CSAT responses

        **NPS metrics**
        - `result.nps.score`: NPS score (promoters % − detractors %)
        - `result.nps.promoters`: Number of promoters (score 9-10)
        - `result.nps.passives`: Number of passives (score 7-8)
        - `result.nps.detractors`: Number of detractors (score 0-6)
        - `result.nps.avg__score`: Average NPS raw score
        - `result.nps.pct__promoters`: Percentage of promoters
        - `result.nps.pct__detractors`: Percentage of detractors
        - `result.nps.pct__passives`: Percentage of passives
        - `result.nps.pct__with_comments`: Percentage of responses with comments
        - `result.nps.pct__without_comment`: Percentage of responses without comments
        - `result.nps.total_responses`: Total number of NPS responses

        **Response metrics**
        - `response.created.replied_under_2days`: Replies sent within 2 days
        - `response.created.replied_over_2days`: Replies sent after 2 days
        - `response.created.not_replied`: Feedback not yet replied to
        - `response.method.nb__manual`: Number of manual replies
        - `response.method.nb__ai`: Number of AI-assisted replies
        - `response.not_replied`: Total feedback not replied to
        - `response.under_2days`: Total replies under 2 days
        - `response.over_2days`: Total replies over 2 days
        - `response.avg_response_time`: Average response time (seconds)
        - `response.total_surveys`: Total surveys included in response stats
        - `response.total_responses`: Total replies sent
        - `response.method_ai`: Replies using AI (alias)
        - `response.method_manual`: Replies sent manually (alias)

        **Result field metrics** (use with `feedback_form_field` dimension)
        - `result_field.rating`: Rating value for a form field
        - `result_field.content`: Text content of a form field response
        - `result_field.choices`: Selected choices for a form field
        - `result_field.field_position`: Position of the field within the form
        - `result_field.result_count`: Number of results for a field
      schema:
        type: string
        example: result.csat.score,result.csat.avg_score
    query_dimensions:
      in: query
      name: dimensions
      required: false
      description: |
        Comma-separated list of dimensions to group the returned data by.
        If omitted, the response contains aggregated totals across all data.

        **Entity dimensions**
        - `business`: Group results by business
        - `user`: Group results by user
        - `feedback_form`: Group results by survey form
        - `group`: Group results by business group
        - `group_section`: Group results by group section
        - `feedback_form_field`: Group results by form field (use with `result_field.*` metrics)
        - `result`: Return individual feedback results (one row per result)

        **Date dimensions**
        - `day`: Group by calendar day
        - `month`: Group by calendar month
        - `year`: Group by calendar year
      schema:
        type: string
        enum:
          - business
          - user
          - feedback_form
          - group
          - group_section
          - feedback_form_field
          - result
          - day
          - month
          - year
        example: business,month
    fm_analytics_query_order_by:
      in: query
      name: order_by
      required: false
      description: |
        Comma-separated list of fields to sort by.
        Prefix a field name with `-` to sort in descending order; no prefix sorts ascending.
        Each field must be one of the `metrics` or `dimensions` values included in the request.

        Examples: `order_by=result.csat.score`, `order_by=-result.nps.score,business`
      schema:
        type: string
        example: -result.csat.score
    fm_analytics_query_business__in:
      in: query
      name: business__in
      required: false
      description: Filter results to only the specified business IDs (comma-separated).
      schema:
        type: string
        example: 59b2645db12ff60643ef832c,60b2645fb12ff60643ef8344
    fm_analytics_query_business__notin:
      in: query
      name: business__notin
      required: false
      description: Exclude the specified business IDs from results (comma-separated).
      schema:
        type: string
        example: 59b2645db12ff60643ef832c
    query_user__in:
      in: query
      name: user__in
      required: false
      description: |
        Filter results to the specified user IDs (comma-separated integers).
        For non-admin users this is automatically restricted to their accessible users when the `user` dimension is requested.
      schema:
        type: string
        example: 6797bc826dfe97f2f60c427c,614d9d1978a067d412028333,672b8d1126ef12c5a00bfbb3
    fm_analytics_query_groups:
      in: query
      name: groups
      required: false
      description: Filter results to businesses belonging to the specified group IDs (comma-separated integers).
      schema:
        type: string
        example: 1244,1245
    query_group_section_id:
      in: query
      name: group_section_id
      required: false
      description: Filter results to businesses belonging to the specified group section ID.
      schema:
        type: integer
        example: 42
    fm_analytics_query_city:
      in: query
      name: city
      required: false
      description: Filter results to businesses located in the specified city.
      schema:
        type: string
        example: Paris
    fm_analytics_query_query:
      in: query
      name: query
      required: false
      description: Fuzzy search businesses by name, city, or zipcode.
      schema:
        type: string
    fm_analytics_query_filter_date__gte:
      in: query
      name: filter_date__gte
      required: false
      description: |
        Return only feedback results whose date is greater than or equal to this value.
      schema:
        type: string
        format: datetime
        example: '2024-01-01T00:00:00'
    fm_analytics_query_filter_date__lte:
      in: query
      name: filter_date__lte
      required: false
      description: |
        Return only feedback results whose date is less than or equal to this value.
      schema:
        type: string
        format: datetime
        example: '2024-03-31T23:59:59'
    query_survey__in:
      in: query
      name: survey__in
      required: false
      description: Filter results to the specified survey (feedback form) IDs (comma-separated).
      schema:
        type: string
        example: 674d791c13c9d976e20001b1,674d791c13c9d976e20001b2
    query_survey_field__in:
      in: query
      name: survey_field__in
      required: false
      description: Filter results to the specified form field IDs (comma-separated).
      schema:
        type: string
    query_survey_field_type__in:
      in: query
      name: survey_field_type__in
      required: false
      description: Filter results to the specified form field types (comma-separated, e.g. `CSAT,NPS`).
      schema:
        type: string
        example: CSAT,NPS
    query_result_nps_score__in:
      in: query
      name: result_nps_score__in
      required: false
      description: Filter results to the specified NPS scores (comma-separated integers, 0–10).
      schema:
        type: string
        example: 9,10
    query_result_id__in:
      in: query
      name: result_id__in
      required: false
      description: Filter to specific feedback result IDs (comma-separated).
      schema:
        type: string
    query_verbatim_query:
      in: query
      name: verbatim_query
      required: false
      description: Full-text search within feedback comments and verbatim responses.
      schema:
        type: string
    query_issues__in:
      in: query
      name: issues__in
      required: false
      description: |
        Filter to results that have one of the specified data quality issues (comma-separated).
        - `deleted_business`: The associated business has been deleted
        - `missing_store_code`: The business is missing a store code
      schema:
        type: string
        enum:
          - deleted_business
          - missing_store_code
    query_issues__notin:
      in: query
      name: issues__notin
      required: false
      description: |
        Exclude results that have one of the specified data quality issues (comma-separated).
        - `deleted_business`: The associated business has been deleted
        - `missing_store_code`: The business is missing a store code
      schema:
        type: string
        enum:
          - deleted_business
          - missing_store_code
    query_metadata:
      in: query
      name: metadata
      required: false
      description: |
        When `true`, the response includes a `metadata` object containing full entity details
        (businesses, forms, users, groups, etc.) referenced by IDs in the `data` array.
        Useful for resolving IDs to display names without additional API calls.
      schema:
        type: boolean
        default: false
    query_download:
      in: query
      name: download
      required: false
      description: |
        When `true`, the response is an Excel file (`.xlsx`) instead of JSON.
        The `Content-Disposition` header contains the generated filename.
      schema:
        type: boolean
        default: false
    query_table_name:
      in: query
      name: table_name
      required: false
      description: |
        Custom label used as part of the generated Excel filename when `download=true`.
        Special characters are sanitised automatically.
      schema:
        type: string
        example: Q1-2024-CSAT
    fm_analytics_query_page:
      in: query
      name: page
      required: false
      description: Page number to retrieve (1-based).
      schema:
        type: integer
        minimum: 1
        default: 1
    fm_analytics_query_per_page:
      in: query
      name: per_page
      required: false
      description: Number of results per page.
      schema:
        type: integer
        minimum: 1
        maximum: 1000
        default: 100
    org_id:
      name: org_id
      in: query
      schema:
        type: integer
      description: Organization identifier, only required for `PROVIDER` users.
      example: 1
      required: false
    webhook_id:
      name: webhook_id
      in: path
      required: true
      schema:
        type: integer
      description: The webhook object identifier.
  schemas:
    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
    ListResult:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/current_page'
        max_page:
          $ref: '#/components/schemas/max_page'
        count:
          $ref: '#/components/schemas/count'
    id:
      type: integer
      example: 3245
    label:
      type: string
      example: API key name
      description: Name given to recognize the Api key
    UserId:
      description: User id
      type: string
      example: 5309c3a237bbc544d8e26737
    UserName:
      description: User first name and last name concatenated. Can be null if it's your org integration api key.
      type: string
      example: Perceval de Galles
    Role:
      description: User role in the application
      type: string
      enum:
        - PROVIDER
        - ORG_ADMIN
        - ORG_MANAGER
        - GROUP_MANAGER
        - BUSINESS_MANAGER
        - PUBLISHER
      example: BUSINESS_MANAGER
    expiration_date:
      type: string
      pattern: yyyy-mm-dd
      example: '2022-06-05'
      description: Must be at least the day after today. If you want it to expire today you must revoke it. You can set it to null.
    ip_whitelist:
      description: |
        List of IP or CIDR network notations to which API Key calls are restricted.

        Empty list means no restriction.
      type: array
      items:
        type: string
      example:
        - 172.16.0.0/12
        - 127.0.0.1
    ApiKeyBase:
      type: object
      description: Base API Key object with common properties
      properties:
        id:
          $ref: '#/components/schemas/id'
        label:
          $ref: '#/components/schemas/label'
        description:
          type: string
          example: API key for updating business name, and categories.
          description: Description of the API key
        user_id:
          $ref: '#/components/schemas/UserId'
        user_name:
          $ref: '#/components/schemas/UserName'
        user_role:
          $ref: '#/components/schemas/Role'
        user_type:
          type: string
          enum:
            - bot
            - user
          example: user
          description: Whether the API key belongs to a bot user (created automatically for integrations) or a regular human user.
        disabled:
          type: boolean
          example: false
          description: Is true if someone revoked the key.
        expiration_date:
          $ref: '#/components/schemas/expiration_date'
        last_used_at:
          type: string
          pattern: date
          example: '2019-08-22 11:46:38.914467+00'
        created_by:
          $ref: '#/components/schemas/UserId'
        created_by_name:
          description: First name and last name concatenated of the user that created the key
          type: string
          example: John Smith
        created_at:
          type: string
          pattern: date
          example: '2018-03-12 11:49:03.399475+00'
        revoked_by:
          $ref: '#/components/schemas/UserId'
        revoked_by_name:
          description: First name and last name concatenated of the user that revoked the key
          type: string
          example: John Smith
        revoked_at:
          type: string
          pattern: date
          example: '2020-10-20 11:46:38.914467+00'
        ip_whitelist:
          $ref: '#/components/schemas/ip_whitelist'
        has_restricted_permissions:
          type: boolean
          example: true
          description: Whether or not the API key has customized permissions. If false, it has the same permissions as the user who created the key.
    ApiKey:
      allOf:
        - $ref: '#/components/schemas/ApiKeyBase'
        - type: object
          properties:
            permissions:
              type: array
              description: List of permission names linked to the API Key.
              items:
                type: string
              example:
                - business_edit
                - business_edit_name
                - business_edit_categories
    ApiKeyBody:
      type: object
      description: Request body schema for creating or updating an API key
      properties:
        label:
          $ref: '#/components/schemas/label'
        description:
          type: string
          example: API key for updating business name, and categories.
          description: Description of the API key
        expiration_date:
          $ref: '#/components/schemas/expiration_date'
        ip_whitelist:
          $ref: '#/components/schemas/ip_whitelist'
        has_restricted_permissions:
          type: boolean
          default: false
          description: |
            Whether or not the API key has customized permissions. If false, it has the same permissions as the user who created the key.

            ⚠️ **Required if the `permissions` parameter is provided.** ⚠️
          example: true
        permissions:
          type: array
          description: |
            List of permission names to assign to the API Key.

            ⚠️ **Required if the `has_restricted_permissions` parameter is provided.** ⚠️
          items:
            type: string
          example:
            - business_edit
            - business_edit_name
            - business_edit_categories
    BusinessId:
      description: Business id
      type: string
      example: 5409c35a97bbc544d8e26737
    BusinessCode:
      description: The unique store code of the business. If not provided, it will be automatically generated
      type: string
      example: CS-75019
    BusinessStatusFilter:
      description: |
        Defines the current status of the business.
        - `Open` indicates the business is up and running.  
        - `Closed` means that the business has definitely closed.  
        - `Opening Soon` indicates the business is open with an opening date set in the future.  
        - `Temporarily closed` means that the business is temporarily closed.

        ⚠️ To get all businesses with the status `open`, regardless of whether the `opening_date` has passed yet or not, submit both the `open` and `opening_soon` options in the filter: `status=open,opening_soon`.
      type: string
      enum:
        - open
        - closed
        - opening_soon
        - closed_temporarily
      default: open
      example: open
    FeatureEnum:
      enum:
        - diffusion
        - feedback_management
        - messages
        - posts
        - review_invite
        - review_management
    BusinessStatus:
      description: |
        Defines the current status of the business. `open` indicates the business is up and running. `closed` means that the business has definitely closed. `closed_temporarily` means that the business is temporarily closed, it is advised when your business is closed for more than one week, otherwise use the `specific_hours`
      type: string
      enum:
        - open
        - closed
        - closed_temporarily
      default: open
      example: open
    BusinessOpeningDate:
      description: The opening_date represents the date when a business was opened. The format of the date must be in ISO 8601 format (YYYY-MM-DD). ⚠️ The date must be in the past or no more than one year in the future from the current date (Google API requirement).
      type: string
      format: YYYY-MM-DD
      example: '2025-01-01'
    OrgId:
      description: Unique identifier of an organization in Partoo.
      type: integer
      example: 42
    groups:
      description: |
        List of Group ID of the business.

        Groups the business belongs to.

        See [the Groups and Sections description](/guides/api/resources/organizations/groups)
      type: array
      items:
        type: integer
      example:
        - 1
        - 2
        - 3
    BusinessName:
      description: The name of the business (POI) as it will appear on the publishing platforms
      type: string
      minLength: 1
      example: Corner shop
    AddressFull:
      description: |
        Full address of the business.

        For example : `130 Rue du Mont-Cenis`.
      type:
        - string
        - 'null'
      example: 12 bis rue du coquelicot
    Address2:
      description: Complement of address. Any additional information that could help better find the business location
      type:
        - string
        - 'null'
    BusinessCity:
      description: The city where the business is located
      type:
        - string
        - 'null'
      example: Paris
    BusinessZipcode:
      description: Zipcode (or postal code) for the business address. Can be empty if the business' country does not require one.
      type:
        - string
        - 'null'
      example: '75019'
    BusinessRegion:
      description: The region where the business is located. Can be empty, it is only useful for some countries like Italy or Spain among others.
      type:
        - string
        - 'null'
      example: Ile-de-France
    BusinessCountry:
      description: Business country - In the ISO 3166 alpha2 code format (i.e. use “FR” for France instead of "fr")
      type: string
      example: FR
    BusinessDefaultLang:
      description: Business default language - it either corresponds to the country's default language or set as English by default
      type: string
      example: fr
    BusinessCategories:
      minItems: 1
      description: |
        A list of category ids mapped to the business. At least one category needs to be provided. For more information see [Categories section](/api-reference/categories/)
      type: array
      items:
        type: string
      example:
        - gcid:restaurant
        - gcid:fast_food_restaurant
        - gcid:hamburger_restaurant
    TimeWindow:
      description: Time window
      type: string
      pattern: ^([0-1][0-9]|2[0-3]):([0-5][0-9])-([0-1][0-9]|2[0-3]):([0-5][0-9])$
      example: 10:00-14:00
    TimeSlotReference:
      description: Default time period, can be used to set open hours of a day from Partoo's interface.
      type: array
      items:
        $ref: '#/components/schemas/TimeWindow'
    Day:
      description: Open in the morning and in the evening `[10:00-14:00, 18:00-00:00]`. Closed the whole day `[]`
      type: array
      items:
        $ref: '#/components/schemas/TimeWindow'
      example:
        - 10:00-14:00
    OpenHours:
      description: |
        The opening hours of the business (in its timezone).

        Opening hours are specified per weekday. This is done by supplying an object mapping weekdays ("monday", "tuesday", etc.) to a list of strings. These strings in turn represent time slots during which the business is open.

        For example, the following value would set the opening hours to between 08:00-15:00 in the afternoon and 18:00-23:00 in the evening on Mondays:  
        `{"monday": ["08:00-15:00", "18:00-23:00"]}`

        To indicate that a business is open 24 hours for a specific weekday, use the value `["00:00-23:59"]`.

        ❗ This field is not mandatory, but if not provided then the business will not be pushed on some platforms (example: Google).  
        If provided, then a schedule needs to be sent for each day in particular.
      type: object
      required:
        - monday
        - tuesday
        - wednesday
        - thursday
        - friday
        - saturday
        - sunday
      properties:
        monday:
          $ref: '#/components/schemas/Day'
        tuesday:
          $ref: '#/components/schemas/Day'
        wednesday:
          $ref: '#/components/schemas/Day'
        thursday:
          $ref: '#/components/schemas/Day'
        friday:
          $ref: '#/components/schemas/Day'
        saturday:
          $ref: '#/components/schemas/Day'
        sunday:
          $ref: '#/components/schemas/Day'
    SpecificHours:
      description: |
        Exceptional opening or closing times for the business (in its timezone).

        All exceptional days of the year, including temporarily closed, can be specified beforehand or on the go. For example:

        - Beforehand: bank holidays (like Christmas or Labor Day)  
        - Unpredicted: COVID-19 exceptional situation

        Specific hours are defined by two values:

        - `open`, containing a list of days with exceptional *opening* hours  
        - `close`, containing a list of days where the business is exceptionally closed all day

        These values in turn contain:

        - `starts_at` indicating the first date for which the exceptional hours are valid  
        - `ends_at` indicating the last date (inclusive) for which the exceptional hours are valid  
        - `open_hours` (only used for days with exceptional *opening* hours) indicating the actual time slots for the given period, following the same pattern as the time slots in `open_hours`
      type: object
      required:
        - open
        - close
      properties:
        open:
          type: array
          items:
            type: object
            properties:
              starts_at:
                type: string
                pattern: date
                example: '2020-01-20'
              ends_at:
                type: string
                pattern: date
                example: '2020-01-20'
              open_hours:
                type: array
                items:
                  $ref: '#/components/schemas/TimeWindow'
        close:
          type: array
          items:
            type: object
            properties:
              starts_at:
                type: string
                pattern: date
                example: '2020-01-20'
              ends_at:
                type: string
                pattern: date
                example: '2020-01-22'
    BusinessShortDescription:
      description: |
        A short description of the business.    

        ⚠️ It is limited to 80 characters
      type: string
      example: lorem ipsum
    BusinessLongDescription:
      description: |
        A more detailed description of the business.    

        ⚠️ It is limited to 750 characters
      type: string
      example: lorem ipsum dolor sit amet
    BusinessWebsite:
      description: The business own website url or the main url of the company.
      type: string
      format: uri
      example: https://www.corner-shop.co/
    BusinessFacebookPage:
      description: Business Facebook page url
      type: string
      format: uri
      example: https://www.facebook.com/the-corner-shop
    BusinessTwitter:
      description: Business twitter page url
      type: string
      format: uri
      example: https://www.twitter.com/the-corner-shop
    BusinessNationalIdentificationNumber:
      description: |
        The National Identification Number of the business.

        It describes a unique number for which the business is registered in a specific country.  
        For example, in France, it's the SIRET code, or for Ireland, it's the CRO.
      type: string
    Contact:
      description: Business contact
      type: object
      properties:
        name:
          description: Contact full name
          type: string
          example: Hubert Bonisseur de la Bath
        email:
          description: Contact email
          type: string
          format: email
          example: hubert@oss117.fr
        phone_numbers:
          description: Contact phone numbers - Preferably in the format E.164 ('+33302060628' instead of '0302060628')
          type: array
          items:
            type: string
          example:
            - '+33302060628'
        fax:
          description: Contact fax
          type: string
          example: '+33302060629'
    BusinessContacts:
      description: Specify how the clients can reach the persons in charge of the business in case they have questions.
      type: array
      items:
        $ref: '#/components/schemas/Contact'
    Photos:
      description: |
        Business photos   

        Each business can have one or more photos associated
      type: object
      properties:
        LOGO:
          description: The logo image of the brand. On Google, for example, for businesses that have their basic information (phone number, hours, etc.), the Business Profile will highlight the logo.
          type: string
          format: uri
        primary:
          description: The business's main photo URL. On Google, for example, it represents the cover photo on the top of the profile.
          type: string
          format: uri
        secondary:
          description: Additional photos that can highlight the features of the business.
          type: array
          items:
            type: string
            format: uri
    Latitude:
      description: Latitude pushed on publishers. Decimals are separated by a dot and not by a comma.
      type:
        - number
        - 'null'
      format: double
      example: -3.585993
    Longitude:
      description: Longitude pushed on publishers. Decimals are separated by a dot and not by a comma.
      type:
        - number
        - 'null'
      format: double
      example: 47.870341
    SubscriptionActive:
      type: object
      required:
        - active
      properties:
        active:
          type: boolean
          description: Product has been activated
    Subscriptions:
      deprecated: true
      description: Business product subscriptions. Deprecated, use `features` instead.
      type: object
      required:
        - presence_management
        - review_booster
        - review_management
        - messages
      properties:
        presence_management:
          $ref: '#/components/schemas/SubscriptionActive'
          description: Is business subscribed to Presence Management
        review_management:
          $ref: '#/components/schemas/SubscriptionActive'
          description: Is business subscribed to Review Management
        review_booster:
          $ref: '#/components/schemas/SubscriptionActive'
          description: Is business subscribed to Review Booster
        messages:
          $ref: '#/components/schemas/SubscriptionActive'
          description: Is business subscribed to Business Message
      example:
        presence_management:
          active: true
        review_management:
          active: true
        review_booster:
          active: false
        messages:
          active: false
    Feature:
      allOf:
        - $ref: '#/components/schemas/FeatureEnum'
      type: string
      description: Business feature name
    Features:
      description: |
        List of business' features.
      type: array
      items:
        $ref: '#/components/schemas/Feature'
      example:
        - business_edition
        - diffusion
        - review_management
        - review_invite
        - messages
    CustomFields.Field.Base:
      description: A Custom Field
      type: object
      properties:
        name:
          description: Name of the custom field
          type: string
        type:
          description: Possible values are "BOOLEAN", "INTEGER", "TEXT", "FLOAT", "SINGLE_SELECT", "MULTIPLE_SELECT", "MULTIPLE_SELECT_IMAGE", "IMAGES_UPLOADER".
          type: string
        id:
          description: Id of the custom field
          type: integer
        order:
          type: integer
    CustomFields.Field.Text:
      allOf:
        - $ref: '#/components/schemas/CustomFields.Field.Base'
        - properties:
            value:
              description: |
                Value for this Custom Field. Can be NULL if not set.
              type:
                - string
                - 'null'
    CustomFields.Field.Integer:
      allOf:
        - $ref: '#/components/schemas/CustomFields.Field.Base'
        - properties:
            value:
              description: |
                Value for this Custom Field. Can be NULL if not set.
              type:
                - integer
                - 'null'
    CustomFields.Field.Number:
      allOf:
        - $ref: '#/components/schemas/CustomFields.Field.Base'
        - properties:
            value:
              description: |
                Value for this Custom Field. Can be NULL if not set.
              type:
                - number
                - 'null'
    CustomFields.Field.Boolean:
      allOf:
        - $ref: '#/components/schemas/CustomFields.Field.Base'
        - properties:
            value:
              description: |
                Value for this Custom Field. Can be NULL if not set.
              type:
                - boolean
                - 'null'
    CustomFields.Field.SingleSelect:
      allOf:
        - $ref: '#/components/schemas/CustomFields.Field.Base'
        - properties:
            value:
              description: |
                Value for this Custom Field. Can be NULL if not set.
              type:
                - string
                - 'null'
    CustomFields.Field.MultiSelect:
      allOf:
        - $ref: '#/components/schemas/CustomFields.Field.Base'
        - properties:
            value:
              description: |
                Value for this Custom Field. Can be NULL if not set.
              type: array
              items:
                type: string
    CustomFields.Field.MultiSelectImage:
      allOf:
        - $ref: '#/components/schemas/CustomFields.Field.Base'
        - properties:
            value:
              description: |
                Value for this Custom Field. Can be NULL if not set.
              type: array
              items:
                type: string
    CustomFieldValuesImagesUploader:
      description: Images uploader custom field value
      type: object
      properties:
        text_field:
          type: string
        max_length:
          type: number
      example:
        - text_field: name 1
          max_length: 20
        - text_field: name 2
          max_length: 30
    CustomFields.Field.ImagesUploader:
      allOf:
        - $ref: '#/components/schemas/CustomFields.Field.Base'
        - properties:
            value:
              description: |
                Value for this Custom Field. Can be NULL if not set.
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldValuesImagesUploader'
    CustomFields.Array:
      description: |
        Custom Fields set for this Business   

        They represent configurable fields that can be defined in addition to the normal business fields proposed by Partoo.    

        They are unique to the organization and can be entirely adapted to the company's needs.
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/CustomFields.Field.Integer'
          - $ref: '#/components/schemas/CustomFields.Field.Number'
          - $ref: '#/components/schemas/CustomFields.Field.Text'
          - $ref: '#/components/schemas/CustomFields.Field.Boolean'
          - $ref: '#/components/schemas/CustomFields.Field.MultiSelect'
          - $ref: '#/components/schemas/CustomFields.Field.MultiSelectImage'
          - $ref: '#/components/schemas/CustomFields.Field.SingleSelect'
          - $ref: '#/components/schemas/CustomFields.Field.ImagesUploader'
        discriminator:
          propertyName: type
          mapping:
            TEXT: '#/components/schemas/CustomFields.Field.Text'
            INTEGER: '#/components/schemas/CustomFields.Field.Integer'
            FLOAT: '#/components/schemas/CustomFields.Field.Number'
            BOOLEAN: '#/components/schemas/CustomFields.Field.Boolean'
            SINGLE_SELECT: '#/components/schemas/CustomFields.Field.SingleSelect'
            MULTIPLE_SELECT: '#/components/schemas/CustomFields.Field.MultiSelect'
            MULTIPLE_SELECT_IMAGE: '#/components/schemas/CustomFields.Field.MultiSelectImage'
            IMAGES_UPLOADER: '#/components/schemas/CustomFields.Field.ImagesUploader'
      example:
        - id: 1
          type: BOOLEAN
          name: Parking
          value: true
          order: 1
        - id: 2
          type: TEXT
          name: ManagerName
          value: toto
          order: 2
        - id: 3
          type: TEXT
          name: Supervisor
          value: null
          order: 2
        - id: 4
          type: INTEGER
          name: Surface
          value: 2
          order: 3
        - id: 5
          type: FLOAT
          name: DistanceFromSubway
          value: 2.55
          order: 4
        - id: 6
          type: SINGLE_SELECT
          name: Level
          value: two
          order: 4
        - id: 7
          type: MULTIPLE_SELECT
          name: Services
          value:
            - one
            - two
          order: 5
        - id: 8
          type: MULTIPLE_SELECT_IMAGE
          name: BannerImage
          value:
            - image 1
            - image 2
          order: 6
        - id: 9
          type: IMAGES_UPLOADER
          name: TeamMembers
          value:
            - url: image1
              texts:
                name1: value 1
                name2: value 2
          order: 7
    BusinessCompletionRate:
      description: |
        The completion rate percentage of the business.

        The completion rate is calculated based on how many fields are filled for the business.  
        If some necessary fields are not filled, it will lower the completion rate.

        ⚠️ After the update of the business, it may take up to 24 hours for this field to be updated.
      type: integer
      example: 77
    Promo:
      deprecated: true
      description: Business promotions
      type: object
      required:
        - title
        - description
        - begin
        - end
      properties:
        title:
          type: string
          description: Promo title
        description:
          type: string
          description: Promo description
        term_of_use:
          type: string
          description: Promo term of use
        additional_informations:
          type: string
          description: Promo additional informations
        begin:
          type: number
          description: Promo start timestamp
        end:
          type: number
          description: Promo end timestamp
        images:
          type: array
          description: Promo images to be displayed
          items:
            type: string
            format: uri
        client_offer_url:
          description: Promo URL
          type: string
          format: uri
        promo_url:
          description: URL of the website
          type: string
          format: uri
    BusinessPromos:
      deprecated: true
      type: array
      items:
        $ref: '#/components/schemas/Promo'
    BusinessWithCustomFields:
      description: Partoo App Business
      type: object
      properties:
        id:
          $ref: '#/components/schemas/BusinessId'
        created:
          description: Timestamp (in seconds) of the business creation
          type: number
          format: float
          example: 1409925979.5
        modified:
          description: Timestamp (in seconds) of the business last modification. Doesn’t take into account changes to the Custom Fields or related objects.
          type: number
          format: float
          example: 1561335111.681374
        code:
          $ref: '#/components/schemas/BusinessCode'
        status:
          $ref: '#/components/schemas/BusinessStatus'
        opening_date:
          $ref: '#/components/schemas/BusinessOpeningDate'
        org_id:
          $ref: '#/components/schemas/OrgId'
        groups:
          $ref: '#/components/schemas/groups'
        name:
          $ref: '#/components/schemas/BusinessName'
        address:
          description: Business address. This fields returns the same value as the field `address_full` for historical reasons. You should prefer the use `address_full`.
          type:
            - string
            - 'null'
        address_full:
          $ref: '#/components/schemas/AddressFull'
        address2:
          $ref: '#/components/schemas/Address2'
        city:
          $ref: '#/components/schemas/BusinessCity'
        zipcode:
          $ref: '#/components/schemas/BusinessZipcode'
        region:
          $ref: '#/components/schemas/BusinessRegion'
        country:
          $ref: '#/components/schemas/BusinessCountry'
        default_lang:
          $ref: '#/components/schemas/BusinessDefaultLang'
        categories:
          $ref: '#/components/schemas/BusinessCategories'
        time_slot_reference:
          $ref: '#/components/schemas/TimeSlotReference'
        open_hours:
          $ref: '#/components/schemas/OpenHours'
        specific_hours:
          $ref: '#/components/schemas/SpecificHours'
        description_short:
          $ref: '#/components/schemas/BusinessShortDescription'
        description_long:
          $ref: '#/components/schemas/BusinessLongDescription'
        website_url:
          $ref: '#/components/schemas/BusinessWebsite'
        facebook_url:
          $ref: '#/components/schemas/BusinessFacebookPage'
        twitter_url:
          $ref: '#/components/schemas/BusinessTwitter'
        google_location_id:
          description: Id of Google Location to which the business is linked
          type: string
        facebook_page_id:
          description: Id of Facebook Location to which the business is linked
          type: string
        national_identification_number:
          $ref: '#/components/schemas/BusinessNationalIdentificationNumber'
        logo_url:
          description: Business LOGO URL
          type: string
          format: uri
        contacts:
          $ref: '#/components/schemas/BusinessContacts'
        photos:
          $ref: '#/components/schemas/Photos'
        lat:
          $ref: '#/components/schemas/Latitude'
        long:
          $ref: '#/components/schemas/Longitude'
        subscriptions:
          $ref: '#/components/schemas/Subscriptions'
        features:
          $ref: '#/components/schemas/Features'
        custom_fields:
          $ref: '#/components/schemas/CustomFields.Array'
        completion_rate:
          $ref: '#/components/schemas/BusinessCompletionRate'
        promos:
          $ref: '#/components/schemas/BusinessPromos'
    BusinessCreateUpdateOrgId:
      description: |
        Unique identifier of the organization to which the business should belong. Only `PROVIDER` users can set this field. If no `org_id` is given, this will default to the ID of your organization.
      type: integer
      example: 42
    BusinessReach:
      description: Defines whether the business is a physical entity with an address (LOCAL) or a Brand (GLOBAL).
      type: string
      enum:
        - LOCAL
        - GLOBAL
      default: LOCAL
      example: LOCAL
    RequiredBusinessCity:
      description: |
        The city where the business is located.

        `Required if 'reach' is not specified or set to 'LOCAL'`.
      type: string
      example: Paris
    BusinessLatitude:
      description: Latitude. Decimals are separated by a dot and not by a comma.
      type: number
      format: double
      example: -3.585993
    BusinessLongitude:
      description: Longitude. Decimals are separated by a dot and not by a comma.
      type: number
      format: double
      example: 47.870341
    BusinessContactsCreate:
      description: Specify how the clients can reach the persons in charge of the business in case they have questions.
      type: array
      items:
        $ref: '#/components/schemas/Contact'
    CustomFields.Update:
      description: |
        Custom Fields set for this Business   

        They represent configurable fields that can be defined in addition to the normal business fields proposed by Partoo.    

        They are unique to the organization and should suit your company needs.
      type: object
      additionalProperties:
        description: |
          Replace `<custom_fields_name>` with the name of the custom field to update.   The value must comply with the custom field type.
          Set to NULL to empty the field.
      example:
        Parking: true
        ManagerName: toto
        Surface: 35
        DistanceFromSubway: 1.5
        Level: one
        Services:
          - DisabledAccess
          - FreeParking
        BannerImage:
          - image 1
          - image 2
        TeamMembers:
          - url: image1
            texts:
              name1: value 1
              name2: value 2
    RequestStatus:
      description: Request status
      type: string
      enum:
        - success
    Attributes.Field.Base:
      description: A Google Attribute
      type: object
      properties:
        gmb_id:
          description: Google id of the attribute
          type: string
        type:
          description: Possible values are "BOOL", "ENUM", "REPEATABLE_ENUM", "URL", "REPEATABLE_URL".
          type: string
    Attributes.Field.BOOL:
      allOf:
        - $ref: '#/components/schemas/Attributes.Field.Base'
        - properties:
            value:
              description: |
                Value for this Attribute. Can be null if not set
              type:
                - boolean
                - 'null'
    Attributes.Field.ENUM:
      allOf:
        - $ref: '#/components/schemas/Attributes.Field.Base'
        - properties:
            value:
              description: |
                Value for this Attribute. Can be null if not set
              type:
                - string
                - 'null'
    Attributes.Field.REPEATABLE_ENUM:
      allOf:
        - $ref: '#/components/schemas/Attributes.Field.Base'
        - properties:
            value:
              type:
                - object
                - 'null'
              description: |
                Value for this Attribute. Can be null if not set
              properties:
                set_values:
                  type: array
                  description: |
                    Options which are true for the Attribute. Can be empty.
                  items:
                    type: string
                unset_values:
                  type: array
                  description: |
                    Options which are false for the Attributes. Can be empty
                  items:
                    type: string
    Attributes.Field.URL:
      allOf:
        - $ref: '#/components/schemas/Attributes.Field.Base'
        - properties:
            value:
              description: |
                Value for this Attribute. Can be null if not set
              type:
                - string
                - 'null'
    Attributes.Field.REPEATABLE_URL:
      allOf:
        - $ref: '#/components/schemas/Attributes.Field.Base'
        - properties:
            value:
              description: |
                Value for this Attribute. Can be null if not set
              type:
                - array
                - 'null'
              items:
                type: string
              deprecated: true
    Attributes.Array:
      description: List of Business Attributes
      type: array
      items:
        anyOf:
          - $ref: '#/components/schemas/Attributes.Field.BOOL'
            title: Boolean
          - $ref: '#/components/schemas/Attributes.Field.ENUM'
            title: Enum
          - $ref: '#/components/schemas/Attributes.Field.REPEATABLE_ENUM'
            title: Repeatable Enum
          - $ref: '#/components/schemas/Attributes.Field.URL'
            title: URL
          - $ref: '#/components/schemas/Attributes.Field.REPEATABLE_URL'
            title: Repeatable URL
        discriminator:
          propertyName: type
          mapping:
            BOOL: '#/components/schemas/Attributes.Field.BOOL'
            ENUM: '#/components/schemas/Attributes.Field.ENUM'
            REPEATABLE_ENUM: '#/components/schemas/Attributes.Field.REPEATABLE_ENUM'
            URL: '#/components/schemas/Attributes.Field.URL'
            REPEATABLE_URL: '#/components/schemas/Attributes.Field.REPEATABLE_URL'
      example:
        - type: BOOL
          gmb_id: has_curbside_pickup
          value: false
        - type: BOOL
          gmb_id: has_delivery
          value: true
        - type: ENUM
          gmb_id: wi_fi
          value: free_wi_fi
        - type: REPEATABLE_ENUM
          gmb_id: pay_credit_card_types_accepted
          value:
            set_values:
              - american_express
              - discover
            unset_values: []
        - type: URL
          gmb_id: url_menu
          value: https://www.test.fr
        - type: REPEATABLE_URL
          gmb_id: url_order_ahead
          value: null
        - type: REPEATABLE_URL
          gmb_id: url_reservations
          value:
            - https://www.test1.fr
            - https://www.test2.fr
    BusinessAttributesResponse:
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/Attributes.Array'
    PostAttributes.Array:
      description: List of Business Attributes
      type: array
      items:
        anyOf:
          - $ref: '#/components/schemas/Attributes.Field.BOOL'
            title: Boolean
          - $ref: '#/components/schemas/Attributes.Field.ENUM'
            title: Enum
          - $ref: '#/components/schemas/Attributes.Field.REPEATABLE_ENUM'
            title: Repeatable Enum
          - $ref: '#/components/schemas/Attributes.Field.URL'
            title: URL
          - $ref: '#/components/schemas/Attributes.Field.REPEATABLE_URL'
            title: Repeatable URL
        discriminator:
          propertyName: type
          mapping:
            BOOL: '#/components/schemas/Attributes.Field.BOOL'
            ENUM: '#/components/schemas/Attributes.Field.ENUM'
            REPEATABLE_ENUM: '#/components/schemas/Attributes.Field.REPEATABLE_ENUM'
            URL: '#/components/schemas/Attributes.Field.URL'
            REPEATABLE_URL: '#/components/schemas/Attributes.Field.REPEATABLE_URL'
      example:
        - type: BOOL
          gmb_id: has_curbside_pickup
          value: false
        - type: ENUM
          gmb_id: wi_fi
          value: free_wi_fi
        - type: REPEATABLE_ENUM
          gmb_id: pay_credit_card_types_accepted
          value:
            set_values:
              - american_express
              - discover
            unset_values: []
        - type: URL
          gmb_id: url_menu
          value: https://www.test.fr
        - type: REPEATABLE_URL
          gmb_id: url_reservations
          value:
            - https://www.test1.fr
            - https://www.test2.fr
    BusinessPostAttributesBody:
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/PostAttributes.Array'
    BusinessPostWrongAttributesValuesError:
      description: At least one of the attributes values in the request body is incorrect
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
      example:
        errors:
          json:
            wi_fi: must be a string
            has_curbside_pickup: must be a bool
            url_reservations: must be a list
            url_menu: must be a valid url
            pay_credit_card_types_accepted: must contain set_values and unset_values
    BusinessPostUnknownAttributesError:
      description: At least one of the attributes in the request body does not exist in our Database
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
      example:
        errors:
          json:
            unknown_attribute: does not exist in DB
    LodgingExceptionCode:
      description: Exception code that can be used instead of a lodging attribute value.
      type: string
      enum:
        - LODGING_EXCEPTION_UNSPECIFIED
        - LODGING_UNDER_CONSTRUCTION
        - LODGING_DEPENDENT_ON_DAY_OF_WEEK
        - LODGING_DEPENDENT_ON_SEASON
    LodgingAttribute.Value.BOOL:
      type: object
      required:
        - gmb_id
        - type
      properties:
        gmb_id:
          type: string
          description: Google Lodging attribute id.
          example: lodging.services.frontDesk
        type:
          type: string
          enum:
            - BOOL
        value:
          description: Boolean value for the lodging attribute.
          oneOf:
            - type: boolean
            - type: 'null'
          example: true
        exception:
          description: Exception code used instead of `value`. Must be null when `value` is set.
          oneOf:
            - $ref: '#/components/schemas/LodgingExceptionCode'
            - type: 'null'
          example: null
    LodgingAttribute.Value.INTEGER:
      type: object
      required:
        - gmb_id
        - type
      properties:
        gmb_id:
          type: string
          description: Google Lodging attribute id.
          example: lodging.property.roomCount
        type:
          type: string
          enum:
            - INTEGER
        value:
          description: Integer value for the lodging attribute.
          oneOf:
            - type: integer
            - type: 'null'
          example: 42
        exception:
          description: Exception code used instead of `value`. Must be null when `value` is set.
          oneOf:
            - $ref: '#/components/schemas/LodgingExceptionCode'
            - type: 'null'
          example: null
    LodgingAttribute.Value.TIME:
      type: object
      required:
        - gmb_id
        - type
      properties:
        gmb_id:
          type: string
          description: Google Lodging attribute id.
          example: lodging.property.checkinTime
        type:
          type: string
          enum:
            - TIME
        value:
          description: Time value in `HH:MM` 24-hour format.
          oneOf:
            - type: string
              pattern: ^([01][0-9]|2[0-3]):[0-5][0-9]$
            - type: 'null'
          example: '15:00'
        exception:
          description: Exception code used instead of `value`. Must be null when `value` is set.
          oneOf:
            - $ref: '#/components/schemas/LodgingExceptionCode'
            - type: 'null'
          example: LODGING_DEPENDENT_ON_SEASON
    LodgingAttribute.Value.ENUM:
      type: object
      required:
        - gmb_id
        - type
      properties:
        gmb_id:
          type: string
          description: Google Lodging attribute id.
          example: lodging.property.parkingType
        type:
          type: string
          enum:
            - ENUM
        value:
          description: Selected Google Lodging enum option id.
          oneOf:
            - type: string
            - type: 'null'
          example: FREE_PARKING
        exception:
          description: Exception code used instead of `value`. Must be null when `value` is set.
          oneOf:
            - $ref: '#/components/schemas/LodgingExceptionCode'
            - type: 'null'
          example: null
    LodgingAttribute.Value.REPEATABLE_ENUM:
      type: object
      required:
        - gmb_id
        - type
      properties:
        gmb_id:
          type: string
          description: Google Lodging attribute id.
          example: lodging.services.languagesSpoken
        type:
          type: string
          enum:
            - REPEATABLE_ENUM
        value:
          description: Selected Google Lodging enum option ids.
          oneOf:
            - type: array
              items:
                type: string
            - type: 'null'
          example:
            - ENGLISH
            - FRENCH
        exception:
          description: Exception code used instead of `value`. Must be null when `value` is set.
          oneOf:
            - $ref: '#/components/schemas/LodgingExceptionCode'
            - type: 'null'
          example: null
    LodgingAttributeValue:
      anyOf:
        - $ref: '#/components/schemas/LodgingAttribute.Value.BOOL'
          title: Boolean
        - $ref: '#/components/schemas/LodgingAttribute.Value.INTEGER'
          title: Integer
        - $ref: '#/components/schemas/LodgingAttribute.Value.TIME'
          title: Time
        - $ref: '#/components/schemas/LodgingAttribute.Value.ENUM'
          title: Enum
        - $ref: '#/components/schemas/LodgingAttribute.Value.REPEATABLE_ENUM'
          title: Repeatable Enum
      discriminator:
        propertyName: type
        mapping:
          BOOL: '#/components/schemas/LodgingAttribute.Value.BOOL'
          INTEGER: '#/components/schemas/LodgingAttribute.Value.INTEGER'
          TIME: '#/components/schemas/LodgingAttribute.Value.TIME'
          ENUM: '#/components/schemas/LodgingAttribute.Value.ENUM'
          REPEATABLE_ENUM: '#/components/schemas/LodgingAttribute.Value.REPEATABLE_ENUM'
    LodgingAttributeValueArray:
      type: array
      description: List of Google Lodging attribute values.
      items:
        $ref: '#/components/schemas/LodgingAttributeValue'
      example:
        - gmb_id: lodging.services.frontDesk
          type: BOOL
          value: true
          exception: null
        - gmb_id: lodging.property.roomCount
          type: INTEGER
          value: 42
          exception: null
        - gmb_id: lodging.property.checkinTime
          type: TIME
          value: null
          exception: LODGING_DEPENDENT_ON_SEASON
        - gmb_id: lodging.services.languagesSpoken
          type: REPEATABLE_ENUM
          value:
            - ENGLISH
            - FRENCH
          exception: null
    BusinessLodgingResponse:
      type: object
      required:
        - lodging
      properties:
        lodging:
          description: |
            Google Lodging attribute values for the business. `null` means the business Google location cannot operate Lodging data. An empty array means the location can operate Lodging data but no Lodging attribute value is set yet.
          oneOf:
            - $ref: '#/components/schemas/LodgingAttributeValueArray'
            - type: 'null'
    BusinessPostLodgingBody:
      type: object
      required:
        - lodging
      properties:
        lodging:
          $ref: '#/components/schemas/LodgingAttributeValueArray'
    LodgingBadRequestError:
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              description: Details about the invalid lodging update request.
              oneOf:
                - type: string
                - type: object
              example: 'Read-only lodging attribute(s) cannot be modified: [''lodging.property.roomCount'']'
    MoreHoursGet:
      description: |
        The More Hours of the business and category (in its timezone).

        More hours are specified per weekday. Every value in this array is an object mapping weekdays (`monday`, `tuesday`, etc.) to a list of strings. These strings in turn represent time slots during which the business is open.

        For example, the following value sets the hours to 08:00-15:00 in the afternoon and 18:00-23:00 in the evening on Mondays:  
        `{"monday": ["08:00-15:00", "18:00-23:00"]}`

        If a business is open 24 hours for a specific weekday, the value `["00:00-23:59"]` is used.

        If a business does not have any defined More Hours, `value` will be `null`.
      type: object
      properties:
        monday:
          $ref: '#/components/schemas/Day'
        tuesday:
          $ref: '#/components/schemas/Day'
        wednesday:
          $ref: '#/components/schemas/Day'
        thursday:
          $ref: '#/components/schemas/Day'
        friday:
          $ref: '#/components/schemas/Day'
        saturday:
          $ref: '#/components/schemas/Day'
        sunday:
          $ref: '#/components/schemas/Day'
    MoreHoursBusinessGetResponse:
      properties:
        more_hours:
          type: array
          items:
            type: object
            properties:
              gmb_id:
                description: More Hour ID.
                type: string
                example: BREAKFAST
              value:
                $ref: '#/components/schemas/MoreHoursGet'
          example:
            - gmb_id: KITCHEN
              value:
                monday:
                  - 08:00-15:00
                  - 18:00-23:00
                tuesday:
                  - 08:00-15:00
                  - 18:00-23:00
                wednesday:
                  - 08:00-15:00
                  - 18:00-23:00
                thursday:
                  - 08:00-15:00
                  - 18:00-23:00
                friday:
                  - 08:00-15:00
                  - 18:00-23:00
                saturday:
                  - 08:00-15:00
                  - 18:00-23:00
                sunday:
                  - 08:00-15:00
                  - 18:00-23:00
            - gmb_id: LUNCH
              value:
                monday:
                  - 11:00-15:00
                tuesday:
                  - 11:00-15:00
                wednesday:
                  - 11:00-15:00
                thursday:
                  - 11:00-15:00
                friday:
                  - 11:00-15:00
                saturday: []
                sunday: []
    MoreHoursListInvalidCategoryError:
      properties:
        errors:
          description: The detail of the error encountered
          type: object
          properties:
            json:
              type: string
              example: Category with id foo does not exist
    MoreHoursListInvalidCountryError:
      properties:
        errors:
          description: The detail of the error encountered
          type: object
          properties:
            json:
              type: object
              properties:
                country:
                  type: object
                  properties:
                    explanation:
                      description: country paramter is invalid
                      type: string
                      example: abc is an incorrect value
                    choices:
                      description: available country codes
                      type: array
                      items:
                        type: string
                      example:
                        - AF
                        - AL
                        - DZ
                        - AS
                        - AD
                        - AO
                        - AI
                        - AQ
                        - AG
                        - AR
                        - AM
                        - AW
                        - AU
                        - AT
                        - AZ
                        - BS
                        - BH
                        - BD
                        - BB
                        - BY
                        - BE
                        - BZ
                        - BJ
                        - BM
                        - BT
                        - BO
                        - BQ
                        - BA
                        - BW
                        - BV
                        - BR
                        - IO
                        - BN
                        - BG
                        - BF
                        - BI
                        - CV
                        - KH
                        - CM
                        - CA
                        - KY
                        - CF
                        - TD
                        - CL
                        - CN
                        - CX
                        - CC
                        - CO
                        - KM
                        - CD
                        - CG
                        - CK
                        - CR
                        - HR
                        - CU
                        - CW
                        - CY
                        - CZ
                        - CI
                        - DK
                        - DJ
                        - DM
                        - DO
                        - EC
                        - EG
                        - SV
                        - GQ
                        - ER
                        - EE
                        - SZ
                        - ET
                        - FK
                        - FO
                        - FJ
                        - FI
                        - FR
                        - GF
                        - PF
                        - TF
                        - GA
                        - GM
                        - GE
                        - DE
                        - GH
                        - GI
                        - GR
                        - GL
                        - GD
                        - GP
                        - GU
                        - GT
                        - GG
                        - GN
                        - GW
                        - GY
                        - HT
                        - HM
                        - VA
                        - HN
                        - HK
                        - HU
                        - IS
                        - IN
                        - ID
                        - IR
                        - IQ
                        - IE
                        - IM
                        - IL
                        - IT
                        - JM
                        - JP
                        - JE
                        - JO
                        - KZ
                        - KE
                        - KI
                        - KP
                        - KR
                        - KW
                        - KG
                        - LA
                        - LV
                        - LB
                        - LS
                        - LR
                        - LY
                        - LI
                        - LT
                        - LU
                        - MO
                        - MG
                        - MW
                        - MY
                        - MV
                        - ML
                        - MT
                        - MH
                        - MQ
                        - MR
                        - MU
                        - YT
                        - MX
                        - FM
                        - MD
                        - MC
                        - MN
                        - ME
                        - MS
                        - MA
                        - MZ
                        - MM
                        - NA
                        - NR
                        - NP
                        - NL
                        - NC
                        - NZ
                        - NI
                        - NE
                        - NG
                        - NU
                        - NF
                        - MP
                        - 'NO'
                        - OM
                        - PK
                        - PW
                        - PS
                        - PA
                        - PG
                        - PY
                        - PE
                        - PH
                        - PN
                        - PL
                        - PT
                        - PR
                        - QA
                        - MK
                        - RO
                        - RU
                        - RW
                        - RE
                        - BL
                        - SH
                        - KN
                        - LC
                        - MF
                        - PM
                        - VC
                        - WS
                        - SM
                        - ST
                        - SA
                        - SN
                        - RS
                        - SC
                        - SL
                        - SG
                        - SX
                        - SK
                        - SI
                        - SB
                        - SO
                        - ZA
                        - GS
                        - SS
                        - ES
                        - LK
                        - SD
                        - SR
                        - SJ
                        - SE
                        - CH
                        - SY
                        - TW
                        - TJ
                        - TZ
                        - TH
                        - TL
                        - TG
                        - TK
                        - TO
                        - TT
                        - TN
                        - TR
                        - TM
                        - TC
                        - TV
                        - UG
                        - UA
                        - AE
                        - GB
                        - UM
                        - US
                        - UY
                        - UZ
                        - VU
                        - VE
                        - VN
                        - VG
                        - VI
                        - WF
                        - EH
                        - YE
                        - ZM
                        - ZW
                        - AX
                        - XK
    MoreHoursPost:
      description: |
        The More Hours of the business and category (in its timezone).

        More hours are specified per weekday. This is done by supplying a More Hour ID (`BREAKFAST`, `DINNER`, etc.), and an object mapping weekdays (`monday`, `tuesday`, etc.) to a list of strings. These strings in turn represent time slots during which the business is open.

        For example, the following value would set the kitchen hours to between 08:00-15:00 in the afternoon and 18:00-23:00 in the evening on Mondays:  
        `{"gmb_id": "KITCHEN", "value": {"monday": ["08:00-15:00", "18:00-23:00"]}}`

        To indicate that a business is open 24 hours for a specific weekday, use the value `["00:00-23:59"]`.

        To delete a More Hours value, supply a `null` value.
      type: object
      properties:
        monday:
          $ref: '#/components/schemas/Day'
        tuesday:
          $ref: '#/components/schemas/Day'
        wednesday:
          $ref: '#/components/schemas/Day'
        thursday:
          $ref: '#/components/schemas/Day'
        friday:
          $ref: '#/components/schemas/Day'
        saturday:
          $ref: '#/components/schemas/Day'
        sunday:
          $ref: '#/components/schemas/Day'
    MoreHoursBusinessPostBody:
      properties:
        more_hours:
          description: Array containing the more hours values to update. Grouped by More Hour ID. Only More Hour IDs included in the body will be updated.
          type: array
          items:
            type: object
            properties:
              gmb_id:
                description: More Hour ID for which to update hours.
                type: string
              value:
                $ref: '#/components/schemas/MoreHoursPost'
          example:
            - gmb_id: KITCHEN
              value:
                monday: []
                tuesday: []
                wednesday: []
                thursday: []
                friday: []
                saturday:
                  - 08:00-15:00
                  - 18:00-23:00
                sunday:
                  - 08:00-15:00
                  - 18:00-23:00
            - gmb_id: BRUNCH
              value: null
    MoreHoursBusinessPostResponse:
      properties:
        status:
          description: Status of the request. Should say "success" unless something unexpected went wrong.
          type: string
          example: success
        id:
          description: ID of the business that was just updated.
          type: string
          example: 545f7bf982efa41a496379d2
    MoreHoursBusinessPostInvalidCategory:
      properties:
        errors:
          description: Object containing all errors encountered.
          type: object
          properties:
            json:
              description: Object containing any errors related to the request JSON body.
              type: object
              properties:
                more_hours:
                  description: Array containing any errors related to the `more_hours` property in the request JSON body.
                  type: array
                  items:
                    type: string
                  example:
                    - '''foo'' is not a valid gmb_id'
    MoreHoursBusinessPostOverlappingHours:
      properties:
        errors:
          description: Object containing all errors encountered.
          type: object
          properties:
            json:
              description: Object containing any errors related to the request JSON body.
              type: object
              properties:
                more_hours:
                  description: Object containing any errors related to the `more_hours` property in the request JSON body.
                  type: object
                  properties:
                    '0':
                      description: Each index contains the errors found at that index in the array of More Hours given in the request JSON body.
                      type: object
                      properties:
                        value:
                          description: Object that indicates value errors for each given weekday.
                          type: object
                          properties:
                            saturday:
                              description: Each weekday key indicates an error in the More Hours value given for that specific weekday.
                              type: object
                              properties:
                                '0':
                                  description: Each index contains a string describing the errors found at that index in the array of More Hours time slots.
                                  type: string
                                  example: start time cannot be superior to end time
    ServiceId:
      description: Id of the service (For creation you can get this id by calling [get services suggestions endpoint](/api-reference/google/list-google-services))
      type: integer
      example: 1
    ServiceType:
      description: Type of the service
      type: string
      enum:
        - STRUCTURED_SERVICE_ITEM
        - FREE_FORM_SERVICE_ITEM
    ServiceName:
      description: |
        Name of the service.
      type: string
      example: Salle d'escalade
    ServicePrice:
      description: Price of the service.
      type: number
      example: 12.5
    ServiceDescription:
      description: Description of the service.
      type: string
      maxLength: 300
    ServiceCategoryGmbName:
      type: string
      description: |
        Google name of the category.
      example: gcid:climbing_gym
    Services:
      description: A Google Service.
      type: object
      properties:
        service_id:
          $ref: '#/components/schemas/ServiceId'
        type:
          $ref: '#/components/schemas/ServiceType'
        name:
          $ref: '#/components/schemas/ServiceName'
        price:
          $ref: '#/components/schemas/ServicePrice'
        description:
          $ref: '#/components/schemas/ServiceDescription'
        category_gmb_name:
          $ref: '#/components/schemas/ServiceCategoryGmbName'
    BusinessServicesResponse:
      type: object
      description: List of Business Services.
      properties:
        services:
          type: array
          items:
            $ref: '#/components/schemas/Services'
          example:
            - service_id: 1
              type: STRUCTURED_SERVICE_ITEM
              name: Climbing Gym
              price: 50
              description: Our climbing gym available for all
              category_gmb_name: gcid:climbing_gym
            - service_id: 2
              type: FREE_FORM_SERVICE_ITEM
              name: Random Name
              price: 25.35
              description: This is our custom service
              category_gmb_name: gcid:climbing_gym
    StructuredServicesCreateUpdate:
      description: A Google Service.
      required:
        - service_id
      type: object
      properties:
        service_id:
          $ref: '#/components/schemas/ServiceId'
        price:
          $ref: '#/components/schemas/ServicePrice'
        description:
          $ref: '#/components/schemas/ServiceDescription'
    FreeFormServicesCreate:
      description: A Google Service.
      required:
        - category_gmb_name
        - name
      type: object
      properties:
        category_gmb_name:
          type: string
          description: |
            Google name of the category. The category must belong to your business.
          example: gcid:climbing_gym
        name:
          description: Name of the service.
          type: string
          example: Random Name
        price:
          description: Price of the service.
          type: number
          example: 25.35
        description:
          description: Description of the service.
          type: string
          example: This is our custom service
          maxLength: 300
    FreeFormServicesUpdate:
      description: A Google Service.
      required:
        - service_id
      type: object
      properties:
        service_id:
          description: |
            Id of the service.
          type: integer
          example: 2
        category_gmb_name:
          type: string
          description: |
            Google name of the category. The category must belong to your business.
          example: gcid:climbing_gym
        name:
          description: Name of the service.
          type: string
          example: Random Name
        price:
          description: Price of the service.
          type: number
          example: 25.35
        description:
          description: Description of the service.
          type: string
          example: This is our custom service
          maxLength: 300
    FoodMenuSectionName:
      description: Name of the food menu section.
      type: string
    FoodMenuSectionOrder:
      description: Display order of the food menu item in the food menu section.
      type: integer
      example: 3
    FoodMenuItemName:
      description: Name of the food menu item.
      type: string
      example: Item name
      maxLength: 140
    FoodMenuItemOrder:
      description: Display order of the food menu item in the food menu section.
      type: integer
      example: 3
    FoodMenuItemDescription:
      description: Description of the food menu item.
      type: string
      maxLength: 1000
    FoodMenuItemPrice:
      description: Price of the food menu item.
      type: number
      example: 12.5
    FoodMenuMediaSourceUrl:
      description: User source url of the food menu item, mandatory to set/update media with food menu item
      type: string
    FoodMenuMediaPublicUrl:
      description: Public url the food menu item provided by partoo, can be empty in set/update.
      type: string
    FoodMenuItemMedia:
      description: Media of the food menu item.
      properties:
        sourceUrl:
          $ref: '#/components/schemas/FoodMenuMediaSourceUrl'
        publicUrl:
          $ref: '#/components/schemas/FoodMenuMediaPublicUrl'
        id:
          type: string
    FoodMenuItem:
      description: A food menu item object.
      properties:
        name:
          $ref: '#/components/schemas/FoodMenuItemName'
        order:
          $ref: '#/components/schemas/FoodMenuItemOrder'
        description:
          $ref: '#/components/schemas/FoodMenuItemDescription'
        price:
          $ref: '#/components/schemas/FoodMenuItemPrice'
        media:
          $ref: '#/components/schemas/FoodMenuItemMedia'
    FoodMenuSection:
      description: A food menu item section.
      properties:
        name:
          $ref: '#/components/schemas/FoodMenuSectionName'
        order:
          $ref: '#/components/schemas/FoodMenuSectionOrder'
        items:
          type: array
          items:
            $ref: '#/components/schemas/FoodMenuItem'
      example:
        name: Starters
        order: 1
        items:
          - name: Starter 1
            order: 1
            description: First starter of the food menu
            price: 1
          - name: Starter 2
            order: 2
            description: Second starter of the food menu
            price: 5
    BusinessFoodMenus:
      description: A Google food menu for business.
      properties:
        menus:
          type: array
          items:
            $ref: '#/components/schemas/FoodMenuSection'
      example:
        menus:
          - name: Starters
            order: 1
            items:
              - name: Starter 1
                order: 1
                description: First starter of the food menu
                price: 1
                media:
                  source_url: https://www.source_url.com/main_dishes
                  public_url: https://www.partoo_url.com/main_dishes
              - name: Starter 2
                order: 2
                description: Second starter of the food menu
                price: 5
          - name: Main dishes
            order: 2
            items:
              - name: Today's special
                order: 1
                description: Today's special description
                price: 25
                media:
                  source_url: https://www.source_url.com/main_dishes
                  public_url: https://www.partoo_url.com/main_dishes
    PlaceActionLinks.Array:
      description: List of Business Place Action Links
      type: array
      items:
        type: object
        properties:
          gmb_id:
            type: string
            description: The Google My Business ID for the place action type.
            enum:
              - APPOINTMENT
              - ONLINE_APPOINTMENT
              - DINING_RESERVATION
              - FOOD_ORDERING
              - FOOD_DELIVERY
              - FOOD_TAKEOUT
              - SHOP_ONLINE
          urls:
            type: array
            description: List of place action links associated with a given gmb_id.
            items:
              type: object
              properties:
                id:
                  type: integer
                  description: Id for link
                value:
                  type: string
                  description: Must be a valid url value and be unique within the list of URLs for this gmb_id.
                is_preferred:
                  type: boolean
                  description: Indicates if this URL is the preferred link. There can only be one preferred URL per gmb_id.
                is_editable:
                  type: boolean
                  description: Indicates if this URL is editable.
      example:
        - gmb_id: SHOP_ONLINE
          urls:
            - id: 1
              value: https://www.example.com/shop_online
              is_preferred: true
              is_editable: true
            - id: 2
              value: https://www.example.com/shop_online2
              is_preferred: false
              is_editable: true
        - gmb_id: FOOD_TAKEOUT
          urls:
            - id: 3
              value: https://www.example.com/food_takeout1
              is_preferred: false
              is_editable: false
            - id: 4
              value: https://www.example.com/food_takeout2
              is_preferred: false
              is_editable: true
            - id: 5
              value: https://www.example.com/food_takeout3
              is_preferred: false
              is_editable: true
        - gmb_id: ONLINE_APPOINTMENT
          urls:
            - id: 6
              value: https://www.example.com/online_appointment
              is_preferred: true
              is_editable: true
            - id: 7
              value: https://www.example.com/online_appointment2
              is_preferred: false
              is_editable: true
        - gmb_id: DINING_RESERVATION
          urls:
            - id: 8
              value: https://www.example.com/dining_reservation1
              is_preferred: true
              is_editable: false
            - id: 9
              value: https://www.example.com/dining_reservation2
              is_preferred: false
              is_editable: true
        - gmb_id: APPOINTMENT
          urls:
            - id: 10
              value: https://www.example.com/appointment1
              is_preferred: true
              is_editable: true
            - id: 11
              value: https://www.example.com/appointment2
              is_preferred: false
              is_editable: true
        - gmb_id: FOOD_ORDERING
          urls:
            - id: 12
              value: https://www.example.com/food_ordering1
              is_preferred: true
              is_editable: true
            - id: 13
              value: https://www.example.com/food_ordering2
              is_preferred: false
              is_editable: true
        - gmb_id: FOOD_DELIVERY
          urls: []
    PlaceActionLinksResponse:
      type: object
      properties:
        place_action_links:
          $ref: '#/components/schemas/PlaceActionLinks.Array'
    PostPlaceActionLinks.Array:
      description: List of Business Place Action Links
      type: array
      items:
        type: object
        required:
          - gmb_id
          - urls
        properties:
          gmb_id:
            type: string
            description: The Google My Business ID for the place action type.
            enum:
              - APPOINTMENT
              - ONLINE_APPOINTMENT
              - DINING_RESERVATION
              - FOOD_ORDERING
              - FOOD_DELIVERY
              - FOOD_TAKEOUT
              - SHOP_ONLINE
          urls:
            type: array
            description: List of place action links associated with a given gmb_id.
            items:
              type: object
              required:
                - value
                - is_preferred
              properties:
                id:
                  type: integer
                  description: 'Optional: Include for existing links to update'
                value:
                  type: string
                  description: Must be a valid url value and be unique within the list of URLs for this gmb_id.
                is_preferred:
                  type: boolean
                  description: Indicates if this URL is the preferred link. There can only be one preferred URL per gmb_id.
      example:
        - gmb_id: SHOP_ONLINE
          urls:
            - value: https://www.example.com/shop_online
              is_preferred: true
            - id: 2
              value: https://www.example.com/shop_online2
              is_preferred: false
        - gmb_id: FOOD_TAKEOUT
          urls:
            - id: 3
              value: https://www.example.com/food_takeout1
              is_preferred: false
            - id: 4
              value: https://www.example.com/food_takeout2
              is_preferred: false
            - value: https://www.example.com/food_takeout3
              is_preferred: false
        - gmb_id: ONLINE_APPOINTMENT
          urls:
            - value: https://www.example.com/online_appointment
              is_preferred: true
            - id: 7
              value: https://www.example.com/online_appointment2
              is_preferred: false
        - gmb_id: DINING_RESERVATION
          urls:
            - id: 8
              value: https://www.example.com/dining_reservation1
              is_preferred: true
            - id: 9
              value: https://www.example.com/dining_reservation2
              is_preferred: false
        - gmb_id: APPOINTMENT
          urls:
            - value: https://www.example.com/appointment1
              is_preferred: true
            - id: 11
              value: https://www.example.com/appointment2
              is_preferred: false
        - gmb_id: FOOD_ORDERING
          urls:
            - value: https://www.example.com/food_ordering1
              is_preferred: true
            - id: 13
              value: https://www.example.com/food_ordering2
              is_preferred: false
        - gmb_id: FOOD_DELIVERY
          urls:
            - id: 14
              value: https://www.example.com/food_delivery1
              is_preferred: true
            - value: https://www.example.com/food_delivery2
              is_preferred: false
    PlaceActionLinksPostBody:
      type: object
      properties:
        place_action_links:
          $ref: '#/components/schemas/PostPlaceActionLinks.Array'
    PlaceActionLinksNonExistingGmbIdsError:
      description: At least one of the attributes values in the request body is incorrect
      type: object
      properties:
        errors:
          type: object
          properties:
            non_existing_gmb_ids:
              type: array
              items:
                type: string
              description: List of `gmb_id` values that do not exist.
      example:
        errors:
          json:
            message: 'following gmb_ids do not exist in place_action_links: [''SHOPIFY_ONLINE'', ''JUST_TAKEOUT'']'
    PlaceActionLinksNonUniqueGmbIdsError:
      description: The `gmb_id` values in the request are not unique.
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
              properties:
                message:
                  type: string
                  description: Error message indicating that `gmb_id` values must be unique.
      example:
        errors:
          json:
            message: gmb_ids must be unique
    PlaceActionLinksNonUniqueUrlsError:
      description: URL values are not unique within each `gmb_id`.
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
              properties:
                message:
                  type: string
                  description: Error message indicating that URL values per `gmb_id` must be unique.
      example:
        errors:
          json:
            message: url values per gmb_id must be unique
    PlaceActionLinksMultiplePreferredUrlsError:
      description: More than one URL is marked as preferred for a `gmb_id`.
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
              properties:
                message:
                  type: string
                  description: Error message indicating that only one URL can be marked as preferred per `gmb_id`.
      example:
        errors:
          json:
            message: only one is_preferred url at most per place_action_link
    PlaceActionLinksMissingIdsError:
      description: The `id` values in the request do not exist in the backend.
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
              properties:
                message:
                  type: string
                  description: Error message indicating that some `id` values do not exist for the business place action links.
      example:
        errors:
          json:
            message: 'place_action_link ids do not exist for business: {1, 2}'
    PlaceActionLinksNonUniqueIdsError:
      description: The `id` values in the request are not unique.
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
              properties:
                message:
                  type: string
                  description: Error message indicating that `id` values must be unique.
      example:
        errors:
          json:
            message: place_action_link ids must be unique
    BusinessFields.Section:
      description: Business Fields sections permissions
      type: object
      properties:
        name:
          description: |
            Name of a the section. The structure of the fields inside it depends of the section and is described below.
          type: string
    BusinessFields.Field:
      description: Business Field
      type: object
      properties:
        name:
          description: Name of the field
          type: string
        enabled:
          description: Permission (enabled | disabled) of the field for the current user
          type: boolean
        enabled_for_subroles:
          description: |
            Permission (enabled | disabled) of the field for the users with a more restrictive role compared to the current user.
            E.g., if the user is ORG_ADMIN: enabled_for_subroles describes the permissions of the field for all the GROUP_MANAGER and BUSINESS_MANAGER of the given organization.
            E.g., if the user is PROVIDER: enabled_for_subroles describes the permissions of the field for all the ORG_ADMIN, GROUP_MANAGER, and BUSINESS_MANAGER of the given provider.
          type: boolean
    BusinessFields.SectionNormal:
      allOf:
        - $ref: '#/components/schemas/BusinessFields.Section'
        - description: Business Fields Section
          type: object
          properties:
            fields:
              type: array
              items:
                $ref: '#/components/schemas/BusinessFields.Field'
    CustomFields.Metadata:
      allOf:
        - $ref: '#/components/schemas/BusinessFields.Field'
        - description: Business Fields permissions
          type: object
          properties:
            type:
              description: |
                Type of the custom field.
                Possible values are "TEXT", "INTEGER", "FLOAT", "BOOLEAN", "SINGLE_SELECT", "MULTIPLE_SELECT", "MULTIPLE_SELECT_IMAGE", "IMAGES_UPLOADER".
              type: string
              enum:
                - TEXT
                - INTEGER
                - FLOAT
                - BOOLEAN
                - SINGLE_SELECT
                - MULTIPLE_SELECT
                - MULTIPLE_SELECT_IMAGE
                - IMAGES_UPLOADER
            id:
              description: ID of the custom field.
              type: integer
            order:
              type: integer
    BusinessFields.SectionCustomFields:
      allOf:
        - $ref: '#/components/schemas/BusinessFields.Section'
        - description: Business Fields Section of Custom Fields
          type: object
          properties:
            fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFields.Metadata'
    BusinessFields.SectionArray:
      description: Business Fields sections array
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/BusinessFields.SectionNormal'
          - $ref: '#/components/schemas/BusinessFields.SectionCustomFields'
      example:
        - name: address
          fields:
            - name: country
              enabled: true
              enabled_for_subroles: true
            - name: city
              enabled: true
              enabled_for_subroles: false
        - name: description
          fields:
            - name: categories
              enabled: true
              enabled_for_subroles: true
            - name: website_url
              enabled: true
              enabled_for_subroles: true
        - name: hours
          fields:
            - name: open_hours
              enabled: true
              enabled_for_subroles: true
        - name: photos
          fields:
            - name: cover
              enabled: false
              enabled_for_subroles: false
        - name: contact
          fields:
            - name: phone_number
              enabled: true
              enabled_for_subroles: false
        - name: custom_fields
          fields:
            - name: has_parking
              enabled: true
              enabled_for_subroles: true
              type: BOOLEAN
              id: 1
              order: 10
              section_id: 4
            - name: special_description
              enabled: true
              enabled_for_subroles: true
              type: TEXT
              id: 2
              order: 11
              max_len: 250
              section_id: 6
            - name: facilities
              enabled: true
              enabled_for_subroles: true
              type: MULTIPLE_SELECT
              id: 3
              order: 2
              possible_values:
                - handicapped access
                - toilets
                - break room
            - name: banner image
              enabled: true
              enabled_for_subroles: true
              id: 4
              type: MULTIPLE_SELECT_IMAGE
              order: 10
              possible_values:
                - image 1
                - image 2
                - image 3
              possible_images_labels:
                - label image 1
                - label image 2
                - label image 3
              possible_images_urls:
                - url_of_image_1
                - url_of_image_2
                - url_of_image_3
            - name: team members
              enabled: true
              enabled_for_subroles: true
              id: 5
              type: IMAGES_UPLOADER
              order: 11
              text_fields:
                - text_field: text 1
                  max_length: 10
                - text_field: text 2
                  max_length: 20
                - text_field: text 3
                  max_length: 30
    Lang:
      description: Available language in the application
      type: string
      enum:
        - fr
        - en
        - es
        - it
        - pt-br
        - de
        - ar
        - nl
        - pl
        - cs
        - ca
        - sk
        - pt
        - lv
        - ro
        - bg
        - hu
      example: fr
    CategorySqlId:
      type: integer
      description: Category id
      example: 42
    CategorySqlGmbId:
      type: string
      description: |
        Unique category id. This is the id you should pass in business.categories array when creating/updating a business
      example: gcid:climbing_gym
    CategoryName:
      type: string
      description: Category name in given language or user's language
      example: Cabinet d'expertise comptable
    CategorySqlName:
      type: object
      properties:
        name:
          type: string
          description: Translated category name
          example: salle d'escalade
        lang:
          type: string
          description: Available language in the application
          example: FR
    CategorySqlNames:
      type: array
      description: |
        Category names translated for available languages

        *If `with_names` is true*
      items:
        $ref: '#/components/schemas/CategorySqlName'
    CategorySqlState:
      type: string
      description: State of category ( OK or DEPRECATED )
      example: OK
    CategorySqlBlockPushLong:
      type: boolean
      description: Boolean indicating if the business long description can be pushed to Google when the business belongs to this category
      example: false
    CategoryCountries:
      type: array
      items:
        type: string
      description: |
        Array of strings representing the list of country codes in which the category is available

        *If `with_countries` is true*
      example:
        - FR
        - GB
        - IT
        - ES
    CategorySqlLiveId:
      type:
        - string
        - 'null'
      description: Live category id to which the category is mapped (deprecated categories are mapped to the closest category)
      example: gcid:sport_club
    CategorySql:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/CategorySqlId'
        gmb_id:
          $ref: '#/components/schemas/CategorySqlGmbId'
        name:
          $ref: '#/components/schemas/CategoryName'
        names:
          $ref: '#/components/schemas/CategorySqlNames'
        state:
          $ref: '#/components/schemas/CategorySqlState'
        block_push_long_description_on_gmb:
          $ref: '#/components/schemas/CategorySqlBlockPushLong'
        countries:
          $ref: '#/components/schemas/CategoryCountries'
        live_id:
          $ref: '#/components/schemas/CategorySqlLiveId'
    CategoryId:
      oneOf:
        - type: integer
          description: Category id
        - type: string
          description: Google's category id
      description: Category id or Google's category id
      example: 5706 or gcid:bank
    SuggestedAdditionalCategoriesObject:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/CategorySqlId'
        gmb_id:
          $ref: '#/components/schemas/CategorySqlGmbId'
        name:
          $ref: '#/components/schemas/CategoryName'
        state:
          $ref: '#/components/schemas/CategorySqlState'
        block_push_long_description_on_gmb:
          $ref: '#/components/schemas/CategorySqlBlockPushLong'
        live_id:
          $ref: '#/components/schemas/CategorySqlLiveId'
    MessageContentType:
      type: string
      enum:
        - Text
        - Image
        - Video
        - Audio
        - Document
        - IgStoryReply
        - IgStoryMention
        - Unsupported
      description: |
        The type of the message:
        - "Text" describes a simple text message.
        - "Image" describes a message that only contains an image.
        - "IgStoryReply" (for "Instagram" conversations) describes a notification
        of reply to an Instagram story.
        - "IgStoryMention" (for "Instagram" conversations) describes a notification
        of a mention in an Instagram story.
        - "Unsupported" describes a message whose content is not supported.

        ⚠️ New values may be added to this enum without prior notice and without following the classic depreciation cycle.      
        It is up to you to gracefully handle the case where new values are added.         
        We recommend showing a "Unhandled content" placeholder to the user in place of the message ⚠️
    SenderType:
      type: string
      enum:
        - User
        - Consumer
        - Metadata
      description: |
        Describes the person that sent the Message:
        - "User" indicates that the message was sent as the Business.
        Such messages can be sent by a Partoo user, via API, or directly on the
        messaging platform.
        - "Consumer" indicates that the message was sent by a consumer, a client
        that wants to get in touch with the business.
        - "Metadata" is reserved for special messages that appear in the
        Partoo inbox. They only give contextual information about the conversation,
        and are not shown to the consumer.

        ⚠️ New values may be added to this enum without prior notice and without following the classic depreciation cycle.        
        It is up to you to gracefully handle the case where new values are added.       
        We recommend ignoring messages with unhandled sender_type ⚠️
    MessageStatus:
      type: string
      enum:
        - Sending
        - Success
        - Failed
      description: |
        The delivery status of the message.
        Messages send via Partoo are created with the status "Sending", and
        propagated to the messaging channel.
        If the message is sent successfully, the status is changed to "Success".
        If the messaging channel fails to send the message, the status changed to
        "Failed". A failed message can be retried using the [/retry endpoint](/api-reference/messages/retry-send-message).
    TextMessageContent:
      title: Text
      type: string
      description: The text of the message.
    ImageMessageContent:
      title: Image
      type: string
      format: url
      description: The url of the image.
    VideoMessageContent:
      type: object
      title: Video
      properties:
        url:
          type: string
          format: url
          description: The url of the video.
        file_name:
          type:
            - string
            - 'null'
          description: Name of the video file.
    AudioMessageContent:
      type: object
      title: Audio
      properties:
        url:
          type: string
          format: url
          description: The url of the audio.
        file_name:
          type:
            - string
            - 'null'
          description: Name of the audio file.
    DocumentMessageContent:
      type: object
      title: Document
      properties:
        url:
          type: string
          format: url
          description: The url of the document.
        file_name:
          type:
            - string
            - 'null'
          description: Name of the document file.
    IgStoryReplyMessageContent:
      type: object
      title: IgStoryReply
      properties:
        url:
          type: string
          format: url
          description: The url of the story that received the reply.
        content:
          type: string
          description: Text of the reply, or url of the image.
        content_type:
          type: string
          enum:
            - Image
            - Text
          description: The type of content of ther reply.
        id:
          type: string
          description: The Instagram ID of the story.
    IgStoryMentionMessageContent:
      type: string
      title: IgStoryMention
      format: url
      description: The url of the story mentionned.
    UnsupportedMessageContent:
      type: object
      title: Unsupported
      properties:
        type:
          type: string
          enum:
            - video
            - audio
            - unknown
    SolvingMessageContent:
      type: string
      enum:
        - Solving
      title: Solving (Metadata)
    ReopeningMessageContent:
      type: string
      enum:
        - Reopening
      title: Reopening (Metadata)
    CustomChannelMessage:
      type: object
      title: Message
      properties:
        external_message_id:
          type: string
          description: The unique id of the message in your system.
    Message:
      type: object
      title: Message
      properties:
        id:
          type: integer
          description: The id of the message.
        conversation_id:
          type: integer
          description: The id of the parent conversation.
        date:
          type: string
          description: |
            The date at which the message was sent or received, in the ISO 8601
            format (ex: "2023-01-31 16:22:17.327878+00:00").
          example: '2023-01-31 16:22:17.327878+00:00'
        content_type:
          $ref: '#/components/schemas/MessageContentType'
        sender_type:
          $ref: '#/components/schemas/SenderType'
        sender_label:
          type:
            - string
            - 'null'
          description: Name of the person sending the message
          example: Jane Doe
        status:
          $ref: '#/components/schemas/MessageStatus'
        is_deleted:
          type: boolean
          description: |
            If the message has been deleted by the consumer on the messaging
            channel (for now, only "Instagram" messages can be deleted).
          example: false
        is_automated:
          type: boolean
          description: |
            If the message was sent by a Partoo automation (chatbot, ...).
          example: false
        content:
          oneOf:
            - $ref: '#/components/schemas/TextMessageContent'
            - $ref: '#/components/schemas/ImageMessageContent'
            - $ref: '#/components/schemas/VideoMessageContent'
            - $ref: '#/components/schemas/AudioMessageContent'
            - $ref: '#/components/schemas/DocumentMessageContent'
            - $ref: '#/components/schemas/IgStoryReplyMessageContent'
            - $ref: '#/components/schemas/IgStoryMentionMessageContent'
            - $ref: '#/components/schemas/UnsupportedMessageContent'
            - $ref: '#/components/schemas/SolvingMessageContent'
            - $ref: '#/components/schemas/ReopeningMessageContent'
        user_id:
          type:
            - string
            - 'null'
          description: |
            For "User" messages sent via the Partoo application, the id of the
            user that sent the message.
        custom_channel:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomChannelMessage'
          description: Data about the custom channel, this object is filled only if the messaging partner is `Custom`.
    ConversationStatus:
      type: string
      enum:
        - Open
        - Closed
    ConversationBusiness:
      type: object
      title: BusinessInfo
      properties:
        id:
          type: string
        name:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        zipcode:
          type:
            - string
            - 'null'
        country:
          type:
            - string
            - 'null'
        formatted_address:
          type:
            - string
            - 'null'
    MessagingPartner:
      description: |
        The channel that the message is being sent to/from.

        ⚠️ New values may be added to this enum without prior notice and without following the classic depreciation cycle.    
        It is up to you to gracefully handle the case where new values are added.
      type: string
      enum:
        - Google
        - Facebook
        - Instagram
        - SMS
        - Whatsapp
        - Custom
        - Livechat
      example: Facebook
    ConversationIssue:
      type: string
      enum:
        - facebook_no_page_linked
        - facebook_partner_co_undone
        - facebook_invalid_status
        - facebook_missing_webhook_subs
        - instagram_no_account_linked
        - sms_no_phone_number
    CustomChannel:
      type: object
      title: Message
      properties:
        id:
          type: string
          description: The id of the custom channel.
        name:
          type: string
          description: The name of the custom channel.
        icon:
          type: string
          description: Url of the channel's icon.
        is_readonly:
          type: boolean
          description: Set to `true` if the channel to be read-only (i.e., no replies via Partoo)
        external_conversation_id:
          type: string
          description: The unique id of the conversation in your system.
    Conversation:
      type: object
      title: Conversation
      properties:
        id:
          type: integer
        consumer_img:
          type:
            - string
            - 'null'
          format: url
          description: The url of the consumer's profile picture
          example: https://www.example.com/profile-picture.jpg
        consumer_name:
          type:
            - string
            - 'null'
          description: |
            The name of the consumer, can be empty. The format may differ depending on the platform of contact (ex: "John Doe", "John Doe (@johndoe)", "@johndoe", "", ...).
          example: John Doe
        consumer_phone_number:
          type:
            - string
            - 'null'
          description: |
            The phone number of the consumer, formatted in E.164 international
            format (ex: "+33612345678").
          example: '+33612345678'
        consumer_email:
          type:
            - string
            - 'null'
          description: |
            The email of the consumer.
          example: john.doe@example.com
        last_message:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Message'
              description: The last message exchanged in the conversation.
        is_read:
          type: boolean
          description: |
            If the last message received was read.
            This property is scoped to the user who performs the request.
            Multiple partoo users can have a different is_read value for the same conversation.
            is_read is always false in webhook payloads.
        status:
          allOf:
            - description: |
                If Open, it is possible to send a message in the conversation, else not.
                A conversation can be Closed if it is expired.
            - $ref: '#/components/schemas/ConversationStatus'
        created_at:
          type: string
          description: |
            The date of creation of the conversation, in the ISO 8601 format
            (ex: "2023-01-31 16:22:17.327878+00:00").
          example: '2023-01-31 16:22:17.327878+00:00'
        has_one_user_message:
          type: boolean
          description: |
            If the conversation has at least one message sent by a Partoo user.
        business:
          allOf:
            - description: |
                Some basic information about the business that the conversation is associated with.
            - $ref: '#/components/schemas/ConversationBusiness'
        messaging_partner:
          $ref: '#/components/schemas/MessagingPartner'
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ConversationIssue'
          description: |
            The list of issues that affect the conversation. The issues represent
            setup problem that the business may have with a messaging channel. It is
            not possible to send messages on a conversation that has issues.

            ⚠️ New values may be added to this enum without prior notice and without following the classic depreciation cycle.      
            It is up to you to gracefully handle the case where new values are added.
          example:
            - facebook_no_page_linked
        first_message_date:
          type: string
          description: |
            The date at which the first message of the conversation was received, in the ISO 8601 format (ex: "2023-01-31 16:22:17.327878+00:00").
        last_message_date:
          type:
            - string
            - 'null'
          description: |
            The date of the last message of the conversation, in the ISO 8601 format (ex: "2023-01-31 16:22:17.327878+00:00").
          example: '2023-01-31 16:22:17.327878+00:00'
        is_expired:
          type: boolean
          description: |
            If the conversation has expired. A conversation expires if the consumer has not contacted the business for a certain amount of time.      
            You cannot send messages to an expired conversation.
          example: false
        is_solved:
          type: boolean
          description: |
            If the conversation has been solved.      
            Conversations can be solved from our app or by updating conversation status to "closed".
          example: false
        is_automated:
          type: boolean
          description: |
            If a Partoo chatbot is assigned to the conversation.
          example: false
        assigned_user_id:
          type:
            - string
            - 'null'
          description: |
            The "user_id" of the user assigned to the conversation.
          example: 62d80fae74e8b11d700302b8
        custom_channel:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomChannel'
              description: Data about the custom channel, this object is filled only if the messaging partner is `Custom`.
    Count:
      type: integer
      description: |
        Total number of results available for the filters and dimensions requested.
      example: 1
    NextCursor:
      type:
        - string
        - 'null'
      description: |
        The cursor to use in order to retrieve the next page of data.
        When all data have been fetched, the value is null.
    PostMessage:
      required:
        - conversation_id
        - content_type
        - date
      properties:
        conversation_id:
          type: integer
          description: The id of the conversation
    PostTextMessage:
      required:
        - content
      title: Text
      allOf:
        - $ref: '#/components/schemas/PostMessage'
        - properties:
            content_type:
              type: string
              enum:
                - Text
            content:
              type: string
              description: The text to send
    PostImageUrlMessage:
      required:
        - url
      title: Image Url
      allOf:
        - $ref: '#/components/schemas/PostMessage'
        - properties:
            content_type:
              type: string
              enum:
                - Image
            url:
              type: string
              description: The url of the image to send
    PostAudioMessage:
      required:
        - url
      title: Audio
      allOf:
        - $ref: '#/components/schemas/PostMessage'
        - properties:
            content_type:
              type: string
              enum:
                - Audio
            content:
              type: object
              properties:
                url:
                  type: string
                  description: The url of the audio to send
    PostVideoMessage:
      required:
        - url
      title: Video
      allOf:
        - $ref: '#/components/schemas/PostMessage'
        - properties:
            content_type:
              type: string
              enum:
                - Video
            content:
              type: object
              properties:
                url:
                  type: string
                  description: The url of the video to send
    PostDocumentMessage:
      required:
        - url
      title: Document
      allOf:
        - $ref: '#/components/schemas/PostMessage'
        - properties:
            content_type:
              type: string
              enum:
                - Document
            content:
              type: object
              properties:
                url:
                  type: string
                  description: The url of the document to send
    PostImageMessage:
      required:
        - image
      allOf:
        - $ref: '#/components/schemas/PostMessage'
        - properties:
            content_type:
              type: string
              enum:
                - Image
            image:
              type: string
              description: The image to send
    MessageReplyTemplate:
      type: object
      title: MessageReplyTemplate
      properties:
        id:
          type: string
          example: 642bca3d2830e15c6806cc33
        title:
          type: string
          description: The title of the message template.
          example: Quote request
        content:
          type: string
          enum:
            - client_full_name
            - client_first_name
            - business_name
            - my_first_name
            - rb_link
            - address
            - website_url
            - phone_number
          description: |
            The content of the message template should be a __stringified JSON__ object. This includes both the message content (`"text"`) and the pair `"_version": "0.1"`.

            The `"text"` can contain placeholders (values from the enum above within double curly braces `{{}}`) that will be replaced with the actual values when the message is sent.
          example: '{"text": "Hello {{client_full_name}}, thank you for your request. For a quote, please contact us at 0123456789." "_version": "0.1"}'
        icon:
          type:
            - string
            - 'null'
          description: The icon associated with the message template.
          example: 📝
        org_id:
          type: integer
          description: The organization ID that the message template belongs to.
          example: 123
        created_at:
          type: string
          format: date-time
          description: The date and time when the message template was created, in ISO 8601 format.
          example: '2023-01-31T16:22:17.327878+00:00'
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: The date and time when the message template was last updated, in ISO 8601 format.
          example: '2023-02-15T10:00:00.000000+00:00'
        usage_count:
          type: integer
          description: The number of times the message template has been used.
          example: 50
    MessageTemplateCreateRequest:
      required:
        - title
        - content
      properties:
        title:
          type: string
          description: The title of the template
          example: Quote request
        icon:
          type: string
          description: The icon linked to the template
          example: 📝
        content:
          type: string
          description: |
            The template content as a __stringified JSON__ object with `"_version": "0.1"` inside
          example: '{"text": "Hello, thank you for your request. For a quote, please contact us at 0123456789." "_version": "0.1"}'
    MessageTemplateUpdateRequest:
      properties:
        title:
          type: string
          description: The new title of the template
          example: Quote request
        icon:
          type: string
          description: The new icon linked to the template
          example: 📝
        content:
          type: string
          description: |
            The new template content as a __stringified JSON__ object with `"_version": "0.1"` inside
          example: '{"text": "Hello, thank you for your request. For a quote, please contact us at 0123456789." "_version": "0.1"}'
    MessagingSettingWelcomeMessage:
      type:
        - string
        - 'null'
      description: |
        When a consumer first contacts the business, an automated reply is sent.
        The content of the reply depends on whether the consumer contacted the business during it's chat hours.        
        If it is, the welcome_message is sent as a reply.     

        The welcome_message is mandatory, and can be customized. A default will be set if none is specified.
    MessagingSettingOfflineMessage:
      type:
        - string
        - 'null'
      description: |
        When a consumer first contacts the business, an automated reply is sent.      
        The content of the reply depends on whether the consumer contacted the business during it's chat hours.      
        If it is not, the offline_message is sent as a reply.     

        The offline_message is mandatory, and can be customized. A default will be set if none is specified.
    MessagingSettingUsesBusinessHours:
      type:
        - boolean
        - 'null'
      description: |
        If set to true, the business' "open_hours" will be used as chat hours.    
        Otherwise, you need to specify "custom_chat_hours".
    ChatHours:
      type:
        - object
        - 'null'
      description: |
        The chat hours of the business (in its timezone).

        Chat hours are specified per weekday. This is done by supplying an object mapping weekdays ("monday", "tuesday", etc.) to a list of strings. These strings in turn represent time slots during which the business is open.      

        For example, the following value would set the chat hours to between 08:00-15:00 in the afternoon and 18:00-23:00 in the evening on Mondays:      

        `{"monday": ["08:00-15:00", "18:00-23:00"]}`    

        To indicate that a business can be contacted for 24 hours, for a specific weekday, use the value `["00:00-23:59"]`.     

        This field is not mandatory unless "uses_business_hours" is set to false.
      required:
        - monday
        - tuesday
        - wednesday
        - thursday
        - friday
        - saturday
        - sunday
      properties:
        monday:
          $ref: '#/components/schemas/Day'
        tuesday:
          $ref: '#/components/schemas/Day'
        wednesday:
          $ref: '#/components/schemas/Day'
        thursday:
          $ref: '#/components/schemas/Day'
        friday:
          $ref: '#/components/schemas/Day'
        saturday:
          $ref: '#/components/schemas/Day'
        sunday:
          $ref: '#/components/schemas/Day'
    MessagingSettingIsLaunched:
      type:
        - boolean
        - 'null'
      description: |
        Some messaging channels (Google and Facebook) can be temporarily deactivated. This allows the business to close for a period of time without having to answer consumer messages.      

        This is important because consumers will get frustrated if they are able to contact a business and do not get an answer. It is also important to note that for some messaging channels, not responding to messages may lead to decreased visibility of the business, or suspension of the messaging service.      

        The is_launched property indicates whether the business is reachable for those messaging channels.        

        The value can be updated, and the changes will be propagated to the messaging channels, effectively toggling the On or Off the ability for consumers to reach the business. (The change to "is_launched" is made asychronously, and the update will be effective when the messaging channels have finished propagating the information)
    MessagingSetting:
      type: object
      properties:
        id:
          type: integer
        business_id:
          type: string
          description: |
            The ID of the business that the MessagingSetting is related to.
        business_name:
          type:
            - string
            - 'null'
          description: |
            The Name of the business that the MessagingSetting is related to.
        business_address:
          type:
            - string
            - 'null'
          description: |
            The Formatted address of the business that the MessagingSetting isrelated to.
          example: 1 Rue de la Paix, 75000 Paris
        welcome_message:
          $ref: '#/components/schemas/MessagingSettingWelcomeMessage'
        offline_message:
          $ref: '#/components/schemas/MessagingSettingOfflineMessage'
        uses_business_hours:
          $ref: '#/components/schemas/MessagingSettingUsesBusinessHours'
        custom_chat_hours:
          $ref: '#/components/schemas/ChatHours'
        is_launched:
          $ref: '#/components/schemas/MessagingSettingIsLaunched'
    Page:
      description: The current page number.
      type: integer
      example: 1
    MaxPage:
      description: Total number of pages available for this request.
      type: integer
      example: 1
    CustomFieldId:
      description: Id of the custom field
      type: integer
      example: 42
    CustomFieldName:
      description: The name of the custom field
      type: string
      minLength: 1
      maxLength: 50
      example: Click and collect
    CustomFieldDescription:
      description: Description of the custom field
      type: string
      maxLength: 150
      nullable: true
      example: Whether the business offers click and collect service
    CustomFieldTypeBool:
      description: BOOLEAN
      minLength: 1
      type: string
      example: BOOLEAN
    CustomFieldSlug:
      description: 'Unique identifier slug for the custom field. Cannot contain any of the following characters: `,;/\|<>`'
      type: string
      minLength: 1
      maxLength: 100
      nullable: true
      example: click-and-collect
    CustomFieldOrder:
      description: Describes where the custom field is displayed on the Business Edit view of the Partoo App. If the custom field is within a section, **order** specifies its position within the custom field section.
      type: integer
      default: 10
      example: 30
    CustomFieldSectionId:
      description: Id of the custom field section
      type: integer
      example: 6
    CustomFieldSectionName:
      description: The name of the custom field section. Needs to be unique from all other section names.
      type: string
      maxLength: 60
      example: Section A
    CustomFieldBoolGet:
      description: Boolean Custom Field
      type: object
      title: Boolean Field
      properties:
        id:
          $ref: '#/components/schemas/CustomFieldId'
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeBool'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
        section_name:
          $ref: '#/components/schemas/CustomFieldSectionName'
    CustomFieldTypeText:
      description: TEXT
      minLength: 1
      type: string
      example: TEXT
    CustomFieldMaxLen:
      description: maximum lenght for TEXT field
      type: integer
      example: 10
    CustomFieldTextGet:
      description: Text Custom Field
      type: object
      title: Text Field
      properties:
        id:
          $ref: '#/components/schemas/CustomFieldId'
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeText'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        max_len:
          $ref: '#/components/schemas/CustomFieldMaxLen'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
        section_name:
          $ref: '#/components/schemas/CustomFieldSectionName'
    CustomFieldTypeInteger:
      description: INTEGER
      minLength: 1
      type: string
      example: INTEGER
    CustomFieldMin:
      description: minimum value for INTEGER field
      type: integer
      example: 0
    CustomFieldMax:
      description: maximum value for INTEGER field
      type: integer
      example: 100
    CustomFieldIntegerGet:
      description: Integer Custom Field
      type: object
      title: Integer Field
      properties:
        id:
          $ref: '#/components/schemas/CustomFieldId'
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeInteger'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        min:
          $ref: '#/components/schemas/CustomFieldMin'
        max:
          $ref: '#/components/schemas/CustomFieldMax'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
        section_name:
          $ref: '#/components/schemas/CustomFieldSectionName'
    CustomFieldTypeFloat:
      description: FLOAT
      minLength: 1
      type: string
      example: FLOAT
    CustomFieldFloatMin:
      description: minimum value for FLOAT field
      type: number
      example: 0
    CustomFieldFloatMax:
      description: maximum value for FLOAT field
      type: number
      example: 10.5
    CustomFieldFloatGet:
      description: Float Custom Field
      type: object
      title: Float Field
      properties:
        id:
          $ref: '#/components/schemas/CustomFieldId'
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeFloat'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        min:
          $ref: '#/components/schemas/CustomFieldFloatMin'
        max:
          $ref: '#/components/schemas/CustomFieldFloatMax'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
        section_name:
          $ref: '#/components/schemas/CustomFieldSectionName'
    CustomFieldTypeSingleSelect:
      description: SINGLE_SELECT
      minLength: 1
      type: string
      example: SINGLE_SELECT
    CustomFieldPossibleValues:
      minItems: 1
      description: list of available values
      type: array
      items:
        type: string
      example:
        - free parking
        - disabled access
    CustomFieldPossibleOrders:
      description: |
        The order of the possible values. Array of integers where each element corresponds  to the display order of the value at the same index in possible_values. Orders with gaps (e.g., [5, 8, 1]) will be automatically normalized to consecutive  values (e.g., [2, 3, 1]) while preserving the relative ordering.
      type: array
      items:
        type: integer
        nullable: true
      nullable: true
      example:
        - 3
        - 2
        - 4
        - 1
    CustomFieldSingleSelectGet:
      description: Single Select Custom Field
      type: object
      title: Single Select Field
      properties:
        id:
          $ref: '#/components/schemas/CustomFieldId'
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeSingleSelect'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        possible_values:
          $ref: '#/components/schemas/CustomFieldPossibleValues'
        possible_orders:
          $ref: '#/components/schemas/CustomFieldPossibleOrders'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
        section_name:
          $ref: '#/components/schemas/CustomFieldSectionName'
    CustomFieldTypeMultipleSelect:
      description: MULTIPLE_SELECT
      minLength: 1
      type: string
      example: MULTIPLE_SELECT
    CustomFieldMaxSelectedValues:
      description: Maximum number of values that can be selected for multiple select fields
      type: integer
      minimum: 1
      nullable: true
      example: 3
    CustomFieldMultipleSelectGet:
      description: Multiple Select Custom Field
      type: object
      title: Multiple Select Field
      properties:
        id:
          $ref: '#/components/schemas/CustomFieldId'
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeMultipleSelect'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        possible_values:
          $ref: '#/components/schemas/CustomFieldPossibleValues'
        possible_orders:
          $ref: '#/components/schemas/CustomFieldPossibleOrders'
        max_selected_values:
          $ref: '#/components/schemas/CustomFieldMaxSelectedValues'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
        section_name:
          $ref: '#/components/schemas/CustomFieldSectionName'
    CustomFieldTypeMultipleSelectImage:
      description: MULTIPLE_SELECT_IMAGE
      minLength: 1
      type: string
      example: MULTIPLE_SELECT_IMAGE
    CustomFieldPossibleValuesMSI:
      minItems: 1
      description: |
        List of available values.
        Each element corresponds to one of possible_images_urls and possible_images_labels.
        Hence, the 3 lists shall have the same size.
      type: array
      items:
        type: string
      example:
        - first image
        - second image
    CustomFieldPossibleImagesUrls:
      minItems: 1
      description: List of available urls
      type: array
      items:
        type: string
      example:
        - https://image1
        - https://image2
    CustomFieldPossibleImagesLabels:
      minItems: 1
      description: |
        List of available labels.
        Can be set to null but shall always have the same number of elements as possible_values and possible_images_urls.
      type: array
      items:
        type: string
      example:
        - Image 1
        - Image 2
    CustomFieldMultipleSelectImageGet:
      description: Multiple Select Image Custom Field
      type: object
      title: Multiple Select Image Field
      properties:
        id:
          $ref: '#/components/schemas/CustomFieldId'
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeMultipleSelectImage'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        possible_values:
          $ref: '#/components/schemas/CustomFieldPossibleValuesMSI'
        possible_images_urls:
          $ref: '#/components/schemas/CustomFieldPossibleImagesUrls'
        possible_images_labels:
          $ref: '#/components/schemas/CustomFieldPossibleImagesLabels'
        possible_orders:
          $ref: '#/components/schemas/CustomFieldPossibleOrders'
        max_selected_values:
          $ref: '#/components/schemas/CustomFieldMaxSelectedValues'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
        section_name:
          $ref: '#/components/schemas/CustomFieldSectionName'
    CustomFieldTypeImagesUploader:
      description: IMAGES_UPLOADER
      minLength: 1
      type: string
      example: IMAGES_UPLOADER
    CustomFieldTextFields:
      description: Configuration for text type Custom Fields
      type: array
      items:
        type: object
        required:
          - text_field
        properties:
          text_field:
            type: string
            description: Name of the text field
          max_length:
            type: integer
            minimum: 1
            maximum: 1000
            nullable: true
            description: Maximum length for the text field
      example:
        - text_field: Caption
          max_length: 100
        - text_field: Alt Text
          max_length: 50
    CustomFieldImagesUploaderGet:
      description: Images uploader Custom Field
      type: object
      title: Images Uploader Field
      properties:
        id:
          $ref: '#/components/schemas/CustomFieldId'
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeImagesUploader'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        text_fields:
          $ref: '#/components/schemas/CustomFieldTextFields'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
        section_name:
          $ref: '#/components/schemas/CustomFieldSectionName'
    CustomFieldTypeGet:
      anyOf:
        - $ref: '#/components/schemas/CustomFieldBoolGet'
        - $ref: '#/components/schemas/CustomFieldTextGet'
        - $ref: '#/components/schemas/CustomFieldIntegerGet'
        - $ref: '#/components/schemas/CustomFieldFloatGet'
        - $ref: '#/components/schemas/CustomFieldSingleSelectGet'
        - $ref: '#/components/schemas/CustomFieldMultipleSelectGet'
        - $ref: '#/components/schemas/CustomFieldMultipleSelectImageGet'
        - $ref: '#/components/schemas/CustomFieldImagesUploaderGet'
    CustomFieldForceUpdate:
      description: |
        The deletion of a custom field or the update of its metadata can have impacts on custom fields which are already set for businesses.
        - If `force` is set to false, updates/deletions will be performed only if they are non-destructive.  
          If some businesses would be impacted by the update/deletion, an exception will be returned.

        - If `force` is set to true, destructive modification will be performed and businesses' values will be deleted accordingly.
      type: boolean
      default: false
    CustomFieldBool:
      description: Boolean Custom Field
      type: object
      required:
        - name
        - type
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeBool'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldText:
      description: Text Custom Field
      type: object
      required:
        - name
        - type
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeText'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        max_len:
          $ref: '#/components/schemas/CustomFieldMaxLen'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldInteger:
      description: Integer Custom Field
      type: object
      required:
        - name
        - type
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeInteger'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        min:
          $ref: '#/components/schemas/CustomFieldMin'
        max:
          $ref: '#/components/schemas/CustomFieldMax'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldFloat:
      description: Float Custom Field
      type: object
      required:
        - name
        - type
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeFloat'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        min:
          $ref: '#/components/schemas/CustomFieldFloatMin'
        max:
          $ref: '#/components/schemas/CustomFieldFloatMax'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldSingleSelect:
      description: Single Select Custom Field
      type: object
      required:
        - name
        - type
        - possible_values
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeSingleSelect'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        possible_values:
          $ref: '#/components/schemas/CustomFieldPossibleValues'
        possible_orders:
          $ref: '#/components/schemas/CustomFieldPossibleOrders'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldMultipleSelect:
      description: Multiple Select Custom Field
      type: object
      required:
        - name
        - type
        - possible_values
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeMultipleSelect'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        possible_values:
          $ref: '#/components/schemas/CustomFieldPossibleValues'
        possible_orders:
          $ref: '#/components/schemas/CustomFieldPossibleOrders'
        max_selected_values:
          $ref: '#/components/schemas/CustomFieldMaxSelectedValues'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldMultipleSelectImage:
      description: Multiple Select Image Custom Field
      type: object
      required:
        - name
        - type
        - possible_values
        - possible_images_urls
        - possible_images_labels
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeMultipleSelectImage'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        possible_values:
          $ref: '#/components/schemas/CustomFieldPossibleValuesMSI'
        possible_images_urls:
          $ref: '#/components/schemas/CustomFieldPossibleImagesUrls'
        possible_images_labels:
          $ref: '#/components/schemas/CustomFieldPossibleImagesLabels'
        possible_orders:
          $ref: '#/components/schemas/CustomFieldPossibleOrders'
        max_selected_values:
          $ref: '#/components/schemas/CustomFieldMaxSelectedValues'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldImagesUploader:
      description: Images uploader Custom Field
      type: object
      required:
        - name
        - type
        - text_fields
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeImagesUploader'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        text_fields:
          $ref: '#/components/schemas/CustomFieldTextFields'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldEditTypeBool:
      description: Boolean Custom Field
      type: object
      required:
        - name
        - type
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeBool'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldEditTypeText:
      description: Text Custom Field
      type: object
      required:
        - name
        - type
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeText'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        max_len:
          $ref: '#/components/schemas/CustomFieldMaxLen'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldEditTypeInteger:
      description: Integer Custom Field
      type: object
      required:
        - name
        - type
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeInteger'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        min:
          $ref: '#/components/schemas/CustomFieldMin'
        max:
          $ref: '#/components/schemas/CustomFieldMax'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldEditTypeFloat:
      description: Float Custom Field
      type: object
      required:
        - name
        - type
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeFloat'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        min:
          $ref: '#/components/schemas/CustomFieldFloatMin'
        max:
          $ref: '#/components/schemas/CustomFieldFloatMax'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldCreatedValues:
      description: list of available values to add
      type: array
      items:
        type: string
      example:
        - Image 3
    CustomFieldCreatedValuesOrders:
      description: |
        The order of the created values. Array of integers where each element corresponds  to the display order of the value at the same index in created_values. Orders with gaps (e.g., [5, 8, 1]) will be automatically normalized to consecutive  values (e.g., [2, 3, 1]) while preserving the relative ordering.
      type: array
      items:
        type: integer
        nullable: true
      nullable: true
      example:
        - 3
        - 2
        - 4
        - 1
    CustomFieldDeletedValues:
      description: list of available values to remove
      type: array
      items:
        type: string
      example:
        - Image 1
    CustomFieldRenamedValues:
      description: list of available values to rename
      type: array
      items:
        type: object
        properties:
          old_value:
            type: string
          new_value:
            type: string
      example:
        - old_value: Image 1
          new_value: Draw 1
        - old_value: Image 2
          new_value: Photo 2
    CustomFieldTypeEditSingleSelect:
      description: Single Select Custom Field
      type: object
      required:
        - name
        - type
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeSingleSelect'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        created_values:
          $ref: '#/components/schemas/CustomFieldCreatedValues'
        created_values_orders:
          $ref: '#/components/schemas/CustomFieldCreatedValuesOrders'
        deleted_values:
          $ref: '#/components/schemas/CustomFieldDeletedValues'
        renamed_values:
          $ref: '#/components/schemas/CustomFieldRenamedValues'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldTypeEditMultipleSelect:
      description: Multiple Select Custom Field
      type: object
      required:
        - name
        - type
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeMultipleSelect'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        created_values:
          $ref: '#/components/schemas/CustomFieldCreatedValues'
        created_values_orders:
          $ref: '#/components/schemas/CustomFieldCreatedValuesOrders'
        deleted_values:
          $ref: '#/components/schemas/CustomFieldDeletedValues'
        renamed_values:
          $ref: '#/components/schemas/CustomFieldRenamedValues'
        max_selected_values:
          $ref: '#/components/schemas/CustomFieldMaxSelectedValues'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldCreatedValuesMSI:
      description: list of available values to add
      type: array
      items:
        type: object
        required:
          - label
          - url
          - value
        properties:
          label:
            type: string
            description: Label for the image option
          url:
            type: string
            description: URL of the image option
          value:
            type: string
            description: Value identifier for the option
          order:
            type: integer
            nullable: true
            description: Display order for the option
      example:
        - label: Image 3
          url: https://image3
          value: Image 3
          order: 1
    CustomFieldEditedValuesMSI:
      description: list of available values to edit
      type: array
      items:
        type: object
        required:
          - label
          - url
          - value
          - old_value
        properties:
          label:
            type: string
            description: New label for the image option
          url:
            type: string
            description: New URL for the image option
          value:
            type: string
            description: New value for the image option
          old_value:
            type: string
            description: Original value being edited
      example:
        - label: Updated Image
          url: https://updated-image.jpg
          value: updated-image
          old_value: old-image
    CustomFieldTypeEditMultipleSelectImage:
      description: Multiple Select Image Custom Field
      type: object
      required:
        - name
        - type
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeMultipleSelectImage'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        created_values:
          $ref: '#/components/schemas/CustomFieldCreatedValuesMSI'
        deleted_values:
          $ref: '#/components/schemas/CustomFieldDeletedValues'
        edited_values:
          $ref: '#/components/schemas/CustomFieldEditedValuesMSI'
        max_selected_values:
          $ref: '#/components/schemas/CustomFieldMaxSelectedValues'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldCreatedValuesImagesUploader:
      description: List of text fields to add
      type: array
      items:
        $ref: '#/components/schemas/CustomFieldValuesImagesUploader'
      example:
        - text_field: text 1
          max_length: 30
        - text_field: text 2
          max_length: 20
    CustomFieldDeletedValuesImagesUploader:
      description: List of text fields to delete
      type: array
      items:
        type: string
      example:
        - my text field
    CustomFieldEditedValuesImagesUploader:
      description: List of edited text fields
      type: array
      items:
        type: object
        properties:
          new_value:
            $ref: '#/components/schemas/CustomFieldValuesImagesUploader'
          old_value:
            $ref: '#/components/schemas/CustomFieldValuesImagesUploader'
      example:
        - new_value:
            text_field: new name
            max_length: 40
          old_value:
            text_field: old name
            max_length: 20
    CustomFieldTypeEditImagesUploader:
      description: Images uploader Custom Field
      type: object
      required:
        - name
        - type
      properties:
        name:
          $ref: '#/components/schemas/CustomFieldName'
        description:
          $ref: '#/components/schemas/CustomFieldDescription'
        type:
          $ref: '#/components/schemas/CustomFieldTypeImagesUploader'
        slug:
          $ref: '#/components/schemas/CustomFieldSlug'
        created_values:
          $ref: '#/components/schemas/CustomFieldCreatedValuesImagesUploader'
        deleted_values:
          $ref: '#/components/schemas/CustomFieldDeletedValuesImagesUploader'
        edited_values:
          $ref: '#/components/schemas/CustomFieldEditedValuesImagesUploader'
        force:
          $ref: '#/components/schemas/CustomFieldForceUpdate'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldOrdersObject:
      type: object
      required:
        - id
        - order
      properties:
        id:
          $ref: '#/components/schemas/CustomFieldId'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldOrders:
      description: |
        On the Business Edit view of the Partoo App, custom fields will be displayed depending on their order.      
        The lowest number will be the first.
      type: array
      items:
        $ref: '#/components/schemas/CustomFieldOrdersObject'
    CustomFieldSectionOrder:
      description: Describes where the custom field section is displayed on the Business Edit view of the Partoo App.
      type: integer
      example: 18
    CustomFieldSectionOrdersObject:
      type: object
      required:
        - id
        - order
      properties:
        id:
          $ref: '#/components/schemas/CustomFieldSectionId'
        order:
          $ref: '#/components/schemas/CustomFieldSectionOrder'
    CustomFieldSectionOrders:
      description: |
        On the Business Edit view of the Partoo App, custom fields section will be displayed depending on their order.      
        The lowest number will be the first.
      type: array
      items:
        $ref: '#/components/schemas/CustomFieldSectionOrdersObject'
    CustomFieldSectionDescription:
      description: Description of the custom field section
      type: string
      maxLength: 150
      nullable: true
      example: Contains primary business information fields
    CustomFieldSectionSlug:
      description: 'Unique identifier slug for the custom field section. Cannot contain any of the following characters: `,;/\|<>`'
      type: string
      minLength: 1
      maxLength: 100
      nullable: true
      pattern: ^[^,;/\\|<>]*$
      example: section-a
    CustomRoleBase:
      type: object
      properties:
        name:
          type: string
          description: 'Name of the Custom Role. Cannot contain any of the following characters: `,;/\|<>`.'
          example: This is My Custom Role
        api_id:
          type: string
          description: 'API identifier of the Custom Role. Cannot contain any of the following characters: `,;/\|<>`.'
          example: this_is_my_custom_role
        description:
          type: string
          example: It has a custom permission configuration!
        org_id:
          oneOf:
            - $ref: '#/components/schemas/OrgId'
            - type: 'null'
        is_builtin:
          type: boolean
          example: false
    CustomRoleListItem:
      description: Compact representation of a Custom Role in lists
      allOf:
        - $ref: '#/components/schemas/CustomRoleBase'
        - type: object
          properties: {}
    CustomRoleGetResponse:
      description: A list of Custom Roles is returned upon success.
      type: object
      properties:
        page:
          $ref: '#/components/schemas/current_page'
        max_page:
          $ref: '#/components/schemas/max_page'
        count:
          description: Total number of Custom Roles found.
          type: integer
          example: 3
        custom_roles:
          description: The list of Custom Roles.
          type: array
          items:
            $ref: '#/components/schemas/CustomRoleListItem'
    CustomRoleCreationBody:
      description: Custom role creation payload.
      type: object
      required:
        - name
        - api_id
        - permissions
      properties:
        name:
          type: string
          description: 'Name of the Custom Role. Cannot contain any of the following characters: `,;/\|<>`.'
          minLength: 1
          maxLength: 100
          pattern: ^[^,;\/\\|<>]{1,100}$
          example: My Custom Role
        api_id:
          type: string
          description: 'Unique identifier. Cannot contain any of the following characters: `,;/\|<>`.'
          minLength: 1
          maxLength: 100
          pattern: ^[^,;\/\\|<>]{1,100}$
          example: my_custom_role
        description:
          type: string
          description: 'Description of the Custom Role. Cannot contain any of the following characters: `,;/\|<>`.'
          minLength: 1
          maxLength: 200
          pattern: ^[^,;\/\\|<>]{1,200}$
          example: This Custom Role is just an example for our API documentation
        permissions:
          description: List of permission names. (Use GET `/api/v2/permissions` to get a list of all available permissions for your organization.)
          type: array
          items:
            type: string
          example:
            - business_edit
            - business_edit_name
            - review_read
        org_id:
          description: Organization ID (optional). Specify if you have access to more than one organization.
          oneOf:
            - $ref: '#/components/schemas/OrgId'
            - type: 'null'
    CustomRoleCreationResponse:
      description: Response returned when a custom role is successfully created.
      type: object
      properties:
        status:
          description: Request status
          type: string
          enum:
            - success
        api_id:
          description: API identifier of the created custom role.
          type: string
          example: my_custom_role
    CustomRoleDetail:
      description: Detailed representation of a Custom Role
      allOf:
        - $ref: '#/components/schemas/CustomRoleBase'
        - type: object
          properties:
            permissions:
              type: array
              items:
                type: string
              example:
                - business_edit
                - business_edit_open_hours
    CustomRoleUpdateBody:
      description: Custom role update payload.
      type: object
      properties:
        name:
          type: string
          description: 'Name of the Custom Role. Cannot contain any of the following characters: `,;/\|<>`.'
          minLength: 1
          maxLength: 100
          pattern: ^[^,;\/\\|<>]{1,100}$
          example: My Custom Role
        api_id:
          type: string
          description: 'Unique identifier. Cannot contain any of the following characters: `,;/\|<>`.'
          minLength: 1
          maxLength: 100
          pattern: ^[^,;\/\\|<>]{1,100}$
          example: my_custom_role
        description:
          type: string
          description: 'Description of the Custom Role. Cannot contain any of the following characters: `,;/\|<>`.'
          minLength: 1
          maxLength: 200
          pattern: ^[^,;\/\\|<>]{1,200}$
          example: This Custom Role is just an example for our API documentation
        permissions:
          description: List of permission names. (Use GET `/api/v2/permissions` to get a list of all available permissions for your organization.)
          type: array
          items:
            type: string
          example:
            - business_edit
            - business_edit_name
            - review_read
        org_id:
          description: Organization ID (optional). Specify if you have access to more than one organization.
          oneOf:
            - $ref: '#/components/schemas/OrgId'
            - type: 'null'
    CustomRoleUpdateResponse:
      description: Response returned when a custom role is successfully updated.
      type: object
      properties:
        status:
          description: Request status
          type: string
          enum:
            - success
        api_id:
          description: API identifier of the updated custom role.
          type: string
          example: my_custom_role
    CustomRoleDeletionResponse:
      description: Response for successfully deleting a custom role
      type: object
      properties:
        status:
          type: string
          example: success
        api_id:
          type: string
          description: API identifier of the deleted custom role
          example: my_custom_role
    CustomRoleDuplicateResponse:
      description: Response for successfully duplicating a custom role
      allOf:
        - $ref: '#/components/schemas/CustomRoleBase'
        - type: object
          properties:
            api_id:
              type: string
              description: API identifier of the duplicated custom role.
              example: my_custom_role_2
    Permissions.Permission:
      type: object
      description: Permission item
      properties:
        name:
          type: string
          description: Permission internal name
          example: business_edit
        order:
          type: integer
          description: Ordering value used by the UI
          example: 100
        feature:
          type: string
          description: Feature flag or product feature that gates this permission
          example: business_edition
        depends_on:
          description: If present, identifies the permission(s) that must also be granted for a user to have this permission.
          oneOf:
            - type: string
            - type: 'null'
          example: business_edit
        disabled_for_roles:
          type: array
          description: List of `api_id`s of roles for which this permission is disabled
          items:
            type: string
          example: []
    Permissions.Subsection:
      type: object
      description: Subsection grouping permissions
      properties:
        name:
          type: string
          example: presence_pages
        order:
          type: integer
          example: 100
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/Permissions.Permission'
    Permissions.Section:
      type: object
      description: Section grouping subsections
      properties:
        name:
          type: string
          example: presence
        order:
          type: integer
          example: 100
        subsections:
          type: array
          items:
            $ref: '#/components/schemas/Permissions.Subsection'
    Permissions.GetSuccessResponse:
      type: object
      description: Response when permissions are successfully retrieved
      properties:
        sections:
          type: array
          items:
            $ref: '#/components/schemas/Permissions.Section'
      example:
        sections:
          - name: presence
            order: 100
            subsections:
              - name: presence_pages
                order: 100
                permissions:
                  - name: business_edit
                    order: 100
                    feature: business_edition
                    depends_on: null
                    disabled_for_roles: []
                  - name: business_edit_name
                    order: 101
                    feature: business_edition
                    depends_on: business_edit
                    disabled_for_roles: []
    AttributeType:
      description: Type of the Attribute
      type: string
      enum:
        - URL
        - REPEATABLE_URL
        - BOOL
        - ENUM
        - REPEATABLE_ENUM
    AttributeGmbId:
      description: Google Id of the attribute
      type: string
      example: gcid:restaurant
    AttributeName:
      description: Name of the attribute in the chosen language
      type: string
      example: Delivery
    AttributeOrder:
      type: integer
      example: 1
    Attribute:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AttributeType'
        gmb_id:
          $ref: '#/components/schemas/AttributeGmbId'
        name:
          $ref: '#/components/schemas/AttributeName'
        order:
          $ref: '#/components/schemas/AttributeOrder'
    AttributesGroupName:
      type: string
      description: Name of the attribute group
      example: Services disponibles
    AttributesGroupOrder:
      type: integer
      example: 5
    AttributesGroup:
      type: object
      properties:
        attributes:
          type: array
          description: List of Google Attributes
          items:
            $ref: '#/components/schemas/Attribute'
        name:
          $ref: '#/components/schemas/AttributesGroupName'
        order:
          $ref: '#/components/schemas/AttributesGroupOrder'
    AttributesGroupList:
      type: array
      description: List of Google Groups
      items:
        $ref: '#/components/schemas/AttributesGroup'
    AttributesGroupResponse:
      type: object
      properties:
        groups:
          $ref: '#/components/schemas/AttributesGroupList'
    AttributesMissingParametersError:
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
              properties:
                lang:
                  description: lang parameter is required
                  type: string
                  example: is required
                category_name:
                  description: category_name parameter is required
                  type: string
                  example: is required
    AttributesWrongCategoryError:
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: string
              description: Category name not found in DB
              example: Category name not found in DB
    AttributesWrongLangError:
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
              properties:
                lang:
                  type: object
                  properties:
                    explanation:
                      description: incorrect value inputed in lang parameter
                      type: string
                      example: xx is an incorrect value
                    choices:
                      type: array
                      items:
                        type: string
                      description: languages choices available
                      example:
                        - DE
                        - EN
                        - ES
                        - FR
                        - IT
                        - PT
                        - PT_BR
    MoreHoursListResponse:
      properties:
        more_hours:
          description: List of More Hour IDs for a given category and country.
          type: array
          items:
            type: object
            properties:
              gmb_id:
                description: The More Hour ID.
                type: string
                example: BREAKFAST
              name:
                description: The name of the More Hour translated to the specified language.
                type: string
                example: Breakfast
          example:
            - gmb_id: BREAKFAST
              name: Breakfast
            - gmb_id: BRUNCH
              name: Brunch
            - gmb_id: DELIVERY
              name: Delivery
            - gmb_id: DINNER
              name: Dinner
            - gmb_id: DRIVE_THROUGH
              name: Drive through
            - gmb_id: HAPPY_HOUR
              name: Happy hours
            - gmb_id: KITCHEN
              name: Kitchen
            - gmb_id: LUNCH
              name: Lunch
            - gmb_id: ONLINE_SERVICE_HOURS
              name: Online service hours
            - gmb_id: PICKUP
              name: Pickup
            - gmb_id: TAKEOUT
              name: Takeout
            - gmb_id: SENIOR_HOURS
              name: Senior hours
            - gmb_id: ACCESS
              name: Access
    MoreHoursListMissingParametersError:
      properties:
        errors:
          description: The detail of the error encountered
          type: object
          properties:
            json:
              type: object
              properties:
                category:
                  description: category parameter is required
                  type: string
                  example: is required
                country:
                  description: country parameter is required
                  type: string
                  example: is required
    LodgingExceptionDefinition:
      type: object
      required:
        - id
      properties:
        id:
          $ref: '#/components/schemas/LodgingExceptionCode'
    LodgingAttributeType:
      description: Type of Google Lodging attribute value.
      type: string
      enum:
        - BOOL
        - INTEGER
        - TIME
        - ENUM
        - REPEATABLE_ENUM
    LodgingOptionDefinition:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Google Lodging enum option id.
          example: ENGLISH
    LodgingAttributeDefinition:
      type: object
      required:
        - gmb_id
        - type
        - order
        - allowed_exception
        - read_only
      properties:
        gmb_id:
          type: string
          description: Google Lodging attribute id.
          example: lodging.property.checkinTime
        type:
          $ref: '#/components/schemas/LodgingAttributeType'
        order:
          type: integer
          description: Display order of the lodging attribute inside its group.
          example: 10
        options:
          description: Available enum option ids for `ENUM` and `REPEATABLE_ENUM` attributes. Null for other attribute types.
          oneOf:
            - type: array
              items:
                $ref: '#/components/schemas/LodgingOptionDefinition'
            - type: 'null'
          example:
            - id: ENGLISH
            - id: FRENCH
        allowed_exception:
          type: boolean
          description: Whether the lodging attribute accepts an exception code instead of a value.
          example: true
        read_only:
          type: boolean
          description: Whether the lodging attribute is returned for display purposes only and cannot be modified through `POST /v2/business/{business_id}/lodging`.
          example: false
    LodgingAttributeGroup:
      type: object
      required:
        - section_id
        - order
        - attributes
      properties:
        section_id:
          type: string
          description: Lodging section technical id.
          example: lodging.property
        order:
          type: integer
          description: Display order of the lodging section.
          example: 100
        attributes:
          type: array
          description: Lodging attributes in this section.
          items:
            $ref: '#/components/schemas/LodgingAttributeDefinition'
    LodgingListResponse:
      type: object
      required:
        - available_exceptions
        - groups
      properties:
        available_exceptions:
          type: array
          description: Exception codes that can be used for lodging attributes allowing exceptions.
          items:
            $ref: '#/components/schemas/LodgingExceptionDefinition'
        groups:
          type: array
          description: Google Lodging attributes grouped by section.
          items:
            $ref: '#/components/schemas/LodgingAttributeGroup'
      example:
        available_exceptions:
          - id: LODGING_EXCEPTION_UNSPECIFIED
          - id: LODGING_UNDER_CONSTRUCTION
          - id: LODGING_DEPENDENT_ON_DAY_OF_WEEK
          - id: LODGING_DEPENDENT_ON_SEASON
        groups:
          - section_id: lodging.property
            order: 100
            attributes:
              - gmb_id: lodging.property.checkinTime
                type: TIME
                order: 10
                options: null
                allowed_exception: true
                read_only: false
              - gmb_id: lodging.property.roomCount
                type: INTEGER
                order: 20
                options: null
                allowed_exception: false
                read_only: true
          - section_id: lodging.services
            order: 200
            attributes:
              - gmb_id: lodging.services.languagesSpoken
                type: REPEATABLE_ENUM
                order: 20
                options:
                  - id: ENGLISH
                  - id: FRENCH
                allowed_exception: true
                read_only: false
    ServicesSuggestion:
      type: object
      properties:
        service_id:
          $ref: '#/components/schemas/ServiceId'
        type:
          $ref: '#/components/schemas/ServiceType'
        name:
          $ref: '#/components/schemas/ServiceName'
        category_id:
          $ref: '#/components/schemas/CategorySqlId'
        category_gmb_name:
          $ref: '#/components/schemas/ServiceCategoryGmbName'
    ServicesSuggestionResponse:
      type: object
      properties:
        services_suggestions:
          type: array
          items:
            $ref: '#/components/schemas/ServicesSuggestion'
    GoogleLocation:
      description: Google location
      type: object
      properties:
        id:
          description: The unique identifier of the Google location on Partoo.
          type: string
          example: 6047dac0604f33da03018004
        location_name:
          description: The name of the location.
          type: string
          example: Annie - HQ
        store_code:
          description: The store code of the google location.
          type: string
          example: annie-hq
        region_code:
          description: The region code where the location is situated.
          type: string
          example: FR
        postal_code:
          description: The postal code of the location.
          type: string
          example: '75018'
        address_details:
          description: The details of the location's address.
          type: string
          example: 130 rue mont cenis
        locality:
          description: The locality of the location.
          type: string
          example: Paris
        place_id:
          description: The unique identifier of the Google Maps place.
          type: string
          example: ChIJ3Qu-HpFt5kcRNHUedqwIzQY
        google_verifications:
          description: The status and checked date of the Google verification for the location.
          type: object
          properties:
            status:
              description: The status of the Google verification.
              type: string
              example: verified
            checked_at:
              description: The date and time when the Google verification was last checked.
              type: string
              format: date-time
              example: '2023-01-30T14:25:11.163950Z'
        phone_numbers:
          description: The phone number associated with the location.
          type: string
          example: '0675181818'
    GoogleLocations:
      description: Paginated Google Locations
      type: object
      properties:
        locations:
          type: array
          items:
            $ref: '#/components/schemas/GoogleLocation'
        page:
          $ref: '#/components/schemas/current_page'
        max_page:
          $ref: '#/components/schemas/max_page'
        count:
          $ref: '#/components/schemas/count'
    GroupItem:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        has_puller:
          description: If the group is connected to an automated data puller or not. Groups linked to pullers cannot be modified or deleted. Should you want to make any changes to a group connected to a puller, please contact support for assistance.
          type: boolean
        business_count:
          type: integer
          description: Number of businesses in the group that the requesting user has access to. Note that this might not be the same number as the total number of businesses in the group.
    SectionItem:
      type: object
      properties:
        id:
          type: integer
          example: 1
          description: ID of the section
        name:
          type: string
          example: Country
          description: Name of the section, must be unique
        groups:
          type: array
          items:
            $ref: '#/components/schemas/GroupItem'
        can_edit:
          description: If the current user has the right to edit or delete the section, or one of the groups it contains
          type: boolean
        has_puller:
          description: If the section is connected to an automated data puller or not. Sections linked to pullers cannot be modified or deleted. Should you want to make any changes to a section connected to a puller, please contact support for assistance.
          type: boolean
    SectionsGetSuccessResponse:
      type: object
      properties:
        page:
          type: integer
          example: 1
        count:
          type: integer
          example: 6
        max_page:
          type: integer
          example: 1
        sections:
          type: array
          items:
            $ref: '#/components/schemas/SectionItem'
    SectionName:
      description: 'Name of the section. Cannot include any of the following characters: `,;/`'
      type: string
      example: Country
    SectionCreateOrgId:
      description: Unique identifier of the organization in which to create the section (only available to `PROVIDER` users)
      type: integer
      example: 1
    SectionCreateSuccessResponse:
      type: object
      properties:
        status:
          description: Request status
          type: string
          enum:
            - success
        id:
          description: ID of the created section
          type: integer
          example: 1
    SectionCreateNameConflictResponse:
      type: object
      properties:
        errors:
          description: The detail of the error encountered
          type: object
          properties:
            json:
              type: object
              properties:
                name:
                  type: string
                  example: name_already_exists
    SectionCreateForbiddenCharactersResponse:
      type: object
      properties:
        errors:
          description: The detail of the error encountered
          type: object
          properties:
            json:
              type: object
              properties:
                name:
                  type: string
                  example: name_contains_forbidden_characters
    SectionUpdateSuccessResponse:
      type: object
      properties:
        status:
          description: Request status
          type: string
          enum:
            - success
        id:
          description: ID of the updated section
          type: integer
          example: 1
    SectionDeleteSuccessResponse:
      type: object
      properties:
        status:
          description: Request status
          type: string
          enum:
            - success
        id:
          description: ID of the deleted section
          type: integer
          example: 1
    GroupV2Name:
      description: 'Name of the group. Cannot include any of the following characters: `,;/`'
      type: string
      example: France
    business_ids:
      description: List of business ids
      type: array
      example:
        - 5409c35a97bbc544d8e26737
        - 595badaef348ab6b3530033f
        - 59d53302b12ff6429f262639
      items:
        $ref: '#/components/schemas/BusinessId'
    GroupCreateSuccessResponse:
      type: object
      properties:
        status:
          description: Request status
          type: string
          enum:
            - success
        id:
          description: ID of the created group
          type: integer
          example: 1
    GetGroupItem:
      type: object
      properties:
        id:
          description: ID of the group
          type: integer
          example: 1
        name:
          description: Name of the group, must be unique
          type: string
          example: France
        has_puller:
          description: If the group is linked to a puller. If so, it's not possible to delete the group. Should you want to make any changes to a group connected to a puller, please contact support for assistance.
          type: boolean
        business_ids:
          description: list of business ids in the group
          type: array
          items:
            $ref: '#/components/schemas/BusinessId'
          example:
            - a1f0e2d3b4c5e6f7a8b9c0d1
            - 3f2e1d4c5b6a7f8e9d0c1a2
            - 0e1d2c3b4a5f6e7d8c9a0b1
    GroupDeleteSuccessResponse:
      type: object
      properties:
        status:
          description: Request status
          type: string
          enum:
            - success
        id:
          description: ID of the deleted group
          type: integer
          example: 1
    OrgName:
      description: Organization name
      type: string
      example: Fast Retailer
    OrgAlias:
      description: Organization alias (should match regex `[a-z0-9_]`)
      type: string
      example: fast_retailer
    OrgProvider:
      description: Organization provider
      type: string
      example: partoo
    OrgType:
      description: Organization type
      type: string
      enum:
        - small_medium_business
        - enterprise
      default: small_medium_business
    OrgFeatures:
      description: |
        List of organization's available features.
        Contains the features the organization can subscribe to as well as the ones only some businesses may have subscribed to additionally.
      type: array
      items:
        $ref: '#/components/schemas/Feature'
      example:
        - business_edition
        - diffusion
        - review_management
        - review_invite
        - messages
    OrgAvailableFeatures:
      description: |
        List of organization's features.
        Only contains the features the organization has subscribed to.
      type: array
      items:
        $ref: '#/components/schemas/Feature'
      example:
        - business_edition
        - diffusion
        - review_management
        - review_invite
        - messages
        - review_ai_suggestion
    OrgLastApiCall:
      description: Date of the last API call made with one of the API keys linked to the organization
      type: string
      example: 05-11-2021
    OrgMaxBusinesses:
      description: |
        Maximum number of local businesses the organization can have.
        It does not include the global (brand) businesses.
        If null, there is no limit for the organization.
        This field can only be set by a `PROVIDER` user.
      type:
        - integer
        - 'null'
      example: 100
    Org:
      description: Organization
      type: object
      properties:
        org_id:
          $ref: '#/components/schemas/OrgId'
        name:
          $ref: '#/components/schemas/OrgName'
        alias:
          $ref: '#/components/schemas/OrgAlias'
        provider:
          $ref: '#/components/schemas/OrgProvider'
        type:
          $ref: '#/components/schemas/OrgType'
        features:
          $ref: '#/components/schemas/OrgFeatures'
        org_features:
          $ref: '#/components/schemas/OrgAvailableFeatures'
        last_org_api_call:
          $ref: '#/components/schemas/OrgLastApiCall'
        max_businesses:
          $ref: '#/components/schemas/OrgMaxBusinesses'
    OrganizationForceDeletion:
      description: Force the deletion of organization even if there are still users and business linked to it
      type: boolean
      default: false
    postId:
      description: The Post id
      type: integer
      example: 34
    postType:
      type: string
      description: The type of the post to be created. Event and Offer are not yet available for Facebook.
      enum:
        - news
        - event
        - offer
        - covid
    postSummary:
      type: string
      description: Main text content of the post.
      example: Wonderful post summary !
    postImageURL:
      description: |
        URLs of the images displayed with the post.

        **Note:**
          - Add up to 10 images for multi-image post on Facebook and IG
          - Multi-image is not supported by Google, only the first image will be displayed
          - Image ratio must be between 4:5 and 16:9 for IG
          - All images must be same ratio for IG or they will be crop at the first image ratio by IG
      anyOf:
        - type: string
        - type: array
          items:
            type: string
      example:
        - https://example.com/1.png
        - https://example.com/2.png
    postMedias:
      description: The photo that will be on the Post
      type: array
      items:
        type: object
        properties:
          media_url:
            $ref: '#/components/schemas/postImageURL'
    CreatedDate:
      type: string
      description: Creation date on Partoo
      format: datetime
      example: '2019-08-01T19:15:54.256000+02:00'
    UpdatedDate:
      type: string
      description: Last update date (either on Partoo or on Partner platform)
      format: datetime
      example: '2019-09-01T15:12:35.256000+02:00'
    postCreatedOnPartoo:
      description: Indicates whether or not the post was created using Partoo App/API
      type: boolean
      example: false
    postUpdatedOnPartoo:
      description: Indicates whether or not the post was updated using Partoo App/API
      type: boolean
      example: false
    postBusinessInfo:
      description: name and address of the business that the post is related to.
      type: string
      example: Rick - HQ - 157 boulevard Macdonald, Paris
    postPublisherPost:
      type: string
      description: Publisher related to the post
      enum:
        - google_my_business__posts
        - facebook__posts
      example: facebook__posts
    postInsight:
      description: |-
        Statistics related to the posts on the different platforms.
        ⚠️ Due to a Google deprecation, on 20/02/2023, Google views and counts won't be available anymore. Old insights will still be sent. Facebook ones will still be available.
      type: array
      items:
        type: object
        properties:
          name:
            $ref: '#/components/schemas/postPublisherPost'
          click_count:
            type: integer
            description: number of times a user has clicked on the post.
            example: 1512
          view_count:
            type: integer
            description: number of times the post has been viewed.
            example: 2012
    postState:
      description: The state of the post, indicating at which lifecycle stage it is currently.
      type: string
      enum:
        - live
        - pending
        - to_configure
        - scheduled
        - error
        - expired
      example: live
    postCTALink:
      description: Link displayed in the post to redirect the client clicking on it.
      type: string
      example: www.partoo.co
    postStatus:
      description: Status related to the posts on the different platforms.
      type: array
      items:
        type: object
        properties:
          name:
            $ref: '#/components/schemas/postPublisherPost'
          state:
            $ref: '#/components/schemas/postState'
          link:
            $ref: '#/components/schemas/postCTALink'
    postOfferTerms:
      type: string
      description: Terms and conditions of the offer
      example: These are the conditions
    postCouponCode:
      type: string
      description: Offer code that is usable in store or online
      example: PROMO25
    postCTAType:
      description: The type of the post to be created. Some type mig.
      type: string
      enum:
        - book
        - order
        - shop
        - learn_more
        - sign_up
        - call
        - no_cta
    Post:
      description: Post
      type: object
      properties:
        id:
          $ref: '#/components/schemas/postId'
        business_id:
          $ref: '#/components/schemas/BusinessId'
        post_type:
          $ref: '#/components/schemas/postType'
        summary:
          $ref: '#/components/schemas/postSummary'
        schedule_time:
          description: Date when the Post will be published. No scheduled start time means that the Post will be published immediately.
          type: string
          example: '2020-01-01T12:00:00+02:00'
          default: null
        expiration_time:
          description: If this post is a draft, this indicates the date when it will be expired (= date after which the BM/GM user will no longer be able to validate and publish).
          type: string
          example: '2020-01-01T12:00:00+02:00'
          default: null
        validation_time:
          description: Date when the Draft post has been validated by the BM or GM user If the post doesn't also have a schedule time, this date coincides with the publishing date
          type: string
          example: '2020-01-01T12:00:00+02:00'
          default: null
        post_medias:
          $ref: '#/components/schemas/postMedias'
        created_at:
          $ref: '#/components/schemas/CreatedDate'
        updated_at:
          $ref: '#/components/schemas/UpdatedDate'
        created_on_partoo:
          $ref: '#/components/schemas/postCreatedOnPartoo'
        updated_on_partoo:
          $ref: '#/components/schemas/postUpdatedOnPartoo'
        business_info:
          $ref: '#/components/schemas/postBusinessInfo'
        post_insight:
          $ref: '#/components/schemas/postInsight'
        post_status:
          $ref: '#/components/schemas/postStatus'
        offer_terms:
          $ref: '#/components/schemas/postOfferTerms'
        offer_code:
          $ref: '#/components/schemas/postCouponCode'
        cta_link:
          $ref: '#/components/schemas/postCTALink'
        cta_type:
          $ref: '#/components/schemas/postCTAType'
    PostBusinessSearch:
      description: Business to create post
      type: object
      required:
        - business__in
      properties:
        business__in:
          type: array
          items:
            $ref: '#/components/schemas/business_ids'
    PostPublishers:
      description: List of publisher to diffuse the post
      type: array
      items:
        type: string
        enum:
          - google_my_business
          - facebook
          - instagram
      example:
        - google_my_business
        - facebook
        - instagram
    postTitle:
      type: string
      description: Title of the post.
      example: Great post title !
    postLink:
      description: Link displayed in the post to redirect the client clicking on it. Use can only have one of the following parameters ('use_business_url' or 'custom_url').
      type: object
      properties:
        use_business_url:
          type: boolean
          description: Use the business google url for link on the post.
        custom_url:
          type: string
          description: An URL to redirect client when they click on the button
    postScheduleTime:
      type: string
      description: Date and time of when the post will be diffused corresponding platforms. It needs to be at least 2 hours after the time of the request. The timezone used is UTC.
      example: '2050-01-01T09:00:00'
    postExpirationTime:
      type: string
      description: This parameter is mandatory when creating a draft post. It indicates when the draft will expire, the time after which BM/GM users will no longer be able to validate and publish the post
      example: '2050-01-01T09:00:00'
    postStartAt:
      type: string
      description: For either event or offer post type. Defined when it start. Timezone is defined by the business timezone.
      example: '2050-01-01T09:00:00'
    postEndAt:
      type: string
      description: For either event or offer post type. Defined when it end. Timezone is defined by the business timezone.
      example: '2050-01-01T09:00:00'
    PostData:
      description: Information on post to create
      type: object
      required:
        - post_type
        - summary
      properties:
        post_type:
          $ref: '#/components/schemas/postType'
        summary:
          $ref: '#/components/schemas/postSummary'
        image_url:
          $ref: '#/components/schemas/postImageURL'
        title:
          $ref: '#/components/schemas/postTitle'
        cta_type:
          $ref: '#/components/schemas/postCTAType'
        link:
          $ref: '#/components/schemas/postLink'
        schedule_time:
          $ref: '#/components/schemas/postScheduleTime'
        expiration_time:
          $ref: '#/components/schemas/postExpirationTime'
        coupon_code:
          $ref: '#/components/schemas/postCouponCode'
        offer_terms:
          $ref: '#/components/schemas/postOfferTerms'
        start_at:
          $ref: '#/components/schemas/postStartAt'
        end_at:
          $ref: '#/components/schemas/postEndAt'
    requestResponsePost:
      properties:
        status:
          description: Request status
          type: string
          enum:
            - success
        code:
          description: Request code
          type: number
          example: 200
        message:
          description: Number of post(s) created
          type: string
          example: 2 posts have been created.
        ids:
          deprecated: true
          description: Id(s) of post(s) created
          type: string
          example: 45,46
        data:
          description: Post ID and relative business ID pair list
          type: array
          items:
            type: object
            properties:
              post_id:
                type: integer
              business_id:
                type: string
          example:
            - post_id: 101
              business_id: '1234567890'
            - post_id: 102
              business_id: '1234567891'
    PostUpdateData:
      description: Request body to update a Post
      type: object
      properties:
        title:
          $ref: '#/components/schemas/postTitle'
        summary:
          $ref: '#/components/schemas/postSummary'
        image_url:
          $ref: '#/components/schemas/postImageURL'
        cta_type:
          $ref: '#/components/schemas/postCTAType'
        link:
          $ref: '#/components/schemas/postLink'
        schedule_time:
          $ref: '#/components/schemas/postScheduleTime'
        start_at:
          $ref: '#/components/schemas/postStartAt'
        end_at:
          $ref: '#/components/schemas/postEndAt'
        coupon_code:
          $ref: '#/components/schemas/postCouponCode'
        offer_terms:
          $ref: '#/components/schemas/postOfferTerms'
    GetPlaceActionLinks.Array:
      description: List of available Place Action Links
      type: array
      items:
        type: object
        properties:
          gmb_id:
            type: string
            description: The Google My Business ID for the place action type.
          name:
            type: string
            description: The name for the place action type.
      example:
        - gmb_id: APPOINTMENT
          name: Appointment links
        - gmb_id: DINING_RESERVATION
          name: Reservations links
        - gmb_id: FOOD_DELIVERY
          name: Food delivery links
        - gmb_id: FOOD_ORDERING
          name: Food ordering links
        - gmb_id: FOOD_TAKEOUT
          name: Food takeout links
        - gmb_id: ONLINE_APPOINTMENT
          name: Online appointment links
        - gmb_id: SHOP_ONLINE
          name: Shop Online links
    GetPlaceActionLinksResponse:
      type: object
      properties:
        place_action_links:
          $ref: '#/components/schemas/GetPlaceActionLinks.Array'
    state:
      type: string
      enum:
        - success
        - pending
        - to_configure
      example: success
    error_type:
      type:
        - string
        - 'null'
      enum:
        - PUBLISHER_CONNEXION
        - USER_INPUT
        - EXTERNAL
        - null
    publisher_state_state:
      type: object
      properties:
        error_type:
          $ref: '#/components/schemas/error_type'
        state:
          type: string
        url_on_publisher:
          type:
            - string
            - 'null'
    publisher_state_type:
      type: object
      properties:
        business_formatted_address:
          type: string
        business_id:
          type: string
        business_name:
          type: string
        publishers:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/publisher_state_state'
    getPublisherStatesResponse:
      type: object
      properties:
        businesses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/publisher_state_type'
        count:
          type: integer
          description: number of businesses returned in response
          example: 1
    postPublisherErrorsResponse:
      type: object
      description: |
        This response structure identifies and details errors detected by publishers in specific sections and fields of business information edits. It is organized to clearly indicate which publisher reported an error for a particular piece of business information, along with a specific error code or message identifier.
      additionalProperties:
        type: object
        description: |
          Denotes a particular section of the business edit process, such as 'hours' or 'description', where a publisher has identified an error. Each section can contain one or more fields.
        additionalProperties:
          type: object
          description: |
            Specifies the exact field within a business section, like 'open_hours' or 'description_short', where the error was detected. This allows for pinpointing specific areas within business information that require attention.
          additionalProperties:
            type: string
            description: |
              A mapping of publisher names to their corresponding error identifiers for the given field. Each key in this object is a publisher's name, and its value is a string representing a unique error code or message key, such as 'name_has_more_than_90_char' for overly long names or 'description_short_too_long' for descriptions exceeding allowable length. This structure supports detailing multiple errors across various publishers for a single business information field.
    ReviewPublisherLabel:
      type: string
      description: Review partner slug
      example: google_my_business
    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
    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
    CommentId:
      type: integer
      description: Comment id
      example: 82938
    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.
    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
    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'
    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'
    Review:
      description: Business Review on partner
      type: object
      properties:
        key:
          type: string
          description: |
            Identifier of the review on the partner platform. For a review pushed through a
            custom partner, this is the `external_id` you sent.
        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:
          type: array
          description: Replies to the review
          items:
            $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...
    ReviewError:
      description: Error returned when a review cannot be pushed or deleted
      type: object
      properties:
        errors:
          type: object
          description: The detail of the error encountered
          properties:
            json:
              type: string
              description: Reason the request was refused
              example: Partner not found
    ReviewPartner:
      description: A partner reviews can come from
      type: object
      properties:
        slug:
          type: string
          description: |
            Unique identifier of the partner. This is the value carried by a review's `partner`
            field, and the one accepted by the `partner__in` search filter.
          example: google_my_business
        display_name:
          type: string
          description: Name of the partner, as displayed in the Partoo app
          example: Google
        is_custom:
          type: boolean
          description: |
            `true` for a custom partner, whose reviews your organization pushes through the API.
            `false` for a partner Partoo synchronizes natively.
          example: false
    TemplateLanguage:
      type: string
      description: Template language
      $ref: '#/components/schemas/Lang'
    TemplateId:
      type: integer
      description: Template id
      example: 34
    TemplateUpdateDate:
      type: string
      description: Template update date
      format: datetime
      example: '2017-08-01T19:15:54.256000+02:00'
    TemplateCreationDate:
      type: string
      description: Template creation date
      format: datetime
      example: '2017-08-01T19:15:54.256000+02:00'
    TemplateTitle:
      type: string
      description: Template title
    TemplateText:
      description: |
        The content of the reply template.

        Placeholders are recognisable within the text by this exact markup `@[](name_of_the_placeholder)`.
        Where `name_of_the_placeholder` is the `value` field taken from the `GET placeholders` operation.

        Example of usable placeholder values: `client_full_name`, `client_first_name`, `business_name`, `my_first_name`.
      type: string
      example: |-
        hello @[](client_full_name),
        Thanks from the team at @[](business_name).
        @[](my_first_name)
    TemplateNegative:
      type: boolean
      description: Template is made for negative reviews (ex from 1 to 2 stars on gmb)
    TemplateNeutral:
      type: boolean
      description: Template is made for neutral reviews (ex 3 stars on gmb)
    TemplatePositive:
      type: boolean
      description: Template is made for positive reviews (ex from 4 to 5 stars on gmb)
    Template:
      description: Review's reply template
      type: object
      properties:
        id:
          $ref: '#/components/schemas/TemplateId'
        org_id:
          $ref: '#/components/schemas/OrgId'
        update_date:
          $ref: '#/components/schemas/TemplateUpdateDate'
        creation_date:
          $ref: '#/components/schemas/TemplateCreationDate'
        language:
          $ref: '#/components/schemas/TemplateLanguage'
        title:
          $ref: '#/components/schemas/TemplateTitle'
        text:
          $ref: '#/components/schemas/TemplateText'
        negative:
          $ref: '#/components/schemas/TemplateNegative'
        neutral:
          $ref: '#/components/schemas/TemplateNeutral'
        positive:
          $ref: '#/components/schemas/TemplatePositive'
    TemplatePlaceholder:
      description: |
        Reply templates available placeholders.
        A template placeholder is a dynamically updated word depending on the context.
      type: object
      properties:
        id:
          type: integer
          description: Placeholder id
          example: 2
        value:
          type: string
          description: |
            Placeholder value

            This value must be used within the placeholder markup `@[](placeholder_value)` in a template `text` in order to work properly.
          example: my_first_name
    ReplySuggestionId:
      type: integer
      description: Reply suggestion id
      example: 820459
    ReplySuggestion:
      description: Review's reply suggestion
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ReplySuggestionId'
        index:
          type: integer
          description: Index of the reply suggestion
          example: 1
        review_id:
          $ref: '#/components/schemas/ReviewId'
        content:
          type: string
          description: The content of the reply suggestion
          example: Dear Client, thanks for your kind feedback.
        report:
          type: object
          description: Report details if the suggestion was reported (can be null)
          properties:
            id:
              type: integer
              description: Report id
              example: 3587
            user_id:
              type: string
              description: User id of the user who reported the suggestion
              example: 52e10f004ee65a020
            created_at:
              type: string
              format: datetime
              description: Date the review suggestion report was created on
              example: '2025-05-12T12:57:21.895170Z'
    BusinessID:
      description: Business id
      type: string
      example: 5409c35a97bbc544d8e26737
    TotalItemsCount:
      description: |
        Total number of results available for the filters and dimensions requested.
      type: integer
      example: 1
    BusinessImpressionsDesktopMaps:
      type: integer
      description: |
        Business impressions on Google Maps on Desktop devices.
         Multiple impressions by a unique user within a single day are
         counted as a single impression.
      example: 123
    BusinessImpressionsMobileMaps:
      type: integer
      description: |
        Business impressions on Google Maps on Mobile devices.
         Multiple impressions by a unique user within a single
          day are counted as a single impression.
      example: 123
    BusinessImpressionsDesktopSearch:
      type: integer
      description: |
        Business impressions on Google Search on Desktop devices.
         Multiple impressions by a unique user within a single day
         are counted as a single impression.
      example: 123
    BusinessImpressionsMobileSearch:
      type: integer
      description: |
        Business impressions on Google Search on Mobile devices.
         Multiple impressions by a unique user within a single day
         are counted as a single impression.
      example: 123
    BusinessDirectionRequests:
      type: integer
      description: |
        The number of times a direction request was requested to the
         business location.
      example: 123
    ActionsPhone:
      type: integer
      description: Customers who call your business
      example: 123
    ActionsWebsite:
      type: integer
      description: Customers who click on your website link
      example: 123
    AnalyticsDate:
      type: string
      description: First day of the aggregation
      example: '2019-11-05'
    AnalyticsBucket:
      type: string
      description: Time aggregation requested
      example: day
    PresenceAnalyticsMetricsResults:
      type: array
      items:
        type: object
        properties:
          business_impressions_desktop_maps:
            $ref: '#/components/schemas/BusinessImpressionsDesktopMaps'
          business_impressions_mobile_maps:
            $ref: '#/components/schemas/BusinessImpressionsMobileMaps'
          business_impressions_desktop_search:
            $ref: '#/components/schemas/BusinessImpressionsDesktopSearch'
          business_impressions_mobile_search:
            $ref: '#/components/schemas/BusinessImpressionsMobileSearch'
          business_direction_requests:
            $ref: '#/components/schemas/BusinessDirectionRequests'
          call_clicks:
            $ref: '#/components/schemas/ActionsPhone'
          website_clicks:
            $ref: '#/components/schemas/ActionsWebsite'
          date:
            $ref: '#/components/schemas/AnalyticsDate'
          bucket:
            $ref: '#/components/schemas/AnalyticsBucket'
          business_id:
            $ref: '#/components/schemas/BusinessID'
    PresenceAnalyticsMetricsResponse:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        count:
          $ref: '#/components/schemas/TotalItemsCount'
        max_page:
          $ref: '#/components/schemas/MaxPage'
        metrics:
          $ref: '#/components/schemas/PresenceAnalyticsMetricsResults'
    Keyword:
      type: string
      description: |
        The lower-cased string that the user entered.

        This is present only if the “keyword” dimension is in the request.
      example: 123
    KeywordsCount:
      type: integer
      description: |
        An aggregation of mountly keyword search count values.

        The count values indicates the number of unique users that used the keyword in a month.
      example: 123
    Threshold:
      type: integer
      description: |
        An aggregation of monthly threshold values.

        The threshold value indicates that the real count of unique users that used the keyword is below this value.
      example: 123
    KeywordsAnalyticsDate:
      type: string
      description: First day of the aggregation
      example: '2019-11-01'
    KeywordsAnalyticsBucket:
      type: string
      description: Time aggregation requested
      example: month
    Branded:
      type: string
      description: |
        Indicates whether the keyword is branded or discovery.

        - `branded`: Keywords associated with your brand (e.g., "Castorama", "Casto")
        - `discovery`: Generic keywords not associated with your brand (e.g., "bricolage", "magasin outillage")

        This field is only present when the "branded" dimension is included in the request.
      enum:
        - branded
        - discovery
      example: branded
    PresenceAnalyticsKeywordsResults:
      type: array
      items:
        type: object
        properties:
          keyword:
            $ref: '#/components/schemas/Keyword'
          count:
            $ref: '#/components/schemas/KeywordsCount'
          threshold:
            $ref: '#/components/schemas/Threshold'
          date:
            $ref: '#/components/schemas/KeywordsAnalyticsDate'
          bucket:
            $ref: '#/components/schemas/KeywordsAnalyticsBucket'
          business_id:
            $ref: '#/components/schemas/BusinessID'
          branded:
            $ref: '#/components/schemas/Branded'
    PresenceAnalyticsKeywordsResponse:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        count:
          $ref: '#/components/schemas/TotalItemsCount'
        max_page:
          $ref: '#/components/schemas/MaxPage'
        keywords:
          $ref: '#/components/schemas/PresenceAnalyticsKeywordsResults'
    GroupID:
      description: Group id
      type: integer
      example: 12312
    TagID:
      description: Tag id
      type: integer
      example: 10,12,44
    ReviewMetricsResponse:
      type: object
      required:
        - dimension
        - metrics
      properties:
        dimension:
          oneOf:
            - type: string
            - type: number
            - type: 'null'
          description: |
            Unique identifier of the dimension:
            - **string** when `dimensions` is `business`, `user`, `day`, `week`, `month`, `year`.
            - **number** when `dimensions` is `group` or `tag`.
            - **null** when `dimensions` is not set.

            When `dimensions` is `day` or `week`, the format is `YYYY-MM-DD`
            When `dimensions` is `month`, the format is `YYYY-MM`
            When `dimensions` is `year`, the format is `YYYY`
          example: 59b2645db12ff60643ef832c
        metrics:
          type: object
          properties:
            average_rating:
              type: number
              format: float
              description: Average rating.
            average_rating_distribution:
              type: object
              description: |
                Number of businesses within each pre-defined ratings.
              properties:
                'NULL':
                  type: number
                  format: integer
                  description: Number of businesses without any average rating.
                0-3:
                  type: number
                  format: integer
                  description: Number of businesses whose rating is between 0 and 3 (excluded).
                3-3.8:
                  type: number
                  format: integer
                  description: Number of businesses whose rating is between 3 (included) and 3.8 (excluded).
                3.8-4.3:
                  type: number
                  format: integer
                  description: Number of businesses whose rating is between 3.8 (included) and 4.3 (excluded).
                4.3-5:
                  type: number
                  format: integer
                  description: Number of businesses whose rating is between 4.3 (included) and 5.
            rank:
              type: number
              format: integer
              description: |
                Rank of the dimension compared to the others, based on the specified `order_by` parameter.

                **Note:** Two results with the same metrics value will have the same rank.
            rating_distribution:
              type: object
              properties:
                '1':
                  type: number
                  format: integer
                  description: Number of 1 star reviews.
                '2':
                  type: number
                  format: integer
                  description: Number of 2 star reviews.
                '3':
                  type: number
                  format: integer
                  description: Number of 3 star reviews.
                '4':
                  type: number
                  format: integer
                  description: Number of 4 star reviews.
                '5':
                  type: number
                  format: integer
                  description: Number of 5 star reviews.
            reply_means:
              type: object
              properties:
                ai_suggestion:
                  type: number
                  format: integer
                  description: Number of reviews replied using an AI suggestion.
                auto_reply:
                  type: number
                  format: integer
                  description: Number of reviews replied using the auto reply.
                manual:
                  type: number
                  format: integer
                  description: Number of reviews replied manually (without an AI suggestion nor a reply template).
                reply_template:
                  type: number
                  format: integer
                  description: Number of reviews replied using a reply template (excluding auto replies).
                total:
                  type: number
                  format: integer
                  description: Total (ai_suggestion + auto_reply + manual + reply_template).
            reply_time:
              type: object
              properties:
                fast:
                  type: number
                  format: integer
                  description: Number of reviews replied in less than 2 days
                slow:
                  type: number
                  format: integer
                  description: Number of reviews replied in more than 2 days
                not_replied:
                  type: number
                  format: integer
                  description: Number of reviews not replied
                total:
                  type: number
                  format: integer
                  description: Total (fast + slow + not_replied)
            reviews_count:
              type: number
              format: integer
              description: Number of reviews
        dimension_name:
          type: string
          description: |
            Name of the dimension:
            - Business name when `dimensions` is `business`
            - Group name when `dimensions` is `group`
            - Tag name when `dimensions` is `tag`
            - User full name when `dimensions` is `user`
            - Not present in the response otherwise
        dimension_info:
          type: object
          description: |
            Additional info about the dimension.

            Only returned when `dimensions` is `business`.
          properties:
            address_full:
              $ref: '#/components/schemas/AddressFull'
            city:
              $ref: '#/components/schemas/BusinessCity'
            code:
              $ref: '#/components/schemas/BusinessCode'
            zipcode:
              $ref: '#/components/schemas/BusinessZipcode'
    ReviewsStatisticsResponse:
      type: object
      properties:
        answer_time:
          type: number
          format: float
          description: |
            Average reviews answer time in seconds. Only measured for reviews with a comment from Google
            partner.
            It returns the time between the update date of a review and the creation date of its comments.
          example: 10493.90997409
        average:
          type: number
          format: float
          description: |
            Average reviews rating.
          maximum: 5
          minimum: 0
          example: 3.0394
        treated:
          type: number
          format: integer
          description: |
            Total number of treated reviews.
          example: 9
        not_treated:
          type: number
          format: integer
          description: |
            Total number of non treated reviews.
          example: 10
        answered:
          type: number
          format: integer
          description: |
            Total number of answered reviews (reviews with a comment).
          example: 8
        satisfied:
          type: number
          format: integer
          description: |
            Total number of reviews of type *satisfied*.

            *Satisfied* reviews are defined by a rating of 4 or more for google_my_business and tripadvisor or recommended
            for facebook.
          example: 10
        neutral:
          type: number
          format: integer
          description: |
            Total number of reviews of type *neutral*.

            *Neutral* reviews are defined by a rating of 3 for google_my_business and tripadvisor.
          example: 6
        dissatisfied:
          type: number
          format: integer
          description: |
            Total number of reviews of type *dissatisfied*.

            *Dissatisfied* reviews are defined by a rating of 2 or less for google_my_business and tripadvisor
            or not recommended for facebook.
          example: 3
        total:
          type: number
          format: integer
          description: |
            Total number of reviews.
          example: 19
    InvitationId:
      description: invitation id
      type: string
      example: d3d8c966-0356-4ec0-baae-13ec3622ebc2
    TargetPhone:
      type: string
      description: the exact phone number we would have sent the invitation(s) to
      example: '0701020304'
    SubscriptionDetails:
      type: object
      description: The details on the product subscription
      properties:
        status:
          type: string
          enum:
            - inactive
            - active
        canceling_date:
          type: number
          description: timestamp
    Product:
      type: string
      enum:
        - presence_management
        - review_booster
        - review_management
        - messages
      example: presence_management
    ProductSubscribeResponseObject:
      type: object
      properties:
        subscription_date:
          type: integer
          description: Date on which the subscription was activated
          example: 1540628702
        status:
          type: string
          enum:
            - active
    ProductUnsubscribeResponseObject:
      type: object
      properties:
        canceling_date:
          type: integer
          description: Date on which the subscription was canceled
          example: 1540628702
        status:
          type: string
          enum:
            - inactive
    OrganizationPlanUpdate:
      description: Plan
      type: object
      required:
        - name
      properties:
        name:
          type: string
          enum:
            - presence_management
            - review_management
            - posts
            - messages
            - review_booster
            - bulk_modification
            - feedback_management
            - competitive_benchmark
            - messages_channel_sms
            - booking_links
            - webhooks
          description: Plan's name.
          example: presence_management
        expiration_date:
          type: string
          pattern: date
          description: Plan's expiration date. If not set, the plan is active indefinitely.
          example: '2026-01-01'
          default: null
    OrganizationPlan:
      allOf:
        - $ref: '#/components/schemas/OrganizationPlanUpdate'
      properties:
        subscription_date:
          type: string
          pattern: date
          description: Plan's subscription date.
          example: '2025-01-01'
    OrgPlansDetails:
      description: The exhaustive list of the organization's plans.
      type: array
      items:
        $ref: '#/components/schemas/OrganizationPlan'
      example:
        - name: presence_management
          subscription_date: '2025-01-01'
          expiration_date: '2026-01-01'
        - name: review_management
          subscription_date: '2025-01-01'
          expiration_date: null
    OrgPlans:
      properties:
        plans:
          $ref: '#/components/schemas/OrgPlansDetails'
    OrganizationPlansUpdate:
      properties:
        plans:
          description: The exhaustive list of the organization's plans.
          type: array
          items:
            $ref: '#/components/schemas/OrganizationPlanUpdate'
          example:
            - name: presence_management
              expiration_date: '2026-01-01'
            - name: review_management
    BusinessPlanUpdate:
      description: Plan
      type: object
      required:
        - name
      properties:
        name:
          type: string
          enum:
            - presence_management
            - review_management
            - posts
            - messages
            - review_booster
            - feedback_management
            - competitive_benchmark
          description: Plan's name.
          example: presence_management
        expiration_date:
          type: string
          pattern: date
          description: Plan's expiration date. If not set, the plan is active indefinitely.
          example: '2026-01-01'
          default: null
        enabled:
          type: boolean
          description: |
            Plan's enablement.

            If true, the plan and all its features are enabled for this business, even if its organization doesn't have the plan or it's expired.

            If false, the plan and all its features are disabled for this business, even if its organization has the plan.
          example: true
    BusinessPlan:
      allOf:
        - $ref: '#/components/schemas/BusinessPlanUpdate'
      properties:
        subscription_date:
          type: string
          pattern: date
          description: Plan's subscription date.
          example: '2025-01-01'
    BusinessPlans:
      properties:
        plans:
          description: The exhaustive list of the business's plans.
          type: array
          items:
            $ref: '#/components/schemas/BusinessPlan'
          example:
            - name: presence_management
              enabled: true
              subscription_date: '2025-01-01'
              expiration_date: '2026-01-01'
            - name: review_management
              enabled: false
              subscription_date: '2025-01-01'
              expiration_date: null
        org_plans:
          $ref: '#/components/schemas/OrgPlansDetails'
        active_plans:
          description: The exhaustive list of active plans for the business.
          type: array
          items:
            $ref: '#/components/schemas/BusinessPlan'
    BusinessPlansUpdate:
      properties:
        plans:
          description: The exhaustive list of the business' plans.
          type: array
          items:
            $ref: '#/components/schemas/BusinessPlanUpdate'
          example:
            - name: presence_management
              enabled: true
              expiration_date: '2026-01-01'
            - name: review_management
              enabled: false
    UserStatus:
      description: User status in the application
      type: string
      enum:
        - active
        - invited
      example: active
    UserOrgId:
      description: User organization id
      type: integer
      example: 42
    UserFirstName:
      description: User first name
      type: string
      example: Perceval
    UserLastName:
      description: User last name
      type: string
      example: de Galles
    UserEmail:
      description: User email
      type: string
      format: email
      example: perceval@kaamelott.com
    SidebarPagesFeatureEnum:
      enum:
        - bulk_modification
        - diffusion
        - feedback_management
        - messages
        - posts
        - presence_analytics
        - review_analytics
        - review_invite
        - review_management
    SidebarPages:
      type: array
      description: |
        List of features the user can access from the sidebar.
      items:
        allOf:
          - $ref: '#/components/schemas/SidebarPagesFeatureEnum'
        type: string
        description: Sidebar page feature name
    accesses:
      description: |
        List of (list of Group ID).

        Accesses of the users for the new groups system, only for `GROUP_MANAGER` users.

        See [the Groups and Sections description](/guides/api/resources/organizations/groups)
      type: array
      items:
        type: array
        items:
          type: integer
      example:
        - - 1
          - 2
        - - 1
          - 3
    UserProvider:
      description: User provider label
      type: string
      example: partoo
    CustomRoleApiId:
      description: |
        Optional API identifier of a custom role to assign to the user. The value must match the `api_id` of one of the custom roles available to your organization.

        If no custom role is given, users with the role `GROUP_MANAGER` or `BUSINESS_MANAGER` will automatically be assigned to the default built-in custom role associated with their role.

        For more information about custom roles, see [Managing User Permissions with Custom Roles](/guides/api/guides/custom-roles-and-permissions)
      type: string
      example: my_custom_role
    SsoOnly:
      description: |
        Prevent the user from connecting directly from the Partoo connection page.

        This field is available for users whose organization has defined an SSO configuration.

        This field can be edited by a user with the role `ORG_ADMIN` or `PROVIDER`.
      type: boolean
      default: false
    User:
      description: Partoo App User
      type: object
      properties:
        id:
          $ref: '#/components/schemas/UserId'
        org_id:
          $ref: '#/components/schemas/UserOrgId'
        first_name:
          $ref: '#/components/schemas/UserFirstName'
        last_name:
          $ref: '#/components/schemas/UserLastName'
        email:
          $ref: '#/components/schemas/UserEmail'
        lang:
          $ref: '#/components/schemas/Lang'
        sidebar_pages:
          deprecated: true
          $ref: '#/components/schemas/SidebarPages'
        business_ids:
          description: |
            Populated only for BUSINESS_MANAGER role.

            List of businesses ids the user can access.

            Note: For a reliable way of getting all the businesses the user can access, use [operation/searchBusinesses](/api-reference/businesses/search-for-businesses).
          type: array
          items:
            $ref: '#/components/schemas/BusinessId'
        accesses:
          $ref: '#/components/schemas/accesses'
        role:
          $ref: '#/components/schemas/Role'
        provider:
          $ref: '#/components/schemas/UserProvider'
        status:
          $ref: '#/components/schemas/UserStatus'
        disabled:
          description: The state of the User account.
          type: boolean
          example: false
        created_at:
          description: Timestamp representing the date the user was created
          type: number
          example: 1615299414
        shadow_user_id:
          description: Used internally at Partoo
          type: string
          example: ''
        custom_role:
          $ref: '#/components/schemas/CustomRoleApiId'
        sso_only:
          $ref: '#/components/schemas/SsoOnly'
    UserWithFeatures:
      description: Partoo App User
      type: object
      properties:
        id:
          $ref: '#/components/schemas/UserId'
        org_id:
          $ref: '#/components/schemas/UserOrgId'
        first_name:
          $ref: '#/components/schemas/UserFirstName'
        last_name:
          $ref: '#/components/schemas/UserLastName'
        email:
          $ref: '#/components/schemas/UserEmail'
        lang:
          $ref: '#/components/schemas/Lang'
        sidebar_pages:
          deprecated: true
          $ref: '#/components/schemas/SidebarPages'
        available_features:
          description: The features the user has access to.
          type: array
          items:
            $ref: '#/components/schemas/Feature'
        business_ids:
          description: |
            Populated only for BUSINESS_MANAGER role.

            List of businesses ids the user can access.

            Note: For a reliable way of getting all the businesses the user can access, use [operation/searchBusinesses](/api-reference/businesses/search-for-businesses).
          type: array
          items:
            $ref: '#/components/schemas/BusinessId'
        accesses:
          $ref: '#/components/schemas/accesses'
        role:
          $ref: '#/components/schemas/Role'
        provider:
          $ref: '#/components/schemas/UserProvider'
        status:
          $ref: '#/components/schemas/UserStatus'
        disabled:
          description: The state of the User account.
          type: boolean
          example: false
        created_at:
          description: Timestamp representing the date the user was created
          type: number
          example: 1615299414
        shadow_user_id:
          description: Used internally at Partoo
          type: string
          example: ''
        custom_role:
          $ref: '#/components/schemas/CustomRoleApiId'
        sso_only:
          $ref: '#/components/schemas/SsoOnly'
    UserCreateUpdateOrgId:
      description: |
        Unique identifier of the organization to which the user should belong. Only `PROVIDER` users can set this field. If no `org_id` is given, or if you are not a `PROVIDER`, the user will have the same organization as you.
      type: integer
      example: 42
    RoleWithoutProvider:
      description: User role in the application
      type: string
      enum:
        - ORG_ADMIN
        - ORG_MANAGER
        - GROUP_MANAGER
        - BUSINESS_MANAGER
        - PUBLISHER
      example: BUSINESS_MANAGER
    Password:
      description: |
        The User password. It should comply with the following rules:
        - should be at least 8 characters long
        - should have one upper case letter and one lower case letter
        - should have one special character
      type: string
      format: password
      minLength: 8
    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
    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
    Business:
      description: Partoo App Business
      type: object
      properties:
        id:
          $ref: '#/components/schemas/BusinessId'
        created:
          description: Timestamp (in seconds) of the business creation
          type: number
          format: float
          example: 1409925979.5
        modified:
          description: Timestamp (in seconds) of the business last modification. It doesn’t take into account changes to the Custom Fields or related objects.
          type: number
          format: float
          example: 1561335111.681374
        code:
          $ref: '#/components/schemas/BusinessCode'
        status:
          $ref: '#/components/schemas/BusinessStatus'
        org_id:
          $ref: '#/components/schemas/OrgId'
        groups:
          $ref: '#/components/schemas/groups'
        name:
          $ref: '#/components/schemas/BusinessName'
        address:
          description: Business address. This fields returns the same value as the field `address_full` for historical reasons. You should prefer the use `address_full`.
          type: string
        address_full:
          $ref: '#/components/schemas/AddressFull'
        address2:
          $ref: '#/components/schemas/Address2'
        city:
          $ref: '#/components/schemas/BusinessCity'
        zipcode:
          $ref: '#/components/schemas/BusinessZipcode'
        region:
          $ref: '#/components/schemas/BusinessRegion'
        country:
          $ref: '#/components/schemas/BusinessCountry'
        default_lang:
          $ref: '#/components/schemas/BusinessDefaultLang'
        open_hours:
          $ref: '#/components/schemas/OpenHours'
        specific_hours:
          $ref: '#/components/schemas/SpecificHours'
        description_short:
          $ref: '#/components/schemas/BusinessShortDescription'
        description_long:
          $ref: '#/components/schemas/BusinessLongDescription'
        website_url:
          $ref: '#/components/schemas/BusinessWebsite'
        facebook_url:
          $ref: '#/components/schemas/BusinessFacebookPage'
        twitter_url:
          $ref: '#/components/schemas/BusinessTwitter'
        google_location_id:
          description: Id of Google Location to which the business is linked
          type: string
        facebook_page_id:
          description: Id of Facebook Location to which the business is linked
          type: string
        national_identification_number:
          $ref: '#/components/schemas/BusinessNationalIdentificationNumber'
        logo_url:
          description: Business LOGO URL
          type: string
          format: uri
        contacts:
          $ref: '#/components/schemas/BusinessContacts'
        photos:
          $ref: '#/components/schemas/Photos'
        lat:
          $ref: '#/components/schemas/Latitude'
        long:
          $ref: '#/components/schemas/Longitude'
        subscriptions:
          $ref: '#/components/schemas/Subscriptions'
        features:
          $ref: '#/components/schemas/Features'
        completion_rate:
          $ref: '#/components/schemas/BusinessCompletionRate'
        promos:
          $ref: '#/components/schemas/BusinessPromos'
    FeedbackEmailTemplateBase:
      type: object
      properties:
        name:
          type: string
          description: Internal name for the template
          example: Default Template
        subject:
          type: string
          description: Email subject line
          example: We'd love your feedback
        title:
          type: string
          description: Title displayed in the email body
          example: How did we do?
        body:
          type: string
          description: Main body text of the email
          example: Thank you for visiting us. Please take a moment to share your experience.
        cta_text:
          type:
            - string
            - 'null'
          description: Call-to-action label. Required when `cta_type` is `BUTTON`.
          example: Leave a review
        cta_type:
          type: string
          enum:
            - BUTTON
            - EMBEDDED_NPS
          description: |
            Type of call-to-action rendered in the email.
            - `BUTTON`: a clickable button; `cta_text` must be non-null.
            - `EMBEDDED_NPS`: an NPS score row embedded in the email.
          example: BUTTON
        post_cta_text:
          type:
            - string
            - 'null'
          description: Text displayed below the call-to-action
          example: Your feedback helps us improve.
        closing_text:
          type:
            - string
            - 'null'
          description: Closing paragraph of the email
          example: Thank you for your time!
        signature_name:
          type:
            - string
            - 'null'
          description: Name displayed in the email signature
          example: The Partoo Team
        logo_url:
          type:
            - string
            - 'null'
          format: uri
          description: URL of the organization logo displayed in the email header
          example: https://example.com/logo.png
        banner_url:
          type:
            - string
            - 'null'
          format: uri
          description: URL of the banner image displayed in the email
          example: https://example.com/banner.png
        color:
          type: string
          description: Primary accent color for the email template (hex code)
          example: '#3B82F6'
        font_family:
          type: string
          enum:
            - Arial
            - Helvetica
            - Verdana
            - Georgia
            - Trebuchet
          description: Font family used in the email
          example: Arial
    feedback_email_template:
      allOf:
        - $ref: '#/components/schemas/FeedbackEmailTemplateBase'
        - type: object
          required:
            - id
            - org_id
            - name
            - subject
            - title
            - body
            - cta_type
            - color
            - font_family
            - created_at
            - updated_at
          properties:
            id:
              type: integer
              description: Unique identifier of the email template
              example: 1
            org_id:
              type: integer
              description: The organization ID that owns this template
              example: 42
            created_at:
              type: string
              format: date-time
              description: Date and time the template was created
              example: '2024-01-15T10:30:00+00:00'
            updated_at:
              type: string
              format: date-time
              description: Date and time the template was last updated
              example: '2024-06-01T08:00:00+00:00'
    FeedbackEmailTemplateCreate:
      allOf:
        - $ref: '#/components/schemas/FeedbackEmailTemplateBase'
      required:
        - name
        - subject
        - title
        - body
        - cta_type
        - color
        - font_family
    FeedbackEmailTemplateUpdate:
      allOf:
        - $ref: '#/components/schemas/FeedbackEmailTemplateBase'
    feedback_form:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the form
          example: 674d791c13c9d976e20001b1
        org_id:
          type: integer
          description: The organization ID that the form is for
          example: 42
        email_reply_source:
          type:
            - string
            - 'null'
          description: The source email to use when replying to a feedback
          example: noreply@example.com
        email_reply_subject:
          type:
            - string
            - 'null'
          description: The subject of the email used when replying to a feedback
          example: About your feedback
        email_reply_to_business:
          type: boolean
          default: false
          description: |
            Whether to use the business email address when the feedback respondent wants to reply to your reply

            Defaults to false, which means the respondent reply will be sent to the email_reply_source
        email_reply_expeditor_name:
          type:
            - string
            - 'null'
          description: |
            Name to use as the expeditor when replying to a feedback

            This is the name the user sees in his email inbox (which is by default the email_reply_source)
          example: MyCompany
        expiration_interval_seconds:
          type: integer
          default: 1209600
          description: |
            When a date parameter is set on the link sent to the customer, this will be used to disable answers to the feedback form after that many seconds

            Does nothing when the date parameter is not used on the link sent to the customer

            Defaults to 2 weeks

            Example: In the link you sent the customer, you set the date parameter to 2025-01-01T00:00:00Z.
            By default, the customer will no longer be able to answer the survey after 2025-01-15T00:00:00Z.
        display_name:
          type: string
          description: Name of your form
          example: Global Satisfaction
    display_name:
      type: string
      description: Name of your form
      example: Global Satisfaction
    FeedbackFormId:
      type: string
      description: The unique identifier of the form
      example: 674d791c13c9d976e20001b1
    feedback_form_stats:
      type: object
      description: One day of email-delivery funnel metrics for a (feedback_form, business) pair.
      properties:
        feedback_form_id:
          allOf:
            - $ref: '#/components/schemas/FeedbackFormId'
        business_id:
          allOf:
            - $ref: '#/components/schemas/BusinessId'
        date:
          type: string
          format: date
          description: Day these metrics apply to
          example: '2026-06-01'
        source:
          type: string
          enum:
            - external
            - internal
          description: |
            Origin of the emailing volume.

            Always `external` for rows created through this endpoint (i.e. reported by your ESP).
          example: external
        org_id:
          type: integer
          description: The organization ID the feedback form belongs to
          example: 42
        sent:
          type: integer
          minimum: 0
          description: Number of survey emails sent
          example: 100
        processed:
          type: integer
          minimum: 0
          description: Number of survey emails accepted for delivery by the ESP
          example: 95
        delivered:
          type: integer
          minimum: 0
          description: Number of survey emails successfully delivered
          example: 90
        opened:
          type: integer
          minimum: 0
          description: Number of survey emails opened
          example: 50
        clicked:
          type: integer
          minimum: 0
          description: Number of survey link clicks (from the email)
          example: 10
        error_bounces:
          type: integer
          minimum: 0
          description: Number of survey emails that bounced
          example: 5
    FeedbackResultState:
      type: string
      enum:
        - treated
        - not_treated
      description: State of the feedback result
    nps:
      type: integer
      minimum: 0
      maximum: 10
      description: NPS of the feedback result
      example: 9
    feedback_form_field:
      type: object
      properties:
        id:
          type: string
          description: |
            Unique identifier of the field
          example: 674d7aaa13e599deae0001b2
        field_type:
          type: string
          enum:
            - NPS
            - FREE_FORM
            - CSAT
            - MULTIPLE_CHOICE
          example: CSAT
        field_label:
          type: string
          description: |
            The label of the field (i.e. the question that was answered)
          example: How would you rate our service?
        field_choices:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              id:
                type: string
              text:
                type: string
              isOtherOption:
                type: boolean
                description: Whether this is the "Other" option
                example: false
          description: |
            All choices that were ever available for this field

            Only set for MULTIPLE_CHOICE fields
          example: null
    feedback_result_field:
      type: object
      description: |
        One answered question. Only the property matching the question type is set, the others are
        `null`: `rating` for NPS and CSAT, `content` for FREE_FORM and `choices` for MULTIPLE_CHOICE.
      required:
        - rating
        - content
        - choices
        - feedback_form_field
      properties:
        rating:
          type:
            - integer
            - 'null'
          description: |
            Rating assigned by the respondent, if any

            Is set for NPS (0 to 10) and CSAT (1 to 5) fields
          example: 4
        content:
          type:
            - string
            - 'null'
          description: |
            Text content written by the respondent, if any

            Is set for FREE_FORM fields
          example: null
        choices:
          type:
            - array
            - 'null'
          items:
            type: string
          description: |
            Identifiers of the choices selected by the respondent, matching `id` in
            `feedback_form_field.field_choices`. A free-text "Other" answer is given as its text.

            Is set for MULTIPLE_CHOICE fields
          example: null
        feedback_form_field:
          $ref: '#/components/schemas/feedback_form_field'
    feedback_result_reply:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier of the reply
          example: 1
        created:
          type: string
          format: datetime
          description: Date the reply was created
          example: '2024-11-15T10:00:15+00:00'
        author_name:
          type: string
          description: Author of the reply
          example: Jane Doe
        content:
          type: string
          description: Content of the reply
          example: Thank you for your feedback
        feedback_result_id:
          type: integer
          description: Identifier of the feedback result
          example: 1
        user_id:
          allOf:
            - $ref: '#/components/schemas/UserId'
        is_reply_suggestion:
          type: boolean
          description: Whether the reply was created using an AI suggestion
          example: false
    feedback_result:
      type: object
      required:
        - id
        - business_id
        - store_code
        - firstname
        - lastname
        - nps
        - content
        - state
        - optin
        - created
        - feedback_form
        - feedback_result_fields
        - comments
        - extra
      properties:
        id:
          type: integer
          example: 1
        business_id:
          allOf:
            - $ref: '#/components/schemas/BusinessId'
        store_code:
          type:
            - string
            - 'null'
          description: Your own code for the business, if the survey link carried one
          example: FR-0042
        firstname:
          type:
            - string
            - 'null'
          description: Firstname of the respondent, if the survey collected it
          example: John
        lastname:
          type:
            - string
            - 'null'
          description: Lastname of the respondent, if the survey collected it
          example: Doe
        nps:
          allOf:
            - $ref: '#/components/schemas/nps'
        content:
          type:
            - string
            - 'null'
          description: |
            Content of the FREE_FORM answer, or `null` when the survey has none.

            When the survey has several FREE_FORM questions, this holds the last one only: read
            `feedback_result_fields` to get every answer.
          example: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse vulputate efficitur augue, ac auctor nibh scelerisque at. Nulla facilisi. Maecenas luctus efficitur sem sit amet ullamcorper. Donec tempor augue lorem, vitae convallis sapien aliquam id. Maecenas eu odio non est pretium eleifend. Nullam at odio eu ligula ultrices tincidunt. Nulla euismod aliquet ex eget efficitur.
        state:
          allOf:
            - $ref: '#/components/schemas/FeedbackResultState'
        optin:
          type: boolean
          description: Whether the respondent accepts to be contacted
          enum:
            - true
            - false
        created:
          type: string
          format: date-time
          description: Date the feedback result was created on
          example: '2024-10-25T15:12:11+00:00'
        feedback_form:
          type: object
          required:
            - id
            - display_name
          properties:
            id:
              allOf:
                - $ref: '#/components/schemas/FeedbackFormId'
            display_name:
              allOf:
                - $ref: '#/components/schemas/display_name'
            custom_hidden_fields:
              type: object
              additionalProperties:
                type: string
              description: The survey's custom hidden fields, mapping their identifier to their display name
              example:
                field_1: Campaign
          description: Information about the corresponding feedback form
        feedback_result_fields:
          type: array
          items:
            $ref: '#/components/schemas/feedback_result_field'
          description: The various fields of the feedback result
        comments:
          type: array
          items:
            $ref: '#/components/schemas/feedback_result_reply'
          description: The replies of the feedback result
        extra:
          type: object
          description: The additional hidden fields (other than `firstname`, `lastname`, `store_code`, `email` and `date`)
          example:
            extra_field: value
            extra_field_2: value_2
        issues:
          type:
            - array
            - 'null'
          items:
            type: string
            enum:
              - deleted_business
              - missing_store_code
              - deleted_user
          description: Data quality issues flagged on the feedback result, if any
          example: null
    feedback_result_reply_suggestion:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier of the reply suggestion
          example: 1
        index:
          type: integer
          description: Index of the reply suggestion
          example: 0
        content:
          type: string
          description: Content of the reply suggestion
          example: Thank you for your feedback.
        feedback_result_id:
          type: integer
          description: Identifier of the feedback result
          example: 123
        report:
          type: object
          description: Report details if the suggestion was reported (can be null)
          properties:
            id:
              type: integer
              description: Report id
              example: 3587
            user_id:
              type: string
              description: User id of the user who reported the suggestion
              example: xyz123
            created_at:
              type: string
              format: datetime
              description: Date the review suggestion report was created on
              example: '2025-05-12T12:57:21.895170Z'
    CampaignRequirementsResponse:
      type: object
      required:
        - feedback_form_id
        - feedback_email_template_id
        - recipient_fields
        - variable_fields
      properties:
        feedback_form_id:
          type: string
          description: ID of the feedback form associated with the campaign
          example: 5a3f8c2e1b4d7f9a0c6e2b18
        feedback_email_template_id:
          type: integer
          description: ID of the email template used to compute campaign requirements
          example: 42
        recipient_fields:
          type: array
          description: |
            Recipient-level fields supported by the send endpoint.

            This list currently includes `email_address` and `unsubscribe_url`.
          items:
            type: string
            enum:
              - email_address
              - unsubscribe_url
          example:
            - email_address
            - unsubscribe_url
        variable_fields:
          type: array
          description: |
            Template variable names recipients should provide under `variables`,
            sorted alphabetically.
          items:
            type: string
          example:
            - first_name
            - store_code
    FeedbackEmailCampaignRecipient:
      type: object
      required:
        - email_address
        - variables
      properties:
        email_address:
          type: string
          format: email
          description: Recipient email address
          example: john.doe@example.com
        unsubscribe_url:
          type:
            - string
            - 'null'
          format: uri
          description: |
            URL that allows the recipient to unsubscribe from future campaigns.
            Must be a valid HTTP or HTTPS URL when provided.

            If omitted, Partoo will generate and inject a default unsubscribe link automatically.
            Opt-out records are stored by Partoo and can be exported from the Partoo interface
            as an XLSX file (columns: `email_address`, `opt_out_date`).

            <Warning>
            It is your responsibility to honour opt-outs and exclude opted-out recipients
            from future campaign sends. Partoo does not suppress opted-out addresses automatically.
            </Warning>
          example: https://example.com/unsubscribe?token=abc123
        variables:
          type: object
          additionalProperties:
            type: string
          description: Key-value pairs for template variable substitution
          example:
            first_name: John
            store_name: Paris Store
    SendCampaignRequest:
      type: object
      required:
        - feedback_form_id
        - feedback_email_template_id
        - sender_email
        - sender_name
        - recipients
      properties:
        feedback_form_id:
          type: string
          description: ID of the feedback form to associate with this campaign
          example: 5a3f8c2e1b4d7f9a0c6e2b18
        feedback_email_template_id:
          type: integer
          description: ID of the email template to use for this campaign
          example: 42
        sender_email:
          type: string
          format: email
          description: |
            Email address displayed as the sender.

            <Warning>
            The domain of this address must be authorized for your organization and validated for email sending.
            If this check fails, the campaign is rejected with `status: failed` and the response includes
            `sender_validation` details.
            </Warning>
          example: noreply@example.com
        sender_name:
          type: string
          description: Name displayed as the sender
          example: Acme Corp
        recipients:
          type: array
          description: |
            List of recipients for the campaign. Maximum 1000 recipients per call.
            For larger lists, split them into batches and call this endpoint multiple times.
          maxItems: 1000
          items:
            $ref: '#/components/schemas/FeedbackEmailCampaignRecipient'
        is_dry_run:
          type: boolean
          default: false
          description: |
            When `true`, validates the recipients without actually sending the emails.
            Use this to verify your recipient list before triggering a real send.
          example: false
    SenderValidation:
      type: object
      required:
        - sender_email
        - domain
        - status
      properties:
        sender_email:
          type: string
          format: email
          description: Sender email submitted in the request
          example: sender@example.com
        domain:
          type: string
          description: Domain extracted from `sender_email`
          example: example.com
        status:
          type: string
          enum:
            - validated
            - not_validated
          description: |
            `validated` — the domain is authorized for the organization and validated for email sending.

            `not_validated` — the domain is not authorized for the organization or not validated for email sending.
          example: validated
    SendCampaignResponse:
      type: object
      required:
        - status
        - feedback_form_id
        - feedback_email_template_id
        - recipient_count
      properties:
        status:
          type: string
          enum:
            - accepted
            - failed
          description: |
            `accepted` — validation passed; emails have been enqueued (or skipped if `is_dry_run` was `true`).

            `failed` — sender or recipient validation failed; no emails were sent.
            Check the error fields for details.
          example: accepted
        feedback_email_campaign_id:
          type:
            - integer
            - 'null'
          description: ID of the created campaign. `null` when `status` is `failed` or `is_dry_run` is `true`
          example: 101
        feedback_form_id:
          type: string
          description: ID of the feedback form associated with this campaign
          example: 5a3f8c2e1b4d7f9a0c6e2b18
        feedback_email_template_id:
          type: integer
          description: ID of the email template used for this campaign
          example: 42
        recipient_count:
          type: integer
          description: Total number of recipients provided in the request
          example: 150
        recipient_count_exceeded:
          type: boolean
          default: false
          description: |
            `true` when the request contained more than 1000 recipients.
            Split the list into batches of at most 1000 and retry.
          example: false
        duplicate_emails:
          type:
            - array
            - 'null'
          description: Email addresses that appear more than once in the recipients list. Populated when `status` is `failed`
          items:
            type: string
            format: email
          example:
            - duplicate@example.com
        invalid_emails:
          type:
            - array
            - 'null'
          description: Email addresses that are not valid. Populated when `status` is `failed`
          items:
            type: string
          example:
            - not-an-email
            - missing@
        missing_variables:
          type:
            - array
            - 'null'
          description: |
            List of `[email_address, missing_variable_names]` pairs identifying recipients
            who are missing one or more required template variables. Populated when `status` is `failed`
          items:
            type: array
            prefixItems:
              - type: string
                format: email
                description: Recipient email address
              - type: array
                description: Names of the missing variables for this recipient
                items:
                  type: string
            minItems: 2
            maxItems: 2
          example:
            - - john@example.com
              - - first_name
                - store_name
        empty_variables:
          type:
            - array
            - 'null'
          description: |
            List of `[email_address, empty_variable_names]` pairs identifying recipients
            who have one or more required template variables set to an empty string. Populated when `status` is `failed`
          items:
            type: array
            prefixItems:
              - type: string
                format: email
                description: Recipient email address
              - type: array
                description: Names of the empty variables for this recipient
                items:
                  type: string
            minItems: 2
            maxItems: 2
          example:
            - - jane@example.com
              - - store_name
        invalid_store_codes:
          type:
            - array
            - 'null'
          description: |
            Store codes that could not be matched to a business in the organization.
            Populated when `status` is `failed` and one or more recipients provided an unrecognized `store_code` variable.
          items:
            type: string
          example:
            - UNKNOWN-001
            - STORE-999
        sender_validation:
          type:
            - object
            - 'null'
          description: |
            Result of the sender email validation check. Populated when `status` is `failed`.
            If `sender_validation.status` is `not_validated`, the sender domain is either not authorized
            for the organization or not validated for email sending.
          allOf:
            - $ref: '#/components/schemas/SenderValidation'
          example:
            sender_email: noreply@example.com
            domain: example.com
            status: not_validated
    FeedbackAnalyticsDataItem:
      type: object
      description: |
        One row of analytics data. Keys are the requested metric names and dimension serializer keys.
        Metric values are numeric; dimension values are strings (IDs) or dates.
      additionalProperties: true
      example:
        result.csat.score: 87.5
        result.csat.avg_score: 4.2
        result.csat.total_responses: 120
        business_id: 59b2645db12ff60643ef832c
        date: '2024-01-01'
    FeedbackFormSummary:
      type: object
      description: Summary of a feedback form (survey).
      properties:
        id:
          type: string
          description: Unique identifier of the feedback form.
          example: 674d791c13c9d976e20001b1
        display_name:
          type: string
          description: Human-readable name of the feedback form.
          example: Customer Satisfaction Q1 2024
    FeedbackFormFieldSummary:
      type: object
      description: Summary of a form field.
      properties:
        id:
          type: string
          description: Unique identifier of the field.
          example: 674d791c13c9d976e20001c3
        field_type:
          type: string
          description: Type of the field (e.g. CSAT, NPS, TEXT).
          example: CSAT
        field_label:
          type: string
          description: Display label of the field.
          example: How satisfied are you?
        form_id:
          type: string
          description: ID of the parent feedback form.
          example: 674d791c13c9d976e20001b1
        form_display_name:
          type: string
          description: Display name of the parent feedback form.
          example: Customer Satisfaction Q1 2024
    FeedbackAnalyticsMetadata:
      type: object
      description: |
        Entity details referenced by IDs in the `data` array.
        Only present when `metadata=true` is passed in the request.
        Each key is a dimension name; its value is an array of the corresponding entities.
      properties:
        feedback_form:
          type: array
          items:
            $ref: '#/components/schemas/FeedbackFormSummary'
          description: Feedback forms referenced in the data.
        feedback_form_field:
          type: array
          items:
            $ref: '#/components/schemas/FeedbackFormFieldSummary'
          description: Form fields referenced in the data.
        business:
          type: array
          description: Businesses referenced in the data.
          items:
            type: object
            additionalProperties: true
        group:
          type: array
          description: Business groups referenced in the data.
          items:
            type: object
            additionalProperties: true
        group_section:
          type: array
          description: Group sections referenced in the data.
          items:
            type: object
            additionalProperties: true
        user:
          type: array
          description: Users referenced in the data.
          items:
            type: object
            additionalProperties: true
        result:
          type: array
          description: Individual feedback results referenced in the data.
          items:
            type: object
            additionalProperties: true
    FeedbackAnalyticsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/FeedbackAnalyticsDataItem'
          description: Array of analytics rows. Each row contains metric values and dimension identifiers.
        metadata:
          $ref: '#/components/schemas/FeedbackAnalyticsMetadata'
        page:
          type: integer
          description: Current page number.
          example: 1
        count:
          type: integer
          description: Total number of results matching the query.
          example: 42
        max_page:
          type: integer
          nullable: true
          description: Total number of pages available.
          example: 5
    url:
      type: string
      description: The URL receiving the webhook's data.
      example: https://example.com/webhook
    event_type:
      type: string
      description: The webhook event type.
      enum:
        - business_created
        - business_updated
        - business_deleted
        - message_updated
        - message_created
        - lead_received
        - review_created
        - review_updated
        - review_reply_created
        - review_reply_updated
        - review_reply_deleted
        - email_opt_out_created
        - post_created
        - post_updated
        - post_validated
        - post_deleted
        - scheduled_post_pushed
      example: business_created
    CustomHeaders:
      type: object
      description: |
        Custom HTTP headers to include in webhook requests. Keys must start with `X-` (case-insensitive) and must not use the reserved `X-Partoo` prefix. Maximum 5 headers. Key max length: 128 characters. Value max length: 512 characters. The following characters are forbidden in header keys: space, `(`, `)`, `<`, `>`, `@`, `,`, `;`, `:`, `\`, `"`, `/`, `[`, `]`, `?`, `=`, `{`, `}`.
      maxProperties: 5
      propertyNames:
        type: string
        maxLength: 128
        pattern: ^[Xx]-(?![Pp][Aa][Rr][Tt][Oo][Oo])[^ ()<>@,;:\\\"\/\[\]?={}]*$
      additionalProperties:
        type: string
        maxLength: 512
      example:
        X-My-Header: my-value
        X-Auth-Token: secret-token
    WebhookItem:
      type: object
      required:
        - id
        - url
        - event_type
        - created_at
        - updated_at
        - org_id
      properties:
        id:
          type: integer
          description: The identifier for the webhook configuration.
          example: 1
        url:
          $ref: '#/components/schemas/url'
        event_type:
          $ref: '#/components/schemas/event_type'
        created_at:
          type: string
          description: An ISO 8601 date-time string representing the webhook creation date.
          example: '2024-11-27T16:10:44.929678Z'
        updated_at:
          type: string
          description: An ISO 8601 date-time string representing the webhook last update date.
          example: '2024-11-27T16:10:44.929678Z'
        org_id:
          type: integer
          description: The organization identifier for the webhook configuration.
          example: 1
        custom_headers:
          $ref: '#/components/schemas/CustomHeaders'
    webhook_url:
      type: string
      description: The URL receiving the webhook's data. Only HTTPS URLs are supported.
      example: https://example.com/webhook
    webhook_event_type:
      type: string
      description: The webhook event type.
      example: business_created
    CreateWebhookPayloadItem:
      type: object
      required:
        - url
        - event_type
      properties:
        url:
          $ref: '#/components/schemas/webhook_url'
        event_type:
          $ref: '#/components/schemas/webhook_event_type'
        custom_headers:
          $ref: '#/components/schemas/CustomHeaders'
    CreateWebhooksPayload:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/CreateWebhookPayloadItem'
          description: The list of webhook configurations to create.
    WebhookDeleteSuccess:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          description: The status of the webhook deletion.
          example: success
    UpdateWebhookPayload:
      type: object
      required:
        - url
      properties:
        url:
          $ref: '#/components/schemas/webhook_url'
        custom_headers:
          $ref: '#/components/schemas/CustomHeaders'
    tryout_result_status:
      type: string
      description: Result status of the webhook tryout.
      enum:
        - success
        - error
      example: success
    WebhookTryoutResult:
      type: object
      properties:
        payload:
          type: object
          description: The webhook sent payload. Varies depending on the event type.
        event_type:
          $ref: '#/components/schemas/event_type'
        url:
          $ref: '#/components/schemas/url'
        status:
          $ref: '#/components/schemas/tryout_result_status'
    WebhookEventTypes:
      type: array
      items:
        $ref: '#/components/schemas/event_type'
      example:
        - business_created
        - business_updated
        - business_deleted
        - message_updated
        - message_created
        - review_created
        - review_updated
        - review_reply_created
        - review_reply_updated
        - review_reply_deleted
        - email_opt_out_created
        - post_created
        - post_updated
        - post_validated
        - post_deleted
        - scheduled_post_pushed
        - feedback_result_created
    MessageCreatedEvent:
      properties:
        message:
          allOf:
            - $ref: '#/components/schemas/Message'
            - type: object
        conversation:
          allOf:
            - $ref: '#/components/schemas/Conversation'
            - type: object
        org_id:
          type: integer
          description: The id of the organization
    LeadFieldType:
      type: string
      description: The lead field type. `OPT-IN` type is a `BOOLEAN` type
      enum:
        - TEXT
        - NUMBER
        - EMAIL
        - PHONE_NUMBER
        - BOOLEAN
        - OPT_IN
      example: TEXT
    LeadItem:
      type: object
      properties:
        id:
          type: integer
          example: 1
        type:
          $ref: '#/components/schemas/LeadFieldType'
        name:
          type: string
          description: name of the field collected
          example: Your firstname
        value:
          type: string
          description: value of the field corresponding to the lead
          example: John
    LeadWebhook:
      type: object
      properties:
        id:
          type: integer
          description: The identifier for the webhook configuration.
          example: 1
        source:
          type: string
          description: The source of the lead, how we retrieved it.
          example: chatbot
        created_at:
          type: string
          description: An ISO 8601 date-time string representing the webhook creation date.
          example: '2024-11-27T16:10:44.929678Z'
        conversation_id:
          type: integer
          description: The identifier of the conversation that generated the lead
          example: 123
        channel:
          type: string
          description: The channel from which the lead was collected
          enum:
            - Google
            - Facebook
            - Instagram
            - SMS
            - Whatsapp
            - Custom
            - Livechat
          example: Whatsapp
        chatbot_id:
          type: integer
          description: The identifier of the chatbot that collected the lead
          example: 1
        chatbot_name:
          type: string
          description: Name of the chatbot that collected the lead
          example: Jim
        business_name:
          type: string
          description: Name of the business related to the lead
          example: Partoo
        store_code:
          type: string
          description: Store code of the business related to the lead
          example: Partoo123
        values:
          type: array
          items:
            $ref: '#/components/schemas/LeadItem'
    PostWebhookMedia:
      type: object
      description: A media attached to the post.
      properties:
        media_url:
          $ref: '#/components/schemas/postImageURL'
        media_type:
          type: string
          description: The type of the media.
          example: photo
        media_format:
          type: string
          description: The format of the media.
          example: png
        order:
          type: integer
          description: Display order of the media among the post's medias.
          example: 0
    PostWebhookContent:
      type: object
      description: |
        Post content shared across every business a create/update call affects — everything except what's inherently per-business (`id`, `business_id`, diffuser state), which only `scheduled_post_pushed` carries since it's always per-post.
      properties:
        bulk_id:
          type: integer
          nullable: true
          description: Identifier shared by every post created or edited together in the same bulk call.
          example: 7
        post_type:
          type: string
          description: The type of the post.
          example: standard
        language:
          type: string
          nullable: true
          description: Language of the post content.
        title:
          $ref: '#/components/schemas/postTitle'
        summary:
          $ref: '#/components/schemas/postSummary'
        cta_type:
          $ref: '#/components/schemas/postCTAType'
        cta_link:
          $ref: '#/components/schemas/postCTALink'
        start_at:
          $ref: '#/components/schemas/postStartAt'
        end_at:
          $ref: '#/components/schemas/postEndAt'
        schedule_time:
          $ref: '#/components/schemas/postScheduleTime'
        expiration_time:
          $ref: '#/components/schemas/postExpirationTime'
        validation_time:
          type: string
          nullable: true
          description: Date when the draft post was validated by a Business/Group Manager.
          example: '2050-01-01T09:00:00Z'
        post_medias:
          type: array
          items:
            $ref: '#/components/schemas/PostWebhookMedia'
        offer_terms:
          $ref: '#/components/schemas/postOfferTerms'
        offer_code:
          $ref: '#/components/schemas/postCouponCode'
        created_at:
          $ref: '#/components/schemas/CreatedDate'
        updated_at:
          $ref: '#/components/schemas/UpdatedDate'
        created_on_partoo:
          $ref: '#/components/schemas/postCreatedOnPartoo'
        updated_on_partoo:
          $ref: '#/components/schemas/postUpdatedOnPartoo'
    PostCreatedUpdatedPayload:
      type: object
      description: Payload for `post_updated` and `post_validated` (and, without `is_draft`, the base shape of `post_created`).
      properties:
        org_id:
          type: integer
          description: The organization identifier.
          example: 106844
        post:
          $ref: '#/components/schemas/PostWebhookContent'
        post_ids:
          type: array
          description: |
            Identifiers of the posts affected by this call, in the same order as `business_ids`: `post_ids[i]` is the post published on `business_ids[i]`. A bulk create/edit fires one event for the whole call rather than one per post.
          items:
            $ref: '#/components/schemas/postId'
          example:
            - 14398024
            - 14398025
        business_ids:
          type: array
          description: |
            The businesses affected by this call, in the same order as `post_ids`. A bulk create/edit fires one event for the whole call rather than one per business.
          items:
            $ref: '#/components/schemas/BusinessId'
          example:
            - 69661fcd599c4ab7800db486
            - 6969f6a175a203457b0e6f0c
        diffusers:
          type: array
          description: Names of the diffusers/publishers this post is pushed to.
          items:
            type: string
          example:
            - google_my_business__posts
            - facebook__posts
    PostCreatedPayload:
      description: Payload for `post_created`.
      allOf:
        - $ref: '#/components/schemas/PostCreatedUpdatedPayload'
        - type: object
          properties:
            is_draft:
              type: boolean
              description: |
                Whether this call created a draft post (state `to_validate`) rather than a normal post.
              example: false
    PostDeletedWebhookPayload:
      type: object
      description: Payload for `post_deleted`.
      properties:
        org_id:
          type: integer
          description: The organization identifier.
          example: 106844
        post_ids:
          type: array
          description: |
            Identifiers of the deleted posts. A bulk delete fires one event with every id.
          items:
            $ref: '#/components/schemas/postId'
          example:
            - 14398024
            - 14398025
    PostWebhookScheduledContent:
      description: |
        Same content as `PostWebhookContent`, plus the per-business identity fields that the bulk events omit.
      allOf:
        - $ref: '#/components/schemas/PostWebhookContent'
        - type: object
          properties:
            id:
              $ref: '#/components/schemas/postId'
            business_id:
              $ref: '#/components/schemas/BusinessId'
            diffusers:
              type: array
              description: Names of the diffusers/publishers this post is pushed to.
              items:
                type: string
              example:
                - google_my_business__posts
                - facebook__posts
    ScheduledPostPushedWebhookPayload:
      type: object
      description: Payload for `scheduled_post_pushed`.
      properties:
        org_id:
          type: integer
          description: The organization identifier.
          example: 106844
        post:
          $ref: '#/components/schemas/PostWebhookScheduledContent'
    feedback_result_webhook_payload:
      description: |
        A full survey response, as delivered by the `feedback_result_created` webhook.

        It has the same format as a feedback result returned by `GET /feedback/feedback_result`,
        plus `org_id` and the respondent's `email`. `comments` is always empty, since a response
        has no reply yet when it is received.
      allOf:
        - $ref: '#/components/schemas/feedback_result'
        - type: object
          required:
            - org_id
            - email
          properties:
            org_id:
              type: integer
              description: The organization identifier
              example: 1234
            email:
              type:
                - string
                - 'null'
              description: Email of the respondent, if the survey collected it
              example: jane.doe@example.com
      example:
        id: 8471023
        org_id: 1234
        business_id: 66ab12cd34ef56ab78cd90ef
        store_code: FR-0042
        firstname: Jane
        lastname: Doe
        email: jane.doe@example.com
        nps: 9
        content: Great service, very quick.
        state: not_treated
        optin: false
        created: '2026-09-23T10:14:22+00:00'
        feedback_result_fields:
          - feedback_form_field:
              id: 66f1aa11bb22cc33dd44ee55
              field_type: NPS
              field_label: How likely are you to recommend us?
              field_choices: null
            rating: 9
            content: null
            choices: null
          - feedback_form_field:
              id: 66f2aa11bb22cc33dd44ee55
              field_type: CSAT
              field_label: How would you rate our service?
              field_choices: null
            rating: 4
            content: null
            choices: null
          - feedback_form_field:
              id: 66f3aa11bb22cc33dd44ee55
              field_type: FREE_FORM
              field_label: Tell us more
              field_choices: null
            rating: null
            content: Great service, very quick.
            choices: null
          - feedback_form_field:
              id: 66f4aa11bb22cc33dd44ee55
              field_type: MULTIPLE_CHOICE
              field_label: What did you like?
              field_choices:
                - id: a1b2c3
                  text: The staff
                  isOtherOption: false
                - id: d4e5f6
                  text: The speed
                  isOtherOption: false
            rating: null
            content: null
            choices:
              - a1b2c3
        comments: []
        feedback_form:
          id: 66f0aa11bb22cc33dd44ee55
          display_name: Post-visit satisfaction
          custom_hidden_fields:
            field_1: Campaign
            field_2: Ticket ID
        extra:
          Campaign: summer-2026
          Ticket ID: INC-99182
        issues: null
  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
