openapi: 3.0.3
info:
  title: Everflow Network API - On-Hold Conversion Reporting
  description: >
    On-hold conversion reporting and management endpoints for the Everflow
    partner marketing platform.
    For more detail, see [On Hold (Conversions) Report](https://helpdesk.everflow.io/customer/on-hold-conversions-report) in the Help Center.
  version: 1.0.0
servers:
  - description: Production Server
    url: https://api.eflow.team/v1
tags:
  - name: Reporting
    description: On-hold conversion reporting and management endpoints.
paths:
  /networks/reporting/onhold/{onHoldId}:
    get:
      summary: Get On-Hold Conversion by ID
      tags:
        - Reporting
      parameters:
        - in: path
          name: onHoldId
          required: true
          schema:
            type: string
          description: The 32-character on-hold conversion ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  on_hold_conversion_id:
                    type: string
                    description: The 32-character on-hold conversion ID.
                  network_id:
                    type: integer
                  holding_period_end:
                    type: integer
                    description: Unix timestamp when the holding period ends.
                  status:
                    type: string
                    enum:
                      - on_hold
                      - approved
                      - rejected
                    description: Current status of the on-hold conversion.
                  note:
                    type: string
                  conversion:
                    type: object
                    description: The full conversion record.
                    properties:
                      conversion_id:
                        type: string
                      conversion_unix_timestamp:
                        type: integer
                      sub1:
                        type: string
                      sub2:
                        type: string
                      sub3:
                        type: string
                      sub4:
                        type: string
                      sub5:
                        type: string
                      sub6:
                        type: string
                      sub7:
                        type: string
                      sub8:
                        type: string
                      sub9:
                        type: string
                      sub10:
                        type: string
                      source_id:
                        type: string
                      status:
                        type: string
                      payout_type:
                        type: string
                      revenue_type:
                        type: string
                      payout:
                        type: number
                      revenue:
                        type: number
                      session_user_ip:
                        type: string
                      conversion_user_ip:
                        type: string
                      country:
                        type: string
                      region:
                        type: string
                      city:
                        type: string
                      dma:
                        type: integer
                      carrier:
                        type: string
                      platform:
                        type: string
                      os_version:
                        type: string
                      device_type:
                        type: string
                      device_model:
                        type: string
                      brand:
                        type: string
                      browser:
                        type: string
                      language:
                        type: string
                      http_user_agent:
                        type: string
                      adv1:
                        type: string
                      adv2:
                        type: string
                      adv3:
                        type: string
                      adv4:
                        type: string
                      adv5:
                        type: string
                      adv6:
                        type: string
                      adv7:
                        type: string
                      adv8:
                        type: string
                      adv9:
                        type: string
                      adv10:
                        type: string
                      is_event:
                        type: boolean
                      event:
                        type: string
                      notes:
                        type: string
                      transaction_id:
                        type: string
                      click_unix_timestamp:
                        type: integer
                      error_code:
                        type: integer
                      error_message:
                        type: string
                      sale_amount:
                        type: number
                      is_scrub:
                        type: boolean
                      coupon_code:
                        type: string
                      order_id:
                        type: string
                      url:
                        type: string
                      isp:
                        type: string
                      referer:
                        type: string
                      app_id:
                        type: string
                      idfa:
                        type: string
                      idfa_md5:
                        type: string
                      idfa_sha1:
                        type: string
                      google_ad_id:
                        type: string
                      google_ad_id_md5:
                        type: string
                      google_ad_id_sha1:
                        type: string
                      android_id:
                        type: string
                      android_id_md5:
                        type: string
                      android_id_sha1:
                        type: string
                      currency_id:
                        type: string
                      email:
                        type: string
                      is_view_through:
                        type: boolean
                      previous_network_offer_id:
                        type: integer
                      network_offer_payout_revenue_id:
                        type: integer
                      relationship:
                        type: object
                        properties:
                          offer:
                            type: object
                            properties:
                              network_offer_id:
                                type: integer
                              network_id:
                                type: integer
                              name:
                                type: string
                              offer_status:
                                type: string
                                enum:
                                  - active
                                  - paused
                                  - pending
                                  - deleted
                          advertiser:
                            type: object
                            properties:
                              network_advertiser_id:
                                type: integer
                              network_id:
                                type: integer
                              name:
                                type: string
                              account_status:
                                type: string
                          account_manager:
                            type: object
                            properties:
                              network_employee_id:
                                type: integer
                              network_id:
                                type: integer
                              first_name:
                                type: string
                              last_name:
                                type: string
                              full_name:
                                type: string
                              account_status:
                                type: string
                          affiliate:
                            type: object
                            properties:
                              network_affiliate_id:
                                type: integer
                              network_id:
                                type: integer
                              name:
                                type: string
                              account_status:
                                type: string
                          affiliate_manager:
                            type: object
                            properties:
                              network_employee_id:
                                type: integer
                              network_id:
                                type: integer
                              first_name:
                                type: string
                              last_name:
                                type: string
                              full_name:
                                type: string
                              account_status:
                                type: string
                          offer_group:
                            type: object
                            properties:
                              network_offer_group_id:
                                type: integer
                              network_id:
                                type: integer
                              network_advertiser_id:
                                type: integer
                              name:
                                type: string
                              offer_group_status:
                                type: string
                              offer_count:
                                type: integer
                          attribution_method:
                            type: string
                          custom_payout_revenue:
                            type: object
                            properties:
                              network_custom_payout_revenue_setting_id:
                                type: integer
                              network_id:
                                type: integer
                              name:
                                type: string
                          postback_control:
                            type: object
                            properties:
                              network_postback_control_id:
                                type: integer
                              network_id:
                                type: integer
                              name:
                                type: string
                          redirect_url:
                            type: string
                          query_parameters:
                            type: object
                            description: The query string parameters from the original click URL.
                          usm_data:
                            nullable: true
                            type: object
                            description: User session management data. Null when not applicable.
                          unix_timestamp_postback:
                            type: integer
                          snapshots:
                            type: array
                            items:
                              type: object
                              properties:
                                conversion_history_snapshot_id:
                                  type: integer
                                conversion_id:
                                  type: string
                                network_id:
                                  type: integer
                                initiator:
                                  type: string
                                  enum:
                                    - manual
                                    - csv
                                    - bulk_payout_adjustment
                                    - twenty_four_metrics
                                    - reversal
                                    - avow
                                    - retroactive_tiered_commission
                                network_employee:
                                  type: object
                                  properties:
                                    network_employee_id:
                                      type: integer
                                    network_id:
                                      type: integer
                                    first_name:
                                      type: string
                                    last_name:
                                      type: string
                                    full_name:
                                      type: string
                                    account_status:
                                      type: string
                                status:
                                  type: string
                                  enum:
                                    - approved
                                    - rejected
                                    - pending
                                    - invalid
                                snapshot_type:
                                  type: string
                                  enum:
                                    - status
                                    - payout_revenue
                                    - sale_amount
                                    - payout_revenue_and_sale_amount
                                payout:
                                  type: number
                                revenue:
                                  type: number
                                sale_amount:
                                  type: number
                                error_code:
                                  type: integer
                                unix_timestamp:
                                  type: integer
                          on_hold_snapshots:
                            type: array
                            items:
                              type: object
                              properties:
                                on_hold_conversion_history_snapshot_id:
                                  type: integer
                                on_hold_conversion_id:
                                  type: string
                                network_id:
                                  type: integer
                                initiator:
                                  type: string
                                  enum:
                                    - manual
                                    - conversion_processing
                                    - conversion_update
                                    - csv
                                network_employee:
                                  type: object
                                  properties:
                                    network_employee_id:
                                      type: integer
                                    network_id:
                                      type: integer
                                    first_name:
                                      type: string
                                    last_name:
                                      type: string
                                    full_name:
                                      type: string
                                    account_status:
                                      type: string
                                status:
                                  type: string
                                  enum:
                                    - on_hold
                                    - approved
                                    - rejected
                                snapshot_type:
                                  type: string
                                  enum:
                                    - status
                                    - payout_revenue
                                unix_timestamp:
                                  type: integer
                  relationship:
                    type: object
                    properties:
                      history_snapshots:
                        type: array
                        items:
                          type: object
                          properties:
                            on_hold_conversion_history_snapshot_id:
                              type: integer
                            on_hold_conversion_id:
                              type: string
                            network_id:
                              type: integer
                            initiator:
                              type: string
                              enum:
                                - manual
                                - conversion_processing
                                - conversion_update
                                - csv
                            network_employee:
                              type: object
                              properties:
                                network_employee_id:
                                  type: integer
                                network_id:
                                  type: integer
                                first_name:
                                  type: string
                                last_name:
                                  type: string
                                full_name:
                                  type: string
                                account_status:
                                  type: string
                            status:
                              type: string
                              enum:
                                - on_hold
                                - approved
                                - rejected
                            snapshot_type:
                              type: string
                              enum:
                                - status
                                - payout_revenue
                            unix_timestamp:
                              type: integer
        "404":
          description: On-hold conversion not found.
      security:
        - API Key: []
  /networks/reporting/onhold:
    post:
      summary: Search On-Hold Conversions
      tags:
        - Reporting
      parameters:
        - in: query
          name: page
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: The page of results to retrieve.
        - in: query
          name: page_size
          required: false
          schema:
            type: integer
            minimum: 1
            default: 50
          description: The number of results to return per page.
      requestBody:
        required: true
        content:
          application/json:
            example:
              show_conversions: true
              show_events: false
              from: "2025-01-01"
              to: "2025-01-31"
              timezone_id: 67
              currency_id: "USD"
              query:
                filters: []
                search_terms: []
            schema:
              type: object
              required:
                - from
                - to
                - timezone_id
                - show_conversions
                - show_events
              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.
                show_conversions:
                  type: boolean
                  description: Include base on-hold conversion records.
                show_events:
                  type: boolean
                  description: Include post-conversion event records.
                query:
                  type: object
                  description: Optional filters and search terms 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
                              - status
                              - 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:
                  conversions:
                    type: array
                    items:
                      type: object
                      description: Conversion record with on-hold details.
                  paging:
                    type: object
                    properties:
                      page:
                        type: integer
                      page_size:
                        type: integer
                      total_count:
                        type: integer
      security:
        - API Key: []
    patch:
      summary: Update On-Hold Conversion Status
      tags:
        - Conversion Updates
      requestBody:
        required: true
        content:
          application/json:
            example:
              on_hold_conversion_ids:
                - "baab7e25bba046e6b080c799729c5cba"
                - "a91a421038ab46b694547f4db636db80"
              status: "approved"
            schema:
              type: object
              required:
                - on_hold_conversion_ids
                - status
              properties:
                on_hold_conversion_ids:
                  type: array
                  items:
                    type: string
                  description: Array of on-hold conversion IDs to update.
                status:
                  type: string
                  enum:
                    - approved
                    - rejected
                  description: Target status for the conversions.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: boolean
                    description: Whether the update was successful.
      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
