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.
To retrieve the Advanced (Rules Builder) and By Product Revenue Rules created in the system.
Get Revenue Rules Policy
A system-generated compliance ID to retrieve the Revenue Rules Policies
Name of the policy fetched by the system.
ID of the user who created the policy. Example: username@rightrev.com
Timestamp of the policy created by the user. This is a unix Epoch timestamp format
ID of the user last modified by
Timestamp of the policy last modified on. This is a unix Epoch timestamp format
When the policy used. Value here should be Null
Represents the type of policy
Represents the status of the policy
Name of the Policy
Unique alpha-numeric number generated by the system
GET /apis/policy-sets/v1/policy/revenue-rules HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Accept: */*
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"
}To create new Revenue Rule or to update existing Revenue Rule.
A system-generated compliance ID to edit the revenue rule policy
Format type of the request code used to collect data - For e.g. JSON
Name of the Revenue Rule Policy either By Product or Advance
Name of the Revenue Rule Policy
Update Revenue Rules Policy
A system-generated compliance ID to create or edit the event policy.
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} 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"
}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
To delete the Revenue Rule policies from system. User can delete only those policies which are not consumed.
User has to provide compliance id to delete the policy
Name of the Revenue Rule policy to be deleted.
Delete Revenue Rules Policy
Displays the details of specific rules and standards processed by the system
Displays a system-generated compliance ID associated with revenue rule policy to be deleted
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} HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Accept: */*
Delete Revenue Rules Policy
{
"compliance_details": [],
"compliance_id": "b788cb6c-7fec-4786-a848-96d4e6a7620a",
"error": []
}Last updated
Was this helpful?

