> 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/company-profile/accounting-period-calendar.md).

# Accounting Period/Calendar

## Get Accounting Period Policy

> Retrieves the accounting calendar period details associated with a specific tenant.<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/calendar":{"get":{"description":"Retrieves the accounting calendar period details associated with a specific tenant.\n","responses":{"200":{"description":"Get Accounting Calendar Policy","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"compliance_id":{"type":"string","description":"A system-generated compliance ID to retrieve the accounting calendar."},"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 period can be deleted or not. If set to True, the user is allowed to delete the period; if False, deletion is not permitted."},"code":{"type":"string","description":"Unique combination of legal entity, tenant name and period name generated by the system."},"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."},"end_date":{"type":"string","description":"End date of the period."},"fiscal_year_name":{"type":"string","description":"Name of the fiscal year."},"is_user_defined":{"type":"boolean","description":"A boolean field indicating whether the period is defined by the user or not. If set to True, the user is allowed to define the period; if False, defining the period is not permitted."},"legal_entity":{"type":"string","description":"Name of the legal entity."},"period_name":{"type":"string","description":"Name of the period."},"period_number":{"type":"integer","description":"Number of period within the fiscal year (normally 1-12)."},"quarter_number":{"type":"integer","description":"The quarter of the period within the fiscal year (1-4)."},"start_date":{"type":"string","description":"Start date of the period."},"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."}}},"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."},"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 the policy."},"unique_key":{"type":"string","description":"Unique combination of legal entity, tenant name and period name generated by the system."},"version_id":{"type":"string","description":"Represents the latest version of the policy."}}}}}}}},"tags":["Policy Sets"],"summary":"Get Accounting Period Policy","operationId":"get_accounting_period_policy_apis_policy_sets_v1_policy_calendar_get"}}}}
```

## Update Accounting Period Policy

> Create a new \*\*Accounting Calendar\*\* in RightRev system by uploading calendar data via a CSV file.\
> \- Users must provide 12 months period for a fiscal year.\
> \- Start date must be less than the end date.\
> \- Both start and end dates must be provided.\
> \- Start and end date must be the 1st and last day of the month respectively.<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/calendar/{code}":{"post":{"description":"Create a new **Accounting Calendar** in RightRev system by uploading calendar data via a CSV file.\n- Users must provide 12 months period for a fiscal year.\n- Start date must be less than the end date.\n- Both start and end dates must be provided.\n- Start and end date must be the 1st and last day of the month respectively.\n","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"},"description":"Provide code name as **upload**.\n"}],"responses":{"200":{"description":"Create a New Accounting Calendar Policy (CSV)","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 combination of legal entity,tenant name and period name."}}},"description":"A list of compliance-related entries, each providing detailed information about the outcome of a specific compliance check. This includes messages, associated errors, and a system-generated unique identifier for tracking."},"compliance_id":{"type":"string","description":"A system-generated compliance ID to set an accounting calendar."},"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."}}}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"file","format":"binary","description":"The CSV file to be uploaded to the system.\n\n Refer a [Sample CSV File](https://docs.google.com/spreadsheets/d/1N_OXPagqvHPdiMGJpkqGw8kbLx6BZ4OfHpoI4zMTa5A/edit?gid=259517834#gid=259517834) for reference."},"date_format":{"type":"text","format":"%m/%d/%Y","description":"Start Date and End Date must be in mm-dd-yyyy format."},"unique_key":{"type":"text","format":"code","description":"A CSV file ***upload*** method."}},"required":["file","date_format","unique_key"]}},"application/json":{"schema":{}}},"required":true},"tags":["Policy Sets"],"summary":"Update Accounting Period Policy","operationId":"update_accounting_period_policy_apis_policy_sets_v1_policy_calendar__code__post"}}}}
```

## Post Accounting Period Policy

> Create a new \*\*Accounting Calendar\*\* in the RightRev system by providing calendar data in JSON format.\
> \- Users must provide 12 months period for a fiscal year.\
> \- Start date must be less than the end date.\
> \- Both start and end dates must be provided.\
> \- Start and end date must be the 1st and last day of the month respectively.<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/calendar":{"post":{"description":"Create a new **Accounting Calendar** in the RightRev system by providing calendar data in JSON format.\n- Users must provide 12 months period for a fiscal year.\n- Start date must be less than the end date.\n- Both start and end dates must be provided.\n- Start and end date must be the 1st and last day of the month respectively.\n","responses":{"200":{"description":"Create a New Accounting Calendar Policy (JSON)","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 combination of legal entity and period name generated by the system."}}},"description":"A list of compliance-related entries, each providing detailed information about the outcome of a specific compliance check. This includes messages, associated errors, and a system-generated unique identifier for tracking."},"compliance_id":{"type":"string","description":"A system-generated compliance ID to set an accounting calendar."},"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."}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"compliance_name":{"type":"string","description":"Name of the policy fetched by the system."},"unique_key":{"type":"string","description":"Unique combination of legal entity and period name.\n\n Example:\n\n - Legal Entity: Default Legal Entity\n - Period Name: Jan-21\n - Code: Default Legal Entity_Jan-21"},"compliance_spec":{"type":"array","items":{"type":"object","properties":{"can_delete":{"type":"boolean","description":"A boolean field indicating whether the period can be deleted or not. If set to True, the user is allowed to delete the period; if False, deletion is not permitted."},"code":{"type":"string","description":"A unique key with a 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."},"is_user_defined":{"type":"boolean","description":"A boolean field indicating whether the period is defined by the user or not. If set to True, the user is allowed to define the period; if False, defining the period is not permitted."},"legal_entity":{"type":"string","description":"Name of the legal entity."},"period_name":{"type":"string","description":"Name of the period."},"period_number":{"type":"integer","description":"Number of period within the fiscal year (normally 1-12)."},"quarter_number":{"type":"integer","description":"The quarter of the period within the fiscal year (1-4)."},"start_date":{"type":"string","description":"Start date of the period."}},"required":["can_delete","code","end_date","fiscal_year_name","is_user_defined","legal_entity","period_name","period_number","quarter_number","start_date"]},"description":"Defines the specific rules and standards where a system must process adhering to the compliant."}},"required":["compliance_name","compliance_spec","unique_key"]}}},"Required":true},"tags":["Policy Sets"],"summary":"Post Accounting Period Policy","operationId":"post_accounting_period_policy_apis_policy_sets_v1_policy_calendar_post"}}}}
```

## Delete Accounting Period Policy

> Delete the existing \*\*Accounting Calendar\*\* in the RightRev system.\
> \- If user deletes one fiscal year, then all the future fiscal years will be deleted.<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/calendar/{compliance_id}/{object_unique_value}":{"delete":{"description":"Delete the existing **Accounting Calendar** in the RightRev system.\n- If user deletes one fiscal year, then all the future fiscal years will be deleted.\n","parameters":[{"name":"compliance_id","in":"path","required":true,"schema":{"type":"string","title":"Compliance Id"},"description":"User has to provide a compliance id to delete an accounting calendar. This compliance id can be fetched from the response of the **Accounting Calendar Policy - GET** API.\n"},{"name":"object_unique_value","in":"path","required":true,"schema":{"type":"string","title":"Object Unique Value"},"description":"A Unique combination of legal entity, tenant name and period name.\n\nExample:\n  - Legal Entity: Default Legal Entity\n  - Tenant Name: tenant-name\n  - Period Name: Jan-21\n  - Object Unique Value: Default Legal Entity_tenant-name_Jan-21\n"}],"responses":{"200":{"description":"Delete Accounting Calendar 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 Unique combination of legal entity, tenant name and period name."}}},"description":"A list of compliance-related entries, each providing detailed information about the outcome of a specific compliance check. This includes messages, associated errors, and a system-generated unique identifier for tracking."},"compliance_id":{"type":"string","description":"A system-generated compliance ID to delete an accounting calendar."},"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."}}}}}}},"tags":["Policy Sets"],"summary":"Delete Accounting Period Policy","operationId":"delete_accounting_period_policy_apis_policy_sets_v1_policy_calendar__compliance_id___object_unique_value__delete"}}}}
```


---

# 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/company-profile/accounting-period-calendar.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.
