> 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/approvals.md).

# Approvals

## Get Pending Approval

> This API is to retrieve the list of all manually uploaded CSV files for Orders, Invoices, Events and All Bulk Uploads with status as Pending Approval.<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/oingest-approval/v1/pending":{"get":{"responses":{"200":{"description":"Get Pending Approvals","content":{"application/json":{"schema":{"type":"object","properties":{"approval_enabled":{"type":"boolean","description":"This field indicates *Enable* *Approval* *for* *Manual* *Uploads* flag at tenant level is enabled or not."},"approval_roles":{"type":"array","items":{"type":"string"},"description":"This will display the name of the role eligible for Approvals"},"records":{"type":"array","items":{"type":"object","properties":{"approval_comments":{"type":"null","description":"Comments added by the user to approve or reject. This is mandatory field."},"approval_id":{"type":"string","description":"System generated unique alpha-numeric number."},"approved_by":{"type":"null","description":"Id of the user approved by."},"approved_on":{"type":"null","description":"Timestamp of the file approved by the user. This is a unix Epoch timestamp format."},"approver_role":{"type":"null","description":"Role of the approver."},"context":{"type":"string","description":"This is the context of transactions. Orders, Invoices, Events or Bulk uploads. For e.g. if it's Bulk GL Segment Update it will show - gl_segment_update-Data-Ingestion"},"file_date_format":{"type":"string","description":"Date format of the uploaded file for. For e.g. MM/DD/YYYY "},"file_format":{"type":"string","description":"Type of the file. It should be CSV."},"file_id":{"type":"string","description":"A system generated unique alpha-numeric number "},"file_name":{"type":"string","description":"name of the file uploaded for approval."},"ingested_transaction_type":{"type":"string","description":"This is the type of transactions. Orders, Invoices, Events or Bulk uploads."},"is_own_upload":{"type":"boolean","description":"Boolean field indicating is the file uploaded by same user  "},"status":{"type":"string","description":"Status of the file. For. e.g. Pending Approval or Approved or Rejected."},"total_rows_received":{"type":"integer","description":"No of records available in CSV file to be approved"},"upload_time":{"type":"integer","description":"Timestamp of the file uploaded by the user. This is a unix Epoch timestamp format."},"upload_type":{"type":"string","description":"This is the type of transactions. Manual, Events or Bulk"},"uploaded_by":{"type":"string","description":"Id of the user uploaded by."},"uploaded_file_name":{"type":"string","description":"Name of the CSV file uploaded for approval"}},"required":["approval_comments","approval_id","approved_by","approved_on","approver_role","context","file_date_format","file_format","file_id","file_name","ingested_transaction_type","is_own_upload","status","total_rows_received","upload_time","upload_type","uploaded_by","uploaded_file_name"]},"description":"No of total records with status as Pending Approval"},"total_records":{"type":"integer","description":"Count of total records with status as Pending Approval"}},"required":["approval_enabled","approval_roles","records","total_records"]}}}}},"description":"This API is to retrieve the list of all manually uploaded CSV files for Orders, Invoices, Events and All Bulk Uploads with status as Pending Approval.\n","tags":["Transactions"],"summary":"Get Pending Approval","operationId":"get_pending_approval_apis_oingest_approval_v1_pending_get"}}}}
```

## Post Approval Action

> \- This API is to \*Approve\* or \*Reject\* the list of all manually uploaded CSV files for Orders, Invoices, Events and All Bulk Uploads with status as Pending Approval.\
> \- The user who uploads a file cannot approve the same file.\
> \- The user who uploads a file can Reject his own file before it is approved.<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/oingest-approval/v1/action":{"post":{"responses":{"200":{"description":"Approval Action","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"System generated message on Approval or reject."},"processed_count":{"type":"integer","description":"No of records approved or rejected."},"status":{"type":"string","description":"Status shows actions is successful or not. "}},"required":["message","processed_count","status"]}}}}},"description":"- This API is to *Approve* or *Reject* the list of all manually uploaded CSV files for Orders, Invoices, Events and All Bulk Uploads with status as Pending Approval.\n- The user who uploads a file cannot approve the same file.\n- The user who uploads a file can Reject his own file before it is approved.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","description":"name of the action. Is it *Approve* or *Reject*. "},"comments":{"type":"string","description":"Comments added by the user to approve or reject. This is mandatory field."},"approval_ids":{"type":"array","items":{"type":"string"},"description":"User need to provide approval ID. User can get it from GET call. This is System generated unique alpha-numeric number."}},"required":["action","approval_ids","comments"]}}},"required":true},"tags":["Transactions"],"summary":"Post Approval Action","operationId":"post_approval_action_apis_oingest_approval_v1_action_post"}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apis.rightrev.com/rightrev-rest-api/approvals.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
