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

# Figures per time bucket

> The headline figures per bucket, every bucket of the range included, empty ones as zeros. The bucket size comes back as `granularity`.



## OpenAPI

````yaml https://api.highseat.com/v1/openapi.json get /sites/{site}/timeseries
openapi: 3.1.1
info:
  title: Highseat Stats API
  version: 1.0.0
  description: >-
    Read-only access to the same figures the dashboard shows.


    Authentication, limits and the shape of every response:
    https://highseat.com/docs/api.
  license:
    name: Proprietary
servers:
  - url: https://api.highseat.com/v1
security:
  - bearerAuth: []
paths:
  /sites/{site}/timeseries:
    get:
      tags:
        - Stats
      summary: Figures per time bucket
      description: >-
        The headline figures per bucket, every bucket of the range included,
        empty ones as zeros. The bucket size comes back as `granularity`.
      operationId: timeseries
      parameters:
        - name: site
          in: path
          required: true
          schema:
            type: string
            description: 'The site: its domain as registered (example.com), or its site id.'
        - name: period
          in: query
          schema:
            anyOf:
              - enum:
                  - day
                  - week
                  - month
                  - year
                  - all
                  - custom
                type: string
              - type: string
                pattern: ^([1-9]\d{0,3})(mo|m|h|d|w)$
            default: 7d
            description: >-
              The range: a calendar unit (day, week, month, year) positioned by
              `date`; a window ending now as a count and unit, m h d w mo (30m,
              24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`.
              Defaults to 7d.
          allowEmptyValue: true
          allowReserved: true
        - name: date
          in: query
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: >-
              Which day/week/month/year a unit preset refers to, YYYY-MM-DD in
              the site's timezone. Omitted means the current one.
          allowEmptyValue: true
          allowReserved: true
        - name: from
          in: query
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: First day of a custom range, YYYY-MM-DD, inclusive.
          allowEmptyValue: true
          allowReserved: true
        - name: to
          in: query
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: Last day of a custom range, YYYY-MM-DD, inclusive.
          allowEmptyValue: true
          allowReserved: true
        - name: filter
          in: query
          schema:
            anyOf:
              - type: string
                maxLength: 1200
              - type: array
                maxItems: 20
                items:
                  type: string
                  maxLength: 1200
            default: []
            description: >-
              Repeatable filter, written dimension[.key]:operator:value. Only
              the first two colons separate, so values may contain them.
              Dimensions: page_path, entry_page, exit_page, hostname, country,
              region, city, browser, os, device_type, referrer_source,
              referrer_domain, referrer_channel, utm_source, utm_medium,
              utm_campaign, utm_content, utm_term, event_name, goal, property
              (property and goal take a key). Operators: is, is_not, contains;
              country, region, goal take is and is_not only. A region takes the
              name the locations report gives it, an ISO 3166-2 code
              (region:is:DE-BY). Examples: filter=country:is:DE,
              filter=property.plan:is:pro. Repeat the parameter to combine
              filters; they all have to match.
          style: deepObject
          explode: true
          allowEmptyValue: true
          allowReserved: true
        - name: compare
          in: query
          schema:
            enum:
              - 'off'
              - previous
              - year
              - custom
            type: string
            default: 'off'
            description: >-
              Comparison period, always the range's own length moved: off,
              previous (the range immediately before), year (the same range a
              year earlier), or custom (starting on compareFrom). Defaults to
              off.
          allowEmptyValue: true
          allowReserved: true
        - name: compareFrom
          in: query
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: >-
              First day of a custom comparison, YYYY-MM-DD; it runs for the
              range's length.
          allowEmptyValue: true
          allowReserved: true
        - name: event
          in: query
          schema:
            type: string
            maxLength: 200
            description: Count this custom event per bucket instead of pageviews.
          allowEmptyValue: true
          allowReserved: true
        - name: granularity
          in: query
          schema:
            enum:
              - hour
              - day
              - week
              - month
            type: string
            description: >-
              The bucket size. Absent, it follows the range's length; one finer
              than the range allows is widened.
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      granularity:
                        enum:
                          - minute
                          - hour
                          - day
                          - week
                          - month
                        type: string
                        description: The bucket size.
                      rows:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              description: The bucket's start, in the site's timezone.
                            pageviews:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                            visitors:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                              description: Distinct visitors.
                            sessions:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                            bounceRate:
                              type: number
                              description: >-
                                Percent, 0 to 100. Sessions that bounced, to one
                                decimal.
                            avgDuration:
                              type: number
                              description: >-
                                Seconds. Engaged time per session, to one
                                decimal.
                            revenue:
                              type: number
                              description: >-
                                Integer, minor units of the site's reporting
                                currency (cents for USD). Sales in the bucket,
                                refunds netted.
                            refunded:
                              type: number
                              description: >-
                                Integer, minor units of the site's reporting
                                currency (cents for USD). Refunds in the bucket,
                                already netted.
                            paidOrders:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                            averageOrder:
                              type: number
                              description: >-
                                Minor units of the site's reporting currency
                                (cents for USD), unrounded, so it may carry a
                                fraction. Revenue per paid order.
                            revenuePerVisitor:
                              type: number
                              description: >-
                                Minor units of the site's reporting currency
                                (cents for USD), unrounded, so it may carry a
                                fraction. Revenue per visitor.
                            buyers:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                            purchaserRate:
                              type: number
                              description: Percent, 0 to 100. Buyers among the visitors.
                            previous:
                              type: object
                              properties:
                                date:
                                  type: string
                                  description: The bucket's start, in the site's timezone.
                                pageviews:
                                  type: integer
                                  minimum: 0
                                  maximum: 9007199254740991
                                visitors:
                                  type: integer
                                  minimum: 0
                                  maximum: 9007199254740991
                                  description: Distinct visitors.
                                sessions:
                                  type: integer
                                  minimum: 0
                                  maximum: 9007199254740991
                                bounceRate:
                                  type: number
                                  description: >-
                                    Percent, 0 to 100. Sessions that bounced, to
                                    one decimal.
                                avgDuration:
                                  type: number
                                  description: >-
                                    Seconds. Engaged time per session, to one
                                    decimal.
                                revenue:
                                  type: number
                                  description: >-
                                    Integer, minor units of the site's reporting
                                    currency (cents for USD). Sales in the
                                    bucket, refunds netted.
                                refunded:
                                  type: number
                                  description: >-
                                    Integer, minor units of the site's reporting
                                    currency (cents for USD). Refunds in the
                                    bucket, already netted.
                                paidOrders:
                                  type: integer
                                  minimum: 0
                                  maximum: 9007199254740991
                                averageOrder:
                                  type: number
                                  description: >-
                                    Minor units of the site's reporting currency
                                    (cents for USD), unrounded, so it may carry
                                    a fraction. Revenue per paid order.
                                revenuePerVisitor:
                                  type: number
                                  description: >-
                                    Minor units of the site's reporting currency
                                    (cents for USD), unrounded, so it may carry
                                    a fraction. Revenue per visitor.
                                buyers:
                                  type: integer
                                  minimum: 0
                                  maximum: 9007199254740991
                                purchaserRate:
                                  type: number
                                  description: >-
                                    Percent, 0 to 100. Buyers among the
                                    visitors.
                              required:
                                - date
                                - pageviews
                                - visitors
                                - sessions
                                - bounceRate
                                - avgDuration
                                - revenue
                                - refunded
                                - paidOrders
                                - averageOrder
                                - revenuePerVisitor
                              description: >-
                                The comparison range's bucket at the same
                                position, when asked for.
                          required:
                            - date
                            - pageviews
                            - visitors
                            - sessions
                            - bounceRate
                            - avgDuration
                            - revenue
                            - refunded
                            - paidOrders
                            - averageOrder
                            - revenuePerVisitor
                      importedExcluded:
                        type: boolean
                        description: >-
                          True when the range holds days imported from another
                          tool that these figures leave out: a filter or a
                          breakdown the imported daily totals cannot answer.
                    required:
                      - granularity
                      - rows
                  meta:
                    type: object
                    properties:
                      timezone:
                        type: string
                        description: >-
                          The site's timezone, which every day boundary falls
                          in.
                      currency:
                        type: string
                        description: ISO 4217 code of every amount in the response.
                      range:
                        anyOf:
                          - type: object
                            properties:
                              from:
                                type: string
                                description: ISO 8601, inclusive.
                              to:
                                type: string
                                description: ISO 8601, exclusive.
                            required:
                              - from
                              - to
                          - type: 'null'
                        description: The instants the period resolved to.
                      compare:
                        anyOf:
                          - type: object
                            properties:
                              from:
                                type: string
                                description: ISO 8601, inclusive.
                              to:
                                type: string
                                description: ISO 8601, exclusive.
                            required:
                              - from
                              - to
                          - type: 'null'
                        description: The comparison range, when one was asked for.
                    required:
                      - timezone
                      - currency
                      - range
                      - compare
                required:
                  - data
                  - meta
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            RateLimit:
              $ref: '#/components/headers/RateLimit'
        '400':
          $ref: '#/components/responses/Error400'
        '401':
          $ref: '#/components/responses/Error401'
        '403':
          $ref: '#/components/responses/Error403'
        '404':
          $ref: '#/components/responses/Error404'
        '422':
          $ref: '#/components/responses/Error422'
        '429':
          $ref: '#/components/responses/Error429'
        '503':
          $ref: '#/components/responses/Error503'
components:
  headers:
    RateLimit-Limit:
      description: Calls the key may make in the window.
      schema:
        type: integer
    RateLimit-Remaining:
      description: Calls left in the current window.
      schema:
        type: integer
    RateLimit-Reset:
      description: Seconds until the window reopens.
      schema:
        type: integer
    RateLimit-Policy:
      description: >-
        The quota and window, as the IETF draft writes it:
        "hourly";q=600;w=3600.
      schema:
        type: string
    RateLimit:
      description: >-
        The remaining budget, as the IETF draft writes it:
        "hourly";r=599;t=3540.
      schema:
        type: string
    Retry-After:
      description: Seconds to wait before the next call.
      schema:
        type: integer
  responses:
    Error400:
      description: 'The request is malformed: BAD_REQUEST, INVALID_FILTER or INVALID_CURSOR.'
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error401:
      description: 'No API key, or one that is not valid: UNAUTHORIZED.'
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error403:
      description: 'The workspace''s reports are closed until it pays: FORBIDDEN.'
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error404:
      description: 'The site, the funnel or the route does not exist: NOT_FOUND.'
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error422:
      description: 'The report ran into the time cap; try a shorter range: QUERY_TIMEOUT.'
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error429:
      description: >-
        The key has used its hourly budget (RATE_LIMITED), or its workspace
        already runs as many calls at once as it may
        (TOO_MANY_CONCURRENT_REQUESTS).
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error503:
      description: 'The server is busy; retry in a moment: SERVICE_UNAVAILABLE.'
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: >-
                Stable and machine-readable: BAD_REQUEST, INVALID_FILTER,
                INVALID_CURSOR, UNAUTHORIZED, FORBIDDEN, NOT_FOUND,
                QUERY_TIMEOUT, RATE_LIMITED, TOO_MANY_CONCURRENT_REQUESTS,
                SERVICE_UNAVAILABLE or INTERNAL_SERVER_ERROR.
            message:
              type: string
              description: What went wrong, written for a person.
            issues:
              type: array
              items:
                type: object
                properties:
                  path:
                    type: array
                    items:
                      anyOf:
                        - type: string
                        - type: number
                    description: >-
                      The parameter at fault, e.g. ['filter', 1] for the second
                      filter.
                  message:
                    type: string
                required:
                  - path
                  - message
              description: One entry per invalid parameter.
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.