For the complete documentation index, see llms.txt. This page is also available as Markdown.

Revenue Rules

Defines the conditions and methods used to determine how and when revenue should be recognized. These rules guide the transformation of API inputs into revenue events.

Get Revenue Rules Policy

get
/apis/policy-sets/v1/policy/revenue-rules

To retrieve the Advanced (Rules Builder) and By Product Revenue Rules created in the system.

Responses
200

Get Revenue Rules Policy

application/json
compliance_idstringRequired

A system-generated compliance ID to retrieve the Revenue Rules Policies

compliance_namestringRequired

Name of the policy fetched by the system.

created_bystringRequired

ID of the user who created the policy. Example: username@rightrev.com

created_onintegerRequired

Timestamp of the policy created by the user. This is a unix Epoch timestamp format

last_modified_bystringRequired

ID of the user last modified by

last_modified_onintegerRequired

Timestamp of the policy last modified on. This is a unix Epoch timestamp format

last_usednullRequired

When the policy used. Value here should be Null

policy_typestringRequired

Represents the type of policy

statusstringRequired

Represents the status of the policy

unique_keystringRequired

Name of the Policy

version_idstringRequired

Unique alpha-numeric number generated by the system

get/apis/policy-sets/v1/policy/revenue-rules
GET /apis/policy-sets/v1/policy/revenue-rules HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Accept: */*
200

Get Revenue Rules Policy

{
  "compliance_id": "0edfe255-7ec8-47ce-98d4-5c884bcdba42",
  "compliance_name": "Revenue rule by product",
  "compliance_spec": [
    {
      "rule": [
        {
          "active": true,
          "can_delete": false,
          "created_at": 1758630295,
          "created_by": "RIGHTREV",
          "distribution_date_method": "CATCHUP",
          "distribution_method": "POINTINTIME",
          "hybrid_rules": null,
          "is_user_defined": false,
          "name": "MJE-PIT",
          "pob_type": "MJE",
          "prorate_method": null,
          "revenue_trigger": "BOOKING",
          "rule_type": "ADVANCED",
          "sequence_no": 1,
          "updated_at": 1758630295,
          "updated_by": "RIGHTREV",
          "user_defined_event": null,
          "when": []
        }
      ]
    },
    {
      "rule": [
        {
          "active": true,
          "can_delete": false,
          "created_at": 1758630295,
          "created_by": "RIGHTREV",
          "distribution_date_method": "CATCHUP",
          "distribution_method": "DAILY",
          "hybrid_rules": null,
          "is_user_defined": false,
          "name": "MJE-RATABLE",
          "pob_type": "MJE",
          "prorate_method": null,
          "revenue_trigger": "BOOKING",
          "rule_type": "ADVANCED",
          "sequence_no": 2,
          "updated_at": 1758630295,
          "updated_by": "RIGHTREV",
          "user_defined_event": null,
          "when": []
        }
      ]
    },
    {
      "rule": [
        {
          "active": true,
          "can_delete": false,
          "created_at": 1758630295,
          "created_by": "RIGHTREV",
          "distribution_date_method": "CATCHUP",
          "distribution_method": "POINTINTIME",
          "hybrid_rules": null,
          "is_user_defined": false,
          "name": "RR Accelerate Revenue",
          "pob_type": "DISTINCT",
          "prorate_method": null,
          "revenue_trigger": "BOOKING",
          "rule_type": "ADVANCED",
          "sequence_no": 10001,
          "updated_at": 1758630295,
          "updated_by": "RIGHTREV",
          "user_defined_event": null,
          "when": []
        }
      ]
    },
    {
      "rule": [
        {
          "active": true,
          "can_delete": true,
          "created_at": 1729686767,
          "created_by": "user@rightrev.com",
          "distribution_date_method": "CONDENSED",
          "distribution_method": "DAILY",
          "hybrid_rules": null,
          "is_user_defined": true,
          "name": "TEST_123",
          "pob_type": "DISTINCT",
          "prorate_method": null,
          "revenue_trigger": "BOOKING",
          "rule_type": "BY_PRODUCT",
          "sequence_no": null,
          "updated_at": 1729686767,
          "updated_by": "user@rightrev.com",
          "user_defined_event": null,
          "when": [
            {
              "field_name": "product_name",
              "operator": "==",
              "value": "TEST_123"
            }
          ]
        }
      ]
    }
  ],
  "created_by": "rightrev",
  "created_on": 1767600052,
  "last_modified_by": "rightrev",
  "last_modified_on": 1767600052,
  "last_used": null,
  "policy_type": "revenue-rules",
  "status": "Active",
  "unique_key": "rule/name",
  "version_id": "90a9d95c-dbc6-4119-b4dd-6f40372affa7"
}

Patch Revenue Rules Policy

patch
/apis/policy-sets/v1/policy/revenue-rules/{compliance_id}

To create new Revenue Rule or to update existing Revenue Rule.

Path parameters
compliance_idstringRequired

A system-generated compliance ID to edit the revenue rule policy

Body
format_typestringRequired

Format type of the request code used to collect data - For e.g. JSON

compliance_namestringRequired

Name of the Revenue Rule Policy either By Product or Advance

unique_keystringRequired

Name of the Revenue Rule Policy

Responses
200

Update Revenue Rules Policy

application/json
compliance_idstringRequired

A system-generated compliance ID to create or edit the event policy.

errorarrayRequired

Displays information about problems that occurred while handling the request. Commonly used to report validation errors, missing or invalid parameters, or other issues related to API processing.

patch/apis/policy-sets/v1/policy/revenue-rules/{compliance_id}
PATCH /apis/policy-sets/v1/policy/revenue-rules/{compliance_id} HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Content-Type: application/json
Accept: */*
Content-Length: 497

{
  "compliance_spec": [
    {
      "rule": [
        {
          "name": "Product_Sample",
          "pob_type": "DISTINCT",
          "prorate_method": null,
          "sequence_no": 100,
          "active": true,
          "distribution_date_method": "CATCHUP",
          "distribution_method": "POINTINTIME",
          "rule_type": "BY_PRODUCT",
          "user_defined_event": null,
          "revenue_trigger": "BILLING",
          "when": [
            {
              "field_name": "product_name",
              "operator": "==",
              "value": "Product_Sample"
            }
          ],
          "is_user_defined": true,
          "can_delete": true
        }
      ]
    }
  ],
  "format_type": "json",
  "compliance_name": "Revenue rule by product",
  "unique_key": "rule/name"
}
200

Update Revenue Rules Policy

{
  "compliance_details": [
    {
      "error": [],
      "message": "created successfully",
      "unique_key": "RRAPI-12"
    }
  ],
  "compliance_id": "b36073da-f869-48e0-aa8c-bf2c298e4074",
  "error": []
}

Delete Revenue Rules Policy

delete
/apis/policy-sets/v1/policy/revenue-rules/{compliance_id}/{object_unique_value}

To delete the Revenue Rule policies from system. User can delete only those policies which are not consumed.

Path parameters
compliance_idstringRequired

User has to provide compliance id to delete the policy

object_unique_valuestringRequired

Name of the Revenue Rule policy to be deleted.

Responses
200

Delete Revenue Rules Policy

application/json
compliance_detailsarrayRequired

Displays the details of specific rules and standards processed by the system

compliance_idstringRequired

Displays a system-generated compliance ID associated with revenue rule policy to be deleted

errorarrayRequired

Displays information about problems that occurred while handling the request. Commonly used to report validation errors, missing or invalid parameters, or other issues related to API processing.

delete/apis/policy-sets/v1/policy/revenue-rules/{compliance_id}/{object_unique_value}
DELETE /apis/policy-sets/v1/policy/revenue-rules/{compliance_id}/{object_unique_value} HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Accept: */*
200

Delete Revenue Rules Policy

{
  "compliance_details": [],
  "compliance_id": "b788cb6c-7fec-4786-a848-96d4e6a7620a",
  "error": []
}

Last updated

Was this helpful?