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

# Get a prepared daily series

> Returns a daily, store-currency metric series with explicit date coverage and confidence metadata.



## OpenAPI

````yaml /openapi.json get /ad-metrics/{storeUrl}/daily-series
openapi: 3.1.0
info:
  title: Bily API
  version: 1.0.0
  description: >-
    Discover stores, read analytics and commerce data, inspect connections, and
    run explicitly authorized actions with the Bily API.
  contact:
    name: Bily support
    email: support@bily.ai
servers:
  - url: https://app.bily.ai/api/customer/v1
    description: Production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Identity
    description: Discover the identity and organizations attached to a key.
  - name: Stores
    description: Discover stores within an organization.
  - name: Store data
    description: Read store profiles, readiness, catalogs, and connected accounts.
  - name: Commerce
    description: Run scoped commerce reads and explicitly approved GraphQL mutations.
  - name: Analytics
    description: >-
      Read normalized advertising, attribution, product, customer, and cohort
      metrics.
  - name: Analytics SQL
    description: Run constrained read-only SQL over store-scoped Bily datasets.
  - name: Customer journeys
    description: Read customer touchpoints within an authenticated store scope.
  - name: Connections
    description: Inspect available connections, support, and advertising assets.
  - name: Supported actions
    description: Synchronize connections and update supported advertising assets.
  - name: Campaign actions
    description: Create or clone supported advertising campaign resources.
  - name: Tracking connections
    description: >-
      List and manage store-scoped tracking connections without returning
      credential secrets.
paths:
  /ad-metrics/{storeUrl}/daily-series:
    get:
      tags:
        - Analytics
      summary: Get a prepared daily series
      description: >-
        Returns a daily, store-currency metric series with explicit date
        coverage and confidence metadata.
      operationId: getPreparedDailySeries
      parameters:
        - $ref: '#/components/parameters/StoreUrl'
        - $ref: '#/components/parameters/OrganizationId'
        - name: startDate
          in: query
          description: First date to include, in YYYY-MM-DD format.
          required: true
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: Last date to include, in YYYY-MM-DD format.
          required: true
          schema:
            type: string
            format: date
      responses:
        '200':
          description: Request completed successfully.
          headers:
            x-request-id:
              description: The request identifier selected or generated by Bily.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DailySeriesResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    StoreUrl:
      name: storeUrl
      in: path
      required: true
      description: The exact store URL returned by GET /context or GET /stores.
      schema:
        type: string
        example: store.example.com
    OrganizationId:
      name: x-bily-organization-id
      in: header
      required: false
      description: >-
        An organization ID returned by GET /context or GET /organizations.
        Required for GET /stores and optional for store-scoped paths.
      schema:
        type: string
        example: org_01J8W7T9G3E6ZQ4M2K5N8P1R0S
  schemas:
    DailySeriesResponse:
      type: object
      required:
        - dataset
        - title
        - storeUrl
        - startDate
        - endDate
        - coverageComplete
        - expectedDays
        - observedDays
        - missingDates
        - dataConfidence
        - qualityWarnings
        - meta
        - rows
        - data
        - statistics
      properties:
        dataset:
          type: string
          enum:
            - views_daily_series
        title:
          type: string
        storeUrl:
          type: string
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
        coverageComplete:
          type: boolean
        expectedDays:
          type: integer
          minimum: 0
        observedDays:
          type: integer
          minimum: 0
        missingDates:
          type: array
          items:
            type: string
            format: date
        dataConfidence:
          type: string
          enum:
            - ready
            - review_required
        qualityWarnings:
          type: array
          items:
            type: object
            required:
              - code
              - severity
              - message
              - evidence
              - recommendation
            properties:
              code:
                type: string
                enum:
                  - prepared_series_coverage_incomplete
              severity:
                type: string
                enum:
                  - warning
              message:
                type: string
              evidence:
                type: object
                additionalProperties: true
              recommendation:
                type: string
        meta:
          type: array
          items:
            type: object
            required:
              - name
              - type
            properties:
              name:
                type: string
              type:
                type: string
        rows:
          type: integer
          minimum: 0
        data:
          type: array
          items:
            $ref: '#/components/schemas/FlexibleMetricRow'
        statistics:
          $ref: '#/components/schemas/MetricStatistics'
      additionalProperties: true
    FlexibleMetricRow:
      type: object
      description: >-
        A normalized metric row. Available dimensions depend on the requested
        view and hierarchy.
      properties:
        shop:
          type: string
        date:
          type: string
          format: date
        time:
          type: string
        channel:
          type: string
        ad_id:
          type: string
        adset_id:
          type: string
        campaign_id:
          type: string
        ad_name:
          type: string
        adset_name:
          type: string
        campaign_name:
          type: string
        p_spend:
          type: number
        p_clicks:
          type: number
        p_impressions:
          type: number
        p_reach:
          type: number
        conversions:
          type: number
        conv_value:
          type: number
        customers:
          type: number
        sessions:
          type: number
        pageviews:
          type: number
        p_currency:
          type:
            - string
            - 'null'
        fp_currency:
          type:
            - string
            - 'null'
      additionalProperties: true
    MetricStatistics:
      type:
        - object
        - 'null'
      properties:
        elapsed:
          type: number
        rows_read:
          type: integer
        bytes_read:
          type: integer
      additionalProperties: true
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Store not found
        requestId:
          type: string
          description: Present on some server errors.
        details:
          description: Optional safe details for an action failure.
        retryAfter:
          type:
            - string
            - 'null'
      additionalProperties: true
  responses:
    BadRequest:
      description: The request path, query, or body is invalid.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication is missing or invalid.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The identity or API key is not allowed to perform this request.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The resource was not found in the caller's accessible scope.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: The request rate is too high.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Bily could not complete the request.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        A server-side Bily API key created under Settings > MCP > Access key
        fallback. Select the intended store before creating it.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bily API key
      description: An alternative way to send the same server-side Bily API key.

````