openapi: 3.0.3
info:
  title: Everflow Network API - Aggregated Reporting
  description: >
    Aggregated reporting endpoints for the Everflow partner marketing platform.
    Retrieve grouped reporting data, summaries, variance reports, post-conversion
    event reports, and MTTI metrics.
  version: 1.0.0
servers:
  - description: Production Server
    url: https://api.eflow.team/v1
tags:
  - name: Reporting
    description: Aggregated reporting endpoints.
paths:
  /networks/reporting/entity/table:
    post:
      summary: Get Aggregated Reporting Data
      tags:
        - Reporting
      requestBody:
        content:
          application/json:
            example:
              from: "2026-03-01"
              to: "2026-03-08"
              timezone_id: 90
              currency_id: "USD"
              columns:
                - column: "offer"
            schema:
              required:
                - from
                - to
                - timezone_id
                - currency_id
                - columns
              properties:
                columns:
                  type: array
                  items:
                    type: object
                    properties:
                      column:
                        type: string
                        enum:
                          - unix_timestamp
                          - offer
                          - offer_group
                          - affiliate
                          - advertiser
                          - creative
                          - category
                          - affiliate_manager
                          - account_manager
                          - country
                          - carrier
                          - platform
                          - os_version
                          - device_type
                          - browser
                          - device_make
                          - language
                          - sub1
                          - sub2
                          - sub3
                          - sub4
                          - sub5
                          - sub6
                          - sub7
                          - sub8
                          - sub9
                          - sub10
                          - event_name
                          - region
                          - city
                          - dma
                          - connection_type
                          - campaign
                          - source_id
                          - hour
                          - date
                          - week
                          - month
                          - year
                          - offer_url
                          - device_model
                          - project_id
                          - referer
                          - offer_id
                          - offer_group_id
                          - affiliate_id
                          - advertiser_id
                          - campaign_id
                          - creative_id
                          - payout_type
                          - payout_amount
                          - revenue_type
                          - revenue_amount
                          - currency
                          - sales_manager
                          - account_executive
                          - derived_affiliate_manager
                          - derived_account_manager
                          - derived_sales_manager
                          - derived_project_id
                          - derived_account_executive
                          - isp
                          - adv1
                          - adv2
                          - adv3
                          - adv4
                          - adv5
                          - adv6
                          - adv7
                          - adv8
                          - adv9
                          - adv10
                          - offer_status
                          - hourly
                          - originating_offer
                          - is_proxy
                          - affiliate_status
                          - coupon_code
                          - advertiser_campaign_name
                          - app_identifier
                          - bundle_id
                          - meta_platform
                          - score_rating
                          - total_rating
                          - size
                          - developer
                          - version
                          - advertiser_event_name
                          - tracking_domain
                          - postal_code
                          - order_id
                          - attribution_method
                          - custom_payout_revenue
                          - custom_payout_revenue_id
                          - country_code
                          - day_of_week
                          - transaction_id
                          - derived_referred_by
                currency_id:
                  type: string
                from:
                  type: string
                query:
                  properties:
                    exclusions:
                      type: array
                      items:
                        type: object
                        properties:
                          filter_id_value:
                            type: string
                          resource_type:
                            enum:
                              - offer
                              - offer_group
                              - affiliate
                              - advertiser
                              - creative
                              - account_manager
                              - affiliate_manager
                              - category
                              - billing_frequency
                              - country
                              - region
                              - city
                              - carrier
                              - device_platform
                              - device_type
                              - device_make
                              - browser
                              - event_name
                              - language
                              - connection_type
                              - campaign
                              - source_id
                              - transaction_id
                              - offer_url
                              - business_unit
                              - label
                              - sales_manager
                              - account_executive
                              - adv1
                              - adv2
                              - adv3
                              - adv4
                              - adv5
                              - adv6
                              - adv7
                              - adv8
                              - adv9
                              - adv10
                              - offer_status
                              - sub1
                              - sub2
                              - sub3
                              - sub4
                              - sub5
                              - sub6
                              - sub7
                              - sub8
                              - sub9
                              - sub10
                              - originating_offer
                              - channel
                              - coupon_code
                              - affiliate_tier
                              - tracking_domain
                              - country_code
                              - advertiser_billing_frequency
                            type: string
                            description: >-
                              Dimension the filter applies to. Entity dimensions take an ID, not the label
                              a group-by returns -- filter `region` by `region_id` (see /meta/regions), not
                              by "California". An unrecognised value is ignored and the report comes back
                              unfiltered.
                    filters:
                      type: array
                      items:
                        type: object
                        properties:
                          filter_id_value:
                            type: string
                          resource_type:
                            enum:
                              - offer
                              - offer_group
                              - affiliate
                              - advertiser
                              - creative
                              - account_manager
                              - affiliate_manager
                              - category
                              - billing_frequency
                              - country
                              - region
                              - city
                              - carrier
                              - device_platform
                              - device_type
                              - device_make
                              - browser
                              - event_name
                              - language
                              - connection_type
                              - campaign
                              - source_id
                              - transaction_id
                              - offer_url
                              - business_unit
                              - label
                              - sales_manager
                              - account_executive
                              - adv1
                              - adv2
                              - adv3
                              - adv4
                              - adv5
                              - adv6
                              - adv7
                              - adv8
                              - adv9
                              - adv10
                              - offer_status
                              - sub1
                              - sub2
                              - sub3
                              - sub4
                              - sub5
                              - sub6
                              - sub7
                              - sub8
                              - sub9
                              - sub10
                              - originating_offer
                              - channel
                              - coupon_code
                              - affiliate_tier
                              - tracking_domain
                              - country_code
                              - advertiser_billing_frequency
                            type: string
                            description: >-
                              Dimension the filter applies to. Entity dimensions take an ID, not the label
                              a group-by returns -- filter `region` by `region_id` (see /meta/regions), not
                              by "California". An unrecognised value is ignored and the report comes back
                              unfiltered.
                    metric_filters:
                      type: array
                      items:
                        type: object
                        properties:
                          metric_type:
                            enum:
                              - impression
                              - total_click
                              - unique_click
                              - invalid_click
                              - duplicate_click
                              - cv
                              - invalid_cv_scrub
                              - view_through_cv
                              - event
                              - payout
                              - revenue
                              - event_revenue
                              - gross_sales
                              - affiliate_event
                              - affiliate_revenue
                              - media_buying_cost
                            type: string
                          metric_value:
                            type: number
                          operator:
                            enum:
                              - less_than
                              - less_than_or_equal
                              - greater_than
                              - greater_than_or_equal
                            type: string
                    settings:
                      properties:
                        campaign_data_only:
                          type: boolean
                        ignore_fail_traffic:
                          type: boolean
                        only_include_fail_traffic:
                          type: boolean
                      type: object
                    user_metrics:
                      properties:
                        metric_aggr_function:
                          enum:
                            - sum
                            - avg
                          type: string
                        metric_type:
                          type: string
                      type: object
                  type: object
                timezone_id:
                  type: integer
                to:
                  type: string
                usm_columns:
                  items:
                    type: string
                  nullable: true
                  type: array
              type: object
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  table:
                    type: array
                    items:
                      properties:
                        columns:
                          type: array
                          description: >
                            Array of column entries matching the requested columns.
                            Note: requesting the `offer` column automatically includes
                            an `advertiser` column in the response.
                          items:
                            type: object
                            properties:
                              column_type:
                                type: string
                                description: The column type identifier.
                              id:
                                type: string
                                description: The entity ID or value for this column.
                              label:
                                type: string
                                description: Human-readable label for this column value.
                        custom_metric_columns:
                          type: array
                          description: Custom metrics configured for this network.
                          items:
                            type: object
                            properties:
                              column_type:
                                type: string
                                description: The custom metric name.
                              label:
                                type: string
                                description: The computed metric value (as a string).
                              network_reporting_custom_metric_id:
                                type: integer
                                description: ID of the custom metric definition.
                        reporting:
                          properties:
                            avg_sale_value:
                              type: number
                            cpa:
                              type: number
                            cpc:
                              type: number
                            cpm:
                              type: number
                            ctr:
                              type: number
                            cv:
                              type: integer
                            cvr:
                              type: number
                            duplicate_click:
                              type: integer
                            epc:
                              type: number
                            event:
                              type: integer
                            event_revenue:
                              type: number
                            evr:
                              type: number
                            gross_click:
                              type: integer
                            gross_sales:
                              type: number
                            imp:
                              type: integer
                            invalid_click:
                              type: integer
                            invalid_cv_scrub:
                              type: integer
                            margin:
                              type: number
                            media_buying_cost:
                              type: number
                            on_hold_conversion_count:
                              type: integer
                            on_hold_potential_payout:
                              type: number
                            on_hold_potential_revenue:
                              type: number
                            payout:
                              type: number
                            profit:
                              type: number
                            revenue:
                              type: number
                            roas:
                              type: number
                            rpa:
                              type: number
                            rpc:
                              type: number
                            rpm:
                              type: number
                            total_click:
                              type: integer
                            total_cv:
                              type: integer
                            unique_click:
                              type: integer
                            view_through_cv:
                              type: integer
                            public_events:
                              type: integer
                          type: object
                        usm_columns:
                          type: array
                          description: User-specific metric columns.
                          items:
                            type: object
                            properties:
                              column_type:
                                type: string
                              label:
                                type: string
                      type: object
                type: object
          description: ""
      security:
        - API Key: []
  /networks/reporting/entity/summary:
    post:
      summary: Get Reporting Summary
      tags:
        - Reporting
      requestBody:
        required: true
        content:
          application/json:
            example:
              from: "2026-03-01"
              to: "2026-03-08"
              timezone_id: 90
              currency_id: "USD"
              columns:
                - column: "offer"
            schema:
              type: object
              required:
                - from
                - to
                - timezone_id
                - currency_id
              properties:
                from:
                  type: string
                  description: "Start date (format: YYYY-MM-DD)."
                to:
                  type: string
                  description: "End date (format: YYYY-MM-DD)."
                timezone_id:
                  type: integer
                  description: Timezone ID for the report.
                currency_id:
                  type: string
                  description: Currency code for reporting metrics.
                columns:
                  type: array
                  description: >
                    Columns to group/pivot data by. The summary totals are not
                    affected by the columns value; however, filters and metric_filters
                    still apply. This field is optional but typically included
                    when using this endpoint alongside the entity/table endpoint.
                  items:
                    type: object
                    required:
                      - column
                    properties:
                      column:
                        type: string
                        description: The dimension to group by.
                query:
                  type: object
                  description: Optional filters to narrow the report scope.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  imp:
                    type: integer
                    description: Total impressions.
                  total_click:
                    type: integer
                    description: Total clicks.
                  unique_click:
                    type: integer
                    description: Unique clicks.
                  invalid_click:
                    type: integer
                    description: Invalid clicks.
                  duplicate_click:
                    type: integer
                    description: Duplicate clicks.
                  gross_click:
                    type: integer
                    description: Gross clicks (total + invalid + duplicate).
                  ctr:
                    type: number
                    description: Click-through rate.
                  cv:
                    type: integer
                    description: Total conversions.
                  invalid_cv_scrub:
                    type: integer
                    description: Scrubbed/throttled conversions.
                  view_through_cv:
                    type: integer
                    description: View-through conversions.
                  total_cv:
                    type: integer
                    description: Total conversions including scrubbed and view-through.
                  event:
                    type: integer
                    description: Total events.
                  cvr:
                    type: number
                    description: Conversion rate.
                  evr:
                    type: number
                    description: Event rate.
                  cpc:
                    type: number
                    description: Cost per click.
                  cpm:
                    type: number
                    description: Cost per mille (thousand impressions).
                  cpa:
                    type: number
                    description: Cost per action.
                  epc:
                    type: number
                    description: Earnings per click.
                  rpc:
                    type: number
                    description: Revenue per click.
                  rpa:
                    type: number
                    description: Revenue per action.
                  rpm:
                    type: number
                    description: Revenue per mille (thousand impressions).
                  payout:
                    type: number
                    description: Total payout.
                  revenue:
                    type: number
                    description: Total revenue.
                  event_revenue:
                    type: number
                    description: Revenue from events.
                  gross_sales:
                    type: number
                    description: Gross sales amount.
                  profit:
                    type: number
                    description: Total profit.
                  margin:
                    type: number
                    description: Profit margin percentage.
                  roas:
                    type: number
                    description: Return on ad spend.
                  avg_sale_value:
                    type: number
                    description: Average sale value.
                  media_buying_cost:
                    type: number
                    description: Media buying cost.
                  on_hold_potential_revenue:
                    type: integer
                    description: Potential revenue from on-hold conversions.
                  on_hold_potential_payout:
                    type: integer
                    description: Potential payout from on-hold conversions.
                  on_hold_conversion_count:
                    type: integer
                    description: Number of on-hold conversions.
                  public_events:
                    type: integer
                    description: Total public events.
      security:
        - API Key: []

  /networks/reporting/variance:
    post:
      summary: Get Variance Report
      tags:
        - Reporting
      requestBody:
        required: true
        content:
          application/json:
            example:
              current_from: "2024-02-01"
              current_to: "2024-02-28"
              previous_from: "2024-01-01"
              previous_to: "2024-01-31"
              timezone_id: 90
              currency_id: "USD"
              columns:
                - column: "offer"
            schema:
              type: object
              required:
                - current_from
                - current_to
                - previous_from
                - previous_to
                - timezone_id
                - currency_id
                - columns
              properties:
                current_from:
                  type: string
                  description: "Current period start date (format: YYYY-MM-DD)."
                current_to:
                  type: string
                  description: "Current period end date (format: YYYY-MM-DD)."
                previous_from:
                  type: string
                  description: "Previous (comparison) period start date (format: YYYY-MM-DD)."
                previous_to:
                  type: string
                  description: "Previous (comparison) period end date (format: YYYY-MM-DD)."
                timezone_id:
                  type: integer
                  description: Timezone ID for the report.
                currency_id:
                  type: string
                  description: Currency code for reporting metrics.
                columns:
                  type: array
                  items:
                    type: string
                  description: Columns to group by.
                query:
                  type: object
                  description: Optional filters to narrow the report scope.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  table:
                    type: array
                    items:
                      type: object
                      properties:
                        columns:
                          type: array
                          items:
                            type: object
                            properties:
                              column_type:
                                type: string
                              id:
                                type: string
                              label:
                                type: string
                        current_reporting:
                          type: object
                          description: Aggregated metrics for the current period.
                        previous_reporting:
                          type: object
                          description: Aggregated metrics for the previous period.
                        current_custom_metric_columns:
                          type: array
                          items:
                            type: object
                        previous_custom_metric_columns:
                          type: array
                          items:
                            type: object
                  summary:
                    type: object
                    description: Overall summary metrics across the current period.
                  performance:
                    type: object
                    description: Date range metadata for both periods.
                    properties:
                      current_range:
                        type: object
                      previous_range:
                        type: object
                  incomplete_results:
                    type: boolean
                    description: Whether the results are incomplete due to data limits.
      security:
        - API Key: []

  /networks/reporting/postconversions:
    post:
      summary: Search Post-Conversion Events
      tags:
        - Reporting
      requestBody:
        required: true
        content:
          application/json:
            example:
              from: "2026-03-01"
              to: "2026-03-08"
              timezone_id: 90
              currency_id: "USD"
              columns:
                - column: "offer"
                - column: "affiliate"
                - column: "event_name"
            schema:
              type: object
              required:
                - from
                - to
                - timezone_id
                - columns
              properties:
                from:
                  type: string
                  description: "Start date (format: `YYYY-MM-DD` or `YYYY-MM-DD HH:mm:SS`)."
                to:
                  type: string
                  description: "End date (format: `YYYY-MM-DD` or `YYYY-MM-DD HH:mm:SS`)."
                timezone_id:
                  type: integer
                  description: Timezone ID for the report.
                currency_id:
                  type: string
                  description: Currency code for monetary values. Currently only `USD` is supported.
                columns:
                  type: array
                  description: >
                    Columns to break down the data by. Must include a pivot column
                    (`event_name` or `advertiser_event_name`) plus one or two
                    additional columns.
                  items:
                    type: object
                    required:
                      - column
                    properties:
                      column:
                        type: string
                        description: The dimension to group by.
                        enum:
                          - offer
                          - affiliate
                          - advertiser
                          - campaign
                          - offer_group
                          - country
                          - category
                          - date
                          - month
                          - week
                          - platform
                          - browser
                          - device_type
                          - device_brand
                          - affiliate_manager
                          - account_manager
                          - event_name
                          - advertiser_event_name
                          - source_id
                          - sub1
                          - sub2
                          - label
                          - offer_url
                          - billing_frequency
                          - currency_id
                          - affiliate_tier
                          - region
                          - city
                          - carrier
                          - isp
                          - os_version
                          - language
                          - dma
                          - hour
                          - hourly
                          - coupon_code
                          - project_id
                          - tracking_domain
                          - business_unit
                          - referrer
                          - offer_status
                          - payout_type
                          - revenue_type
                query:
                  type: object
                  description: Optional filters to narrow results.
                  properties:
                    filters:
                      type: array
                      items:
                        type: object
                        properties:
                          resource_type:
                            type: string
                            enum:
                              - offer
                              - offer_group
                              - affiliate
                              - advertiser
                              - offer_creative
                              - transaction_id
                              - campaign
                              - billing_frequency
                              - business_unit
                              - label
                              - category
                              - sub1
                              - sub2
                              - sub3
                              - sub4
                              - sub5
                              - sub6
                              - sub7
                              - sub8
                              - sub9
                              - sub10
                              - source_id
                              - country
                              - account_manager
                              - affiliate_manager
                              - sales_manager
                              - account_executive
                              - offer_url
                              - currency_id
                              - affiliate_tier
                              - adv1
                              - adv2
                              - adv3
                              - adv4
                              - adv5
                              - adv6
                              - adv7
                              - adv8
                              - adv9
                              - adv10
                              - browser
                              - carrier
                              - city
                              - coupon_code
                              - dma
                              - date
                              - hourly
                              - device_brand
                              - device_type
                              - hour
                              - isp
                              - language
                              - month
                              - os_version
                              - payout_amount
                              - payout_type
                              - platform
                              - project_id
                              - referrer
                              - region
                              - revenue_amount
                              - revenue_type
                              - week
                              - conversion_id
                              - order_id
                              - tracking_domain
                              - offer_payout_revenue_id
                              - country_code
                              - advertiser_billing_frequency
                              - error_code
                          filter_id_value:
                            type: string
                    search_terms:
                      type: array
                      items:
                        type: object
                        properties:
                          search_type:
                            type: string
                            enum:
                              - transaction_id
                              - sub_1
                              - sub_2
                              - sub_3
                              - sub_4
                              - sub_5
                              - adv_1
                              - adv_2
                              - adv_3
                              - adv_4
                              - adv_5
                              - source_id
                              - user_ip
                              - user_agent
                              - order_id
                              - country
                              - region
                              - city
                              - status
                              - is_scrub
                              - email
                              - coupon_code
                              - event_name
                          value:
                            type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  report:
                    type: array
                    items:
                      type: object
                      properties:
                        columns:
                          type: array
                          items:
                            type: object
                            properties:
                              column_type:
                                type: string
                                description: The dimension this column represents.
                              id:
                                type: string
                                description: The unique identifier for this column value.
                              label:
                                type: string
                                description: Human-readable label for this column value.
                        reporting:
                          type: object
                          description: Aggregated reporting metrics for this row.
                          properties:
                            imp:
                              type: integer
                              description: Impression count.
                            total_click:
                              type: integer
                              description: Total click count.
                            ctr:
                              type: number
                              description: Click-through rate.
                            total_cv:
                              type: integer
                              description: Total conversion count.
                            cv:
                              type: integer
                              description: Conversion count.
                            view_through_cv:
                              type: integer
                              description: View-through conversion count.
                            total_event:
                              type: integer
                              description: Total event count.
                            event:
                              type: integer
                              description: Event count.
                            view_through_event:
                              type: integer
                              description: View-through event count.
                            evr:
                              type: number
                              description: Event rate.
                            payout:
                              type: number
                              description: Total payout amount.
                            revenue:
                              type: number
                              description: Total revenue amount.
                            event_revenue:
                              type: number
                              description: Revenue from events.
                            profit:
                              type: number
                              description: Revenue minus payout.
                            margin:
                              type: number
                              description: Profit margin percentage.
                            gross_sales:
                              type: number
                              description: Total gross sales amount.
                            view_through_gross_sales:
                              type: number
                              description: View-through gross sales.
                            avg_sale_value:
                              type: number
                              description: Average sale value.
                            roas:
                              type: number
                              description: Return on ad spend.
      security:
        - API Key: []

  /networks/reporting/mtti/table:
    post:
      summary: Get MTTI Report
      tags:
        - Reporting
      requestBody:
        required: true
        content:
          application/json:
            example:
              from: "2024-01-01"
              to: "2024-01-31"
              timezone_id: 90
              time_unit: "days"
              query:
                filters: []
                search_terms: []
              columns:
                - "offer"
                - "affiliate"
            schema:
              type: object
              required:
                - from
                - to
                - timezone_id
                - time_unit
              properties:
                from:
                  type: string
                  description: "Start date (format: YYYY-MM-DD)."
                to:
                  type: string
                  description: "End date (format: YYYY-MM-DD)."
                timezone_id:
                  type: integer
                  description: Timezone ID for the report.
                time_unit:
                  type: string
                  description: Time unit for aggregation.
                  enum:
                    - unknown
                    - seconds
                    - minutes
                    - hours
                    - days
                currency_id:
                  type: string
                  description: Currency code for reporting metrics.
                query:
                  type: object
                  description: Optional filters to narrow results.
                  properties:
                    filters:
                      type: array
                      items:
                        type: object
                      description: Array of filter objects to narrow results.
                    search_terms:
                      type: array
                      items:
                        type: object
                      description: Array of search term objects.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                description: MTTI report data with average time-to-install metrics.
      security:
        - API Key: []

components:
  securitySchemes:
    API Key:
      description: The Everflow API key generated from the Control Center > Security.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey
