openapi: 3.0.3
info:
  title: Everflow Network API - Traffic Health
  description: >
    Read endpoints for Traffic Health — the operational health of the domains and
    hosting IPs behind your tracking and conversion links. Surfaces uptime / SSL /
    DNS / expiry incidents, blocklist reputation, the remediation tasks that need
    your attention, and per-domain assignment summaries.


    Traffic Health has two tiers. The capabilities available to a network are
    reported by `GET /networks/traffic/access`. Endpoints marked **Traffic Health
    Premium** (domain and IP blocklist reputation) require the premium package; on a
    network without it they return an authorization error rather than data.


    For how these incidents and reputation flags work, see [Traffic Health: Incidents & Reputation Management](https://helpdesk.everflow.io/customer/traffic-health-incidents-and-reputation-management).
  version: 1.0.0
servers:
  - url: https://api.eflow.team/v1
tags:
  - name: Traffic Health
paths:
  /networks/traffic/access:
    get:
      summary: Get Traffic Health Access
      description: >
        Returns the Traffic Health capabilities enabled for the authenticated
        network — whether Traffic Health is enabled at all, whether the premium tier
        is active, and which premium features (blocklist monitoring, alerts,
        external domain monitoring, external-proxy domains, assignment management,
        external notifications) are available. Call this first to decide which
        Traffic Health endpoints a network can use.
      tags:
        - Traffic Health
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                is_enabled: true
                has_premium: true
                has_blacklist_monitoring: true
                has_monitoring_alerts: true
                has_third_party_domain_monitoring: true
                has_external_proxy_domain: true
                has_external_notifications: true
                has_domain_assignment_management: true
                premium_monitored_domain_quota: 25
              schema:
                $ref: "#/components/schemas/TrafficHealthAccess"
      security:
        - API Key: []
  /networks/traffic/situation:
    post:
      summary: Get Network Situation Summary
      description: >
        Network-wide Traffic Health summary — aggregate counts of active domains,
        domains with and without incidents, active incidents, and blocklist incidents
        broken down by vendor (EasyList, HetrixTools, Google Threat Intelligence),
        plus the mean time to resolution. Send an empty object `{}` for the default
        network-wide rollup.
      tags:
        - Traffic Health
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SituationFilter"
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                network_id: 1
                active_domain_count: 9
                active_domain_with_incident_count: 3
                active_domain_without_incident_count: 6
                active_domain_with_blacklist_incident_count: 1
                active_domain_without_blacklist_incident_count: 8
                active_incident_count: 4
                active_domain_blacklist_incident_count: 2
                active_easylist_domain_blacklist_incident_count: 0
                active_hetrix_tools_domain_blacklist_incident_count: 0
                active_google_threat_intelligence_domain_blacklist_incident_count: 2
                active_ip_address_blacklist_incident_count: 0
                mean_time_to_resolution_seconds: 0
              schema:
                $ref: "#/components/schemas/SituationSummary"
      security:
        - API Key: []
  /networks/traffic/situation/domains:
    post:
      summary: List Domain Situations
      description: >
        Per-domain Traffic Health rollup for every monitored domain — each entry's
        overall state (`up` / `down`), domain type, and active/resolved incident and
        blocklist-incident counts (with vendor breakdowns). Send an empty object `{}`
        for all domains.
      tags:
        - Traffic Health
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SituationFilter"
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                entries:
                  - network_id: 1
                    url: "track.acme.com"
                    type: "down"
                    domain_type: "tracking"
                    active_incident_count: 2
                    resolved_incident_count: 1
                    active_blacklist_incident_count: 0
                    resolved_blacklist_incident_count: 0
              schema:
                type: object
                properties:
                  entries:
                    type: array
                    description: One entry per monitored domain.
                    items:
                      $ref: "#/components/schemas/DomainSituationShort"
      security:
        - API Key: []
  /networks/traffic/domains/{domainUrl}/situation:
    post:
      summary: Get Domain Situation
      description: >
        The full Traffic Health picture for a single monitored domain — overall
        state, ownership, expiry, IP-flag status, its open incidents, and rolled-up
        incident / task / flag counts. The domain must be a monitored tracking or
        conversion domain; otherwise an `INVALID_ARGUMENT` error is returned.
      tags:
        - Traffic Health
      parameters:
        - in: path
          name: domainUrl
          required: true
          schema:
            type: string
          description: The monitored tracking or conversion domain URL (e.g. `track.acme.com`).
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SituationFilter"
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                network_id: 1
                url: "track.acme.com"
                type: "down"
                domain_type: "tracking"
                ownership: "internal"
                is_mps: false
                time_expires: 1797989980
                is_ip_flagged: false
                time_last_uptime_checked: 1782434380
                time_first_uptime_checked: 1782437980
                incidents:
                  - network_id: 1
                    url: "track.acme.com"
                    identifier: "WO8429BKVJ4E7CPE"
                    type: "certificate_issue"
                    status: "active"
                    time_created: 1781746780
                    time_resolved: 0
                ongoing_incidents_count: 1
                resolved_incidents_count: 0
                action_required_tasks_count: 0
                non_urgent_tasks_count: 0
                completed_tasks_count: 0
                active_flags_count: 0
                removed_flags_count: 0
                mean_time_to_resolution_seconds: 0
              schema:
                $ref: "#/components/schemas/DomainSituation"
      security:
        - API Key: []
  /networks/traffic/assignments/{domainUrl}/summary:
    get:
      summary: Get Domain Assignment Summary
      description: >
        Assignment summary for a single tracking domain — whether it is active and
        assignable, and how many offers, partners, and offer/partner combinations are
        currently assigned to it. Assignments themselves are managed at the offer and
        affiliate level.
      tags:
        - Traffic Health
      parameters:
        - in: path
          name: domainUrl
          required: true
          schema:
            type: string
          description: The tracking domain URL (e.g. `track.acme.com`).
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                active: true
                assignable: true
                offers_assigned: 4
                partners_assigned: 12
                combinations_assigned: 18
              schema:
                $ref: "#/components/schemas/AssignmentSummary"
      security:
        - API Key: []
  /networks/traffic/incidents/{incidentIdentifier}:
    get:
      summary: Get Incident
      description: >
        A single uptime / SSL / DNS / expiry incident by its identifier, including its
        contributing factors, linked remediation tasks, and the domain it affects.
        Incident identifiers come from the domain situation endpoints.
      tags:
        - Traffic Health
      parameters:
        - in: path
          name: incidentIdentifier
          required: true
          schema:
            type: string
          description: The incident identifier (e.g. `WO8429BKVJ4E7CPE`).
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                network_id: 1
                url: "track.acme.com"
                network_tracking_domain_id: 25004
                network_conversion_domain_id: 0
                identifier: "WO8429BKVJ4E7CPE"
                type: "certificate_issue"
                status: "active"
                time_created: 1781746780
                time_saved: 1782437980
                time_last_observed: 1782437980
                time_resolved: 0
                relationship:
                  factors: []
                  tasks: []
              schema:
                $ref: "#/components/schemas/Incident"
      security:
        - API Key: []
  /networks/traffic/tasks:
    get:
      summary: List Tasks
      description: >
        Customer-actionable remediation tasks across the network — each task is a
        domain that needs action from you (renew a domain, verify ownership, fix DNS,
        etc.), with its urgency category, status, and the incident that generated it.
      tags:
        - Traffic Health
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                tasks:
                  - network_id: 1
                    url: "track.acme.com"
                    identifier: "T81BNW0EFPJ9O0FP"
                    type: "renew_domain"
                    category: "reactive"
                    status: "to_do"
                    assignment: "customer"
                    title: "Your domain subscription has expired. Renew it now"
                    description: "Under your domain registrar, add or choose a payment method and renew the domain."
                    time_created: 1779845980
                    time_completed: 0
                    relationship:
                      incident_identifier: "DOXTKYVL2JYFT9YS"
              schema:
                type: object
                properties:
                  tasks:
                    type: array
                    items:
                      $ref: "#/components/schemas/Task"
      security:
        - API Key: []
  /networks/traffic/tasks/{taskIdentifier}:
    get:
      summary: Get Task
      description: >
        A single remediation task by its identifier, including its title, step-by-step
        description, urgency, status, and the incident that generated it.
      tags:
        - Traffic Health
      parameters:
        - in: path
          name: taskIdentifier
          required: true
          schema:
            type: string
          description: The task identifier (e.g. `T81BNW0EFPJ9O0FP`).
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                network_id: 1
                url: "track.acme.com"
                network_tracking_domain_id: 0
                network_conversion_domain_id: 0
                identifier: "T81BNW0EFPJ9O0FP"
                type: "renew_domain"
                category: "reactive"
                status: "to_do"
                assignment: "customer"
                title: "Your domain subscription has expired. Renew it now"
                description: "Under your domain registrar, add or choose a payment method and renew the domain."
                time_created: 1779845980
                time_completed: 0
                relationship:
                  incident_identifier: "DOXTKYVL2JYFT9YS"
              schema:
                $ref: "#/components/schemas/Task"
      security:
        - API Key: []
  /networks/traffic/blacklistincidents/domains/{blacklistIncidentIdentifier}:
    get:
      summary: Get Domain Blacklist Incident
      description: >
        **Traffic Health Premium.** A single domain blocklist incident by its
        identifier — the flagging provider and vendor, status, and the vendor's
        listing details (impact level, criteria, delisting guidance). Requires
        `has_blacklist_monitoring`.
      tags:
        - Traffic Health
      parameters:
        - in: path
          name: blacklistIncidentIdentifier
          required: true
          schema:
            type: string
          description: The blacklist incident identifier.
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                network_id: 1
                url: "track.acme.com"
                domain_type: "tracking"
                identifier: "N5T2KL7CUPYYNBY0"
                status: "active"
                provider: "easylist"
                vendor: "EASYLIST"
                time_created: 1778549980
                time_saved: 1782437980
                time_last_observed: 1782437980
                time_resolved: 0
                relationship:
                  vendor:
                    provider: "EasyList"
                    category: "Advertiser Block List"
                    name: "EasyList"
                    identifier: "EASYLIST"
                    website_url: "https://easylist.to/"
                    impact_level: "high"
              schema:
                $ref: "#/components/schemas/DomainBlacklistIncident"
      security:
        - API Key: []
  /networks/traffic/blacklistincidents/ipaddresses/{blacklistIncidentIdentifier}:
    get:
      summary: Get IP Address Blacklist Incident
      description: >
        **Traffic Health Premium.** A single hosting-IP blocklist incident by its
        identifier — provider and vendor, status, the IP address it affects, the
        vendor's listing details, and a delist URL where available. Requires
        `has_blacklist_monitoring`.
      tags:
        - Traffic Health
      parameters:
        - in: path
          name: blacklistIncidentIdentifier
          required: true
          schema:
            type: string
          description: The IP blacklist incident identifier.
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                network_id: 1
                ip_address: "203.0.113.44"
                ip_address_id: 5
                identifier: "BL9Q2X7K4ZP1"
                status: "active"
                provider: "hetrix_tools"
                vendor: "pbl.spamhaus.org"
                time_created: 1775957980
                time_saved: 1782437980
                time_last_observed: 1782437980
                time_resolved: 0
                relationship:
                  vendor:
                    provider: "Hetrix"
                    category: "IP Blocklist"
                    name: "Spamhaus PBL (pbl.spamhaus.org)"
                    identifier: "pbl.spamhaus.org"
                    impact_level: "high"
                  ip_address:
                    ip_address_id: 5
                    ip_address: "203.0.113.44"
                    ip_version: "ipv4"
                    is_external: false
                  delist_url: "https://check.spamhaus.org/results/?query=203.0.113.44"
              schema:
                $ref: "#/components/schemas/IpBlacklistIncident"
      security:
        - API Key: []
  /networks/traffic/usage/domains:
    post:
      summary: Get Domain Usage
      description: >
        Traffic-attributed reporting per tracking domain — how many offers, partners,
        and offer/partner combinations route through each domain, with that domain's
        performance metrics. The `reporting` object uses the standard Network
        Reporting metric set; see the
        [Reporting](/api-reference/post-networksreportingentitytable) endpoints for
        the full metric definitions. Send an optional reporting window in the body.
      tags:
        - Traffic Health
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UsageFilter"
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                network_domain_reporting:
                  - tracking_domain_id: 1
                    url: "track.acme.com"
                    offer_count: 3
                    affiliate_count: 8
                    reporting:
                      total_click: 1240
                      unique_click: 1180
                      cv: 64
                      revenue: 5120.5
                      payout: 3280.0
                      profit: 1840.5
              schema:
                type: object
                properties:
                  network_domain_reporting:
                    type: array
                    items:
                      $ref: "#/components/schemas/DomainUsage"
      security:
        - API Key: []
  /networks/traffic/mismatches/{networkTrackingDomainId}:
    post:
      summary: Get Domain Mismatches
      description: >
        Tracking-domain mismatches for a domain — offer/affiliate assignments whose
        observed traffic ran on a *different* tracking domain than the one assigned.
        Each entry pairs the assigned domain with the domain traffic was actually seen
        on, plus the offer and affiliate involved. Backed by reporting data; send an
        optional reporting window and filters in the body.
      tags:
        - Traffic Health
      parameters:
        - in: path
          name: networkTrackingDomainId
          required: true
          schema:
            type: integer
          description: The tracking domain ID to check for mismatches.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MismatchQuery"
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                mismatches:
                  - network_id: 5
                    network_tracking_domain_id: 8
                    assigned_network_tracking_domain_id: 10361
                    network_offer_id: 882
                    network_affiliate_id: 20019
                    assignment_type: "offer"
                    time_detected: 1744663035
                    relationship:
                      network_tracking_domain:
                        network_tracking_domain_id: 8
                        network_id: 5
                        url: "www.serve-eflow-test.com"
                        is_primary_domain: false
                        domain_status: "active"
                        is_unassignable: false
                        ownership: "internal"
                        is_ssl_enabled: true
                        time_created: 1482191486
                        time_saved: 1777378430
                      assigned_network_tracking_domain:
                        network_tracking_domain_id: 10361
                        network_id: 5
                        url: "multiproxy.clik2trk.com"
                        is_primary_domain: false
                        domain_status: "active"
                        is_unassignable: false
                        ownership: "external"
                        is_ssl_enabled: true
                        time_created: 1718823747
                        time_saved: 1779323042
                      offer:
                        network_offer_id: 882
                        network_id: 5
                        name: "Mountains of White Castle Burgers!"
                        offer_status: "active"
                      affiliate:
                        network_affiliate_id: 20019
                        network_id: 5
                        name: "Media Media Media"
                        account_status: "active"
              schema:
                type: object
                properties:
                  mismatches:
                    type: array
                    items:
                      $ref: "#/components/schemas/Mismatch"
      security:
        - API Key: []
  /networks/traffic/isptrends:
    get:
      summary: List ISP Trends
      description: >
        **Traffic Health Premium.** Tracking domain and ISP pairs whose click volume is
        declining. A pair is returned only when yesterday's clicks are lower than each
        of the single days 7, 14 and 30 days back, so an empty `entries` array means
        nothing is declining, not that there is no traffic. Each entry carries clicks,
        conversions and revenue for yesterday and for each comparison day, plus the
        change (`_delta`) and the percent trend (`_trend`) from each. Use it to trace a
        partner's "my traffic dropped" report to a specific ISP and domain. On a network
        without the premium package the request returns an authorization error.
      tags:
        - Traffic Health
      responses:
        "200":
          description: ""
          content:
            application/json:
              example:
                entries:
                  - network_id: 1
                    network_tracking_domain_id: 8
                    isp: "Comcast Cable"
                    yesterday_total_clicks: 420
                    seven_days_ago_total_clicks: 910
                    fourteen_days_ago_total_clicks: 880
                    thirty_days_ago_total_clicks: 950
                    yesterday_seven_days_ago_total_clicks_delta: -490
                    yesterday_fourteen_days_ago_total_clicks_delta: -460
                    yesterday_thirty_days_ago_total_clicks_delta: -530
                    yesterday_seven_days_ago_total_clicks_trend: -53.85
                    yesterday_fourteen_days_ago_total_clicks_trend: -52.27
                    yesterday_thirty_days_ago_total_clicks_trend: -55.79
                    yesterday_conversions: 12
                    seven_days_ago_conversions: 31
                    fourteen_days_ago_conversions: 29
                    thirty_days_ago_conversions: 33
                    yesterday_revenue: 360.0
                    seven_days_ago_revenue: 930.0
                    fourteen_days_ago_revenue: 870.0
                    thirty_days_ago_revenue: 990.0
                    relationship:
                      url: "track.acme.com"
              schema:
                type: object
                properties:
                  entries:
                    type: array
                    description: One entry per declining tracking domain and ISP pair.
                    items:
                      $ref: "#/components/schemas/IspTrend"
      security:
        - API Key: []
components:
  securitySchemes:
    API Key:
      type: apiKey
      in: header
      name: X-Eflow-Api-Key
  schemas:
    TrafficHealthAccess:
      type: object
      properties:
        is_enabled:
          type: boolean
          description: Whether Traffic Health is enabled for the network (basic or premium).
        has_premium:
          type: boolean
          description: Whether the Traffic Health Premium tier is active.
        has_blacklist_monitoring:
          type: boolean
          description: "Premium: domain and IP blocklist reputation monitoring."
        has_monitoring_alerts:
          type: boolean
          description: "Premium: configurable monitoring alerts."
        has_third_party_domain_monitoring:
          type: boolean
          description: "Premium: monitoring of external domains."
        has_external_proxy_domain:
          type: boolean
          description: "Premium: external-proxy (self-hosted) domains and certificates."
        has_external_notifications:
          type: boolean
          description: "Premium: external notification channels."
        has_domain_assignment_management:
          type: boolean
          description: "Premium: domain assignment management."
        premium_monitored_domain_quota:
          type: integer
          description: Number of domains that can be premium-monitored.
    SituationFilter:
      type: object
      description: Optional filters. Send an empty object `{}` for the default rollup.
    SituationSummary:
      type: object
      properties:
        network_id:
          type: integer
        active_domain_count:
          type: integer
        active_domain_with_incident_count:
          type: integer
        active_domain_without_incident_count:
          type: integer
        active_domain_with_blacklist_incident_count:
          type: integer
        active_domain_without_blacklist_incident_count:
          type: integer
        active_incident_count:
          type: integer
        active_domain_blacklist_incident_count:
          type: integer
        active_easylist_domain_blacklist_incident_count:
          type: integer
        active_hetrix_tools_domain_blacklist_incident_count:
          type: integer
        active_google_threat_intelligence_domain_blacklist_incident_count:
          type: integer
        active_ip_address_blacklist_incident_count:
          type: integer
        mean_time_to_resolution_seconds:
          type: integer
          description: Mean time to resolution for resolved incidents, in seconds.
    DomainSituationShort:
      type: object
      properties:
        network_id:
          type: integer
        url:
          type: string
        type:
          type: string
          description: Overall state of the domain (`up` or `down`).
        domain_type:
          type: string
          description: "`tracking`, `conversion`, or `third_party`."
        active_incident_count:
          type: integer
        resolved_incident_count:
          type: integer
        active_blacklist_incident_count:
          type: integer
        resolved_blacklist_incident_count:
          type: integer
    DomainSituation:
      type: object
      properties:
        network_id:
          type: integer
        url:
          type: string
        type:
          type: string
          description: Overall state of the domain (`up` or `down`).
        domain_type:
          type: string
        ownership:
          type: string
          description: Ownership / management model (e.g. `internal`).
        is_mps:
          type: boolean
          description: Managed proxy service domain.
        time_expires:
          type: integer
          description: Domain expiry (unix seconds).
        is_ip_flagged:
          type: boolean
          description: Whether a hosting IP is currently flagged.
        time_last_uptime_checked:
          type: integer
        time_first_uptime_checked:
          type: integer
        incidents:
          type: array
          items:
            $ref: "#/components/schemas/Incident"
        ongoing_incidents_count:
          type: integer
        resolved_incidents_count:
          type: integer
        action_required_tasks_count:
          type: integer
        non_urgent_tasks_count:
          type: integer
        completed_tasks_count:
          type: integer
        active_flags_count:
          type: integer
        removed_flags_count:
          type: integer
        mean_time_to_resolution_seconds:
          type: integer
    AssignmentSummary:
      type: object
      properties:
        active:
          type: boolean
          description: Whether the tracking domain is active.
        assignable:
          type: boolean
          description: Whether the domain can be assigned.
        offers_assigned:
          type: integer
        partners_assigned:
          type: integer
        combinations_assigned:
          type: integer
          description: Number of offer/partner combinations assigned to the domain.
    Incident:
      type: object
      properties:
        network_id:
          type: integer
        url:
          type: string
        network_tracking_domain_id:
          type: integer
        network_conversion_domain_id:
          type: integer
        identifier:
          type: string
        type:
          type: string
          description: Incident type (uptime / SSL / DNS / expiry category).
        status:
          type: string
          description: "`active` or `resolved`."
        time_created:
          type: integer
        time_saved:
          type: integer
        time_last_observed:
          type: integer
        time_resolved:
          type: integer
          description: Unix seconds; `0` while the incident is active.
        relationship:
          type: object
          properties:
            factors:
              type: array
              description: Contributing signals for the incident.
              items:
                type: object
            tasks:
              type: array
              description: Remediation tasks linked to the incident.
              items:
                $ref: "#/components/schemas/Task"
    Task:
      type: object
      properties:
        network_id:
          type: integer
        url:
          type: string
        network_tracking_domain_id:
          type: integer
        network_conversion_domain_id:
          type: integer
        identifier:
          type: string
        type:
          type: string
          description: Task type (e.g. `renew_domain`).
        category:
          type: string
          description: Urgency category (e.g. `reactive`).
        status:
          type: string
          description: Task status (e.g. `to_do`).
        assignment:
          type: string
          description: Who the task is assigned to (e.g. `customer`).
        title:
          type: string
        description:
          type: string
        time_created:
          type: integer
        time_completed:
          type: integer
          description: Unix seconds; `0` while the task is open.
        relationship:
          type: object
          properties:
            incident_identifier:
              type: string
              description: The incident that generated the task.
    BlacklistVendor:
      type: object
      description: Listing details for the flagging vendor.
      properties:
        provider:
          type: string
        category:
          type: string
        name:
          type: string
        identifier:
          type: string
        website_url:
          type: string
        impact_level:
          type: string
          description: "`low`, `medium`, or `high`."
        impact_details:
          type: string
        listing_criteria:
          type: string
    DomainBlacklistIncident:
      type: object
      properties:
        network_id:
          type: integer
        url:
          type: string
        domain_type:
          type: string
        identifier:
          type: string
        status:
          type: string
        provider:
          type: string
          description: "Blocklist source (e.g. `easylist`, `google_threat_intelligence`)."
        vendor:
          type: string
        time_created:
          type: integer
        time_saved:
          type: integer
        time_last_observed:
          type: integer
        time_resolved:
          type: integer
        relationship:
          type: object
          properties:
            vendor:
              $ref: "#/components/schemas/BlacklistVendor"
    IpBlacklistIncident:
      type: object
      properties:
        network_id:
          type: integer
        ip_address:
          type: string
        ip_address_id:
          type: integer
        identifier:
          type: string
        status:
          type: string
        provider:
          type: string
        vendor:
          type: string
        time_created:
          type: integer
        time_saved:
          type: integer
        time_last_observed:
          type: integer
        time_resolved:
          type: integer
        relationship:
          type: object
          properties:
            vendor:
              $ref: "#/components/schemas/BlacklistVendor"
            ip_address:
              type: object
              properties:
                ip_address_id:
                  type: integer
                ip_address:
                  type: string
                ip_version:
                  type: string
                  description: "`ipv4` or `ipv6`."
                is_external:
                  type: boolean
            delist_url:
              type: string
              description: Delisting request URL where available.
    UsageFilter:
      type: object
      description: >
        Optional reporting window. Send an empty object `{}` for the default window.
      properties:
        from:
          type: string
          description: Window start, `YYYY-MM-DD`.
        to:
          type: string
          description: Window end, `YYYY-MM-DD`.
        timezone_id:
          type: integer
          description: Reporting timezone ID.
    DomainUsage:
      type: object
      properties:
        tracking_domain_id:
          type: integer
        url:
          type: string
        offer_count:
          type: integer
        affiliate_count:
          type: integer
        reporting:
          type: object
          description: >
            Standard Network Reporting metric set (clicks, conversions, revenue,
            payout, profit, and rate metrics). See the Reporting endpoints for the
            full metric definitions.
    MismatchQuery:
      type: object
      description: Optional filters and search terms. Send an empty object `{}` for the default window.
      properties:
        filters:
          type: object
          properties:
            network_assigned_tracking_domain_id:
              type: integer
              description: Narrow to mismatches whose traffic ran on this assigned domain.
            network_offer_id:
              type: integer
            network_affiliate_id:
              type: integer
            from_timestamp:
              type: integer
              description: Reporting window start (unix seconds).
            to_timestamp:
              type: integer
              description: Reporting window end (unix seconds).
            assignment_types:
              type: array
              description: "Filter by assignment level: `offer`, `affiliate`, `offer_affiliate`."
              items:
                type: string
        search_terms:
          type: array
          description: Optional search by domain, offer, or affiliate.
          items:
            type: object
            properties:
              search_type:
                type: string
                description: "`domain`, `offer`, or `affiliate`."
              value:
                type: string
    Mismatch:
      type: object
      properties:
        network_id:
          type: integer
        network_tracking_domain_id:
          type: integer
          description: The assigned tracking domain (the one queried).
        assigned_network_tracking_domain_id:
          type: integer
          description: The tracking domain traffic was actually observed on.
        network_offer_id:
          type: integer
        network_affiliate_id:
          type: integer
        assignment_type:
          type: string
          description: "The level the assignment exists at: `offer`, `affiliate`, or `offer_affiliate`."
        time_detected:
          type: integer
          description: When the mismatch was detected (unix seconds).
        relationship:
          type: object
          properties:
            network_tracking_domain:
              $ref: "#/components/schemas/MismatchTrackingDomain"
            assigned_network_tracking_domain:
              $ref: "#/components/schemas/MismatchTrackingDomain"
            offer:
              $ref: "#/components/schemas/MismatchOffer"
            affiliate:
              $ref: "#/components/schemas/MismatchAffiliate"
    MismatchTrackingDomain:
      type: object
      properties:
        network_tracking_domain_id:
          type: integer
        network_id:
          type: integer
        url:
          type: string
        is_primary_domain:
          type: boolean
        domain_status:
          type: string
        is_unassignable:
          type: boolean
        ownership:
          type: string
          description: "`internal` or `external`."
        is_ssl_enabled:
          type: boolean
        html_static_redirect:
          type: string
        url_redirect:
          type: string
        public_notes:
          type: string
        time_created:
          type: integer
        time_saved:
          type: integer
    MismatchOffer:
      type: object
      properties:
        network_offer_id:
          type: integer
        network_id:
          type: integer
        name:
          type: string
        offer_status:
          type: string
    MismatchAffiliate:
      type: object
      properties:
        network_affiliate_id:
          type: integer
        network_id:
          type: integer
        name:
          type: string
        account_status:
          type: string
    IspTrend:
      type: object
      description: >
        A tracking domain and ISP pair whose clicks are down yesterday against every
        comparison day. Fields follow the pattern `<period>_<metric>`, with
        `yesterday_<days>_days_ago_<metric>_delta` and `_trend` for the change from
        each comparison day. Trends are percentages (`-53.85` is a 53.85% drop).
      properties:
        network_id:
          type: integer
        network_tracking_domain_id:
          type: integer
        isp:
          type: string
        yesterday_total_clicks:
          type: integer
        seven_days_ago_total_clicks:
          type: integer
        fourteen_days_ago_total_clicks:
          type: integer
        thirty_days_ago_total_clicks:
          type: integer
        yesterday_seven_days_ago_total_clicks_delta:
          type: integer
        yesterday_fourteen_days_ago_total_clicks_delta:
          type: integer
        yesterday_thirty_days_ago_total_clicks_delta:
          type: integer
        yesterday_seven_days_ago_total_clicks_trend:
          type: number
        yesterday_fourteen_days_ago_total_clicks_trend:
          type: number
        yesterday_thirty_days_ago_total_clicks_trend:
          type: number
        yesterday_conversions:
          type: integer
        seven_days_ago_conversions:
          type: integer
        fourteen_days_ago_conversions:
          type: integer
        thirty_days_ago_conversions:
          type: integer
        yesterday_seven_days_ago_conversions_delta:
          type: integer
        yesterday_fourteen_days_ago_conversions_delta:
          type: integer
        yesterday_thirty_days_ago_conversions_delta:
          type: integer
        yesterday_seven_days_ago_conversions_trend:
          type: number
        yesterday_fourteen_days_ago_conversions_trend:
          type: number
        yesterday_thirty_days_ago_conversions_trend:
          type: number
        yesterday_revenue:
          type: number
        seven_days_ago_revenue:
          type: number
        fourteen_days_ago_revenue:
          type: number
        thirty_days_ago_revenue:
          type: number
        yesterday_seven_days_ago_revenue_delta:
          type: number
        yesterday_fourteen_days_ago_revenue_delta:
          type: number
        yesterday_thirty_days_ago_revenue_delta:
          type: number
        yesterday_seven_days_ago_revenue_trend:
          type: number
        yesterday_fourteen_days_ago_revenue_trend:
          type: number
        yesterday_thirty_days_ago_revenue_trend:
          type: number
        relationship:
          type: object
          properties:
            url:
              type: string
              description: The tracking domain URL.
