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

SSP policy by formula method

Get Ssp Policy

get
/apis/policy-sets/v1/policy/ssp

This API will retrieves the list of all SSP Policies, individual SSP Policy details and SSP Policy batch details.

Query parameters
policy_namestringOptional

Name of the SSP Policy

batch_namestringOptional

Name of the SSP Batch Policy

Responses
200

Get list of all SSP Policies, individual SSP Policy details and SSP Policy batch details.

application/json
compliance_idstringRequired

A system-generated compliance ID on creating or updating the policy

compliance_namestringRequired

Name of the Policy.

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.

policy_typestringRequired

Type of the policy.

statusstringRequired

Status of the policy.

unique_keystringRequired

A system generated unique id.

version_idstringRequired

Version ID.

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

Get list of all SSP Policies, individual SSP Policy details and SSP Policy batch details.

[
  {
    "compliance_id": "7c942af2-fe64-4d77-ae7c-155aab288a9c",
    "compliance_name": "SSP",
    "compliance_spec": [
      {
        "active": true,
        "batches": [],
        "can_delete": true,
        "ceiling_percentage": null,
        "created_at": 1763380661,
        "created_by": "username@rightrev.com",
        "data_identifiers": [
          "product_id"
        ],
        "entity_type": "policy",
        "expression": "",
        "floor_percentage": null,
        "hierarchy_no": 1,
        "is_user_defined": true,
        "method": "upload",
        "name": "SSP_Upload1",
        "transaction_above_range": "above_mid_point",
        "transaction_below_range": "below_mid_point",
        "transaction_mid_range": "mid_point",
        "type": "ssp",
        "updated_at": 1763380661,
        "updated_by": "username@rightrev.com",
        "when": []
      },
      {
        "batch_name": "SSP_Upload1-b4",
        "can_delete": false,
        "compliance_percent": null,
        "created_at": 1772018065,
        "created_by": "svc@rightrev.com",
        "entity_type": "ssp_values",
        "is_user_defined": true,
        "name": "SSP_Upload1_SSP_Upload1-b4_a4efc507-bd40-40fe-b218-24c65bfcc90f_1",
        "policy_name": "SSP_Upload1",
        "ssp_values": [
          {
            "above_mid_point": 79,
            "below_mid_point": 75,
            "currency_code": "",
            "effective_end_date": "2023-06-12",
            "effective_start_date": "2023-06-12",
            "mid_point": 77,
            "product_id": "QC003-S1-RC32-02",
            "ssp_value_id": "0f9e864e-d54a-4746-89cf-60f202138ff0",
            "value_type": "Percent"
          }
        ],
        "updated_at": 1772018065,
        "updated_by": "username@rightrev.com"
      },
      {
        "apply_ssppercent_on": "total_list_price",
        "can_delete": true,
        "ceiling_percentage": 10,
        "created_at": 1772018065,
        "created_by": "svc@rightrev.com",
        "effective_end_date": "2023-06-12",
        "effective_start_date": "2023-06-12",
        "entity_type": "batch",
        "file_id": null,
        "file_name": null,
        "floor_percentage": 15,
        "is_user_defined": true,
        "name": "SSP_Upload1-b4",
        "policy_name": "SSP_Upload1",
        "ssp_calculation_method": null,
        "ssp_range_calc_type": null,
        "status": "file_uploaded",
        "timestamp": 1772018065,
        "updated_at": 1772018065,
        "updated_by": "svc@rightrev.com",
        "when": []
      }
    ],
    "created_by": "rightrev",
    "created_on": 1772197076,
    "last_modified_by": "rightrev",
    "last_modified_on": 1772197076,
    "policy_type": "SSP",
    "status": "Active",
    "unique_key": "name",
    "version_id": "d9f9fce3-7fec-4b06-8b7e-c6eb5b9e7d4d"
  }
]

Post Ssp Policy

post
/apis/policy-sets/v1/policy/ssp

This API is used to create new SSP policy by formula or by upload method.

Body
compliance_namestringRequired

Provide compliance name to retrieve an accounting calendar pertaining to that compliance name

unique_keystringRequired

Unique identifier generated by the system. Example: xyz_345

format_typestringRequired

Type of the payload. For e.g. JSON

Responses
200

Create SSP Policy by Formula or Upload method.

application/json
compliance_idstringRequired

A system-generated compliance ID on creating the 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.

post/apis/policy-sets/v1/policy/ssp
POST /apis/policy-sets/v1/policy/ssp HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Content-Type: application/json
Accept: */*
Content-Length: 538

{
  "compliance_name": "SSP",
  "unique_key": "name",
  "format_type": "json",
  "compliance_spec": [
    {
      "active": true,
      "can_delete": false,
      "ceiling_percentage": 15,
      "data_identifiers": [],
      "entity_type": "policy",
      "expression": "total_list_price*0.60",
      "floor_percentage": 8,
      "hierarchy_no": 2,
      "is_user_defined": true,
      "method": "formula",
      "name": "SSP_Formula13",
      "transaction_above_range": "above_mid_point",
      "transaction_below_range": "below_mid_point",
      "transaction_mid_range": "mid_point",
      "type": "ssp",
      "when": [
        {
          "field_name": "product_id",
          "operator": "==",
          "value": "Product"
        }
      ]
    }
  ]
}
200

Create SSP Policy by Formula or Upload method.

{
  "compliance_details": [
    {
      "error": [],
      "message": "updated successfully",
      "unique_key": "SSP_Formula13"
    }
  ],
  "compliance_id": "d459fad1-6385-4460-843c-87639fa2bd80",
  "error": []
}

Last updated

Was this helpful?