Create a Change Order on a Purchase Order as a Procurement Requester

The Draft Purchase Order resource is not limited to the Integrator or Buyer. You can access the Draft Purchase Order resource as a Procurement Requester. As a requester, you can view or edit the same purchase orders that you can view or edit on the user interface based on your requisitioning business unit access.

Note:

See the Privileges topic for access requirements of REST operations.

Before initiating a change order as a Procurement Requester, you can use the procurement requester intent to check if you can update a purchase order. When you access the Draft Purchase Orders REST API using the procurement requester intent, the REST API doesn't return any data in these conditions:

  • Purchase Order has a Pending Change Order initiated by a Buyer, Supplier, or a different requester.
  • Purchase Order is canceled or closed.
  • Purchase Order is frozen.
  • Purchase Order is created from multiple requisitions and the requester doesn't have the Change Purchase Order Consolidated as a Procurement Requester privilege.
  • User has already submitted a change order for approval.
  • User doesn't have access to the requisitioning business unit.

To access the intent, you need the Change Purchase Order as Procurement Requester privilege that's inherited from the Employee role or other job roles such as Procurement Requester.

Example

In this example, Sara Black is a requester who creates two requisitions that are placed on two separate purchase orders, PO1002 and PO1001. In the two scenarios for Sara:

  1. Purchase Order PO1002 is in Open status and the Buyer has created a change order.

  2. Purchase Order PO1001 is in Open status.

Scenario 1: Sara Can't Modify the PO

Sara is using a client UI to make a change to PO1002. On the client UI, it can be verified if Sara has access to update the purchase order by running a REST request with Intent=ProcurementRequester on purchase order PO1002. The response payload will not contain information for purchase order PO1002 as she can't modify the purchase order when there's a pending change order created by the Buyer.

Example URL

Use this resource URL format:

GET

curl -u username:password "https://servername/fscmRestApi/resources/version/draftPurchaseOrders?q=POHeaderId=POHeaderId&finder=findByIntent;Intent=ProcurementRequester"

Example Response

Here's an example of the response body in JSON format:
{
    "items": [],
    "count": 0,
    "hasMore": false,
    "limit": 25,
    "offset": 0
 
}

Scenario 2: Sara Can Modify the PO

Sara is using a client UI to make a change to PO1001. On the client UI, it can be verified if Sara has access to update the purchase order by running a REST request with Intent=ProcurementRequester on purchase order PO1001. The response payload will contain information for purchase order PO1001 as she can modify the purchase order.

Example URL

Use this resource URL format:

GET

curl -u username:password "https://servername/fscmRestApi/resources/version/draftPurchaseOrders?q=POHeaderId=POHeaderId&finder=findByIntent;Intent=ProcurementRequester"

Example Response

Here's an example of the response body in JSON format:
{
    "items": [
    {
        "POHeaderId": 1001,
        "OrderNumber": "PO1001",
        "SoldToLegalEntityId": 204,
        "SoldToLegalEntity": "Vision Operations",
        "CreationDate": "2009-09-13T22:31:03.530+00:00",
        "StatusCode": "OPEN",
        "Status": "Open",
        "ProcurementBUId": 204,
        "ProcurementBU": "Vision Operations",
        "RequisitioningBUId": 204,
        "RequisitioningBU": "Vision Operations",
        "BillToBUId": 204,
        "BillToBU": "Vision Operations",
        "Revision": 0,
        "BuyerId": 100010024202242,
        "Buyer": "Robinson,Andrew",
        "SupplierId": 100000011547508,
        "Supplier": "cPO-Supplier09",
        "SupplierSiteId": 100000011547553,
        "SupplierSite": "cPO-SITE01",
        "SupplierContactId": null,
        "SupplierContact": null,
        "BillToLocationId": 204,
        "BillToLocation": "V1- New York City",
        "ConversionRateType": null,
        "CurrencyCode": "USD",
        "Currency": "US Dollar",
        "TotalTax": 0,
        "Total": 4400.00,
        "Description": "zBIA CO 7.1,CO 7.2\n",
        "RequiredAcknowledgmentCode": "N",
        "RequiredAcknowledgment": "None",
        "SupplierOrder": null,
        "ReferenceNumber": null,
        "AcknowledgmentDueDate": null,
        "PaymentTermsId": 10003,
        "PaymentTerms": "45 Net (terms date + 45)",
        "CarrierId": null,
        "Carrier": null,
        "ModeOfTransportCode": null,
        "ModeOfTransport": null,
        "ServiceLevelCode": null,
        "ServiceLevel": null,
        "ShippingMethod": "",
        "FreightTermsCode": "Due",
        "FreightTerms": "Due",
        "FOBCode": "Origin",
        "FOB": "Origin",
        "RequiresSignatureFlag": false,
        "AcknowledgeWithinDays": null,
        "BuyerManagedTransportFlag": false,
        "PayOnReceiptFlag": false,
        "ConfirmingOrderFlag": null,
        "NoteToSupplier": null,
        "NoteToReceiver": null,
    }
    ]
}

Sara can now create the change order.

Example URL

Use this resource URL format:

PATCH

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

Example Request

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

{
    "ChangeOrderDescription": "change order",
    "ChangeOrderInitiatingParty": "REQUESTER",
    "lines": [
    {
        "POLineId": 300100185839441,
        "Quantity": 15
    }
    ]
}

Example Response

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

{
    "POHeaderId": 300100185839437,
    "OrderNumber": "1004713",
    "Description": null,
    "DocumentStyleId": 1,
    "DocumentStyle": "Purchase Order",
    "StatusCode": "OPEN",
    "Status": "Open",
    "ProcurementBUId": 204,
    "ProcurementBU": "Vision Operations",
    "RequisitioningBUId": 204,
    "RequisitioningBU": "Vision Operations",
    "BuyerId": 100010026863855,
    "Buyer": "Johnson,Ericka",
    "BuyerEmail": "sendmail-test-discard@example.com",
    "CurrencyCode": "USD",
    "Currency": "US Dollar",
    "ConversionRateTypeCode": null,
    "ConversionRateType": null,
    "ConversionRateDate": null,
    "ConversionRate": null,
    "SupplierId": 12,
    "Supplier": "CV_SuppA01",
    "SupplierSiteId": 2444,
    "SupplierSite": "CVSuppA01Site01",
    "SupplierCommunicationMethod": "NONE",
    "SupplierFax": null,
    "SupplierOrder": null,
    "SupplierEmailAddress": null,
    "SoldToLegalEntityId": 204,
    "SoldToLegalEntity": "Vision Operations",
    "BillToBUId": 204,
    "BillToBU": "Vision Operations",
    "BillToLocationId": 300100025284030,
    "BillToLocation": "V1 - Vision Operations",
    "DefaultShipToLocationId": 204,
    "DefaultShipToLocation": "V1- New York City",
    "MasterContractId": null,
    "MasterContractNumber": null,
    "MasterContractTypeId": null,
    "MasterContractType": null,
    "RequiredAcknowledgmentCode": "N",
    "RequiredAcknowledgment": "None",
    "AcknowledgmentDueDate": null,
    "AcknowledgmentWithinDays": null,
    "BuyerManagedTransportFlag": false,
    "RequiresSignatureFlag": false,
    "PendingSignatureFlag": null,
    "PaymentTermsId": 10003,
    "PaymentTerms": "45 Net (terms date + 45)",
    "FOBCode": "Origin",
    "FOB": "Origin",
    "FreightTermsCode": "Due",
    "FreightTerms": "Due",
    "SupplierContactId": 300100002882605,
    "SupplierContact": "Andrews, Rob",
    "NoteToSupplier": null,
    "NoteToReceiver": null,
    "CarrierId": 12519,
    "Carrier": "Airborne",
    "ModeOfTransportCode": null,
    "ModeOfTransport": null,
    "ServiceLevelCode": null,
    "ServiceLevel": null,
    "ConfirmingOrderFlag": false,
    "PayOnReceiptFlag": true,
    "DocumentCreationMethod": "AUTOCREATE",
    "ShippingMethod": "Airborne",
    "DefaultTaxationCountryCode": "US",
    "DefaultTaxationCountry": "United States",
    "FirstPartyRegistrationId": 35647,
    "FirstPartyRegistrationNumber": "4567890",
    "ThirdPartyRegistrationId": null,
    "ThirdPartyRegistrationNumber": null,
    "DocumentFiscalClassificationId": null,
    "DocumentFiscalClassificationCode": null,
    "DocumentFiscalClassification": null,
    "BudgetaryControlEnabledFlag": false,
    "CancelFlag": null,
    "ChangeOrderNumber": "1",
    "ChangeOrderInitiatingParty": "REQUESTER",
    "ChangeOrderDescription": "change order",
    "ChangeOrderStatusCode": "INCOMPLETE",
    "ChangeOrderStatus": "Incomplete",
    "ChangeOrderTypeCode": null,
    "ChangeOrderType": null,
    "ChangeRequestedBy": null,
    "ContractTermsExistFlag": false,
    "DuplicatedFromHeaderId": null,
    "FundsStatus": "Not Applicable",
    "FundsStatusCode": "NOT_APPLICABLE",
    "ImportSourceCode": "UI",
    "ReferenceNumber": null,
    "LastUpdateDate": "2020-10-21T12:32:52.989+00:00",
    "LastUpdatedBy": "PRC_INTEGRATION_USER",
    "CreationDate": "2020-10-21T12:26:10.001+00:00",
    "CreatedBy": "CVBUYER10",
    "lines": [
    {
        "POLineId": 300100185839441,
        "LineNumber": 2,
        "POHeaderId": 300100185839437,
        "OrderNumber": "1004713",
        "LineTypeId": 1,
        "LineType": "Goods",
        "ItemId": 663946,
        "Item": "RCV-105",
        "ItemRevision": null,
        "CategoryId": 1,
        "CategoryCode": "MISC.MISC",
        "Category": "Miscellaneous_1",
        "Description": "Serial Predefined Item",
        "Amount": null,
        "Quantity": 15,
        "Price": 25,
        "UOMCode": "Ea",
        "UOM": "Each",
        "CurrencyCode": "USD",
        "Currency": "US Dollar",
        "BaseModelId": null,
        "BaseModel": null,
        "BaseModelPrice": null,
        "CancelDate": null,
        "CancelFlag": false,
        "CancelReason": null,
        "CancelledBy": null,
        "ChangeAcceptedFlag": null,
        "ConfiguredItemFlag": false,
        "ConsignmentLineFlag": false,
        "SourceAgreementId": null,
        "SourceAgreementNumber": null,
        "SourceAgreementLineId": null,
        "SourceAgreementLine": null,
        "SourceAgreementTypeCode": null,
        "SourceAgreementType": null,
        "ResponseLine": null,
        "Response": null,
        "NegotiationId": null,
        "Negotiation": null,
        "NegotiationLine": null,
        "FundsStatusCode": "NOT_APPLICABLE",
        "FundsStatus": "Not Applicable",
        "ManualPriceChangeFlag": true,
        "NegotiatedFlag": false,
        "NoteToSupplier": null,
        "ReasonForChange": null,
        "SupplierConfigurationId": null,
        "SupplierItem": null,
        "OptionsPrice": null,
        "UNNumberCode": null,
        "UNNumberId": null,
        "UNNumber": null,
        "UNNumberDescription": null,
        "HazardClassCode": null,
        "HazardClassId": null,
        "HazardClass": null,
        "WorkOrderProduct": null,
        "TaxableFlag": false,
        "ReferenceNumber": null,
        "CancelUnfulfilledDemandFlag": null,
        "CreationDate": "2020-10-21T12:26:10.484+00:00",
        "CreatedBy": "CVBUYER10",
        "LastUpdateDate": "2020-10-21T12:32:52.888+00:00",
        "LastUpdatedBy": "PRC_INTEGRATION_USER",
        "MaximumRetainageAmount": null,
        "Manufacturer": null,
        "ManufacturerPartNumber": null
    }
    ]
}

Sara submits the change order. The purchase order line is modified after the change order is implemented.

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"
}