> For the complete documentation index, see [llms.txt](https://apis.rightrev.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apis.rightrev.com/rightrev-rest-api/policy-sets/configuration/ssp-policy/ssp-policy-by-calculator-method.md).

# SSP policy by calculator method

## Ssp Calculate

> This API is used to initiate calculation for SSP batch of SSP calculator method.<br>

```json
{"openapi":"3.1.0","info":{"title":"RightRev API(s)","version":"1.0.0"},"servers":[{"description":"RightRev APP Server","url":"https://{realm}.{env}.rightrev.cloud/","variables":{"env":{"default":"{env}"},"realm":{"default":"{realm}"}}},{"description":"RightRev Auth Server","url":"https://authn.{env}.rightrev.cloud/auth/realms/{realm}/protocol/openid-connect/","variables":{"env":{"default":"{env}"},"realm":{"default":"{realm}"}}}],"security":[],"paths":{"/apis/policy-sets/v1/policy/ssp/{compliance_id}/calculate":{"put":{"description":"This API is used to initiate calculation for SSP batch of SSP calculator method.\n","parameters":[{"name":"compliance_id","in":"path","required":true,"schema":{"type":"string","title":"Compliance Id"},"description":"A system-generated compliance ID on creating or updating the policy\n"}],"responses":{"200":{"description":"Calculate SSP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","description":"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."},"message":{"type":"string","description":"Displays the outcome of the action. It is commonly used to provide success confirmations, error details, or other informational responses from the API after the operation is executed."}},"required":["error","message"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"policy_name":{"type":"string","description":"Name of SSP Calculator Policy."},"batch_name":{"type":"string","description":"Name of SSP Calculator Policy Batch."},"policy_spec":{"type":"object","properties":{"active":{"type":"boolean","description":"A boolean field indicating whether the policy is Active or not. If set to True, the policy is Active; if false, it's Inactive."},"batches":{"type":"array","description":"Name of the SSP batches."},"can_delete":{"type":"boolean","description":"A boolean field indicating whether the policy can be deleted or not. If set to True, the user is allowed to delete the policy; if False, deletion is not permitted."},"ceiling_percentage":{"type":"null","description":"Upper SSP % limit for this batch."},"created_at":{"type":"integer","description":"Timestamp of the policy created by the user. This is a unix Epoch timestamp format."},"created_by":{"type":"string","description":"ID of the user who created the policy. Example: username@rightrev.com"},"data_identifiers":{"type":"array","items":{"type":"string"},"description":"Fields used to identify SSP items (e.g., product_id)."},"entity_type":{"type":"string","description":"This field contains of SSP values or batches"},"expression":{"type":"string","description":"Formula expression used to calculate SSP value."},"floor_percentage":{"type":"null","description":"Minimum allowed SSP percentage."},"hierarchy_no":{"type":"integer","description":"Order of evaluation in policy hierarchy."},"is_user_defined":{"type":"boolean","description":"A boolean field indicating whether the policy is defined by the user or not. If set to True, the user is allowed to define the policy; if False, defining the policy is not permitted."},"method":{"type":"string","description":"Method used to calculate SSP value sin calculator. For e.g absolute or median"},"name":{"type":"string","description":"Name of the SSP policy."},"transaction_above_range":{"type":"string","description":"Handling rule when value is above midpoint."},"transaction_below_range":{"type":"string","description":"Handling rule when value is below midpoint."},"transaction_mid_range":{"type":"string","description":"Handling rule when value is at midpoint."},"type":{"type":"string","description":"Type of the SSP Policy."},"updated_at":{"type":"integer","description":"Timestamp of the policy updated by the user. This is a unix Epoch timestamp format."},"updated_by":{"type":"string","description":"ID of the user who updated the policy. Example: username@rightrev.com"},"when":{"type":"array","description":"Conditions if any."},"isEditable":{"type":"boolean","description":"A boolean field indicating whether the policy can be edited or not. If set to True, the user is allowed to edit the policy; if False, edit is not permitted."},"canDelete":{"type":"boolean","description":"A boolean field indicating whether the policy can be deleted or not. If set to True, the user is allowed to delete the policy; if False, deletion is not permitted."}},"required":["active","batches","canDelete","can_delete","ceiling_percentage","created_at","created_by","data_identifiers","entity_type","expression","floor_percentage","hierarchy_no","isEditable","is_user_defined","method","name","transaction_above_range","transaction_below_range","transaction_mid_range","type","updated_at","updated_by","when"],"description":"Defines the specific rules and standards where a system must process adhering to the compliant."},"batch_spec":{"type":"object","properties":{"apply_ssppercent_on":{"type":"string","description":"Field used for SSP % calculation. For e.g. Total List Price"},"can_delete":{"type":"boolean","description":"A boolean field indicating whether the policy can be deleted or not. If set to True, the user is allowed to delete the policy; if False, deletion is not permitted."},"ceiling_percentage":{"type":"integer","description":"Upper SSP limit for this batch."},"created_at":{"type":"integer","description":"Timestamp of the policy created by the user. This is a unix Epoch timestamp format."},"created_by":{"type":"string","description":"ID of the user who created the policy. Example: username@rightrev.com"},"effective_end_date":{"type":"string","description":"Batch validity end date."},"effective_start_date":{"type":"string","description":"Batch validity start date."},"entity_type":{"type":"string","description":"Type of the policy record."},"file_id":{"type":"null","description":"Uploaded file reference ID generated by the system."},"file_name":{"type":"null","description":"Name of the uploaded file."},"floor_percentage":{"type":"integer","description":"Lower SSP limit %."},"is_user_defined":{"type":"boolean","description":"A boolean field indicating whether the policy is defined by the user or not. If set to True, the user is allowed to define the policy; if False, defining the policy is not permitted."},"name":{"type":"string","description":"name of the user."},"policy_name":{"type":"string","description":"name of the SSP Policy."},"ssp_calculation_method":{"type":"string","description":"Name of the SSP Calculator method."},"ssp_range_calc_type":{"type":"string","description":"Type of the SSP range calculation."},"status":{"type":"string","description":"Status of the policy. for e.g. file uploaded or review or approve etc."},"timestamp":{"type":"integer","description":"Timestamp of the policy created by the user. This is a unix Epoch timestamp format."},"updated_at":{"type":"integer","description":"Timestamp of the policy updated by the user. This is a unix Epoch timestamp format."},"updated_by":{"type":"string","description":"ID of the user who updated the policy. Example: username@rightrev.com"},"when":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"name of the field on which SSP is to be applied. For e.g. Product ID"},"operator":{"type":"string","description":"A set of comparison conditions used to evaluate field values in a revenue rule policy, allowing users to filter or match data using equality, inequality, relational comparisons (>, <, >=, <=), list based checks (in, not in), text pattern matching (contains, not contains, starts with, ends with), and null/empty validations (null, not null)."},"value":{"type":"string","description":"Value on which SSP should get applied. For e.g. If Filed Name is Product ID then Value could be Hardware or Software"}},"required":["field_name","operator","value"]},"description":"Filed level details"}},"required":["apply_ssppercent_on","can_delete","ceiling_percentage","created_at","created_by","effective_end_date","effective_start_date","entity_type","file_id","file_name","floor_percentage","is_user_defined","name","policy_name","ssp_calculation_method","ssp_range_calc_type","status","timestamp","updated_at","updated_by","when"],"description":"Batch level details."}},"required":["batch_name","batch_spec","policy_name","policy_spec"]}}},"required":true},"tags":["Policy Sets"],"summary":"Ssp Calculate","operationId":"ssp_calculate_apis_policy_sets_v1_policy_ssp__compliance_id__calculate_put"}}}}
```

## Ssp Refresh

> This API is used to refresh and check status of the ssp values at batch level in SSP calculator method.<br>

```json
{"openapi":"3.1.0","info":{"title":"RightRev API(s)","version":"1.0.0"},"servers":[{"description":"RightRev APP Server","url":"https://{realm}.{env}.rightrev.cloud/","variables":{"env":{"default":"{env}"},"realm":{"default":"{realm}"}}},{"description":"RightRev Auth Server","url":"https://authn.{env}.rightrev.cloud/auth/realms/{realm}/protocol/openid-connect/","variables":{"env":{"default":"{env}"},"realm":{"default":"{realm}"}}}],"security":[],"paths":{"/apis/policy-sets/v1/policy/ssp/{compliance_id}/ssp-values":{"get":{"description":"This API is used to refresh and check status of the ssp values at batch level in SSP calculator method.\n","parameters":[{"name":"compliance_id","in":"path","required":true,"schema":{"type":"string","title":"Compliance Id"},"description":"A system-generated compliance ID on creating or updating the policy\n"},{"name":"policy_name","in":"query","required":true,"schema":{"type":"string","title":"policy_name"},"description":"Name of the SSP Policy."},{"name":"batch_name","in":"query","required":true,"schema":{"type":"string","title":"batch_name"},"description":"Name of the SSP Policy Batch."}],"responses":{"200":{"description":"Refresh SSP","content":{"application/json":{"schema":{"type":"object","properties":{"batch_name":{"type":"string","description":"Name of the SSP Policy Batch"},"entity_type":{"type":"string","description":"Type of the record. For e.g ssp values"},"name":{"type":"string","description":"A unique combination of SSP Policy Name and batch name. "},"policy_name":{"type":"string","description":"name of the SSP Policy."},"ssp_values":{"type":"array","items":{"type":"object","properties":{"above_mid_point":{"type":"integer","description":"Upper range SSP % value."},"below_mid_point":{"type":"integer","description":"Lower range SSP % value."},"compliance_percent":{"type":"number","description":"Compliance value"},"effective_end_date":{"type":"string","description":"End date for SSP validity."},"effective_start_date":{"type":"string","description":"Start date for SSP validity."},"mid_point":{"type":"integer","description":"Middle SSP % value."},"product_name":{"type":"string","description":"Name of the Product on which SSP calculator is being calculated."},"ssp_value_id":{"type":"string","description":"SSP value ID generated by the system."},"transactions_count":{"type":"integer","description":"Total historical transaction available for criteria provided"},"value_type":{"type":"string","description":"Type of the value. Amount or percent"},"withinrange_count":{"type":"integer","description":"Count showing how many transactions are within SSP range."}},"required":["above_mid_point","below_mid_point","compliance_percent","effective_end_date","effective_start_date","mid_point","product_name","ssp_value_id","transactions_count","value_type","withinrange_count"]},"description":"Details of SSP values"}},"required":["batch_name","entity_type","name","policy_name","ssp_values"]}}}}},"tags":["Policy Sets"],"summary":"Ssp Refresh","operationId":"ssp_refresh_apis_policy_sets_v1_policy_ssp__compliance_id__ssp_values_get"}}}}
```

## Ssp Bell Curve

> This API is used to retrieve all bell curve details of SSP calculator value id.<br>

```json
{"openapi":"3.1.0","info":{"title":"RightRev API(s)","version":"1.0.0"},"servers":[{"description":"RightRev APP Server","url":"https://{realm}.{env}.rightrev.cloud/","variables":{"env":{"default":"{env}"},"realm":{"default":"{realm}"}}},{"description":"RightRev Auth Server","url":"https://authn.{env}.rightrev.cloud/auth/realms/{realm}/protocol/openid-connect/","variables":{"env":{"default":"{env}"},"realm":{"default":"{realm}"}}}],"security":[],"paths":{"/apis/policy-sets/v1/policy/ssp/{compliance_id}/bell-curve":{"get":{"description":"This API is used to retrieve all bell curve details of SSP calculator value id.\n","parameters":[{"name":"compliance_id","in":"path","required":true,"schema":{"type":"string","title":"Compliance Id"},"description":"A system-generated compliance ID on creating or updating the policy\n"},{"name":"policy_name","in":"query","required":true,"schema":{"type":"string","title":"policy_name"},"description":"Name of the SSP Policy."},{"name":"batch_name","in":"query","required":true,"schema":{"type":"string","title":"batch_name"},"description":"Name of the SSP Policy Batch."},{"name":"ssp_value_id","in":"query","required":true,"schema":{"type":"string","title":"ssp_value_id"},"description":"Unique SSP batch value ID assigned by system on completion of calculation."}],"responses":{"200":{"description":"Bell Curve SSP","content":{"application/json":{"schema":{"type":"object","properties":{"batch_name":{"type":"string","description":"Name of the SSP Policy Batch."},"bell_curve":{"type":"array","items":{"type":"object","properties":{"y-axis":{"type":"integer","description":"The vertical line on a graph"}},"required":["x-axis","y-axis"]},"description":"System generated bell curve on how SSP calculator values."},"bell_curve_label":{"type":"object","properties":{"y-axis":{"type":"string","description":"The vertical line on a graph"}},"required":["x-axis","y-axis"],"description":"Describe what values available on x axis and y axis"},"policy_name":{"type":"string","description":"Name of SSP Policy"},"ssp_value_id":{"type":"string","description":"Unique SSP batch value ID assigned by system on completion of calculation."}},"required":["batch_name","bell_curve","bell_curve_label","policy_name","ssp_value_id"]}}}}},"tags":["Policy Sets"],"summary":"Ssp Bell Curve","operationId":"ssp_bell_curve_apis_policy_sets_v1_policy_ssp__compliance_id__bell_curve_get"}}}}
```

## Ssp Exclude

> This API is used to upload CSV file of transactions that to be exclude from SSP calculator calculation.<br>

```json
{"openapi":"3.1.0","info":{"title":"RightRev API(s)","version":"1.0.0"},"servers":[{"description":"RightRev APP Server","url":"https://{realm}.{env}.rightrev.cloud/","variables":{"env":{"default":"{env}"},"realm":{"default":"{realm}"}}},{"description":"RightRev Auth Server","url":"https://authn.{env}.rightrev.cloud/auth/realms/{realm}/protocol/openid-connect/","variables":{"env":{"default":"{env}"},"realm":{"default":"{realm}"}}}],"security":[],"paths":{"/apis/policy-sets/v1/policy/ssp/{compliance_id}/exclude-transactions":{"put":{"description":"This API is used to upload CSV file of transactions that to be exclude from SSP calculator calculation.\n","parameters":[{"name":"compliance_id","in":"path","required":true,"schema":{"type":"string","title":"Compliance Id"},"description":"A system-generated compliance ID on creating or updating the policy\n"}],"responses":{"200":{"description":"Exclude SSP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","description":"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."},"message":{"type":"string","description":"Displays the outcome of the action. It is commonly used to provide success confirmations, error details, or other informational responses from the API after the operation is executed."}},"required":["error","message"]}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"file","format":"binary","description":"CSV file to be uploaded with transactions which are to be excluded from SSP calculator calculation."},"ssp_value_id":{"type":"text","format":"string","description":"Unique SSP batch value ID assigned by system on completion of calculation."},"policy_name":{"type":"text","format":"string","description":"Name of the SSP Policy."},"batch_name":{"type":"text","format":"string","description":"Name of the SSP Policy Batch."}},"required":["file","ssp_value_id","policy_name","batch_name"]}},"application/json":{"schema":{}}},"required":true},"tags":["Policy Sets"],"summary":"Ssp Exclude","operationId":"ssp_exclude_apis_policy_sets_v1_policy_ssp__compliance_id__exclude_transactions_put"}}}}
```

## Ssp Download

> This API is used to download the CSV file uploaded to exclude the transactions to be part of SSP calculator calculation.<br>

```json
{"openapi":"3.1.0","info":{"title":"RightRev API(s)","version":"1.0.0"},"servers":[{"description":"RightRev APP Server","url":"https://{realm}.{env}.rightrev.cloud/","variables":{"env":{"default":"{env}"},"realm":{"default":"{realm}"}}},{"description":"RightRev Auth Server","url":"https://authn.{env}.rightrev.cloud/auth/realms/{realm}/protocol/openid-connect/","variables":{"env":{"default":"{env}"},"realm":{"default":"{realm}"}}}],"security":[],"paths":{"/apis/policy-sets/v1/policy/ssp/{compliance_id}/transactions":{"get":{"description":"This API is used to download the CSV file uploaded to exclude the transactions to be part of SSP calculator calculation.\n","parameters":[{"name":"compliance_id","in":"path","required":true,"schema":{"type":"string","title":"Compliance Id"},"description":"A system-generated compliance ID on creating or updating the policy\n"}],"responses":{"200":{"description":"Download SSP","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Policy Sets"],"summary":"Ssp Download","operationId":"ssp_download_apis_policy_sets_v1_policy_ssp__compliance_id__transactions_get"}}}}
```

## Review Approve Ssp Policy

> This API is used to \*\*REVIEW\*\* or \*\*APPROVE\*\* the SSP batches created under SSP by upload or SSP calculator method.<br>

```json
{"openapi":"3.1.0","info":{"title":"RightRev API(s)","version":"1.0.0"},"servers":[{"description":"RightRev APP Server","url":"https://{realm}.{env}.rightrev.cloud/","variables":{"env":{"default":"{env}"},"realm":{"default":"{realm}"}}},{"description":"RightRev Auth Server","url":"https://authn.{env}.rightrev.cloud/auth/realms/{realm}/protocol/openid-connect/","variables":{"env":{"default":"{env}"},"realm":{"default":"{realm}"}}}],"security":[],"paths":{"/apis/policy-sets/v1/policy/ssp/{action}/{compliance_id}/{batch_name}":{"patch":{"description":"This API is used to **REVIEW** or **APPROVE** the SSP batches created under SSP by upload or SSP calculator method.\n","parameters":[{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"},"description":"Two actions are supported here. **review** or **approve**\n"},{"name":"compliance_id","in":"path","required":true,"schema":{"type":"string","title":"Compliance Id"},"description":"A system-generated compliance ID on creating or updating the policy\n"},{"name":"batch_name","in":"path","required":true,"schema":{"type":"string","title":"Batch Name"},"description":"Name of the SSP Policy Batch.\n"}],"responses":{"200":{"description":"Review and Approve SSP Policy","content":{"application/json":{"schema":{"type":"object","properties":{"compliance_details":{"type":"array","items":{"type":"object","properties":{"error":{"type":"array","description":"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."},"message":{"type":"string","description":"Displays the outcome of the action. It is commonly used to provide success confirmations, error details, or other informational responses from the API after the operation is executed."},"unique_key":{"type":"string","description":"A name of the SSP policy."}},"required":["error","message","unique_key"]},"description":"Displays the details of specific rules and standards processed by the system."},"compliance_id":{"type":"string","description":"A system-generated compliance ID on creating or updating the policy"},"error":{"type":"array","description":"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."}},"required":["compliance_details","compliance_id","error"]}}}}},"tags":["Policy Sets"],"summary":"Review Approve Ssp Policy","operationId":"review_approve_ssp_policy_apis_policy_sets_v1_policy_ssp__action___compliance_id___batch_name__patch"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://apis.rightrev.com/rightrev-rest-api/policy-sets/configuration/ssp-policy/ssp-policy-by-calculator-method.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
