swagger: "2.0"
info:
  title: FunnelFlux Reporting API
  description: >-
    FunnelFlux Reporting API endpoints for creating drilldown reports, raw event
    reports, and visitor or hit lookups.


    Use these APIs to inspect reporting attributes, query postback logs, submit
    conversion and cost updates, and run scoped data resets.
  version: 1.0.0
  contact:
    name: FunnelFlux Support
    url: mailto:support@funnelflux.pro
    email: support@funnelflux.pro
  termsOfService: https://funnelflux.com/pro/terms-and-conditions/
host: api.funnelflux.pro
basePath: /v1
schemes:
  - https
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  Bearer:
    type: apiKey
    name: Authorization
    in: header
    description: "All requests must pass a valid header of `Authorization: Bearer TOKEN`"
  apiKeyInQuery:
    type: apiKey
    in: query
    name: key
    description: Optionally, integration APIs may use an API key (not for consumer API use)
security:
  - Bearer: []
  - apiKeyInQuery: []
tags:
  - name: Reporting
    description: Drilldown, raw event, and attribute reporting endpoints
  - name: Updates
    description: Conversion, cost, and reset update endpoints
  - name: Logs
    description: Postback log endpoints
  - name: Explorer
    description: Visitor and hit lookup endpoints
paths:
  /reporting/attributes/:
    get:
      tags:
        - Reporting
      description: Returns the list of available attributes
      summary: List available attributes
      responses:
        "200":
          description: The attributes list as a string array
          schema:
            type: array
            items:
              $ref: "#/definitions/Attribute"
        "403":
          description: Not authorized
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
  /reporting/drilldown/:
    post:
      tags:
        - Reporting
      description: Create and run a new drilldown report. If you would like a report
        to use unique visitor counts, pass returnUniqueVisitors = true and
        include Visitors in the restrictToMetrics array.
      summary: Create a drilldown report
      parameters:
        - name: body
          required: true
          in: body
          schema:
            $ref: "#/definitions/DrilldownReportParams"
      responses:
        "200":
          description: The requested report
          schema:
            $ref: "#/definitions/DrilldownReport"
        "403":
          description: Not authorized
        "429":
          description: Rate limit exceeded
          headers:
            Retry-After:
              type: integer
          schema:
            $ref: "#/definitions/RateLimitError"
        "503":
          description: Maintenance Mode
          headers:
            Retry-After:
              type: integer
          schema:
            type: string
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
  /reporting/hits/:
    post:
      tags:
        - Reporting
      description: Create and run a new hit-level report
      summary: Create a raw event report
      parameters:
        - name: body
          required: true
          in: body
          schema:
            $ref: "#/definitions/HitReportParams"
      responses:
        "200":
          description: The requested report
          schema:
            $ref: "#/definitions/HitReport"
        "403":
          description: Not authorized
        "429":
          description: Rate limit exceeded
          headers:
            Retry-After:
              type: integer
          schema:
            $ref: "#/definitions/RateLimitError"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
  /reporting/logs/postbacks:
    post:
      tags:
        - Logs
      description: Returns postback log for specified criteria.
      summary: Get postback log
      parameters:
        - name: body
          required: true
          in: body
          schema:
            $ref: "#/definitions/PostbackLogParams"
      responses:
        "200":
          description: The requested report
          schema:
            $ref: "#/definitions/PostbackLogReport"
        "403":
          description: Not authorized
        "429":
          description: Rate limit exceeded
          headers:
            Retry-After:
              type: integer
          schema:
            $ref: "#/definitions/RateLimitError"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
  /reporting/update/conversions/:
    put:
      tags:
        - Updates
      description: Add new or update existing conversions
      summary: Submit a conversion update
      parameters:
        - name: body
          required: true
          in: body
          schema:
            $ref: "#/definitions/ConversionsUpdateParams"
      responses:
        "200":
          description: Update queued for processing
        "403":
          description: Not authorized
        "503":
          description: Maintenance Mode
          headers:
            Retry-After:
              type: string
          schema:
            type: string
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
  /reporting/update/cost/:
    put:
      tags:
        - Updates
      description: Update the cost of specific traffic segments
      summary: Submit a cost update
      parameters:
        - name: body
          required: true
          in: body
          schema:
            $ref: "#/definitions/CostUpdateParams"
      responses:
        "200":
          description: Update queued for processing
        "403":
          description: Not authorized
        "503":
          description: Maintenance Mode
          headers:
            Retry-After:
              type: string
          schema:
            type: string
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
  /reporting/update/reset/:
    delete:
      tags:
        - Updates
      summary: Perform a data reset
      description: Reset stats of specific traffic segments
      parameters:
        - name: body
          required: true
          in: body
          schema:
            $ref: "#/definitions/ResetUpdateParams"
      responses:
        "200":
          description: Reset queued for processing
        "403":
          description: Not authorized
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
    post:
      tags:
        - Updates
      description: Get the number of hits that would be deleted with the specified settings
      summary: Validate a data reset
      parameters:
        - name: body
          required: true
          in: body
          schema:
            $ref: "#/definitions/ResetUpdateParams"
      responses:
        "200":
          description: The number of would-be impacted hits
          schema:
            $ref: "#/definitions/IntegerValue"
        "403":
          description: Not authorized
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
  /logs/postbacks/:
    post:
      tags:
        - Logs
      description: Returns postback log for specified criteria.
      summary: Get postback log
      parameters:
        - name: body
          required: true
          in: body
          schema:
            $ref: "#/definitions/PostbackLogCriteria"
      responses:
        "200":
          description: The postback log
          schema:
            $ref: "#/definitions/PostbackLog"
        "403":
          description: Not authorized
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
  /reporting/explorer/visitor:
    post:
      tags:
        - Explorer
      description: |-
        Look up a visitor's session and hit history. Provide either a visitorId
        (with timeStart/timeEnd) or a hitId to find the visitor.
      summary: Look up a visitor
      parameters:
        - name: body
          required: true
          in: body
          schema:
            $ref: "#/definitions/ExplorerVisitorRequest"
      responses:
        "200":
          description: The visitor info and their hit list
          schema:
            $ref: "#/definitions/ExplorerVisitorResponse"
        "400":
          description: Invalid request format
        "401":
          description: Missing owner context
        "403":
          description: Not authorized
        "422":
          description: Validation error (visitorId or hitId required; timeStart/timeEnd
            required with visitorId)
        "429":
          description: Rate limit exceeded
          headers:
            Retry-After:
              type: integer
          schema:
            $ref: "#/definitions/RateLimitError"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
  /reporting/explorer/hit:
    post:
      tags:
        - Explorer
      description: |-
        Look up full details for a single hit by its ID. Returns all event,
        device, geo, connection, and tracking data for the hit.
      summary: Look up a single hit
      parameters:
        - name: body
          required: true
          in: body
          schema:
            $ref: "#/definitions/ExplorerHitRequest"
      responses:
        "200":
          description: The full hit detail
          schema:
            $ref: "#/definitions/ExplorerHitResponse"
        "400":
          description: Invalid request format
        "401":
          description: Missing owner context
        "403":
          description: Not authorized
        "422":
          description: Validation error (hitId is required)
        "429":
          description: Rate limit exceeded
          headers:
            Retry-After:
              type: integer
          schema:
            $ref: "#/definitions/RateLimitError"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
definitions:
  DrilldownReportParams:
    type: object
    required:
      - timeStart
      - timeEnd
      - attributes
    properties:
      timeStart:
        type: string
        format: date-time
        x-nullable: false
        x-order: 1
      timeEnd:
        type: string
        format: date-time
        x-nullable: false
        x-order: 2
      useEntranceTime:
        type: boolean
        x-nullable: false
        default: false
        x-order: 3
      attributes:
        type: array
        items:
          $ref: "#/definitions/AttributeData"
        x-nullable: false
        x-order: 4
      filters:
        type: array
        items:
          $ref: "#/definitions/AttributeData"
        x-nullable: false
        x-order: 5
      showFilteredTraffic:
        type: boolean
        default: false
        x-nullable: false
        x-order: 6
      includeAssetsWithoutTraffic:
        type: boolean
        default: false
        x-nullable: false
        x-order: 7
      returnUniqueVisitors:
        type: boolean
        default: false
        x-nullable: false
        x-order: 8
      restrictToMetrics:
        type: array
        description: >-
          If empty, returns all metrics. Can restrict the response to any
          combination of the following metrics:
            * Visits
            * Visitors
            * Cost
            * NodeViews
            * NodeViewsUnique
            * LanderViews
            * LanderViewsUnique
            * LanderClicks
            * LanderClicksUnique
            * OfferViews
            * OfferViewsUnique
            * OfferClicks
            * OfferClicksUnique
            * Conversions
            * Revenue
            * TotalRevenue
            * CustomEvent1
            * CustomEvent2
            * CustomEvent3
            * CustomEvent4
            * CustomEvent5
            * CustomEvent6
            * CustomEvent7
            * CustomEvent8
            * CustomEvent9
            * CustomEvent10
            * PageViews
            * PageViewsUnique
            * PageClicks
            * PageClicksUnique
        items:
          type: string
        x-nullable: true
        x-order: 9
      calculatedMetrics:
        type: array
        description: |-
          Can get the following calculated metrics:
            * lander_ctr
            * offer_ctr
            * unique_lander_ctr
            * unique_offer_ctr
            * lander_ctr_unique (alias for unique_lander_ctr)
            * offer_ctr_unique (alias for unique_offer_ctr)
            * ctr (general click-through rate)
            * unique_ctr (unique combined CTR)
            * conversion_per_lander_click
            * conversion_per_lander_view
            * conversion_per_offer_click
            * conversion_per_offer_view
            * conversion_per_unique_lander_click
            * conversion_per_unique_lander_view
            * conversion_per_unique_offer_click
            * conversion_per_unique_offer_view
            * conversion_per_unique_visitor
            * conversion_per_visit
            * custom_event_x_per_visit
            * cost_per_conversion
            * cost_per_event_x
            * cost_per_lander_click
            * cost_per_lander_view
            * cost_per_offer_click
            * cost_per_offer_view
            * cost_per_unique_lander_click
            * cost_per_unique_lander_view
            * cost_per_unique_offer_click
            * cost_per_unique_offer_view
            * cost_per_unique_visitor
            * cost_per_visit
            * cost_per_visitor
            * uniqueness
            * profit_and_loss
            * roi
            * epv (earnings per visit)
            * epc (earnings per click)
            * revenue_per_conversion
            * revenue_per_event_x
            * revenue_per_lander_click
            * revenue_per_lander_view
            * revenue_per_offer_click
            * revenue_per_offer_view
            * revenue_per_unique_lander_click
            * revenue_per_unique_lander_view
            * revenue_per_unique_offer_click
            * revenue_per_unique_offer_view
            * revenue_per_unique_visitor
            * revenue_per_visit
            * revenue_per_visitor
            * revenue_per_page_view
            * revenue_per_page_click
            * cost_per_page_view
            * cost_per_page_click
            * conversion_per_page_view
            * conversion_per_page_click
            * rollup_visitors (journey tree internal)
            * rollup_conversions (journey tree internal)
            * rollup_revenue (journey tree internal)
        items:
          type: string
        x-nullable: true
        x-order: 10
      sortByAttributes:
        type: array
        default: []
        x-nullable: false
        items:
          type: string
        x-order: 11
      statusFilter:
        description: >-
          Filters zero-traffic assets by status when includeAssetsWithoutTraffic
          is true.

          Only effective with includeAssetsWithoutTraffic=true; ignored
          otherwise.

          Values: "active" (only active assets), "archived" (only archived
          assets),

          "not-deleted" or empty (all non-deleted assets, the default).
        type: string
        enum:
          - active
          - archived
          - not-deleted
        x-nullable: false
        x-order: 12
      returnAssetURL:
        description: |-
          When true, includes offerURL, offerPayout, and landerURL fields on
          applicable row attributes. Requires additional asset metadata lookups.
        type: boolean
        default: false
        x-nullable: false
        x-order: 13
      campaignIDs:
        description: DEPRECATED
        type: array
        items:
          type: string
        default: []
        x-nullable: false
        x-order: 14
      funnelIDs:
        description: DEPRECATED
        type: array
        items:
          type: string
        default: []
        x-nullable: false
        x-order: 15
      trafficSourceIDs:
        description: DEPRECATED
        type: array
        items:
          type: string
        default: []
        x-nullable: false
        x-order: 16
      pageIDs:
        description: DEPRECATED
        type: array
        items:
          type: string
        default: []
        x-nullable: false
        x-order: 17
      offerSourceIDs:
        description: DEPRECATED
        type: array
        items:
          type: string
        default: []
        x-nullable: false
        x-order: 18
      subCampaigns:
        description: DEPRECATED
        type: array
        items:
          type: string
        default: []
        x-nullable: false
        x-order: 19
  DrilldownReport:
    type: object
    required:
      - columns
      - rows
    properties:
      columns:
        $ref: "#/definitions/DrilldownReportColumns"
      rows:
        type: array
        items:
          $ref: "#/definitions/DrilldownReportRow"
        x-nullable: false
      rootRows:
        description: >-
          Root-level rows for journey tree reports. Only present for
          journey-mode reports.

          Contains the top-level funnel entries before tree expansion.
        type: array
        items:
          $ref: "#/definitions/DrilldownReportRow"
        x-nullable: true
      entities:
        description: >-
          DEPRECATED in V2. Category and offer source metadata is now embedded
          directly

          on each row attribute via categoryID and offerSourceID fields.

          This field is omitted from V2 responses.
        $ref: "#/definitions/DrilldownReportEntities"
        x-nullable: true
      journeyData:
        description: >-
          Aggregate totals for journey tree reports. Only present for
          journey-mode reports.

          Omitted (absent from JSON) when not applicable, rather than null.
        x-nullable: true
        $ref: "#/definitions/DrilldownReportRow"
  DrilldownReportColumns:
    type: object
    x-nullable: false
    required:
      - attributes
    properties:
      attributes:
        type: array
        items:
          $ref: "#/definitions/Attribute"
        x-nullable: false
  DrilldownReportCustomEventMetric:
    x-nullable: false
    type: object
    required:
      - count
      - revenue
    properties:
      count:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      revenue:
        $ref: "#/definitions/Decimal"
  DrilldownReportRow:
    type: object
    required:
      - attributes
      - visitors
      - visits
      - cost
      - nodeViews
      - nodeViewsUnique
      - landerViews
      - landerViewsUnique
      - landerClicks
      - landerClicksUnique
      - offerViews
      - offerViewsUnique
      - offerClicks
      - offerClicksUnique
      - conversions
      - revenue
      - totalRevenue
    properties:
      attributes:
        type: array
        items:
          $ref: "#/definitions/DrilldownReportRowAttribute"
        x-nullable: false
      visitors:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      visits:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      cost:
        $ref: "#/definitions/Decimal"
      nodeViews:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      nodeViewsUnique:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      landerViews:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      landerViewsUnique:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      landerClicks:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      landerClicksUnique:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      offerViews:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      offerViewsUnique:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      offerClicks:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      offerClicksUnique:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      pageViews:
        type: number
        format: int64
        minimum: 0
        x-nullable: true
      pageViewsUnique:
        type: number
        format: int64
        minimum: 0
        x-nullable: true
      pageClicks:
        type: number
        format: int64
        minimum: 0
        x-nullable: true
      pageClicksUnique:
        type: number
        format: int64
        minimum: 0
        x-nullable: true
      conversions:
        type: number
        format: int64
        minimum: 0
        x-nullable: false
      revenue:
        $ref: "#/definitions/Decimal"
      totalRevenue:
        $ref: "#/definitions/Decimal"
      calculatedMetrics:
        $ref: "#/definitions/DrilldownReportRowCalculatedMetrics"
        x-nullable: false
      customEvent1:
        type: object
        x-nullable: true
        properties:
          count:
            type: number
            format: int64
            minimum: 0
            x-nullable: false
          revenue:
            $ref: "#/definitions/Decimal"
      customEvent2:
        type: object
        x-nullable: true
        properties:
          count:
            type: number
            format: int64
            minimum: 0
            x-nullable: false
          revenue:
            $ref: "#/definitions/Decimal"
      customEvent3:
        type: object
        x-nullable: true
        properties:
          count:
            type: number
            format: int64
            minimum: 0
            x-nullable: false
          revenue:
            $ref: "#/definitions/Decimal"
      customEvent4:
        type: object
        x-nullable: true
        properties:
          count:
            type: number
            format: int64
            minimum: 0
            x-nullable: false
          revenue:
            $ref: "#/definitions/Decimal"
      customEvent5:
        type: object
        x-nullable: true
        properties:
          count:
            type: number
            format: int64
            minimum: 0
            x-nullable: false
          revenue:
            $ref: "#/definitions/Decimal"
      customEvent6:
        type: object
        x-nullable: true
        properties:
          count:
            type: number
            format: int64
            minimum: 0
            x-nullable: false
          revenue:
            $ref: "#/definitions/Decimal"
      customEvent7:
        type: object
        x-nullable: true
        properties:
          count:
            type: number
            format: int64
            minimum: 0
            x-nullable: false
          revenue:
            $ref: "#/definitions/Decimal"
      customEvent8:
        type: object
        x-nullable: true
        properties:
          count:
            type: number
            format: int64
            minimum: 0
            x-nullable: false
          revenue:
            $ref: "#/definitions/Decimal"
      customEvent9:
        type: object
        x-nullable: true
        properties:
          count:
            type: number
            format: int64
            minimum: 0
            x-nullable: false
          revenue:
            $ref: "#/definitions/Decimal"
      customEvent10:
        type: object
        x-nullable: true
        properties:
          count:
            type: number
            format: int64
            minimum: 0
            x-nullable: false
          revenue:
            $ref: "#/definitions/Decimal"
      children:
        type: object
        x-nullable: true
        additionalProperties:
          x-nullable: true
          $ref: "#/definitions/DrilldownReportRow"
      index:
        type: number
        format: int64
        minimum: 1
        x-nullable: false
  DrilldownReportEntities:
    type: object
    x-nullable: false
    properties:
      categories:
        type: array
        items:
          $ref: "#/definitions/Category"
        x-nullable: false
      offerSources:
        type: array
        items:
          $ref: "#/definitions/OfferSource"
        x-nullable: false
  DrilldownReportRowAttribute:
    type: object
    required:
      - attribute
      - id
      - value
      - status
    properties:
      attribute:
        type: string
        x-nullable: false
      id:
        type: string
        x-nullable: false
      value:
        type: string
        x-nullable: false
      info:
        type: string
        x-nullable: false
      status:
        $ref: "#/definitions/Status"
        x-nullable: false
      nodeID:
        description: Journey tree node identifier. Only present for journey-mode reports.
        type: string
        x-nullable: false
      categoryID:
        type: string
        x-nullable: false
      offerSourceID:
        type: string
        x-nullable: false
      offerURL:
        description: Offer destination URL. Only present when returnAssetURL is true in
          the request.
        type: string
        x-nullable: false
      offerPayout:
        description: Offer default payout. Only present when returnAssetURL is true in
          the request.
        type: string
        x-nullable: false
      landerURL:
        description: Lander destination URL. Only present when returnAssetURL is true in
          the request.
        type: string
        x-nullable: false
  DrilldownReportRowCalculatedMetrics:
    type: object
    properties:
      lander_ctr:
        type: number
        format: float64
        x-nullable: true
      offer_ctr:
        type: number
        format: float64
        x-nullable: true
      unique_lander_ctr:
        type: number
        format: float64
        x-nullable: true
      unique_offer_ctr:
        type: number
        format: float64
        x-nullable: true
      conversion_per_lander_click:
        type: number
        format: float64
        x-nullable: true
      conversion_per_lander_view:
        type: number
        format: float64
        x-nullable: true
      conversion_per_offer_click:
        type: number
        format: float64
        x-nullable: true
      conversion_per_offer_view:
        type: number
        format: float64
        x-nullable: true
      conversion_per_unique_lander_click:
        type: number
        format: float64
        x-nullable: true
      conversion_per_unique_lander_view:
        type: number
        format: float64
        x-nullable: true
      conversion_per_unique_offer_click:
        type: number
        format: float64
        x-nullable: true
      conversion_per_unique_offer_view:
        type: number
        format: float64
        x-nullable: true
      conversion_per_unique_visitor:
        type: number
        format: float64
        x-nullable: true
      conversion_per_visit:
        type: number
        format: float64
        x-nullable: true
      custom_event_1_per_visit:
        type: number
        format: float64
        x-nullable: true
      custom_event_2_per_visit:
        type: number
        format: float64
        x-nullable: true
      custom_event_3_per_visit:
        type: number
        format: float64
        x-nullable: true
      custom_event_4_per_visit:
        type: number
        format: float64
        x-nullable: true
      custom_event_5_per_visit:
        type: number
        format: float64
        x-nullable: true
      custom_event_6_per_visit:
        type: number
        format: float64
        x-nullable: true
      custom_event_7_per_visit:
        type: number
        format: float64
        x-nullable: true
      custom_event_8_per_visit:
        type: number
        format: float64
        x-nullable: true
      custom_event_9_per_visit:
        type: number
        format: float64
        x-nullable: true
      custom_event_10_per_visit:
        type: number
        format: float64
        x-nullable: true
      cost_per_conversion:
        type: number
        format: float64
        x-nullable: true
      cost_per_event_1:
        type: number
        format: float64
        x-nullable: true
      cost_per_event_2:
        type: number
        format: float64
        x-nullable: true
      cost_per_event_3:
        type: number
        format: float64
        x-nullable: true
      cost_per_event_4:
        type: number
        format: float64
        x-nullable: true
      cost_per_event_5:
        type: number
        format: float64
        x-nullable: true
      cost_per_event_6:
        type: number
        format: float64
        x-nullable: true
      cost_per_event_7:
        type: number
        format: float64
        x-nullable: true
      cost_per_event_8:
        type: number
        format: float64
        x-nullable: true
      cost_per_event_9:
        type: number
        format: float64
        x-nullable: true
      cost_per_event_10:
        type: number
        format: float64
        x-nullable: true
      cost_per_lander_click:
        type: number
        format: float64
        x-nullable: true
      cost_per_lander_view:
        type: number
        format: float64
        x-nullable: true
      cost_per_offer_click:
        type: number
        format: float64
        x-nullable: true
      cost_per_offer_view:
        type: number
        format: float64
        x-nullable: true
      cost_per_unique_lander_click:
        type: number
        format: float64
        x-nullable: true
      cost_per_unique_lander_view:
        type: number
        format: float64
        x-nullable: true
      cost_per_unique_offer_click:
        type: number
        format: float64
        x-nullable: true
      cost_per_unique_offer_view:
        type: number
        format: float64
        x-nullable: true
      cost_per_unique_visitor:
        type: number
        format: float64
        x-nullable: true
      cost_per_visit:
        type: number
        format: float64
        x-nullable: true
      cost_per_visitor:
        type: number
        format: float64
        x-nullable: true
      uniqueness:
        type: number
        format: float64
        x-nullable: true
      profit_and_loss:
        type: number
        format: float64
        x-nullable: true
      roi:
        type: number
        format: float64
        x-nullable: true
      revenue_per_conversion:
        type: number
        format: float64
        x-nullable: true
      revenue_per_event_1:
        type: number
        format: float64
        x-nullable: true
      revenue_per_event_2:
        type: number
        format: float64
        x-nullable: true
      revenue_per_event_3:
        type: number
        format: float64
        x-nullable: true
      revenue_per_event_4:
        type: number
        format: float64
        x-nullable: true
      revenue_per_event_5:
        type: number
        format: float64
        x-nullable: true
      revenue_per_event_6:
        type: number
        format: float64
        x-nullable: true
      revenue_per_event_7:
        type: number
        format: float64
        x-nullable: true
      revenue_per_event_8:
        type: number
        format: float64
        x-nullable: true
      revenue_per_event_9:
        type: number
        format: float64
        x-nullable: true
      revenue_per_event_10:
        type: number
        format: float64
        x-nullable: true
      revenue_per_lander_click:
        type: number
        format: float64
        x-nullable: true
      revenue_per_lander_view:
        type: number
        format: float64
        x-nullable: true
      revenue_per_offer_click:
        type: number
        format: float64
        x-nullable: true
      revenue_per_offer_view:
        type: number
        format: float64
        x-nullable: true
      revenue_per_unique_lander_click:
        type: number
        format: float64
        x-nullable: true
      revenue_per_unique_lander_view:
        type: number
        format: float64
        x-nullable: true
      revenue_per_unique_offer_click:
        type: number
        format: float64
        x-nullable: true
      revenue_per_unique_offer_view:
        type: number
        format: float64
        x-nullable: true
      revenue_per_unique_visitor:
        type: number
        format: float64
        x-nullable: true
      revenue_per_visit:
        type: number
        format: float64
        x-nullable: true
      revenue_per_visitor:
        type: number
        format: float64
        x-nullable: true
      lander_ctr_unique:
        description: Alias for unique_lander_ctr
        type: number
        format: float64
        x-nullable: true
      offer_ctr_unique:
        description: Alias for unique_offer_ctr
        type: number
        format: float64
        x-nullable: true
      ctr:
        description: General click-through rate
        type: number
        format: float64
        x-nullable: true
      unique_ctr:
        description: Combined unique click-through rate
        type: number
        format: float64
        x-nullable: true
      revenue_per_page_view:
        type: number
        format: float64
        x-nullable: true
      revenue_per_page_click:
        type: number
        format: float64
        x-nullable: true
      cost_per_page_view:
        type: number
        format: float64
        x-nullable: true
      cost_per_page_click:
        type: number
        format: float64
        x-nullable: true
      conversion_per_page_view:
        type: number
        format: float64
        x-nullable: true
      conversion_per_page_click:
        type: number
        format: float64
        x-nullable: true
      epv:
        description: Earnings per visit
        type: number
        format: float64
        x-nullable: true
      epc:
        description: Earnings per click
        type: number
        format: float64
        x-nullable: true
      rollup_visitors:
        description: Journey tree rollup - total visitors through this path
        type: number
        format: float64
        x-nullable: true
      rollup_conversions:
        description: Journey tree rollup - total conversions through this path
        type: number
        format: float64
        x-nullable: true
      rollup_revenue:
        description: Journey tree rollup - total revenue through this path
        type: number
        format: float64
        x-nullable: true
  AttributeData:
    type: object
    properties:
      attribute:
        $ref: "#/definitions/Attribute"
      whitelistFilters:
        description: >-
          If not empty, then only rows where at least one of the specified
          filters is true will be returned.

          For asset-related groupings like 'traffic source', 'campaign',
          'lander' etc, a filter must be the asset's id.

          Otherwise, for groupings like 'country', 'device type' etc, a filter
          is a case-insensitive string representing

          the data, like 'Malaysia', 'Smartphone' etc... Filters can contain
          wildcards '*'.
        type: array
        items:
          type: string
      blacklistFilters:
        description: >-
          If not empty, then only rows where all the specified filters are false
          will be returned.

          For asset-related groupings like 'traffic source', 'campaign',
          'lander' etc, a filter must be the asset's id.

          Otherwise, for groupings like 'country', 'device type' etc, a filter
          is a case-insensitive string representing

          the data, like 'Malaysia', 'Smartphone' etc... Filters can contain
          wildcards '*'.
        type: array
        items:
          type: string
      trackingFieldSlot:
        description: "For URL Tracking Field: which column to group by (campaign,
          c1-c20). Replaces the legacy wildcard pattern."
        type: string
  PostbackLogAttributeData:
    type: object
    properties:
      attribute:
        $ref: "#/definitions/PostbackLogAttribute"
      whitelistFilters:
        description: If not empty, then only rows where at least one of the specified
          filters is true will be returned.
        type: array
        items:
          type: string
      blacklistFilters:
        description: If not empty, then only rows where all the specified filters are
          false will be returned.
        type: array
        items:
          type: string
  Category:
    type: object
    required:
      - id
      - name
      - type
      - status
    properties:
      id:
        type: string
        x-nullable: false
      name:
        type: string
        x-nullable: false
      type:
        type: string
        enum:
          - offer
          - lander
          - offersources
          - trafficsources
          - condition
        x-nullable: false
      status:
        $ref: "#/definitions/Status"
        x-nullable: false
  OfferSource:
    type: object
    required:
      - id
      - name
      - categoryID
      - status
    properties:
      id:
        type: string
        x-nullable: false
      name:
        type: string
        x-nullable: false
      categoryID:
        type: string
        x-nullable: false
      status:
        $ref: "#/definitions/Status"
        x-nullable: false
  Attribute:
    type: string
    enum:
      - URL Tracking Field
      - Tracking Field List
      - Tracking Field Values
      - "Element: Campaign"
      - "Element: Funnel Group"
      - "Element: Funnel"
      - "Element: Lander"
      - "Element: Lander Group"
      - "Element: Global Lander Group"
      - "Element: Offer"
      - "Element: Offer Group"
      - "Element: Global Offer Group"
      - "Element: Lander Category"
      - "Element: Offer Category"
      - "Element: Node ID"
      - "Element: Node Name"
      - "Insight: Visitor Journey"
      - "Insight: Visitor Journey (Lander-Offer Groups)"
      - "Insight: Visitor Journey (All Nodes)"
      - "Insight: Visitor Journey (All Nodes w/ Actions)"
      - "Insight: Visitor Journey (Pages w/ Actions)"
      - "Insight: MVT Combination"
      - "Insight: MVT Key-Value Pairs"
      - "Insight: Time on Page"
      - "Insight: Time on Page Segments"
      - "Insight: Time to Conversion Segments"
      - "Third Parties: Traffic Source"
      - "Third Parties: Traffic Source Category"
      - "Third Parties: Offer Source"
      - "Third Parties: Offer Source Category"
      - "Traffic: Tracking Domain"
      - "Traffic: Visitor Tag"
      - "Traffic: Filtered Status"
      - "Insight: Action Number"
      - "Insight: Page > Action Number"
      - "Conversion: Transaction ID"
      - "Event: Custom Data 1"
      - "Event: Custom Data 2"
      - "Device: Device Type"
      - "Device: Brand"
      - "Device: Model"
      - "Device: Model Name"
      - "Device: OS"
      - "Device: OS Version"
      - "Device: Browser"
      - "Device: Browser Version"
      - "Device: Main Language"
      - "Connection: Connection Type"
      - "Connection: ISP"
      - "Connection: Mobile Carrier"
      - "Connection: Referrer"
      - "Connection: Referrer Domain"
      - "Connection: Type + Carrier + ISP"
      - "Location: Continent"
      - "Location: Country"
      - "Location: Region"
      - "Location: City"
      - "Location: Timezone"
      - "Time: Date"
      - "Time: Week-Parting"
      - "Time: Day-Parting"
      - "Time: 10-Minute Blocks"
      - "Time: 30-Minute Blocks"
      - "Time: 1-Hour Blocks"
      - "Time: 3-Hour Blocks"
      - Week of Year
  PostbackLogAttribute:
    type: string
    enum:
      - Time
      - URL
      - Owner
      - FunnelID
      - TrafficSourceID
      - HitID
      - ConversionID
      - TransactionID
      - EventNumber
      - Payout
      - Error
      - ResponseStatusCode
      - ResponseBody
      - Try
      - LastTry
      - IsIntegration
      - IntegrationId
      - QueryString
      - PageID
      - HasPiiEmail
      - HasPiiPhone
      - HasPiiZipcode
      - HasDedupeEventId
  HitReportParams:
    type: object
    required:
      - timeStart
      - timeEnd
      - pagingLength
    properties:
      timeStart:
        type: string
        format: date-time
        x-nullable: false
        x-order: 1
      timeEnd:
        type: string
        format: date-time
        x-nullable: false
        x-order: 2
      filters:
        type: array
        items:
          $ref: "#/definitions/AttributeData"
        x-nullable: false
        x-order: 3
      includeHits:
        type: boolean
        default: true
        x-nullable: false
        x-order: 4
      includeClicks:
        type: boolean
        default: true
        x-nullable: false
        x-order: 5
      includeConversions:
        type: boolean
        default: true
        x-nullable: false
        x-order: 6
      includeCustomEvents:
        type: array
        items:
          type: string
        x-nullable: false
        x-order: 7
      sortBy:
        description: |-
          Column to sort results by. Defaults to 'eventTime' if not specified.
          Available sort columns:
            * eventTime - Time when the event occurred (default)
            * hitTime - Time when the original hit/entrance occurred
            * hitID - The unique hit identifier
            * visitorID - The visitor identifier
        type: string
        enum:
          - eventTime
          - hitTime
          - hitID
          - visitorID
        default: eventTime
        x-nullable: false
        x-order: 8
      sortDirection:
        description: Sort direction - ascending or descending
        type: string
        enum:
          - asc
          - desc
        default: desc
        x-nullable: false
        x-order: 9
      sort:
        description: "DEPRECATED: Use sortDirection instead. Sort direction for results."
        type: string
        enum:
          - asc
          - desc
        default: desc
        x-nullable: false
        x-order: 10
      visitorID:
        description: |-
          Filter results to a specific visitor ID. When provided, only events
          for this visitor will be returned. This is useful for investigating
          a specific user's journey through funnels.
        type: string
        default: ""
        x-nullable: false
        x-order: 11
      hitID:
        description: |-
          Filter results to a specific hit ID. When provided, only events
          for this hit will be returned. This is useful for investigating
          a specific tracking hit and all its associated events (clicks,
          conversions, custom events).
        type: string
        default: ""
        x-nullable: false
        x-order: 12
      pagingStart:
        type: integer
        format: int32
        minimum: 0
        default: 0
        x-nullable: false
        x-order: 13
      pagingLength:
        type: integer
        format: int32
        minimum: 1
        maximum: 10000
        x-nullable: false
        x-order: 14
      restrictToMetrics:
        description: >-
          If empty, returns default metrics. Can restrict the response to any
          combination of the following metrics (note a limit of 20 total metrics
          is imposed):
            * EventType
            * EventTime
            * HitTime
            * FunnelID
            * TrafficSourceID
            * External
            * NodeID
            * NodeType
            * NodeName
            * HitID
            * VisitorID
            * VisitorIP
            * ClickID
            * ConversionID
            * ConversionTransaction
            * Revenue
            * TotalRevenue
            * Cost
            * TrackingDomain
            * FunnelGroupID
            * OfferSourceID
            * PageID
            * PageCategoryID
            * PageGroupID
            * LocationContinent
            * LocationCountry
            * LocationRegion
            * LocationCity
            * ConnectionISP
            * ConnectionMobileCarrier
            * ConnectionType
            * ConnectionReferrerPath
            * ConnectionReferrerDomain
            * DeviceType
            * DeviceBrand
            * DeviceModel
            * DeviceModelName
            * DeviceOS
            * DeviceOSVersion
            * DeviceBrowser
            * DeviceBrowserVersion
            * DeviceMainLanguage
            * DeviceUserAgent
            * SubCampaign
            * TrackingField1
            * TrackingField2
            * TrackingField3
            * TrackingField4
            * TrackingField5
            * TrackingField6
            * TrackingField7
            * TrackingField8
            * TrackingField9
            * TrackingField10
            * TrackingField11
            * TrackingField12
            * TrackingField13
            * TrackingField14
            * TrackingField15
            * TrackingField16
            * TrackingField17
            * TrackingField18
            * TrackingField19
            * TrackingField20
            * CustomEvent1
            * CustomEvent2
            * CustomEvent3
            * CustomEvent4
            * CustomEvent5
            * CustomEvent6
            * CustomEvent7
            * CustomEvent8
            * CustomEvent9
            * CustomEvent10
            * EventData1
            * EventData2
            * FunnelName
            * TrafficSourceName
            * PageName
            * PageGroupName
            * FunnelGroupName
            * OfferSourceName
            * CategoryName
        type: array
        items:
          type: string
        x-nullable: true
        x-order: 15
  HitReport:
    type: object
    properties:
      rows:
        type: array
        items:
          $ref: "#/definitions/HitReportRow"
        x-nullable: false
  HitReportRow:
    type: object
    properties:
      eventType:
        type: string
        enum:
          - hit
          - click
          - conversion
          - customEvent1
          - customEvent2
          - customEvent3
          - customEvent4
          - customEvent5
          - customEvent6
          - customEvent7
          - customEvent8
          - customEvent9
          - customEvent10
        x-nullable: false
        x-order: 1
      eventTime:
        type: string
        x-nullable: false
        x-order: 2
      hitTime:
        type: string
        x-nullable: false
        x-order: 3
      funnelID:
        type: string
        x-nullable: false
        x-order: 4
      trafficSourceID:
        type: string
        x-nullable: false
        x-order: 5
      external:
        type: string
        x-nullable: false
        x-order: 6
      nodeID:
        type: string
        x-nullable: false
        x-order: 7
      hitID:
        type: string
        x-nullable: false
        x-order: 8
      visitorID:
        type: string
        x-nullable: false
        x-order: 9
      visitorIP:
        type: string
        x-nullable: false
        x-order: 10
      clickID:
        type: string
        x-nullable: false
        x-order: 11
      conversionID:
        type: string
        x-nullable: false
        x-order: 12
      conversionTransaction:
        type: string
        x-nullable: false
        x-order: 13
      revenue:
        type: string
        x-nullable: false
        x-order: 14
      cost:
        type: string
        x-nullable: false
        x-order: 15
      trackingDomain:
        type: string
        x-nullable: false
        x-order: 16
      funnelGroupID:
        type: string
        x-nullable: false
        x-order: 17
      offerSourceID:
        type: string
        x-nullable: false
        x-order: 18
      pageID:
        type: string
        x-nullable: false
        x-order: 19
      pageCategoryID:
        type: string
        x-nullable: false
        x-order: 20
      pageGroupID:
        type: string
        x-nullable: false
        x-order: 21
      continent:
        type: string
        x-nullable: false
        x-order: 22
      country:
        type: string
        x-nullable: false
        x-order: 23
      region:
        type: string
        x-nullable: false
        x-order: 24
      city:
        type: string
        x-nullable: false
        x-order: 25
      connectionMobileCarrier:
        type: string
        x-nullable: false
        x-order: 26
      connectionType:
        type: string
        x-nullable: false
        x-order: 27
      connectionReferrerPath:
        type: string
        x-nullable: false
        x-order: 28
      connectionReferrerDomain:
        type: string
        x-nullable: false
        x-order: 29
      deviceType:
        type: string
        x-nullable: false
        x-order: 30
      deviceBrand:
        type: string
        x-nullable: false
        x-order: 31
      deviceModel:
        type: string
        x-nullable: false
        x-order: 32
      deviceModelName:
        type: string
        x-nullable: false
        x-order: 33
      deviceOS:
        type: string
        x-nullable: false
        x-order: 34
      deviceOSVersion:
        type: string
        x-nullable: false
        x-order: 35
      deviceBrowser:
        type: string
        x-nullable: false
        x-order: 36
      deviceBrowserVersion:
        type: string
        x-nullable: false
        x-order: 37
      deviceMainLanguage:
        type: string
        x-nullable: false
        x-order: 38
      deviceUserAgent:
        type: string
        x-nullable: false
        x-order: 39
      subCampaign:
        type: string
        x-nullable: false
        x-order: 40
      totalRevenue:
        type: string
        x-nullable: false
        x-order: 41
      trackingField1:
        type: string
        x-nullable: false
        x-order: 42
      trackingField2:
        type: string
        x-nullable: false
        x-order: 43
      trackingField3:
        type: string
        x-nullable: false
        x-order: 44
      trackingField4:
        type: string
        x-nullable: false
        x-order: 45
      trackingField5:
        type: string
        x-nullable: false
        x-order: 46
      trackingField6:
        type: string
        x-nullable: false
        x-order: 47
      trackingField7:
        type: string
        x-nullable: false
        x-order: 48
      trackingField8:
        type: string
        x-nullable: false
        x-order: 49
      trackingField9:
        type: string
        x-nullable: false
        x-order: 50
      trackingField10:
        type: string
        x-nullable: false
        x-order: 51
      trackingField11:
        type: string
        x-nullable: false
        x-order: 52
      trackingField12:
        type: string
        x-nullable: false
        x-order: 53
      trackingField13:
        type: string
        x-nullable: false
        x-order: 54
      trackingField14:
        type: string
        x-nullable: false
        x-order: 55
      trackingField15:
        type: string
        x-nullable: false
        x-order: 56
      trackingField16:
        type: string
        x-nullable: false
        x-order: 57
      trackingField17:
        type: string
        x-nullable: false
        x-order: 58
      trackingField18:
        type: string
        x-nullable: false
        x-order: 59
      trackingField19:
        type: string
        x-nullable: false
        x-order: 60
      trackingField20:
        type: string
        x-nullable: false
        x-order: 61
      nodeType:
        type: string
        enum:
          - rotator
          - lander
          - offer
          - landerGroup
          - offerGroup
          - externalURL
          - condition
          - visitorTag
        x-nullable: false
        x-order: 62
      nodeName:
        type: string
        x-nullable: false
        x-order: 63
      connectionISP:
        type: string
        x-nullable: false
        x-order: 64
      eventData1:
        type: string
        description: Custom event data field 1 for conversions and custom events
        x-nullable: false
        x-order: 65
      eventData2:
        type: string
        description: Custom event data field 2 for conversions and custom events
        x-nullable: false
        x-order: 66
      funnelName:
        type: string
        description: Resolved funnel name from asset JOIN
        x-nullable: false
        x-order: 67
      trafficSourceName:
        type: string
        description: Resolved traffic source name from asset JOIN
        x-nullable: false
        x-order: 68
      pageName:
        type: string
        description: Resolved page name from asset JOIN
        x-nullable: false
        x-order: 69
      pageGroupName:
        type: string
        description: Resolved page group (lander/offer group) name from asset JOIN
        x-nullable: false
        x-order: 70
      funnelGroupName:
        type: string
        description: Resolved funnel group (campaign) name from asset JOIN
        x-nullable: false
        x-order: 71
      offerSourceName:
        type: string
        description: Resolved offer source name from asset JOIN
        x-nullable: false
        x-order: 72
      categoryName:
        type: string
        description: Resolved page category name from asset JOIN
        x-nullable: false
        x-order: 73
  PostbackLogParams:
    type: object
    required:
      - timeStart
      - timeEnd
      - pagingLength
    properties:
      timeStart:
        type: string
        format: date-time
        x-nullable: false
        x-order: 1
      timeEnd:
        type: string
        format: date-time
        x-nullable: false
        x-order: 2
      filters:
        type: array
        items:
          $ref: "#/definitions/PostbackLogAttributeData"
        x-nullable: false
        x-order: 3
      sort:
        type: string
        enum:
          - asc
          - desc
        default: desc
        x-nullable: false
        x-order: 4
      pagingStart:
        type: integer
        format: int32
        minimum: 0
        default: 0
        x-nullable: false
        x-order: 5
      pagingLength:
        type: integer
        format: int32
        minimum: 1
        maximum: 10000
        x-nullable: false
        x-order: 6
      restrictToMetrics:
        description: >-
          If empty, returns default metrics. Can restrict the response to any
          combination of the following metrics:
            * Time
            * URL
            * Owner
            * FunnelID
            * TrafficSourceID
            * HitID
            * ConversionID
            * TransactionID
            * EventNumber
            * Payout
            * Error
            * ResponseStatusCode
            * ResponseBody
            * Try
            * LastTry
            * IsIntegration
            * IntegrationId
            * QueryString
            * FunnelName
            * TrafficSourceName
            * PageID
            * PageName
            * PageCategoryName
            * OfferSourceName
            * HasPiiEmail
            * HasPiiPhone
            * HasPiiZipcode
            * HasDedupeEventId
        type: array
        items:
          type: string
        x-nullable: true
        x-order: 7
  PostbackLogReport:
    type: object
    properties:
      rows:
        type: array
        items:
          $ref: "#/definitions/PostbackLogReportRow"
        x-nullable: false
  PostbackLogReportRow:
    type: object
    properties:
      time:
        type: string
        x-nullable: false
        x-order: 1
      url:
        type: string
        x-nullable: false
        x-order: 2
      owner:
        type: string
        x-nullable: false
        x-order: 3
      funnelID:
        type: string
        x-nullable: false
        x-order: 4
      trafficSourceID:
        type: string
        x-nullable: false
        x-order: 5
      hitID:
        type: string
        x-nullable: false
        x-order: 6
      conversionID:
        type: string
        x-nullable: false
        x-order: 7
      transactionID:
        type: string
        x-nullable: false
        x-order: 8
      eventNumber:
        type: number
        format: int64
        x-nullable: false
        x-order: 9
      payout:
        type: number
        format: float64
        x-nullable: false
        x-order: 10
      error:
        type: string
        x-nullable: false
        x-order: 11
      responseStatusCode:
        type: number
        format: int32
        x-nullable: false
        x-order: 12
      responseBody:
        type: string
        x-nullable: false
        x-order: 13
      try:
        type: number
        format: int64
        x-nullable: false
        x-order: 14
      lastTry:
        type: number
        format: int64
        x-nullable: false
        x-order: 15
      isIntegration:
        type: string
        x-nullable: false
        x-order: 16
      integrationId:
        type: string
        x-nullable: false
        x-order: 17
      queryString:
        type: string
        x-nullable: false
        x-order: 18
      funnelName:
        type: string
        x-nullable: false
        x-order: 19
      trafficSourceName:
        type: string
        x-nullable: false
        x-order: 20
      pageID:
        type: string
        x-nullable: false
        x-order: 21
      pageName:
        type: string
        x-nullable: false
        x-order: 22
      pageCategoryName:
        type: string
        x-nullable: false
        x-order: 23
      offerSourceName:
        type: string
        x-nullable: false
        x-order: 24
      hasPiiEmail:
        type: boolean
        description: Whether the conversion has a PII email address
        x-nullable: false
        x-order: 25
      hasPiiPhone:
        type: boolean
        description: Whether the conversion has a PII phone number
        x-nullable: false
        x-order: 26
      hasPiiZipcode:
        type: boolean
        description: Whether the conversion has a PII zipcode
        x-nullable: false
        x-order: 27
      hasDedupeEventId:
        type: boolean
        description: Whether the conversion has a deduplication event ID
        x-nullable: false
        x-order: 28
  ExplorerVisitorRequest:
    type: object
    properties:
      visitorId:
        type: string
        description: Visitor ID to look up. Requires timeStart and timeEnd when used.
      hitId:
        type: string
        description: Hit ID to find the visitor for. Alternative to visitorId.
      timeStart:
        type: string
        format: date-time
        description: Start of time range (RFC3339). Required when using visitorId.
      timeEnd:
        type: string
        format: date-time
        description: End of time range (RFC3339). Required when using visitorId.
  ExplorerHitRequest:
    type: object
    required:
      - hitId
    properties:
      hitId:
        type: string
        description: The hit ID to look up
        x-nullable: false
      timeStart:
        type: string
        format: date-time
        description: Optional date hint for partition elimination when hit ID parsing fails
  ExplorerVisitorResponse:
    type: object
    properties:
      visitor:
        $ref: "#/definitions/VisitorInfo"
        x-nullable: true
      hits:
        type: array
        items:
          $ref: "#/definitions/ExplorerHitRow"
        x-nullable: false
      hasMore:
        type: boolean
        description: True if there are more hits beyond the returned set
        x-nullable: false
  ExplorerHitResponse:
    type: object
    properties:
      events:
        type: array
        description: All events for this hit ID — the original hit event, plus any
          conversion, customEvent1–10 events that reference it. Ordered by
          eventTime ASC.
        items:
          $ref: "#/definitions/ExplorerHitDetail"
        x-nullable: false
  VisitorInfo:
    type: object
    description: Visitor session summary derived from the entrance hit
    properties:
      visitorId:
        type: string
        x-nullable: false
      ip:
        type: string
        x-nullable: false
      country:
        type: string
        x-nullable: false
      region:
        type: string
        x-nullable: false
      city:
        type: string
        x-nullable: false
      isp:
        type: string
        x-nullable: false
      connectionType:
        type: string
        x-nullable: false
      mobileCarrier:
        type: string
        x-nullable: false
      deviceType:
        type: string
        x-nullable: false
      deviceBrand:
        type: string
        x-nullable: false
      deviceModel:
        type: string
        x-nullable: false
      deviceModelName:
        type: string
        x-nullable: false
      deviceOS:
        type: string
        x-nullable: false
      deviceOSVersion:
        type: string
        x-nullable: false
      browser:
        type: string
        x-nullable: false
      browserVersion:
        type: string
        x-nullable: false
      language:
        type: string
        x-nullable: false
      userAgent:
        type: string
        x-nullable: false
      firstSeen:
        type: string
        description: Timestamp of earliest hit in the queried range
        x-nullable: false
      lastSeen:
        type: string
        description: Timestamp of latest hit in the queried range
        x-nullable: false
      totalHits:
        type: number
        format: int64
        description: Number of hits returned in this response (capped at 100). Use
          hasMore to detect truncation.
        x-nullable: false
  ExplorerHitRow:
    type: object
    description: Compact hit row returned in visitor hit lists
    properties:
      hitId:
        type: string
        x-nullable: false
      eventType:
        type: string
        x-nullable: false
      eventTime:
        type: string
        x-nullable: false
      funnelId:
        type: string
        x-nullable: false
      funnelName:
        type: string
        x-nullable: false
      nodeId:
        type: string
        x-nullable: false
      nodeName:
        type: string
        x-nullable: false
      nodeType:
        type: string
        x-nullable: false
      trafficSourceId:
        type: string
        x-nullable: false
      trafficSourceName:
        type: string
        x-nullable: false
      pageId:
        type: string
        x-nullable: false
      pageName:
        type: string
        x-nullable: false
      pageGroupId:
        type: string
        x-nullable: false
      pageGroupName:
        type: string
        x-nullable: false
      funnelGroupId:
        type: string
        x-nullable: false
      funnelGroupName:
        type: string
        x-nullable: false
      offerSourceId:
        type: string
        x-nullable: false
      offerSourceName:
        type: string
        x-nullable: false
      categoryId:
        type: string
        x-nullable: false
      categoryName:
        type: string
        x-nullable: false
      cost:
        type: number
        format: float64
        x-nullable: false
      revenue:
        type: number
        format: float64
        x-nullable: false
      totalRevenue:
        type: number
        format: float64
        x-nullable: false
      clickId:
        type: string
        x-nullable: false
      conversionId:
        type: string
        x-nullable: false
      conversionTransaction:
        type: string
        x-nullable: false
      trackingDomain:
        type: string
        x-nullable: false
      externalId:
        type: string
        x-nullable: false
      subCampaign:
        type: string
        x-nullable: false
      t1:
        type: string
        x-nullable: false
      t2:
        type: string
        x-nullable: false
      t3:
        type: string
        x-nullable: false
      t4:
        type: string
        x-nullable: false
      t5:
        type: string
        x-nullable: false
      t6:
        type: string
        x-nullable: false
      t7:
        type: string
        x-nullable: false
      t8:
        type: string
        x-nullable: false
      t9:
        type: string
        x-nullable: false
      t10:
        type: string
        x-nullable: false
      t11:
        type: string
        x-nullable: false
      t12:
        type: string
        x-nullable: false
      t13:
        type: string
        x-nullable: false
      t14:
        type: string
        x-nullable: false
      t15:
        type: string
        x-nullable: false
      t16:
        type: string
        x-nullable: false
      t17:
        type: string
        x-nullable: false
      t18:
        type: string
        x-nullable: false
      t19:
        type: string
        x-nullable: false
      t20:
        type: string
        x-nullable: false
      eventData1:
        type: string
        x-nullable: false
      eventData2:
        type: string
        x-nullable: false
  ExplorerHitDetail:
    type: object
    description: >-
      Complete hit dump for single-hit lookup.

      Superset of ExplorerHitRow — adds device, geo, connection, referrer
      fields.
    properties:
      hitId:
        type: string
        x-nullable: false
      visitorId:
        type: string
        x-nullable: false
      eventType:
        type: string
        x-nullable: false
      eventTime:
        type: string
        x-nullable: false
      hitTime:
        type: string
        x-nullable: false
      funnelId:
        type: string
        x-nullable: false
      funnelName:
        type: string
        x-nullable: false
      nodeId:
        type: string
        x-nullable: false
      nodeName:
        type: string
        x-nullable: false
      nodeType:
        type: string
        x-nullable: false
      trafficSourceId:
        type: string
        x-nullable: false
      trafficSourceName:
        type: string
        x-nullable: false
      pageId:
        type: string
        x-nullable: false
      pageName:
        type: string
        x-nullable: false
      pageGroupId:
        type: string
        x-nullable: false
      pageGroupName:
        type: string
        x-nullable: false
      funnelGroupId:
        type: string
        x-nullable: false
      funnelGroupName:
        type: string
        x-nullable: false
      offerSourceId:
        type: string
        x-nullable: false
      offerSourceName:
        type: string
        x-nullable: false
      categoryId:
        type: string
        x-nullable: false
      categoryName:
        type: string
        x-nullable: false
      ip:
        type: string
        x-nullable: false
      ipv6:
        type: string
        x-nullable: false
      country:
        type: string
        x-nullable: false
      continent:
        type: string
        x-nullable: false
      region:
        type: string
        x-nullable: false
      city:
        type: string
        x-nullable: false
      isp:
        type: string
        x-nullable: false
      connectionType:
        type: string
        x-nullable: false
      mobileCarrier:
        type: string
        x-nullable: false
      referrerDomain:
        type: string
        x-nullable: false
      referrerPath:
        type: string
        x-nullable: false
      deviceType:
        type: string
        x-nullable: false
      deviceBrand:
        type: string
        x-nullable: false
      deviceModel:
        type: string
        x-nullable: false
      deviceModelName:
        type: string
        x-nullable: false
      deviceOS:
        type: string
        x-nullable: false
      deviceOSVersion:
        type: string
        x-nullable: false
      browser:
        type: string
        x-nullable: false
      browserVersion:
        type: string
        x-nullable: false
      language:
        type: string
        x-nullable: false
      userAgent:
        type: string
        x-nullable: false
      cost:
        type: number
        format: float64
        x-nullable: false
      revenue:
        type: number
        format: float64
        x-nullable: false
      totalRevenue:
        type: number
        format: float64
        x-nullable: false
      trackingDomain:
        type: string
        x-nullable: false
      externalId:
        type: string
        x-nullable: false
      clickId:
        type: string
        x-nullable: false
      conversionId:
        type: string
        x-nullable: false
      conversionTransaction:
        type: string
        x-nullable: false
      subCampaign:
        type: string
        x-nullable: false
      t1:
        type: string
        x-nullable: false
      t2:
        type: string
        x-nullable: false
      t3:
        type: string
        x-nullable: false
      t4:
        type: string
        x-nullable: false
      t5:
        type: string
        x-nullable: false
      t6:
        type: string
        x-nullable: false
      t7:
        type: string
        x-nullable: false
      t8:
        type: string
        x-nullable: false
      t9:
        type: string
        x-nullable: false
      t10:
        type: string
        x-nullable: false
      t11:
        type: string
        x-nullable: false
      t12:
        type: string
        x-nullable: false
      t13:
        type: string
        x-nullable: false
      t14:
        type: string
        x-nullable: false
      t15:
        type: string
        x-nullable: false
      t16:
        type: string
        x-nullable: false
      t17:
        type: string
        x-nullable: false
      t18:
        type: string
        x-nullable: false
      t19:
        type: string
        x-nullable: false
      t20:
        type: string
        x-nullable: false
      eventData1:
        type: string
        x-nullable: false
      eventData2:
        type: string
        x-nullable: false
  ConvertedHit:
    required:
      - id
    properties:
      id:
        description: Hit ID
        type: string
        x-nullable: false
      transaction:
        description: The optional transaction id
        type: string
        default: ""
        x-nullable: false
      revenue:
        description: >-
          An optional revenue amount. When not specified, the default revenue
          from the converted offer is used.

          If set to -1, then this hit is set as non-converted.
        $ref: "#/definitions/NullableDecimal"
        default: null
      piiEmail:
        description: An optional email address
        type: string
        default: ""
        x-nullable: true
      piiPhone:
        description: An optional phone number
        type: string
        default: ""
        x-nullable: true
      conversionTime:
        type: string
        default: ""
        description: The time when the conversion occurred
  ConversionsUpdateParams:
    required:
      - hits
    properties:
      hits:
        type: array
        items:
          $ref: "#/definitions/ConvertedHit"
        x-nullable: false
      postbackCalls:
        description: >-
          Call the traffic source postbacks of the sources that generated theses
          conversions. If set to 'none', then

          the postbacks are not called for any of the specified hits. If set to
          'onlyOnce', then the postbacks are

          only called for the hits that never called them before. If set to
          'all', the postbacks are called for all

          the specified hits, even if they were already called in the past for
          some/all hits.
        type: string
        enum:
          - none
          - onlyOnce
          - all
        default: none
        x-nullable: false
      overridePayout:
        $ref: "#/definitions/NullableDecimal"
        default: null
      disablePostbacks:
        type: boolean
        default: false
      forcePostbacks:
        type: boolean
        default: false
  CostSegment:
    properties:
      cost:
        $ref: "#/definitions/Decimal"
        x-nullable: false
      costType:
        type: string
        enum:
          - wholeSegment
          - perEntrance
        default: wholeSegment
        x-nullable: false
      restrictToDeviceType:
        description: If set, then update cost of traffic that comes from this device
          type only
        type: string
        enum:
          - Unknown
          - Console
          - Desktop
          - EReader
          - MediaHub
          - Mobile
          - SmallScreen
          - SmartPhone
          - SmartWatch
          - Tablet
          - TV
      restrictToConnectionType:
        description: If set, then update cost of traffic that comes from this connection
          type only
        type: string
        enum:
          - Unknown
          - Mobile
          - Wifi
          - Wired
          - Dialup
          - Satellite
      restrictToBrowser:
        description: If set, then update cost of traffic that comes from this browser only
        type: string
        default: ""
      restrictToCountryCode:
        description: If set, then update cost of traffic that comes from this country only
        type: string
        default: ""
      restrictToTrackingFields:
        description: If set, then update cost of traffic that have these tracking
          fields' keys/values only.
        type: object
        additionalProperties:
          type: array
          items:
            type: string
        x-nullable: false
  CostUpdateParams:
    required:
      - funnelIDs
      - trafficSourceIDs
      - timeStart
      - timeEnd
      - costSegments
    properties:
      funnelIDs:
        type: array
        items:
          type: string
        default: []
        x-nullable: false
      trafficSourceIDs:
        type: array
        items:
          type: string
        default: []
        x-nullable: false
      timeStart:
        type: string
        format: date-time
        x-nullable: false
      timeEnd:
        type: string
        format: date-time
        x-nullable: false
      costSegments:
        type: array
        items:
          $ref: "#/definitions/CostSegment"
        x-nullable: false
  ResetUpdateParams:
    required:
      - timeStart
      - timeEnd
    properties:
      timeStart:
        type: string
        format: date-time
        x-nullable: false
      timeEnd:
        type: string
        format: date-time
        x-nullable: false
      restrictToCampaignIDs:
        type: array
        items:
          type: string
        default: []
        x-nullable: false
      restrictToFunnelIDs:
        type: array
        items:
          type: string
        default: []
        x-nullable: false
      restrictToTrafficSourceIDs:
        type: array
        items:
          type: string
        default: []
        x-nullable: false
      restrictToCountryCodes:
        type: array
        items:
          type: string
        default: []
        x-nullable: false
      restrictToVisitorIDs:
        type: array
        items:
          type: string
        default: []
        x-nullable: false
      restrictToIPs:
        type: array
        items:
          type: string
        default: []
        x-nullable: false
      restrictToTrackingFields:
        type: object
        additionalProperties:
          type: array
          items:
            type: string
        x-nullable: false
  PostbackLogCriteria:
    type: object
    required:
      - timeStart
      - timeEnd
    properties:
      timeStart:
        type: string
        format: date-time
        x-nullable: false
      timeEnd:
        type: string
        format: date-time
        x-nullable: false
      idFunnel:
        type: string
        default: ""
        x-nullable: false
      offset:
        type: integer
        format: int32
        default: 0
        x-nullable: false
      count:
        type: integer
        format: int32
        default: 100
        x-nullable: false
  PostbackLog:
    type: object
    required:
      - total
      - entries
    properties:
      total:
        type: integer
        format: int32
        x-nullable: false
      entries:
        type: array
        items:
          $ref: "#/definitions/PostbackLogEntry"
        x-nullable: false
  PostbackLogEntry:
    type: object
    x-nullable: false
    required:
      - time
      - url
      - idFunnel
      - idTrafficSource
      - idHit
      - idConversion
      - idTransaction
      - payout
      - error
      - responseStatusCode
      - responseBody
      - try
      - lastTry
    properties:
      time:
        type: string
        format: date-time
        x-nullable: false
      url:
        type: string
        x-nullable: false
      idFunnel:
        type: string
        x-nullable: false
      idTrafficSource:
        type: string
        x-nullable: false
      idHit:
        type: string
        x-nullable: false
      idConversion:
        type: string
        x-nullable: false
      idTransaction:
        type: string
        x-nullable: false
      payout:
        type: string
        x-nullable: false
        description: can be empty string if revenue payout is not specified
      error:
        type: string
        x-nullable: false
      responseStatusCode:
        type: integer
        format: int32
        minimum: 0
        x-nullable: false
      responseBody:
        type: string
        x-nullable: false
      try:
        type: integer
        format: int32
        minimum: 1
        x-nullable: false
      lastTry:
        type: boolean
        x-nullable: false
  IntegerValue:
    type: object
    required:
      - value
    properties:
      value:
        type: integer
        format: int64
        x-nullable: false
  Error:
    type: object
    required:
      - code
      - message
    properties:
      code:
        type: integer
        format: int32
        x-nullable: false
      message:
        type: string
        x-nullable: false
  RateLimitError:
    type: object
    description: |-
      Returned with HTTP 429 when rate limiting is active. Uses a string code
      (REPORTING_RATE_LIMITED or EXPLORER_RATE_LIMITED), not the integer code
      used by the standard Error response.
    required:
      - code
      - message
    properties:
      code:
        type: string
        description: Rate limit error code (REPORTING_RATE_LIMITED or EXPLORER_RATE_LIMITED)
        x-nullable: false
      message:
        type: string
        x-nullable: false
  Decimal:
    type: string
    x-nullable: false
    x-go-type:
      type: Decimal
      import:
        package: github.com/funnelflux/flux-saas-runtime/core/util/decimal
  NullableDecimal:
    type: string
    x-nullable: true
    x-go-type:
      type: NullableDecimal
      import:
        package: github.com/funnelflux/flux-saas-runtime/core/util/decimal
  Status:
    type: string
    enum:
      - active
      - archived
      - deleted
    default: active
    x-nullable: false
