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

# Audience poll

> Polling endpoint gives the data response of global and detailed requests by given datacode



## OpenAPI

````yaml /automation.api.json get /audiences/poll
openapi: 3.0.3
info:
  title: OpenAPI definition for automation api
  version: 1.0.0
servers:
  - url: https://api.kameleoon.com
security: []
tags:
  - description: >-
      This is an object representing a Kameleoon account.You can retrieve it to
      view its properties, such as its current e-mail address or locale.With
      proper authorization, your application can read and update an account and
      profile settings.<aside class="notice"> Not all settings are exposed via
      the API. See the API reference for details. </aside>
    name: Account
  - description: >-
      Feature flag is used to  help our clients implement new features, test and
      deploy them viaour SDK. This service allows you to create and configure
      the feature flag which will be used in the source code of your feature.
    name: FeatureFlag
  - description: >
      You can use your account to set up multiple websites.This is helpful if
      you want to test your website and its mobile version or if you want to try
      Kameleoon on your site in a pre-production environment,It allows you to
      create different testing environments.
    name: Site
  - description: >-
      Custom data is an advanced tool that lets you target your customers in a
      unique way using data that is already available,such as user account
      information.
    name: CustomData
  - description: >-
      Experiment is an A/B test which can be targeted to a specific audience or
      any other audience. Kameleoon has several types of experiments: `Classic`,
      `Multivariate test (MVT)`, `Server-side` and the one that suits the best
      can be used to achieve the best results.
    name: Experiment
  - description: >-
      To measure the efficiency of an experiment or a personalization, it must
      be linked to one or several goals. All goals can be managed through
      Kameleoon interface or Automation API. There are variety of different
      goals you can choose from to better measure the results.
    name: Goal
  - description: This is an object representing an image
    name: Image
  - description: >-
      This is an object representing a key moment. Please note that `KeyMoment`
      has now been renamed to `Triggers`.
    name: KeyMoment
  - description: >-
      KeyPage allows you to target visitors that have visited a particular page,
      or multiple pages on your website.
    name: KeyPage
  - description: >
      Web personalization tailors the experience for each visitor to improve
      your conversion rate.

      The personalization object contains all vital information about a
      personalization as well as segments and variations used in it.
    name: Personalization
  - description: This is an object representing a projectThemeConfig
    name: ProjectThemeConfig
  - description: This is an object representing recommender block
    name: RecommenderBlock
  - description: >
      Referrer is an advanced tool that allows you to target visitors according
      to acquisition methods that lead them to your website.

      Kameleoon automatically creates 5 default channels: `Bing`, `Baidu`,
      `Google`, `Yahoo` and `Google Adwords`.
    name: Referrer
  - description: >-
      Segmenting allows you to effectively target visitors.You can create,
      modify, and duplicate segments using the Segment Builder tool in
      Kameleoon’s backend or through our Automation API.
    name: Segment
  - description: This is an object representing studio recommender block
    name: StudioRecommenderBlock
  - description: This is an object representing tag
    name: Tag
  - description: >-
      Represents an object aggregating the main information about an experiment
      result.
    name: Takeaway
  - description: This is an object representing a takeaway comment.
    name: TakeawayComment
  - description: >-
      TargetingRule is a system entity that combines segments (user groups) and
      triggers (activation conditions) to define precise targeting rules for
      experiments.
    name: TargetingRule
  - description: This is an object representing a theme
    name: Theme
  - description: >-
      A variation is a modified version of your webpage that can be edited for
      experiments or personalization.

      When you add a new variation, Kameleoon creates a copy of the original
      page from which you started.All changes will be saved in the variation,
      which will include all your edits when the test starts.
    name: Variation
  - description: This is an object representing a widget
    name: Widget
  - description: This is an object representing a widget studio
    name: WidgetStudio
  - description: This is an object representing widget studio template
    name: WidgetStudioTemplate
  - name: Audience
    description: >-
      Audience refers to statistical information regarding the number of visits,
      conversions, and other metrics related to a specific segment. Gaining
      insights into your website's audience is essential for effectively
      adjusting segments.
  - name: Data
    description: >
      Web personalization involves offering visitors a tailored experience to
      optimize your conversion rate.

      Personalization object contains information about a personalization, as
      well as the segments and variations used in it.
  - name: Raw Export
    description: >-
      Start a raw data exportation for experiment or personalization, which will
      be sent to the given emails.
paths:
  /audiences/poll:
    get:
      tags:
        - Audience
      summary: Audience poll
      description: >-
        Polling endpoint gives the data response of global and detailed requests
        by given datacode
      operationId: audience-poll
      parameters:
        - name: dataCode
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AudienceResultIO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ServiceError'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ServiceError'
      security:
        - bearerAuth: []
components:
  schemas:
    AudienceResultIO:
      type: object
      properties:
        status:
          type: string
          enum:
            - ERROR
            - READY
            - WAITING
            - TIMEOUT
        data:
          $ref: '#/components/schemas/DetailedAudience'
        errorDescription:
          type: string
    ServiceError:
      type: object
      properties:
        serviceName:
          type: string
        message:
          type: string
    DetailedAudience:
      type: object
      properties:
        startDateTime:
          type: string
          description: >-
            The inclusive start of the period for which statistics are
            calculated. YYYY-MM-DDThh:mm:ss
          format: date-time
          readOnly: true
        endDateTime:
          type: string
          description: >-
            The exclusive end of the period for which statistics are calculated.
            YYYY-MM-DDThh:mm:ss
          format: date-time
          readOnly: true
        analyticsLevel:
          type: string
          description: Indicates at what level the calculations were made.
          readOnly: true
          enum:
            - VISIT
            - VISITOR
        globalStats:
          $ref: '#/components/schemas/GlobalStats'
        segmentStats:
          type: array
          description: Calculations per every segment.
          readOnly: true
          items:
            $ref: '#/components/schemas/SegmentStats'
        periodStats:
          type: array
          description: Calculations separated by day interval
          readOnly: true
          items:
            $ref: '#/components/schemas/PeriodStats'
        breakdownData:
          $ref: '#/components/schemas/BreakdownData'
    GlobalStats:
      type: object
      properties:
        elementCount:
          type: integer
          description: Amount of tracked visits
          format: int64
          readOnly: true
        conversions:
          type: integer
          description: Amount of tracked conversions
          format: int64
          readOnly: true
        convertedElementCount:
          type: integer
          description: Amount of tracked converted visits
          format: int64
          readOnly: true
        conversionRate:
          type: number
          description: >-
            How often visits are being converted. It's being calculated as
            `convertedVisits`/`visits`
          format: double
          readOnly: true
        revenue:
          type: number
          description: >-
            Amount of revenue. It can be tracked by kameleoon.js. Or it can be
            calculated based on audience configuration settings. If you set
            default amount of revenue per 1 conversion then revenue will be =
            `conversions` * the default revenue
          format: double
          readOnly: true
        averageRevenuePerElementCount:
          type: number
          description: '`revenue`/`visits`'
          format: double
          readOnly: true
        averageRevenuePerConversion:
          type: number
          description: '`revenue`/`conversions`'
          format: double
          readOnly: true
        averageConversionPerElementCount:
          type: number
          description: '`conversions`/`visits`'
          format: double
          readOnly: true
        conversionRateEvolution:
          type: number
          description: >-
            How much conversion rate for current period changed according to
            previous period in percents
          format: double
          readOnly: true
        elementCountEvolution:
          type: number
          description: >-
            How much amount of visits for current period changed according to
            previous period in percents
          format: double
          readOnly: true
        revenueEvolution:
          type: number
          description: >-
            How much amount of revenue for current period changed according to
            previous period in percents
          format: double
          readOnly: true
        averageRevenuePerElementCountEvolution:
          type: number
          description: >-
            How much revenue per visit for current period changed according to
            previous period in percents
          format: double
          readOnly: true
        averageRevenuePerConversionEvolution:
          type: number
          description: >-
            How much revenue per conversion for current period changed according
            to previous period in percents
          format: double
          readOnly: true
      description: Summed up calculations for all tracked segments
      readOnly: true
    SegmentStats:
      type: object
      properties:
        segmentId:
          type: integer
          description: Identifier of the segment for which the stats was tracked
          format: int64
          readOnly: true
        elementCount:
          type: integer
          description: Amount of tracked visits
          format: int64
          readOnly: true
        conversions:
          type: integer
          description: Amount of tracked conversions
          format: int64
          readOnly: true
        convertedElementCount:
          type: integer
          description: Amount of tracked converted visits
          format: int64
          readOnly: true
        conversionRate:
          type: number
          description: >-
            How often visits are being converted. It's being calculated as
            `convertedVisits`/`visits`
          format: double
          readOnly: true
        revenue:
          type: number
          description: >-
            Amount of revenue. It can be tracked by kameleoon.js. Or it can be
            calculated based on audience configuration settings. If you set
            default amount of revenue per 1 conversion then revenue will be =
            `conversions` * the default revenue
          format: double
          readOnly: true
        averageRevenuePerElementCount:
          type: number
          description: '`revenue`/`visits`'
          format: double
          readOnly: true
        averageRevenuePerConversion:
          type: number
          description: '`revenue`/`conversions`'
          format: double
          readOnly: true
        averageConversionPerElementCount:
          type: number
          description: '`conversions`/`visits`'
          format: double
          readOnly: true
        conversionRateEvolution:
          type: number
          description: >-
            How much conversion rate for current period changed according to
            previous period in percents
          format: double
          readOnly: true
        elementCountEvolution:
          type: number
          description: >-
            How much amount of visits for current period changed according to
            previous period in percents
          format: double
          readOnly: true
        revenueEvolution:
          type: number
          description: >-
            How much amount of revenue for current period changed according to
            previous period in percents
          format: double
          readOnly: true
        averageRevenuePerElementCountEvolution:
          type: number
          description: >-
            How much revenue per visit for current period changed according to
            previous period in percents
          format: double
          readOnly: true
        averageRevenuePerConversionEvolution:
          type: number
          description: >-
            How much revenue per conversion for current period changed according
            to previous period in percents
          format: double
          readOnly: true
        elementCountGapTotal:
          type: number
          format: double
        conversionsGapTotal:
          type: number
          format: double
        revenueGapTotal:
          type: number
          format: double
        averageRevenuePerConversionGapTotal:
          type: number
          format: double
      description: >-
        Calculations for the requested segment summed up by the whole picked
        period
      readOnly: true
    PeriodStats:
      type: object
      properties:
        elementCount:
          type: integer
          description: Amount of tracked visits
          format: int64
          readOnly: true
        conversions:
          type: integer
          description: Amount of tracked conversions
          format: int64
          readOnly: true
        convertedElementCount:
          type: integer
          description: Amount of tracked converted visits
          format: int64
          readOnly: true
        conversionRate:
          type: number
          description: >-
            How often visits are being converted. It's being calculated as
            `convertedVisits`/`visits`
          format: double
          readOnly: true
        revenue:
          type: number
          description: >-
            Amount of revenue. It can be tracked by kameleoon.js. Or it can be
            calculated based on audience configuration settings. If you set
            default amount of revenue per 1 conversion then revenue will be =
            `conversions` * the default revenue
          format: double
          readOnly: true
        averageRevenuePerElementCount:
          type: number
          description: '`revenue`/`visits`'
          format: double
          readOnly: true
        averageRevenuePerConversion:
          type: number
          description: '`revenue`/`conversions`'
          format: double
          readOnly: true
        averageConversionPerElementCount:
          type: number
          description: '`conversions`/`visits`'
          format: double
          readOnly: true
        startDateTime:
          type: string
          format: date-time
        endDateTime:
          type: string
          format: date-time
      description: Calculations separated by day interval
      readOnly: true
    BreakdownData:
      type: object
      properties:
        usualBreakdownStats:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/BreakdownStats'
        customDataStats:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/BreakdownStats'
      description: Filter audience by segment criteria.
      readOnly: true
    BreakdownStats:
      type: object
      properties:
        breakdownName:
          type: string
          description: Identifier of the segment for which the stats was tracked
          readOnly: true
        elementCount:
          type: integer
          description: Amount of tracked visits
          format: int64
          readOnly: true
        conversions:
          type: integer
          description: Amount of tracked conversions
          format: int64
          readOnly: true
        convertedElementCount:
          type: integer
          description: Amount of tracked converted visits
          format: int64
          readOnly: true
        conversionRate:
          type: number
          description: >-
            How often visits are being converted. It's being calculated as
            `convertedVisits`/`visits`
          format: double
          readOnly: true
        revenue:
          type: number
          description: >-
            Amount of revenue. It can be tracked by kameleoon.js. Or it can be
            calculated based on audience configuration settings. If you set
            default amount of revenue per 1 conversion then revenue will be =
            `conversions` * the default revenue
          format: double
          readOnly: true
        averageRevenuePerElementCount:
          type: number
          description: '`revenue`/`visits`'
          format: double
          readOnly: true
        averageRevenuePerConversion:
          type: number
          description: '`revenue`/`conversions`'
          format: double
          readOnly: true
        averageConversionPerElementCount:
          type: number
          description: '`conversions`/`visits`'
          format: double
          readOnly: true
        conversionRateEvolution:
          type: number
          description: >-
            How much conversion rate for current period changed according to
            previous period in percents
          format: double
          readOnly: true
        elementCountEvolution:
          type: number
          description: >-
            How much amount of visits for current period changed according to
            previous period in percents
          format: double
          readOnly: true
        revenueEvolution:
          type: number
          description: >-
            How much amount of revenue for current period changed according to
            previous period in percents
          format: double
          readOnly: true
        averageRevenuePerElementCountEvolution:
          type: number
          description: >-
            How much revenue per visit for current period changed according to
            previous period in percents
          format: double
          readOnly: true
        averageRevenuePerConversionEvolution:
          type: number
          description: >-
            How much revenue per conversion for current period changed according
            to previous period in percents
          format: double
          readOnly: true
        elementCountPart:
          type: number
          description: >-
            Proportion of the number of visits of the breakdown subtype to the
            whole breakdown
          format: double
          readOnly: true
        revenuePart:
          type: number
          description: >-
            Proportion of the revenue of the breakdown subtype to the whole
            breakdown
          format: double
          readOnly: true
        conversionRatePart:
          type: number
          description: >-
            Proportion of the conversion rate of the breakdown subtype to the
            whole breakdown
          format: double
          readOnly: true
        revenueGapSegment:
          type: number
          description: >-
            Proportion of revenue of the breakdown to the revenue without
            separation by breakdown
          format: double
          readOnly: true
        conversionRateGapSegment:
          type: number
          description: >-
            Proportion of conversions of the breakdown to the number of
            conversions without separation by breakdown
          format: double
          readOnly: true
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````