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

# PublisherStates

> Method to retrieve businesses diffusions states on publishers.

Can be filtered by:
- Business IDs
- Publishers
- States




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml get /publisher_states
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:
  /publisher_states:
    get:
      tags:
        - Presence
      summary: PublisherStates
      description: |
        Method to retrieve businesses diffusions states on publishers.

        Can be filtered by:
        - Business IDs
        - Publishers
        - States
      operationId: getPublisherStates
      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'
components:
  parameters:
    query_business__in:
      in: query
      name: business__in
      description: >-
        Filter by business ids. Use a comma-separated list to provide multiple
        ids.
      schema:
        type: array
        example: >-
          a1c9f37b4deca92f83b61d02,9f4e2a8c0d73b154e621bc97,c73b15e9fa42d60b3a8c21ef
        items:
          $ref: '#/components/schemas/BusinessId'
          description: ''
  schemas:
    state:
      type: string
      enum:
        - success
        - pending
        - to_configure
      example: success
    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
    BusinessId:
      description: Business id
      type: string
      example: 5409c35a97bbc544d8e26737
    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'
    publisher_state_state:
      type: object
      properties:
        error_type:
          $ref: '#/components/schemas/error_type'
        state:
          type: string
        url_on_publisher:
          type:
            - string
            - 'null'
    error_type:
      type:
        - string
        - 'null'
      enum:
        - PUBLISHER_CONNEXION
        - USER_INPUT
        - EXTERNAL
        - null
  responses:
    '401':
      description: You are not authenticated
      content:
        application/json:
          schema:
            description: Error that occurs when you are not authenticated
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authentication:
                    type: string
                    default: User not authenticated
    '403':
      description: |
        You are not allowed to perform this action
      content:
        application/json:
          schema:
            description: >
              Error that occurs when you are authenticated but you are trying to
              perform an action you are not allowed to perform
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authorization:
                    type: string
                    default: Operation not allowed
  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

````