> 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-upload-method.md).

# SSP policy by upload method

## Get Ssp Policy

> This API will retrieves the list of all SSP Policies, individual SSP Policy details and SSP Policy batch details.<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":{"get":{"description":"This API will retrieves the list of all SSP Policies, individual SSP Policy details and SSP Policy batch details.\n","parameters":[{"name":"policy_name","in":"query","required":false,"schema":{"type":"string","title":"policy_name"},"description":"Name of the SSP Policy"},{"name":"batch_name","in":"query","required":false,"schema":{"type":"string","title":"batch_name"},"description":"Name of the SSP Batch Policy"}],"responses":{"200":{"description":"Get list of all SSP Policies, individual SSP Policy details and SSP Policy batch details.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"compliance_id":{"type":"string","description":"A system-generated compliance ID on creating or updating the policy"},"compliance_name":{"type":"string","description":"Name of the Policy."},"compliance_spec":{"type":"array","items":{"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":"The name of the SSP Policy batch details."},"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":"This is Maximum allowed SSP percentage."},"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":"Type of record (policy). For e.g. Batch or ssp values "},"expression":{"type":"string","description":"This field is formula used to derive SSP value"},"floor_percentage":{"type":"null","description":"This is 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":"How SSP values are provided (upload, Formula or calculator)."},"name":{"type":"string","description":"Name of SSP policy or SSP batch"},"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 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"},"batch_name":{"type":"string","description":"Name of the SSP Batch."},"compliance_percent":{"type":"null","description":"Compliance value"},"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."},"currency_code":{"type":"string","description":"Currency of the SSP Values."},"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_id":{"type":"string","description":"Product identifier."},"ssp_value_id":{"type":"string","description":"A system assigned alpha-numeric number to ssp policy value record."},"value_type":{"type":"string","description":"Type of value. For e.g. Amount/Percent."}},"required":["above_mid_point","below_mid_point","currency_code","effective_end_date","effective_start_date","mid_point","product_id","ssp_value_id","value_type"]},"description":"ssp_values TODO"},"apply_ssppercent_on":{"type":"string","description":"Base price used for SSP % calculation."},"effective_end_date":{"type":"string","description":"Batch validity end date."},"effective_start_date":{"type":"string","description":"Batch validity start date."},"file_id":{"type":"null","description":"Uploaded file reference ID generated by the system."},"file_name":{"type":"null","description":"Name of the uploaded file."},"ssp_calculation_method":{"type":"null","description":"Formula used to calculate SSP."},"ssp_range_calc_type":{"type":"null","description":"SSP range calculation type."},"status":{"type":"string","description":"Current batch status. For e.g. file uploaded or reviewed or approved"},"timestamp":{"type":"integer","description":"Timestamp of the policy created by the user. This is a unix Epoch timestamp format."}},"required":["can_delete","created_at","created_by","entity_type","is_user_defined","name","updated_at","updated_by"]},"description":"Defines the specific rules and standards where a system must process adhering to the compliant."},"created_by":{"type":"string","description":"ID of the user who created the policy. Example: username@rightrev.com"},"created_on":{"type":"integer","description":"Timestamp of the policy created by the user. This is a unix Epoch timestamp format."},"last_modified_by":{"type":"string","description":"ID of the user last modified by."},"last_modified_on":{"type":"integer","description":"Timestamp of the policy last modified on. This is a unix Epoch timestamp format."},"policy_type":{"type":"string","description":"Type of the policy."},"status":{"type":"string","description":"Status of the policy."},"unique_key":{"type":"string","description":"A system generated unique id."},"version_id":{"type":"string","description":"Version ID."}},"required":["compliance_id","compliance_name","compliance_spec","created_by","created_on","last_modified_by","last_modified_on","policy_type","status","unique_key","version_id"]}}}}}},"tags":["Policy Sets"],"summary":"Get Ssp Policy","operationId":"get_ssp_policy_apis_policy_sets_v1_policy_ssp_get"}}}}
```

## Ssp Policy Download

> This API is used to download the uploaded SSP Policy Batch value details in CSV file.<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/download/{file_id}":{"get":{"description":"This API is used to download the uploaded SSP Policy Batch value details in CSV file.\n","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"},"description":"Uploaded file ID generated by the system.\n"}],"responses":{"200":{"description":"Get SSP Policy Batch value details in CSV file.","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Policy Sets"],"summary":"Ssp Policy Download","operationId":"ssp_policy_download_apis_policy_sets_v1_policy_ssp_download__file_id__get"}}}}
```

## Download Ssp Policy Template

> This API is used to to download the SSP Policy Batch template.<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/template":{"get":{"description":"This API is used to to download the SSP Policy Batch template.\n","parameters":[{"name":"batch_name","in":"path","required":false,"schema":{"type":"string","title":"batch Name"},"description":"User need to provide the batch name to download the template.\n"}],"responses":{"200":{"description":"Get SSP Batch Template - In Raw text, columns separated by commas","content":{"text/csv":null,"application/json":{"schema":{}}}}},"tags":["Policy Sets"],"summary":"Download Ssp Policy Template","operationId":"download_ssp_policy_template_apis_policy_sets_v1_policy_ssp_template_get"}}}}
```

## Post Ssp Policy

> This API is used to create new SSP policy by formula or by upload 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":{"post":{"description":"This API is used to create new SSP policy by formula or by upload method.\n","responses":{"200":{"description":"Create SSP Policy by Formula or Upload method.","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":"Name of the 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 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"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"compliance_name":{"type":"string","description":"Provide compliance name to retrieve an accounting calendar pertaining to that compliance name"},"unique_key":{"type":"string","description":"Unique identifier generated by the system. Example: xyz_345"},"format_type":{"type":"string","description":"Type of the payload. For e.g. JSON"},"compliance_spec":{"type":"array","items":{"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."},"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":"This is Maximum allowed SSP percentage."},"data_identifiers":{"type":"array","description":"Fields used to identify SSP items (e.g., product_id)."},"entity_type":{"type":"string","description":"Type of record (policy). For e.g. Batch or policy"},"expression":{"type":"string","description":"This field is formula used to derive SSP value"},"floor_percentage":{"type":"integer","description":"This is 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":"How SSP values are provided (upload or Formula)."},"name":{"type":"string","description":"Name of SSP policy or SSP batch"},"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 policy."},"when":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"Name of the field"},"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":"SSP identifier - value of field name."}},"required":["field_name","operator","value"]},"description":"Conditions if any"}},"required":["active","can_delete","ceiling_percentage","data_identifiers","entity_type","expression","floor_percentage","hierarchy_no","is_user_defined","method","name","transaction_above_range","transaction_below_range","transaction_mid_range","type","when"]},"description":"Defines the specific rules and standards where a system must process adhering to the compliant."}},"required":["compliance_name","compliance_spec","format_type","unique_key"]}}},"required":true},"tags":["Policy Sets"],"summary":"Post Ssp Policy","operationId":"post_ssp_policy_apis_policy_sets_v1_policy_ssp_post"}}}}
```

## 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-upload-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.
