> 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/period-close/period-open-close.md).

# Period Open-Close

## Get Period Open Close Policy

> \- To retrieves list of all active legal entities with details and status of current open period and stats of last 3 periods close.\
> \- To retrieve details of error transactions, holds and journals of legal entity and current open period, please refer to below attached sheet.<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/period-open-close":{"get":{"description":"- To retrieves list of all active legal entities with details and status of current open period and stats of last 3 periods close.\n- To retrieve details of error transactions, holds and journals of legal entity and current open period, please refer to below attached sheet.\n","responses":{"200":{"description":"Get Period Open and Close Policy","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"compliance_id":{"type":"string","description":"A system-generated compliance ID to retrieve the period open-close Policies"},"compliance_name":{"type":"string","description":"Name of the policy fetched by the system. "},"compliance_spec":{"type":"array","items":{"type":"object","properties":{"can_delete":{"type":"boolean","description":"A boolean field indicating whether the event policy can be deleted or not. If set to True, the user is allowed to delete the event policy; if False, deletion is not permitted."},"code":{"type":"string","description":"It's unique combination of Legal Entity, Tenant ID and current open period."},"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."},"end_date":{"type":"string","description":"End Date of the current open period."},"fiscal_year_name":{"type":"string","description":"Name of the Fiscal Year. For e.g - FY-2026"},"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."},"legal_entity":{"type":"string","description":"Name of the Legal Entity"},"opened_date":{"type":"string","description":"Date on which current open period is set to open"},"period_name":{"type":"string","description":"Name of the current open period. For e.g - January-2026"},"period_number":{"type":"integer","description":"Period number assigned in Calendar."},"quarter_number":{"type":"integer","description":"Period number assigned in Calendar."},"request_id":{"type":"string","description":"Its a combination of tenant ID and period name."},"start_date":{"type":"string","description":"Start date of the current open period."},"status":{"type":"string","description":"Status of current period. Either Open or Closed"},"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"},"last_1_period_close_days":{"type":"integer","description":"Days indicates the difference between period end date and actual period closed date of Last_1 period. For e.g. Current open period is April-2026 then Last Period is March-2026, Last_1 Period is February-2026 and Last_2 period is January-2026."},"last_1_period_closed_date":{"type":"string","description":"Actual date on which Last_1 period is closed."},"last_1_period_end_date":{"type":"string","description":"End Date of Last_1 period"},"last_1_period_name":{"type":"string","description":"Name of Last_1 period."},"last_1_period_percentage":{"type":"integer","description":"Percentage shows Up or Down comparing with previous month stats. Last_1 period will be compared with Last_2 period."},"last_1_period_start_date":{"type":"string","description":"Start Date of Last_1 period"},"last_2_period_close_days":{"type":"integer","description":"Days indicates the difference between period end date and actual period closed date of Last_2 period. For e.g. Current open period is April-2026 then Last Period is March-2026, Last_1 Period is February-2026 and Last_2 period is January-2026."},"last_2_period_closed_date":{"type":"string","description":"Actual date on which Last_2 period is closed."},"last_2_period_end_date":{"type":"string","description":"End Date of Last_2 period"},"last_2_period_name":{"type":"string","description":"Name of Last_2 period."},"last_2_period_start_date":{"type":"string","description":"Start Date of Last_2 period"},"last_period_close_days":{"type":"integer","description":"Days indicates the difference between period end date and actual period closed date of Last period. For e.g. Current open period is April-2026 then Last Period is March-2026, Last_1 Period is February-2026 and Last_2 period is January-2026."},"last_period_closed_date":{"type":"string","description":"Actual date on which Last period is closed."},"last_period_end_date":{"type":"string","description":"End Date of Last period"},"last_period_name":{"type":"string","description":"Name of the Last period."},"last_period_percentage":{"type":"integer","description":"Percentage shows Up or Down comparing with previous month stats. Last period will be compared with Last_1 period."},"last_period_start_date":{"type":"string","description":"Start Date of Last period"}},"required":["can_delete","code","created_at","created_by","end_date","fiscal_year_name","is_user_defined","legal_entity","opened_date","period_name","period_number","quarter_number","request_id","start_date","status","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":"Represents the type of policy"},"status":{"type":"string","description":"Represents the status of policy"},"unique_key":{"type":"string","description":"Unique key is code which is unique combination of Legal Entity, Tenant ID and current open period. "},"version_id":{"type":"string","description":"Unique alpha-numeric number generated by the system."}},"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 Period Open Close Policy","operationId":"get_period_open_close_policy_apis_policy_sets_v1_policy_period_open_close_get"}}}}
```

## Update Period Open Close Policy

> \- To close current period and open new period in the system.\
> \- To Open First Period after creation of legal entity.\
> \- \*\*closed\_date\*\* will be \*\*\*null\*\*\* and \*\*status\*\* will be \*\*\*open\*\*\* when user set open period for the first time.<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/period-open-close/{compliance_id}":{"patch":{"description":"- To close current period and open new period in the system.\n- To Open First Period after creation of legal entity.\n- **closed_date** will be ***null*** and **status** will be ***open*** when user set open period for the first time.\n","parameters":[{"name":"compliance_id","in":"path","required":true,"schema":{"type":"string","title":"Compliance Id"},"description":"A system-generated compliance ID to update the policy.\n"}],"responses":{"200":{"description":"Update Period Open and Close 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":"Unique identifier generated by the system. Example: xyz_345"}},"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 for period open-close action."},"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":{"format_type":{"type":"string","description":"Format type of the request code used to collect data - For e.g. JSON"},"compliance_name":{"type":"string","description":"Operational name of the policy."},"policy_type":{"type":"string","description":"Name of the policy"},"unique_key":{"type":"string","description":"It's a code which is unique combination of Legal Entity, tenant ID and Period name."},"compliance_spec":{"type":"array","items":{"type":"object","properties":{"closed_date":{"type":["null","string"],"description":"Actual Date on which current period is closed. In case of first time when user set open period this value will be null."},"end_date":{"type":"string","description":"End date of the period."},"fiscal_year_name":{"type":"string","description":"Name of the Fiscal Year. For e.g - FY-2026"},"legal_entity":{"type":"string","description":"Name of the Legal Entity."},"opened_date":{"type":"string","description":"Actual Date on which current period is opened."},"period_name":{"type":"string","description":"Name of the current open period. For e.g - January-2026"},"period_number":{"type":"integer","description":"Period number assigned in Calendar."},"quarter_number":{"type":"integer","description":"Quarter number assigned in Calendar."},"start_date":{"type":"string","description":"Start date of the current open period."},"status":{"type":"string","description":"Status of current period. In case of first time when user set open period this value will be open. "},"code":{"type":"string","description":"It's unique combination of Legal Entity, Tenant ID and current open period."},"comments":{"type":"string","description":"Field where user can add relevant comments before performing period open-close operation."}},"required":["closed_date","code","comments","end_date","fiscal_year_name","legal_entity","opened_date","period_name","period_number","quarter_number","start_date","status"]},"description":"Defines the specific rules and standards where a system must process adhering to the compliant."}},"required":["compliance_name","compliance_spec","format_type","policy_type","unique_key"]}}},"required":true},"tags":["Policy Sets"],"summary":"Update Period Open Close Policy","operationId":"update_period_open_close_policy_apis_policy_sets_v1_policy_period_open_close__compliance_id__patch"}}}}
```

## Update Period Open Close Policy

> \- To close current period and open new period in the Salesforce.\
> \- To Open First Period after creation of legal entity.\
> \- \*\*closed\_date\*\* will be \*\*\*null\*\*\* and \*\*status\*\* will be \*\*\*open\*\*\* when user set open period for the first time.<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/period-open-close/{compliance_id}":{"put":{"description":"- To close current period and open new period in the Salesforce.\n- To Open First Period after creation of legal entity.\n- **closed_date** will be ***null*** and **status** will be ***open*** when user set open period for the first time.\n","parameters":[{"name":"compliance_id","in":"path","required":true,"schema":{"type":"string","title":"Compliance Id"},"description":"A system-generated compliance ID to retrieve the period open-close Policies\n"}],"responses":{"200":{"description":"Replace Period Open and Close 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 system generated unique alpha-numeric number."}},"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"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"format_type":{"type":"string","description":"Format type of the request code used to collect data - For e.g. JSON"},"compliance_name":{"type":"string","description":"Operational name of the policy."},"unique_key":{"type":"string","description":"It's a code which is unique combination of Legal Entity and Period name."},"compliance_spec":{"type":"array","items":{"type":"object","properties":{"period_description":{"type":"string","description":"It's combination of Period Name, Currency, Revenue Book Name and Legal Entity Name. For E.g. Jan 2026-USD-Default Revenue Book-QA-LE-003."},"code":{"type":"string","description":"It's a unique combination of Legal Entity and Period name."},"end_date":{"type":"string","description":"End date of the period."},"fiscal_year_name":{"type":"string","description":"Name of the Fiscal Year. For e.g - FY-2026"},"legal_entity":{"type":"string","description":"Name of the Legal Entity."},"period_name":{"type":"string","description":"Name of the current open period. For e.g - January-2026"},"period_number":{"type":"integer","description":"Period number assigned in Calendar."},"quarter_number":{"type":"integer","description":"Quarter number assigned in Calendar."},"start_date":{"type":"string","description":"Start date of the current open period."},"status":{"type":"string","description":"Status of current period. In case of first time when user set open period this value will be open."},"opened_date":{"type":"string","description":"Actual Date on which period is opened."},"closed_date":{"type":["null","string"],"description":"Actual Date on which period is closed."},"comments":{"type":"string","description":"Field where user can add relevant comments before performing period open-close operation."}},"required":["closed_date","code","comments","end_date","fiscal_year_name","legal_entity","opened_date","period_description","period_name","period_number","quarter_number","start_date","status"]},"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":"Update Period Open Close Policy","operationId":"update_period_open_close_policy_apis_policy_sets_v1_policy_period_open_close__compliance_id__put"}}}}
```


---

# 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/period-close/period-open-close.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.
