For the complete documentation index, see llms.txt. This page is also available as Markdown.

Approvals

Get Pending Approval

get
/apis/oingest-approval/v1/pending

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.

Responses
200

Get Pending Approvals

application/json
approval_enabledbooleanRequired

This field indicates Enable Approval for Manual Uploads flag at tenant level is enabled or not.

approval_rolesstring[]Required

This will display the name of the role eligible for Approvals

total_recordsintegerRequired

Count of total records with status as Pending Approval

get/apis/oingest-approval/v1/pending
GET /apis/oingest-approval/v1/pending HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Accept: */*
200

Get Pending Approvals

{
  "approval_enabled": true,
  "approval_roles": [
    "Sysadmin"
  ],
  "records": [
    {
      "approval_comments": null,
      "approval_id": "aa22cfa8-2c06-41d3-8287-7f4a1ef19132",
      "approved_by": null,
      "approved_on": null,
      "approver_role": null,
      "context": "order-Data-Ingestion",
      "file_date_format": "MM/DD/YYYY",
      "file_format": "csv",
      "file_id": "8ec5f8c2-f39a-4c90-ab0d-7a635a06663b",
      "file_name": "Sage_Order_Ingetion_RR028_ST.csv",
      "ingested_transaction_type": "ORDER",
      "is_own_upload": true,
      "status": "Pending Approval",
      "total_rows_received": 3,
      "upload_time": 1778792766,
      "upload_type": "MANUAL",
      "uploaded_by": "username@rightrev.com",
      "uploaded_file_name": "Sage_Order_Ingetion_RR028_ST.csv"
    }
  ],
  "total_records": 1
}

Post Approval Action

post
/apis/oingest-approval/v1/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.

Body
actionstringRequired

name of the action. Is it Approve or Reject.

commentsstringRequired

Comments added by the user to approve or reject. This is mandatory field.

approval_idsstring[]Required

User need to provide approval ID. User can get it from GET call. This is System generated unique alpha-numeric number.

Responses
200

Approval Action

application/json
messagestringRequired

System generated message on Approval or reject.

processed_countintegerRequired

No of records approved or rejected.

statusstringRequired

Status shows actions is successful or not.

post/apis/oingest-approval/v1/action
POST /apis/oingest-approval/v1/action HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Content-Type: application/json
Accept: */*
Content-Length: 116

{
  "action": "Approved",
  "comments": "Approve May-26 Order file",
  "approval_ids": [
    "a2cd581d-62a7-44f7-9550-82d9e2ee750d"
  ]
}
200

Approval Action

{
  "message": "1 record(s) Approved successfully.",
  "processed_count": 1,
  "status": "success"
}

Last updated

Was this helpful?