Updating Descriptions in Oracle Fusion Purchase Requisitions via REST API: A Practical Guide 

Oracle Fusion Purchase Requisitions via REST API

Introduction 

In Oracle Fusion Purchase Requisitions via REST API, ensuring accurate purchase requisition (PR) details is vital for smooth procurement operations. Recently, we encountered an issue where PR descriptions were incorrectly imported via the FBDI process. Using the REST API, we successfully updated the descriptions, overcoming permission-related errors along the way. Here’s how we tackled the issue:

Scenario Overview in Oracle Fusion Purchase Requisitions via REST API

A batch of PRs imported through the Purchase Order Request (POR) FBDI process had incorrect descriptions. For example, a PR description like: 

Corporate Payroll for Q3 – August 2024 

Needed to be updated to: 

Corporate Payroll for Q3 – September 2024 

To address this, we attempted to use the Oracle Fusion REST API to update the descriptions. 

Level up your expertise with
Oracle Fusion Procurement Training

Update Attempt of Oracle Fusion Purchase Requisitions via REST API

We crafted a REST API request targeting the PR resource with the following endpoint: 

https://examplehost.fa.em2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/purchaseRequisitions/{RequisitionID}

Request Body Example: 

{ 
  "Description": "Corporate Payroll for Q3 - September 2024" 
} 

Response Error: 

The Preparer and the Signed-in User Must be the Same to Create a Requisition.(POR-2010915) 

Root Cause 

This error indicated that the API user did not have sufficient privileges to update requisitions created by another preparer. 

Solution: Assigning Custom Roles 

To resolve the issue, we created a custom role with the required permissions and assigned it to the API user. Below are the steps we followed: 

1. Create a Custom Role: 

Navigate to the Security Console in Oracle Fusion Cloud – Create a new role, for example: a Custom Requisition Manager Role. 

2. Add Privileges to the Custom Role: 

  • Requisition Management Using REST Service (ORA_POR_USE_REST_SERVICE_MANAGE) 
  • Requisition Privileges for BI Reporting (POR_MANAGE_REQUISITION_PRIV_OBI) 

3. Assign the Custom Role to the User: 

Assign the new role to the user account used for REST API operations. 

Successful API Update 

With the new role in place, the REST API call was successfully executed, updating the PR description without errors. 

Updated Request Example: 

{ 
  "Description": "Corporate Payroll for Q3 - September 2024" 
} 

Response Example: 

{ 
  "RequisitionNumber": "19010", 
  "Description": "Corporate Payroll for Q3 - September 2024", 
  "Status": "Updated" 
} 

Conclusion 

This experience highlights the importance of aligning API user permissions with the task requirements. By creating a custom role with specific privileges, we ensured the user had sufficient access to update PRs via REST API. 

This approach can be extended to other API-driven processes in Oracle Fusion Cloud, making it a robust solution for similar permission-related challenges. 

Key Takeaways

– Leverage Oracle Fusion’s role-based access control (RBAC) to grant required privileges. 
– Use custom roles for enhanced control and flexibility. 
– Validate API user roles and permissions before initiating REST operations. 

Author: Kashif Baksh is a Senior Principal Consultant at Fusion Practices

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *