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

# Get Rule

> Retrieve a single Customer Value rule, with its goals, by its ID.

Returns a single Customer Value rule, with its goals, by its ID.

Fetch the rule before an [update](/api-reference/put-networksusmrules) — that endpoint is a full replace, so you need the current object to modify and send back.


## OpenAPI

````yaml openapi/customer-value.yaml get /networks/usm/rules/{ruleId}
openapi: 3.0.3
info:
  title: Everflow Network API - Customer Value
  description: >
    Endpoints for managing Customer Value — data points and rules — in the
    Everflow network.


    Customer Value was previously called **User Management**, and the API paths
    keep the `usm` prefix from that name.


    A **data point** declares a named customer attribute (`ltv_90d`,
    `plan_tier`) that you send in with conversions. A **rule** watches those
    data points, plus standard conversion metrics, and adjusts payout or revenue
    when a customer's aggregated values meet its goals. For setup, see [Customer
    Value](https://helpdesk.everflow.io/customer/customer-value) in the Help
    Center.
  version: 1.0.0
servers:
  - description: Production Server
    url: https://api.eflow.team/v1
security: []
tags:
  - name: Customer Value
    description: >-
      Data points and rules that drive Customer Value payout and revenue
      adjustments.
  - name: Reporting
    description: Conversion reporting scoped to a single customer.
paths:
  /networks/usm/rules/{ruleId}:
    get:
      tags:
        - Customer Value
      summary: Get Rule by ID
      description: Retrieve a single Customer Value rule, with its goals, by its ID.
      parameters:
        - in: path
          name: ruleId
          required: true
          schema:
            type: integer
          description: The rule identifier.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
      security:
        - API Key: []
components:
  schemas:
    Rule:
      allOf:
        - type: object
          properties:
            network_usm_rule_id:
              type: integer
              example: 3
              description: Unique rule ID.
            network_id:
              type: integer
              example: 1
              description: Network ID.
        - $ref: '#/components/schemas/RuleInput'
        - type: object
          properties:
            time_created:
              type: integer
              example: 1788398644
              description: Unix timestamp of creation.
            time_saved:
              type: integer
              example: 1788398704
              description: Unix timestamp of last update.
            relationship:
              type: object
              description: Related objects for the rule.
    RuleInput:
      type: object
      required:
        - name
        - status
        - aggregation_level
        - period
        - trigger_type
        - time_window_duration
        - goals
      properties:
        name:
          type: string
          example: High-LTV bonus
          description: The rule name shown in the Everflow UI.
        status:
          type: string
          enum:
            - active
            - inactive
          description: Whether the rule is evaluated against incoming conversions.
        start_date:
          type: string
          example: '2026-09-01'
          description: 'Date the rule starts applying (format: `YYYY-MM-DD`).'
        end_date:
          type: string
          example: '2026-12-31'
          description: 'Date the rule stops applying (format: `YYYY-MM-DD`).'
        network_offer_ids:
          type: array
          items:
            type: integer
          description: |
            Offers the rule applies to. Leave empty to apply to all offers.
          nullable: true
        network_advertiser_ids:
          type: array
          items:
            type: integer
          description: >-
            Advertisers the rule applies to. Leave empty to apply to all
            advertisers.
          nullable: true
        network_affiliate_ids:
          type: array
          items:
            type: integer
          description: Partners the rule applies to. Leave empty to apply to all partners.
          nullable: true
        aggregation_level:
          type: string
          enum:
            - user
            - user_offer
            - user_affiliate
            - user_advertiser
            - user_affiliate_offer
            - user_affiliate_advertiser
          description: >
            How customer activity is grouped before goals are evaluated. `user`
            aggregates all of a customer's activity across the network; the
            compound levels keep a separate total per partner, offer or
            advertiser.
        period:
          type: string
          enum:
            - daily
            - weekly
            - monthly
            - quarterly
            - global
            - since_user_sign_up
          description: >
            The window the aggregation resets on. `global` and
            `since_user_sign_up` never reset, and are the only periods allowed
            with a `one_time` trigger.
        network_offer_payout_revenue_id:
          type: integer
          description: >
            Restrict the rule to one specific offer payout/revenue entry
            (event). Send `0` to apply to every event on the selected offers.
            Cannot be set when `network_offer_ids` holds more than one offer.
        trigger_type:
          type: string
          enum:
            - one_time
            - recurring
          description: >
            Whether the rule fires once per customer (`one_time`) or every time
            the goals are met (`recurring`). `one_time` requires a non-resetting
            `period`, and forces `payout_action` `exact` with `payout_type`
            `cpa`.
        time_window_duration:
          type: integer
          example: 30
          description: >
            How many days of customer history the rule looks back over. Must be
            greater than `0`.
        goals:
          type: array
          description: >
            The conditions a customer must meet. All goals must match. Replaced
            wholesale on every update.
          items:
            $ref: '#/components/schemas/RuleGoal'
        is_payout_enabled:
          type: boolean
          description: Whether the rule adjusts partner payout.
        payout_action:
          type: string
          enum:
            - exact
            - increase
            - decrease
            - flat_increase
            - flat_decrease
            - unknown
          description: >
            How payout is adjusted. `exact` sets the payout outright,
            `flat_increase` and `flat_decrease` add or subtract `payout_value`,
            and `increase` and `decrease` apply `payout_percentage`. Send
            `unknown` when `is_payout_enabled` is `false`.
        payout_value:
          type: number
          format: double
          description: >-
            The flat amount used by `exact`, `flat_increase` and
            `flat_decrease`.
        payout_type:
          type: string
          enum:
            - cpa
            - cpc
            - cpm
            - cps
            - cpa_cps
            - prv
            - blank
          description: >
            The payout model the adjusted payout is written as. Rules support
            these six models; the SKU variants available on an offer (`cpa_sku`,
            `cps_sku`, …) are not supported here.


            Required with `payout_action: exact` (`blank` is rejected there with
            `Must define a payout type if payout action is 'exact'`), and must
            be `cpa` for `one_time` rules. The flat actions apply `payout_value`
            directly and ignore it — send `blank`.
        payout_percentage:
          type: number
          format: double
          description: The percentage used by the `increase` and `decrease` actions.
        is_revenue_enabled:
          type: boolean
          description: Whether the rule adjusts advertiser revenue.
        revenue_action:
          type: string
          enum:
            - exact
            - increase
            - decrease
            - flat_increase
            - flat_decrease
            - unknown
          description: >
            How revenue is adjusted, mirroring `payout_action`. Send `unknown`
            when `is_revenue_enabled` is `false`.
        revenue_value:
          type: number
          format: double
          description: >-
            The flat amount used by `exact`, `flat_increase` and
            `flat_decrease`.
        revenue_type:
          type: string
          enum:
            - rpa
            - rpc
            - rpm
            - rps
            - rpa_rps
            - blank
          description: >
            The revenue model the adjusted revenue is written as. Rules support
            these five models. Required with `revenue_action: exact` (`blank` is
            rejected there with `Must define a revenue type if revenue action is
            'exact'`); the flat actions ignore it.
        revenue_percentage:
          type: number
          format: double
          description: The percentage used by the `increase` and `decrease` actions.
    RuleGoal:
      type: object
      properties:
        network_usm_rule_goal_id:
          type: integer
          description: >
            Unique goal ID. Assigned by Everflow; goals are re-created on every
            rule update, so this value changes.
        metric:
          type: string
          enum:
            - data_point
            - conversion
            - event
            - payout
            - revenue
            - sale_amount
          description: >
            What the goal measures. Use `data_point` to measure one of your own
            data points, named in `metric_data_point_identifier`.


            `event` cannot be combined with a `network_offer_payout_revenue_id`
            that points at the offer's base event — that returns `An event goal
            cannot be defined if the selected event is the base event`. Send
            `network_offer_payout_revenue_id: 0`, or target a non-base event.
        metric_data_point_identifier:
          type: string
          example: ltv_90d
          description: >
            The `identifier` of the data point to measure. Required when
            `metric` is `data_point`, ignored otherwise.
        metric_aggr_function:
          type: string
          enum:
            - sum
            - min
            - max
            - current
            - all
            - some
          description: >
            How values are aggregated over the rule's `period` before
            comparison. Use `current` to compare the latest value only.
        operator:
          type: string
          enum:
            - greater_than
            - less_than
            - equals
            - exact_match
            - contains
            - begins_with
            - ends_with
          description: >
            How the aggregated value is compared. Use the numeric operators with
            `value_numeric` and the string operators with `value_string`.
        value_numeric:
          type: number
          format: double
          description: The threshold for numeric comparisons.
        value_string:
          type: string
          description: The threshold for string comparisons.
  securitySchemes:
    API Key:
      description: The Everflow API key generated from the Control Center > Security.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey

````