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

# Report rows: earned conversions and spend by channel

> The cac-by-channel read as flat rows, one per channel and currency, for a reporting connector. Cached for a few minutes until new data lands.



## OpenAPI

````yaml https://plainrouter.com/openapi.json get /workspaces/{workspace}/admin/report-rows/channels
openapi: 3.1.0
info:
  title: Plainrouter Conversion API
  version: 0.5.0
  description: Plainrouter public Signals Conversion API.
servers:
  - url: https://plainrouter.com/api/v1
    description: Production
security:
  - workspaceSecret: []
paths:
  /workspaces/{workspace}/admin/report-rows/channels:
    get:
      tags:
        - SignalsExport
      summary: 'Report rows: earned conversions and spend by channel'
      description: >-
        The cac-by-channel read as flat rows, one per channel and currency, for
        a reporting connector. Cached for a few minutes until new data lands.
      operationId: get_report_rows_channels
      parameters:
        - name: workspace
          in: path
          required: true
          description: The workspace ID
          schema:
            type: integer
        - name: account_id
          in: query
          description: >-
            Optional advertising account selector, restricted to the workspace
            and key binding. An account outside either returns 404.
          schema:
            minimum: 1
            type: integer
        - name: from
          in: query
          description: >-
            Inclusive conversion time; defaults to 30 days before to. Retention
            applies. Unknown parameters return 422.
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: to
          in: query
          description: Inclusive conversion time; defaults to now.
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: model
          in: query
          description: Journey credit model.
          schema:
            type: string
            enum:
              - position_based
              - first
              - last
              - linear
            default: position_based
        - name: lookback
          in: query
          description: Maximum touch age before conversion, in days.
          schema:
            type: integer
            enum:
              - 7
              - 30
              - 60
              - 90
            default: 90
        - name: level
          in: query
          description: Channel dimension.
          schema:
            type: string
            enum:
              - platform
              - campaign_id
              - ad_set_id
              - ad_id
              - utm_source
              - utm_medium
              - utm_campaign
            default: platform
        - name: conversion_kind
          in: query
          description: Conversion stage to count.
          schema:
            type: string
            enum:
              - subscribed
              - purchase
              - trial_started
            default: subscribed
      responses:
        '200':
          description: >-
            CAC by channel as flat rows, one per channel and currency, each with
            basis_note and data_caveat.
          content:
            application/json:
              schema:
                type: object
                properties:
                  table:
                    type: string
                    const: channels
                  generated_at:
                    type: string
                    description: >-
                      When these rows were read. A repeat read within the cache
                      time can return the same rows until new data lands.
                  rows:
                    type: array
                    items:
                      type: object
                      properties:
                        level:
                          type: string
                          description: Dimension.
                        channel:
                          type:
                            - string
                            - 'null'
                          description: Dimension.
                        currency:
                          type:
                            - string
                            - 'null'
                          description: Dimension.
                        from:
                          type: string
                          description: Dimension.
                        to:
                          type: string
                          description: Dimension.
                        model:
                          type: string
                          description: Dimension.
                        lookback_days:
                          type: integer
                          description: Dimension.
                        conversion_kind:
                          type: string
                          description: Dimension.
                        counted_appeared_in:
                          type: integer
                          description: >-
                            Counted by Plainrouter. Null stays null; it is never
                            zero.
                        counted_earned:
                          type: string
                          description: >-
                            Counted by Plainrouter. Null stays null; it is never
                            zero.
                        counted_earned_value:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Counted by Plainrouter. Null stays null; it is never
                            zero.
                        platform_spend:
                          type:
                            - string
                            - 'null'
                          description: >-
                            As the ad platform named by platform_spend_source
                            reports it.
                        platform_spend_null_reason:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Why the field it names is null, where the read gives
                            a reason.
                        platform_spend_source:
                          type:
                            - string
                            - 'null'
                          description: >-
                            The ad platform that reported platform_spend: meta
                            or google_ads.
                        platform_spend_latest_date:
                          type:
                            - string
                            - 'null'
                          description: >-
                            As the ad platform named by platform_spend_source
                            reports it.
                        platform_spend_complete:
                          type:
                            - boolean
                            - 'null'
                          description: >-
                            As the ad platform named by platform_spend_source
                            reports it.
                        meta_claimed_purchases:
                          type:
                            - string
                            - 'null'
                          description: >-
                            As Meta reports it. Null stays null; it is never
                            zero.
                        meta_claimed_purchases_null_reason:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Why the field it names is null, where the read gives
                            a reason.
                        meta_claimed_value:
                          type:
                            - string
                            - 'null'
                          description: >-
                            As Meta reports it. Null stays null; it is never
                            zero.
                        meta_claimed_cost_per_result:
                          type:
                            - string
                            - 'null'
                          description: >-
                            As Meta reports it. Null stays null; it is never
                            zero.
                        meta_claimed_cost_per_result_null_reason:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Why the field it names is null, where the read gives
                            a reason.
                        meta_attribution_settings:
                          type:
                            - string
                            - 'null'
                          description: >-
                            As Meta reports it. Null stays null; it is never
                            zero.
                        meta_attribution_settings_null_reason:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Why the field it names is null, where the read gives
                            a reason.
                        basis_note:
                          type: string
                          description: >-
                            How the two counting bases differ, verbatim from the
                            JSON read.
                        data_caveat:
                          type: string
                          description: >-
                            What to keep in mind when charting this row, in
                            plain sentences.
                      required:
                        - level
                        - channel
                        - currency
                        - from
                        - to
                        - model
                        - lookback_days
                        - conversion_kind
                        - counted_appeared_in
                        - counted_earned
                        - counted_earned_value
                        - platform_spend
                        - platform_spend_null_reason
                        - platform_spend_source
                        - platform_spend_latest_date
                        - platform_spend_complete
                        - meta_claimed_purchases
                        - meta_claimed_purchases_null_reason
                        - meta_claimed_value
                        - meta_claimed_cost_per_result
                        - meta_claimed_cost_per_result_null_reason
                        - meta_attribution_settings
                        - meta_attribution_settings_null_reason
                        - basis_note
                        - data_caveat
                required:
                  - table
                  - generated_at
                  - rows
          headers:
            Cache-Control:
              schema:
                type: string
                const: no-store, private
        '401':
          description: >-
            Workspace read key missing, revoked, expired or no longer valid for
            its issuer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '403':
          description: >-
            The key lacks the operation scope, ability or current workspace
            role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: Workspace or account not found or outside the key binding.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ErrorMessage'
                  - $ref: '#/components/schemas/ApiRouteNotFound'
        '422':
          description: >-
            Unknown parameter, or a value outside the table's own choices. The
            whole request is refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      security:
        - workspaceExportKey: []
components:
  schemas:
    ErrorMessage:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: ErrorMessage
    ApiRouteNotFound:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - api_route_not_found
            message:
              type: string
            resolution:
              type: string
          required:
            - code
            - message
            - resolution
        request:
          type: object
          properties:
            method:
              type: string
            path:
              type: string
          required:
            - method
            - path
        resources:
          type: object
          properties:
            documentation:
              type: string
            openapi:
              type: string
          required:
            - documentation
            - openapi
      required:
        - error
        - request
        - resources
      title: ApiRouteNotFound
    ValidationError:
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - message
        - errors
      title: ValidationError
  securitySchemes:
    workspaceSecret:
      type: http
      description: >-
        Per-workspace Server secret. It authenticates only the Signals workspace
        represented by the credential.
      scheme: bearer
    workspaceExportKey:
      type: http
      description: >-
        Workspace read key whose stored grant explicitly names the operation.
        Existing grants are not expanded. A Reporting key reads only arrivals,
        CAC by channel and monthly statements here.
      scheme: bearer

````

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