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

User Defined Events

Allows configuration of custom transaction types or events beyond standard system-defined events. API-triggered events are interpreted based on these definitions.

Get Events Definition Policy

get
/apis/policy-sets/v1/policy/events-definition

Retrieves Events policies created by the user and system for Revenue and Cost. Also retrieves the inactive event policies.

Responses
200

Get events definition Policy

application/json
compliance_idstringOptional

A system-generated compliance ID to retrieve the Event Policy

compliance_namestringOptional

Name of the policy fetched by the system.

created_bystringOptional

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

created_onintegerOptional

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

last_modified_bystringOptional

ID of the user last modified by

last_modified_onintegerOptional

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

policy_typestringOptional

Represents the type of policy

statusstringOptional

Represents the status of the policy

unique_keystringOptional

Name of the Policy

version_idstringOptional

Unique alpha-numeric number generated by the system

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

Get events definition Policy

{
  "compliance_id": "476510bb-a951-42f7-87fe-58f23ebaa9cb",
  "compliance_name": "events-definition",
  "compliance_spec": [
    {
      "active": true,
      "can_delete": false,
      "created_at": 1736358411,
      "created_by": "RIGHTREV",
      "cumulative": false,
      "event_category": "Revenue",
      "event_name": "Event_Percentage",
      "event_type": "Percentage",
      "is_user_defined": true,
      "last_modified_on": 1736358411,
      "source_identifier": [
        "order_financial_id"
      ],
      "updated_at": 1736358411,
      "updated_by": "RIGHTREV"
    },
    {
      "active": true,
      "can_delete": false,
      "created_at": 1707375154,
      "created_by": "RIGHTREV",
      "cumulative": false,
      "event_category": "Cost",
      "event_name": "Cost - Follow Revenue",
      "event_type": "Amount",
      "follow_revenue": true,
      "is_user_defined": false,
      "last_modified_on": 1707375154,
      "practical_expedient": false,
      "source_identifier": [
        "order_financial_id"
      ],
      "updated_at": 1707375154,
      "updated_by": "RIGHTREV"
    },
    {
      "active": true,
      "can_delete": false,
      "created_at": 1707375154,
      "created_by": "RIGHTREV",
      "cumulative": false,
      "event_category": "Cost",
      "event_name": "Cost - Practical Expedient",
      "event_type": "Amount",
      "follow_revenue": true,
      "is_user_defined": false,
      "last_modified_on": 1707375154,
      "practical_expedient": true,
      "source_identifier": [
        "order_financial_id"
      ],
      "updated_at": 1707375154,
      "updated_by": "RIGHTREV"
    },
    {
      "active": true,
      "can_delete": false,
      "created_at": 1707375154,
      "created_by": "RIGHTREV",
      "cumulative": false,
      "event_category": "Cost",
      "event_name": "Cost - Event Based",
      "event_type": "Percentage",
      "follow_revenue": false,
      "is_user_defined": false,
      "last_modified_on": 1707375154,
      "practical_expedient": false,
      "source_identifier": [
        "order_financial_id"
      ],
      "updated_at": 1707375154,
      "updated_by": "RIGHTREV"
    }
  ],
  "created_by": "RIGHTREV",
  "created_on": 1764223346,
  "last_modified_by": "RIGHTREV",
  "last_modified_on": 1764223346,
  "policy_type": "events-definition",
  "status": "Active",
  "unique_key": "event_name",
  "version_id": "3456ce0e-566c-4b73-9a26-9a2c8e4ada7c"
}

Update Events Definition Policy

patch
/apis/policy-sets/v1/policy/events-definition/{compliance_id}

To create or edit the event policies in the system.

Path parameters
compliance_idstringRequired

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

Body
format_typestringRequired

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

compliance_namestringRequired

Name of the Policy

unique_keystringRequired

Name of the Event Policy.

Responses
200

Update events definition 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/events-definition/{compliance_id}
PATCH /apis/policy-sets/v1/policy/events-definition/{compliance_id} HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Content-Type: application/json
Accept: */*
Content-Length: 329

{
  "compliance_spec": [
    {
      "active": false,
      "can_delete": true,
      "cumulative": false,
      "event_category": "Revenue",
      "event_formula": "",
      "event_name": "Event-Percentage",
      "event_type": "Percentage",
      "is_user_defined": true,
      "source_identifier": [
        "order_financial_id"
      ]
    }
  ],
  "format_type": "json",
  "compliance_name": "Event definition",
  "unique_key": "event_name"
}
200

Update events definition Policy

{
  "compliance_details": [
    {
      "error": [],
      "message": "created successfully",
      "unique_key": "Event-Percentage"
    }
  ],
  "compliance_id": "f985edcd-8307-4bf5-9f61-ea36b680aabd",
  "error": []
}

Delete Events Definition Policy

delete
/apis/policy-sets/v1/policy/events-definition/{compliance_id}/{object_unique_value}

To delete the event policies from system.

Path parameters
compliance_idstringRequired

User has to provide compliance id to delete event policy.

object_unique_valuestringRequired

Name of the event policy to be deleted.

Responses
200

Delete events definition 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 event 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/events-definition/{compliance_id}/{object_unique_value}
DELETE /apis/policy-sets/v1/policy/events-definition/{compliance_id}/{object_unique_value} HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Accept: */*
200

Delete events definition Policy

{
  "compliance_details": [],
  "compliance_id": "cc925e7a-2c47-4506-a040-30262d03ed8d",
  "error": []
}

Last updated

Was this helpful?