Manage Requisitions by Users

Previously, only the Integrator could execute REST actions against the Purchase Requisitions resource. Now anyone with the Manage Requisition privilege, POR_MANAGE_REQUISITION_PRIV (assigned to the Procurement Requester role out of the box), can execute actions against the resource. Such users are, however, still limited by their data security policy (a data security policy determines what data you have access to).

Let's assume that Mary Brown, an employee, needs to order some office supplies. Mary Brown has a primary work assignment with an associated requisitioning business unit called Vision Operations (BU ID is 204). She also has an expense account on her work assignment record.

Create a Requisition

This involves executing a POST action against the purchase requisition resource.

Example URL

Use this resource URL format:

fscmRestApi/resources/version/purchaseRequisitions
cURL Command
curl -u username:password -X POST -H "Content-Type:application/vnd.vision.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/purchaseRequisitions" 

Example Request

Here's an example of the request body in JSON format:

{
    "RequisitioningBUId": 204,
    "PreparerId": 100100004256726, 
    "ExternallyManagedFlag": false,
    "Description" : "Office Supplies",
    "lines": [{
            "LineNumber": 1,
            "LineTypeCode": "Goods",
            "CategoryName": "Paper",
            "ItemDescription": "Notebook - 100 Pages",
            "UOM": "Each",
            "Quantity": 1,
            "Price": 4.99,
            "CurrencyCode": "USD",
            "DestinationTypeCode": "EXPENSE",
            "DestinationOrganizationId": 204,
            "RequesterId": 100100004256726,
            "DeliverToLocationId": 204,
            "RequestedDeliveryDate": "2021-09-15",
            "distributions":[{ 
                "DistributionNumber":1,
                "CurrencyAmount": 4.99,
   "Quantity": 1
            }]
        }]
}

Note:

  • The PreparerId must match the personId of the person making the REST call.
  • The person making the call must have access to the requisitioning business unit in which the requisition is being created.
  • The person making the call must have the necessary privilege for the type of line they are creating. For example if the payload has a deliver-to location that is different from what is on the user's HR record, then the person must have the privilege to create requisition lines with a deliver-to location different from what is on their HR record.

Update a Requisition Line

Let's say Mary Brown needs to change the requested delivery date.

This involves executing a PATCH request against a specific requisition line.

Example URL

Use this resource URL format:

fscmRestApi/resources/version/purchaseRequisitions/purchaseRequisitionsUniqID/child/lines/linesUniqID
cURL Command
curl -X PATCH -u "username:password" -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -d 'request payload'  "https://servername/fscmRestApi/resources/version/purchaseRequisitions/purchaseRequisitionsUniqID/child/lines/linesUniqID"

Example Request Body

Here's an example of the request body in JSON format:

"RequestedDeliveryDate": "2021-08-15",
            
}

Note:

The PreparerId of the requisition must match the personId of the person making the REST call. This means you can only update requisitions that you own.

The person making the call must have access to the requisitioning business unit in which the requisition was created. This means, if for example, you created the requisition in BU A but no longer have access to that BU, you won't be able to execute a PATCH against it.

View the Requisition

Mary Brown wants to check that she entered the correct information before submitting the requisition for approval.

This involves executing a GET request against a specific requisition.

Example URL

Use this resource URL format:

fscmRestApi/resources/version/purchaseRequisitions/purchaseRequisitionsUniqID
cURL Command
curl -u username:password "https://servername/fscmRestApi/resources/version/purchaseRequisitions/purchaseRequisitionsUniqID"

Note:

The PreparerId of the requisition must match the personId of the person making the REST call. This means you can only view requisitions that you own. Unlike the web application, you will not be able to view requisitions where you are listed as a requester on one of the lines unless you also own the requisition.

Unlike the web application, having the View Requisitions, All privilege, POR_VIEW_REQUISITIONS_ALL, will not allow you to view requisitions created by other people when you make the call via REST API.

The person making the call must have access to the requisitioning business unit in which the requisition was created. This means, if for example, you created the requisition in BU A but no longer have access to that BU, you won't be able to execute a PATCH against it.

Submit the Requisition

Now that Mary Brown has created and updated the requisition, she will submit it for approval. Submitting it for approval will lead to the tax being calculated and a charge account being generated. This charge account will be set to the expense account on her HR record.

This involves executing a POST action against the purchase requisition resource.

Example URL

Use this resource URL format:

/fscmRestApi/resources/version/purchaseRequisitions/purchaseRequisitionsUniqID
cURL Command
curl -u username:password -X POST -H "Content-Type: application/vnd.oracle.adf.action+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/purchaseRequisitions/purchaseRequisitionsUniqID"

Example Request Body

Here's an example of the request body in JSON format:

{
    "name":"submitRequisition",
    "parameters":[]
}

Note:

The PreparerId of the requisition must match the personId of the person making the REST call. This means you can only submit requisitions that you own.

The person making the call must have access to the requisitioning business unit in which the requisition was created. This means, if for example, you created the requisition in BU A but no longer have access to that BU, you won't be able to submit the requisition.