Add Requisition Lines to an Existing Purchase Order

You can use the Requisition Processing Requests REST API to add newly approved purchase requisition lines to existing purchase orders. You can use the Opt-in UI to enable Add New Approved Requisitions to Existing Open Purchase Orders to add approved requisition lines to existing open purchase orders.

Note:

With this feature, you can add approved requisition lines to existing open purchase orders only when the requisition lines don't reference goods shipped to third parties or work orders.

Here's a typical application processing flow:

  1. Identify the existing open purchase order number to which you want to add approved requisition lines.
  2. Identify the approved requisition lines that are awaiting processing.
  3. Create a requisition processing request by including the requisition lines.
  4. Submit the requisition processing request to add the requisition lines to the order.
  5. Submit the change order for approval.

Identify an Existing Purchase Order

To identify an existing order, query the order details using the Draft Purchase Orders REST service or create a BI Publisher report.

Identify Requisition Lines

In this scenario, you identify the requisition lines for adding to an existing order. To query lines for a given requisition, use the Purchase Requisitions REST service or create a BI Publisher report to identify all requisition lines that are awaiting processing.

Create a Requisition Processing Request

You can now create a requisition processing request. This step is similar to adding requisition lines to the document builder online. In this example, you provide the Order Number and the specific Sold to Legal Entity of the order in the request header.

Example URL

Use this resource URL format:

POST

curl -u username:password -X POST -H "Content-Type:application/json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/requisitionProcessingRequests"

Example Request

Here's an example of the request body in JSON format.
{ 
  "Type" : "Existing Order",
  "OrderNumber": "1005382",
  "SoldToLegalEntity":"Vision Corporation",
   "lines": [	
		{
			"RequisitionLineId": 300100551698198
			
		}
	]
 }

Example Response

Here's an example of the response body in JSON format.
{
    "RequestHeaderId": 300100551759371,
    "ProcurementBUId": 204,
    "ProcurementBU": "Vision Corporation",
    "RequisitioningBUId": 204,
    "RequisitioningBU": "Vision Corporation",
    "Type": "Existing Order",
    "SoldToLegalEntityId": 204,
    "SoldToLegalEntity": "Vision Corporation",
    "SupplierId": 415,
    "Supplier": "CV_SuppA03",
    "SupplierSiteId": 2078,
    "SupplierSite": "05",
    "DocumentStyleId": 1,
    "DocumentStyle": "Purchase Order",
    "SourceAgreementId": null,
    "SourceAgreement": null,
    "CurrencyCode": "USD",
    "Currency": "US Dollar",
    "ConversionRateTypeCode": null,
    "ConversionRateType": null,
    "ConversionRateDate": null,
    "ConversionRate": null,
    "BuyerId": 100010026863783,
    "Buyer": "Furey,Clare",
    "GroupRequisitionLines": null,
    "OrderNumber": "1005382",
    "POHeaderId": 593296,
    "lines": [
        {
            "RequestLineId": 300100551759372,
            "RequestHeaderId": 300100551759371,
            "RequisitionLineId": 184414,
            "links": [
                {
                    "rel": "self",
                    "href": "https://servername/fscmRestApi/resources/version/requisitionProcessingRequests/300100551759371/child/lines/300100551759372",
                    "name": "lines",
                    "kind": "item",
                    "properties": {
                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
                    }
                },
                {
                    "rel": "canonical",
                    "href": "https://servername/fscmRestApi/resources/version/requisitionProcessingRequests/300100551759371/child/lines/300100551759372",
                    "name": "lines",
                    "kind": "item"
                },
                {
                    "rel": "parent",
                    "href": "https://servername/fscmRestApi/resources/version/requisitionProcessingRequests/300100551759371",
                    "name": "requisitionProcessingRequests",
                    "kind": "item"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/requisitionProcessingRequests/300100551759371",
            "name": "requisitionProcessingRequests",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/requisitionProcessingRequests/300100551759371",
            "name": "requisitionProcessingRequests",
            "kind": "item"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/requisitionProcessingRequests/300100551759371/child/lines",
            "name": "lines",
            "kind": "collection"
        },
        {
            "rel": "action",
            "href": "https://servername/fscmRestApi/resources/version/requisitionProcessingRequests/300100551759371/action/processRequest",
            "name": "processRequest",
            "kind": "other"
        }
    ]
}

Submit the Requisition Processing Request

In this scenario, you submit the requisition processing request and a change order is created in the Incomplete status.

Example URL

Use this resource URL format:

POST

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

Example Request

Here's an example of the request body in JSON format.
{
    "name": "processRequest",
    "parameters": [
        {
            "bypassWarningsFlag": "true"
        }
    ]
}

Example Response

Here's an example of the response body in JSON format.
{
    "result": "Change order 1 was created for the (Purchase Order) 1005382 document and the requisition lines were added to it."
}

Submit the Change Order

In this scenario, you submit the incomplete change order for approval.

Example URL

Use this resource URL format.

POST

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

Example Request

Here's an example of the request body in JSON format.
{
	"name": "submit"
}

Example Response

Here's an example of the response body in JSON format.
{
	"result": "SUCCESS"
}