Calculate Tax and Derive a Charge Account

You can use a user-defined action, calculateTaxAndAccounting, to calculate tax and derive a charge account when tax determinants or input sources of Oracle Transaction Account Builder are modified on a purchase order.

Note:

See the Privileges topic for access requirements for this REST operation.

In this example, Smith Wilson is a buyer who wants to modify the quantity and requester information on a purchase order using a REST client. So, Smith uses the PATCH operation to create a buyer-initiated change order and modifies the attributes.

Before submitting the change order for approval, Smith wants to view the new charge account and estimated tax amounts. Smith uses the calculateTaxAndAccounting user-defined action, which re-derives the charge account and tax amount on the change order.

Here are the steps to perform the task:

  1. Get the purchase order details to update.
  2. Create a buyer-initiated change order and update the quantity and the requester information.
  3. Call the user-defined action calculateTaxAndAccounting.

  4. Get purchase order distribution details to see the updated values of the charge account and the taxes.

Get the Purchase Order Details to Update

In this step, Smith gets the details of the purchase order for which he wants to update the quantity and the requester information.

Example URL

Use this resource URL format:

GET

curl -u username:password -X GET -H "Content-Type:application/vnd.oracle.adf.action+json" -d 
"https://servername/fscmRestApi/resources/version/draftPurchaseOrders/purchaseOrdersUniqID/child/schedules/schedulesUniqID/child/distributions/distributionsUniqID"

Example Response

Here's an example of the response body in JSON format:
{
    "PODistributionId": 300100577198656,
    "DistributionNumber": 1,
    "POHeaderId": 300100577198652,
    "OrderNumber": "1006525",
    "POLineId": 300100577198654,
    "LineNumber": 1,
    "LineLocationId": 300100577198655,
    "ScheduleNumber": 1,
    "Quantity": 10,
    "Amount": null,
    "DeliverToLocationId": 204,
    "DeliverToLocationCode": "V1- New York City",
    "DeliverToLocationInternalCode": "V1-_NEW_YORK_CITY_0_2450399170046",
    "DeliverToLocation": "V1- New York City",
    "POChargeAccountId": 17544,
    "POChargeAccount": "01-830-7695-0000-000",
    "POAccrualAccountId": 12854,
    "POAccrualAccount": "01-000-2210-0000-000",
    "POVarianceAccountId": 17544,
    "POVarianceAccount": "01-830-7695-0000-000",
    "DestinationChargeAccountId": null,
    "DestinationChargeAccount": null,
    "DestinationVarianceAccountId": null,
    "DestinationVarianceAccount": null,
    "RecoverableInclusiveTax": 0,
    "RecoverableExclusiveTax": 7.5,
    "NonrecoverableInclusiveTax": 0,
    "NonrecoverableExclusiveTax": 2.5,
    "ConversionRate": null,
    "ConversionRateDate": null,
    "CurrencyCode": "USD",
    "Currency": "US Dollar",
    "UOM": "Each",
    "BudgetDate": null,
    "ChangeAcceptedFlag": null,
    "ChangeOrderAmountCancelled": null,
    "ChangeOrderQuantityCancelled": null,
    "DeliverToCustomerContactId": null,
    "DeliverToCustomerContact": null,
    "DeliverToCustomerId": null,
    "DeliverToCustomer": null,
    "DeliverToCustomerLocationId": null,
    "RequesterId": 300100176828546,
    "Requester": "SSPUSER01",
    "DestinationSubinventory": null,
    "FundsStatusCode": null,
    "FundsStatus": null,
    "ParentDistributionId": null,
    "ParentDistributionNumber": null,
    "ReasonForChange": null,
    "RequisitionHeaderId": null,
    "Requisition": null,
    "RequisitionLineId": null,
    "RequisitionLine": null,
    "RequisitionDistributionId": null,
    "RequisitionDistribution": null,
    "CreationDate": "2023-07-19T14:52:49.856+00:00",
    "CreatedBy": "CVBUYER01",
    "LastUpdateDate": "2023-07-20T06:34:08.097+00:00",
    "LastUpdatedBy": "CVBUYER01",
    "UOMCode": "Ea",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656",
            "name": "distributions",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000878"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656",
            "name": "distributions",
            "kind": "item"
        },
        {
            "rel": "parent",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655",
            "name": "schedules",
            "kind": "item"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656/child/DFF",
            "name": "DFF",
            "kind": "collection"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656/child/globalDFFs",
            "name": "globalDFFs",
            "kind": "collection"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656/child/projectDFF",
            "name": "projectDFF",
            "kind": "collection"
        }
    ]
}

Create a Buyer-Initiated Change Order and Update Quantity and Requester on the PO

In this step, Smith creates a change order and updates the quantity and requester information on the purchase order.

Example URL

Use this resource URL format:

PATCH

curl -u username:password -X PATCH -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:
{
    "ChangeOrderDescription": "Change order1",
    "ChangeOrderInitiatingParty": "Buyer",
    "lines": [
        {
            "POLineId": "300100577198654",  
            "Quantity": 20,      
            "schedules": [
                {
                    "LineLocationId": "300100577198655",
                    "distributions": [
                        {
                            "PODistributionId": "300100577198656",
                           "Requester": "SSPUSER11"
 
                        }
                    ]
                }
            ]
        }
    ]
}  

Example Response

Here's an example of the response body in JSON format:
{
    "POHeaderId": 300100577198652,
    "OrderNumber": "1006525",
    "Description": null,
    "DocumentStyleId": 1,
    "DocumentStyle": "Purchase Order",
    "StatusCode": "OPEN",
    "Status": "Open",
    "ProcurementBUId": 204,
    "ProcurementBU": "Vision Operations",
    "RequisitioningBUId": 204,
    "RequisitioningBU": "Vision Operations",
    "BuyerId": 100010026863783,
    "Buyer": "Furey,Clare",
    "BuyerEmail": null,
    "CurrencyCode": "USD",
    "Currency": "US Dollar",
    "ConversionRateTypeCode": null,
    "ConversionRateType": null,
    "ConversionRateDate": null,
    "ConversionRate": null,
    "SupplierId": 12,
    "Supplier": "CV_SuppA01",
    "SupplierSiteId": 2444,
    "SupplierSite": "CVSuppA01Site01",
    "SupplierCommunicationMethod": "EMAIL",
    "SupplierFax": null,
    "SupplierOrder": null,
    "SupplierEmailAddress": "abc@oracle.com",
    "SoldToLegalEntityId": 204,
    "SoldToLegalEntity": "Vision Operations",
    "BillToBUId": 204,
    "BillToBU": "Vision Operations",
    "BillToLocationId": 300100025284030,
    "BillToLocation": "V1 - Vision Operations",
    "BillToLocationInternalCode": "V1 - Vision Operations",
    "DefaultShipToLocationId": 204,
    "DefaultShipToLocation": "V1- New York City",
    "DefaultShipToLocationInternalCode": "V1-_NEW_YORK_CITY_0_2450399170046",
    "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": null,
    "SupplierContact": null,
    "NoteToSupplier": null,
    "NoteToReceiver": null,
    "CarrierId": 12519,
    "Carrier": "Airborne",
    "ModeOfTransportCode": null,
    "ModeOfTransport": null,
    "ServiceLevelCode": null,
    "ServiceLevel": null,
    "ConfirmingOrderFlag": false,
    "PayOnReceiptFlag": true,
    "DocumentCreationMethod": "ENTER_PO",
    "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": "2",
    "ChangeOrderInitiatingParty": "Buyer",
    "ChangeOrderDescription": "Change order1",
    "ChangeOrderStatusCode": "INCOMPLETE",
    "ChangeOrderStatus": "Incomplete",
    "ChangeOrderTypeCode": null,
    "ChangeOrderType": null,
    "ChangeRequestedBy": null,
    "ContractTermsExistFlag": null,
    "DuplicatedFromHeaderId": null,
    "FundsStatus": "Not Applicable",
    "FundsStatusCode": "NOT_APPLICABLE",
    "ImportSourceCode": null,
    "ReferenceNumber": null,
    "LastUpdateDate": "2023-07-21T11:00:33.262+00:00",
    "LastUpdatedBy": "CVBUYER01",
    "CreationDate": "2023-07-19T14:52:12.001+00:00",
    "CreatedBy": "CVBUYER01",
    "SupplierCCEmailAddress": null,
    "SupplierBCCEmailAddress": null,
    "OverridingApproverId": null,
    "OverridingApprover": null,
    "OverrideB2BCommunicationFlag": false,
    "hasPOlineswithMultipleDistributionsFlag": false,
    "hasReceivedOrInvoicedSchedulesFlag": false,
    "lines": [
        {
            "POLineId": 300100577198654,
            "LineNumber": 1,
            "POHeaderId": 300100577198652,
            "OrderNumber": "1006525",
            "LineTypeId": 1,
            "LineType": "Goods",
            "ItemId": null,
            "Item": null,
            "ItemRevision": null,
            "CategoryId": 1,
            "CategoryCode": "MISC.MISC",
            "Category": "Miscellaneous_1",
            "Description": "TEST 123",
            "Amount": null,
            "Quantity": 20,
            "BasePrice": 10,
            "DiscountType": null,
            "Discount": null,
            "DiscountReason": null,
            "Price": 10,
            "UOMCode": "Ea",
            "UOM": "Each",
            "PricingUOMCode": "Ea",
            "PricingUOM": "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,
            "SourceAgreementProcurementBUId": null,
            "SourceAgreementProcurementBU": null,
            "ResponseLine": null,
            "Response": null,
            "NegotiationId": null,
            "Negotiation": null,
            "NegotiationLine": null,
            "FundsStatusCode": "NOT_APPLICABLE",
            "FundsStatus": "Not Applicable",
            "ManualPriceChangeFlag": false,
            "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": null,
            "ReferenceNumber": null,
            "CancelUnfulfilledDemandFlag": null,
            "CreationDate": "2023-07-19T14:52:49.265+00:00",
            "CreatedBy": "CVBUYER01",
            "LastUpdateDate": "2023-07-21T11:00:32.657+00:00",
            "LastUpdatedBy": "CVBUYER01",
            "MaximumRetainageAmount": null,
            "Manufacturer": null,
            "ManufacturerPartNumber": null,
            "CreditFlag": false,
            "schedules": [
                {
                    "LineLocationId": 300100577198655,
                    "ScheduleNumber": 1,
                    "POLineId": 300100577198654,
                    "LineNumber": 1,
                    "POHeaderId": 300100577198652,
                    "OrderNumber": "1006525",
                    "Quantity": 20,
                    "Amount": null,
                    "ShipToOrganizationId": 204,
                    "ShipToOrganizationCode": "V1",
                    "ShipToOrganization": "Vision Operations",
                    "ShipToLocation": "V1- New York City",
                    "ShipToLocationId": 204,
                    "ShipToLocationCode": "V1- New York City",
                    "ShipToLocationInternalCode": "V1-_NEW_YORK_CITY_0_2450399170046",
                    "DestinationTypeCode": "EXPENSE",
                    "DestinationType": "Expense",
                    "LocationOfFinalDischargeId": null,
                    "LocationOfFinalDischargeCode": null,
                    "TransactionBusinessCategoryId": 20234,
                    "TransactionBusinessCategoryCode": "PURCHASE_TRANSACTION",
                    "TransactionBusinessCategory": "Purchase Transaction",
                    "UserDefinedFiscalClassificationCode": null,
                    "UserDefinedFiscalClassification": null,
                    "ProductFiscalClassificationId": null,
                    "ProductFiscalClassificationCode": null,
                    "ProductFiscalClassification": null,
                    "ProductCategoryCode": null,
                    "ProductCategory": null,
                    "LineIntendedUseId": null,
                    "LineIntendedUse": null,
                    "ProductTypeCode": "GOODS",
                    "ProductType": "Goods",
                    "AssessableValue": 200.00,
                    "TaxClassificationCode": "FUS_PAR_REC_RATE-UES",
                    "TaxClassification": "FUS_PAR_REC_RATE-UES",
                    "InvoiceCloseTolerancePercent": 0,
                    "ReceiptCloseTolerancePercent": 0,
                    "EarlyReceiptToleranceDays": 6,
                    "LateReceiptToleranceDays": 30,
                    "AccrueAtReceiptFlag": true,
                    "ReceiptRoutingId": 1,
                    "ReceiptRouting": "Standard receipt",
                    "InvoiceMatchOptionCode": "P",
                    "InvoiceMatchOption": "Order",
                    "InspectionRequiredFlag": false,
                    "ReceiptRequiredFlag": false,
                    "MatchApprovalLevelCode": "2-Way",
                    "MatchApprovalLevel": "2 Way",
                    "AllowSubstituteReceiptsFlag": true,
                    "FirmFlag": null,
                    "OverReceiptTolerancePercent": 0,
                    "BackToBackFlag": null,
                    "NoteToReceiver": null,
                    "RequestedDeliveryDate": "2023-07-19",
                    "PromisedDeliveryDate": null,
                    "RequestedShipDate": null,
                    "PromisedShipDate": null,
                    "SalesOrderNumber": null,
                    "SalesOrderLineNumber": null,
                    "SalesOrderScheduleNumber": null,
                    "SecondaryQuantity": null,
                    "TaxableFlag": true,
                    "Carrier": "Airborne",
                    "CarrierId": 12519,
                    "CountryOfOrigin": null,
                    "CountryOfOriginCode": null,
                    "ShipToExceptionAction": "Warning",
                    "ShipToExceptionActionCode": "WARNING",
                    "FundsStatusCode": "NOT_APPLICABLE",
                    "FundsStatus": "Not Applicable",
                    "ModeOfTransport": null,
                    "ModeOfTransportCode": null,
                    "CancelDate": null,
                    "CancelReason": null,
                    "CancelledBy": null,
                    "RejectedReason": null,
                    "ReasonForChange": null,
                    "ChangeAcceptedFlag": null,
                    "ChangeOrderAmountCancelled": 0,
                    "ChangeOrderQuantityCancelled": 0,
                    "CustomerItem": null,
                    "CustomerItemDescription": null,
                    "CustomerPOLineNumber": null,
                    "CustomerPONumber": null,
                    "CustomerPOScheduleNumber": null,
                    "CurrencyCode": "USD",
                    "Currency": "US Dollar",
                    "RejectedBy": null,
                    "RejectedByRole": null,
                    "CancelFlag": false,
                    "SecondaryUOMCode": null,
                    "SecondaryUOM": null,
                    "UOMCode": "Ea",
                    "UOM": "Each",
                    "PricingUOMCode": "Ea",
                    "PricingUOM": "Each",
                    "ReceiptDateExceptionActionCode": "WARNING",
                    "ReceiptDateExceptionAction": "Warning",
                    "OverReceiptActionCode": "REJECT",
                    "OverReceiptAction": "Reject",
                    "WorkOrderId": null,
                    "WorkOrderNumber": null,
                    "WorkOrderOperationId": null,
                    "WorkOrderOperationSequence": null,
                    "WorkOrderSubType": null,
                    "SupplierOrderLineNumber": null,
                    "OrchestrationAgreementLineNumber": null,
                    "OrchestrationAgreementNumber": null,
                    "PrimaryTradeRelationshipId": null,
                    "POTradingOrganizationId": null,
                    "POTradingOrganizationCode": null,
                    "POTradingOrganization": null,
                    "FirmStatusLookupCode": null,
                    "FirmStatus": null,
                    "ParentLineLocationId": null,
                    "ParentScheduleNumber": null,
                    "ShipToCustomerContactId": null,
                    "ShipToCustomerContact": null,
                    "ShipToCustomerId": null,
                    "ShipToCustomer": null,
                    "ShipToCustomerLocationId": null,
                    "ServiceLevelCode": null,
                    "ServiceLevel": null,
                    "CancelUnfulfilledDemandFlag": null,
                    "CreatedBy": "CVBUYER01",
                    "CreationDate": "2023-07-19T14:52:49.417+00:00",
                    "LastUpdateDate": "2023-07-21T11:00:32.899+00:00",
                    "LastUpdatedBy": "CVBUYER01",
                    "ShippingMethod": "Airborne",
                    "RetainageRate": null,
                    "LastAcceptableDeliveryDate": null,
                    "LastAcceptableShipDate": null,
                    "OriginalPromisedDeliveryDate": null,
                    "OriginalPromisedShipDate": null,
                    "Type": null,
                    "Description": null,
                    "Price": 10,
                    "TypeCode": null,
                    "distributions": [
                        {
                            "PODistributionId": 300100577198656,
                            "DistributionNumber": 1,
                            "POHeaderId": 300100577198652,
                            "OrderNumber": "1006525",
                            "POLineId": 300100577198654,
                            "LineNumber": 1,
                            "LineLocationId": 300100577198655,
                            "ScheduleNumber": 1,
                            "Quantity": 20,
                            "Amount": null,
                            "DeliverToLocationId": 204,
                            "DeliverToLocationCode": "V1- New York City",
                            "DeliverToLocationInternalCode": "V1-_NEW_YORK_CITY_0_2450399170046",
                            "DeliverToLocation": "V1- New York City",
                            "POChargeAccountId": 17544,
                            "POChargeAccount": "01-830-7695-0000-000",
                            "POAccrualAccountId": 12854,
                            "POAccrualAccount": "01-000-2210-0000-000",
                            "POVarianceAccountId": 17544,
                            "POVarianceAccount": "01-830-7695-0000-000",
                            "DestinationChargeAccountId": null,
                            "DestinationChargeAccount": null,
                            "DestinationVarianceAccountId": null,
                            "DestinationVarianceAccount": null,
                            "RecoverableInclusiveTax": 0,
                            "RecoverableExclusiveTax": 7.5,
                            "NonrecoverableInclusiveTax": 0,
                            "NonrecoverableExclusiveTax": 2.5,
                            "ConversionRate": null,
                            "ConversionRateDate": null,
                            "CurrencyCode": "USD",
                            "Currency": "US Dollar",
                            "UOM": "Each",
                            "BudgetDate": null,
                            "ChangeAcceptedFlag": null,
                            "ChangeOrderAmountCancelled": null,
                            "ChangeOrderQuantityCancelled": null,
                            "DeliverToCustomerContactId": null,
                            "DeliverToCustomerContact": null,
                            "DeliverToCustomerId": null,
                            "DeliverToCustomer": null,
                            "DeliverToCustomerLocationId": null,
                            "RequesterId": 300100202455443,
                            "Requester": "SSPUSER11",
                            "DestinationSubinventory": null,
                            "FundsStatusCode": "NOT_APPLICABLE",
                            "FundsStatus": "Not Applicable",
                            "ParentDistributionId": null,
                            "ParentDistributionNumber": null,
                            "ReasonForChange": null,
                            "RequisitionHeaderId": null,
                            "Requisition": null,
                            "RequisitionLineId": null,
                            "RequisitionLine": null,
                            "RequisitionDistributionId": null,
                            "RequisitionDistribution": null,
                            "CreationDate": "2023-07-19T14:52:49.856+00:00",
                            "CreatedBy": "CVBUYER01",
                            "LastUpdateDate": "2023-07-21T11:00:32.791+00:00",
                            "LastUpdatedBy": "CVBUYER01",
                            "UOMCode": "Ea",
                            "links": [
                                {
                                    "rel": "self",
                                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656",
                                    "name": "distributions",
                                    "kind": "item",
                                    "properties": {
                                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000A78"
                                    }
                                },
                                {
                                    "rel": "canonical",
                                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656",
                                    "name": "distributions",
                                    "kind": "item"
                                },
                                {
                                    "rel": "parent",
                                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655",
                                    "name": "schedules",
                                    "kind": "item"
                                },
                                {
                                    "rel": "child",
                                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656/child/DFF",
                                    "name": "DFF",
                                    "kind": "collection"
                                },
                                {
                                    "rel": "child",
                                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656/child/globalDFFs",
                                    "name": "globalDFFs",
                                    "kind": "collection"
                                },
                                {
                                    "rel": "child",
                                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656/child/projectDFF",
                                    "name": "projectDFF",
                                    "kind": "collection"
                                }
                            ]
                        }
                    ],
                    "links": [
                        {
                            "rel": "self",
                            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655",
                            "name": "schedules",
                            "kind": "item",
                            "properties": {
                                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000478"
                            }
                        },
                        {
                            "rel": "canonical",
                            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655",
                            "name": "schedules",
                            "kind": "item"
                        },
                        {
                            "rel": "parent",
                            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654",
                            "name": "lines",
                            "kind": "item"
                        },
                        {
                            "rel": "child",
                            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/DFF",
                            "name": "DFF",
                            "kind": "collection"
                        },
                        {
                            "rel": "child",
                            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/attachments",
                            "name": "attachments",
                            "kind": "collection"
                        },
                        {
                            "rel": "child",
                            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions",
                            "name": "distributions",
                            "kind": "collection"
                        },
                        {
                            "rel": "child",
                            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/globalDFFs",
                            "name": "globalDFFs",
                            "kind": "collection"
                        }
                    ]
                }
            ],
            "links": [
                {
                    "rel": "self",
                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654",
                    "name": "lines",
                    "kind": "item",
                    "properties": {
                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000478"
                    }
                },
                {
                    "rel": "canonical",
                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654",
                    "name": "lines",
                    "kind": "item"
                },
                {
                    "rel": "parent",
                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652",
                    "name": "draftPurchaseOrders",
                    "kind": "item"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/DFF",
                    "name": "DFF",
                    "kind": "collection"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/attachments",
                    "name": "attachments",
                    "kind": "collection"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules",
                    "name": "schedules",
                    "kind": "collection"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652",
            "name": "draftPurchaseOrders",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000B78"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652",
            "name": "draftPurchaseOrders",
            "kind": "item"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/DFF",
            "name": "DFF",
            "kind": "collection"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/attachments",
            "name": "attachments",
            "kind": "collection"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/globalDFFs",
            "name": "globalDFFs",
            "kind": "collection"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines",
            "name": "lines",
            "kind": "collection"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/summaryAttributes",
            "name": "summaryAttributes",
            "kind": "collection"
        },
        {
            "rel": "action",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/action/distributeProjectCosts",
            "name": "distributeProjectCosts",
            "kind": "other"
        },
        {
            "rel": "action",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/action/submit",
            "name": "submit",
            "kind": "other"
        },
        {
            "rel": "action",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/action/cancelChangeOrder",
            "name": "cancelChangeOrder",
            "kind": "other"
        },
        {
            "rel": "action",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/action/updateAllLines",
            "name": "updateAllLines",
            "kind": "other"
        },
        {
            "rel": "action",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/action/calculateTaxAndAccounting",
            "name": "calculateTaxAndAccounting",
            "kind": "other"
        },
        {
            "rel": "action",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/action/deleteChangeOrder",
            "name": "deleteChangeOrder",
            "kind": "other"
        }
    ]
}  

Call the User-Defined Action calculateTaxAndAccounting

In this step, Smith calls the user-defined action calculateTaxAndAccounting on the change order.

Example URL

Use this resource URL format.

POST

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

Example Request

Here's an example of the request body in JSON format:
{
    "name":"calculateTaxAndAccounting",
    "parameters":[ {
        "initiatingParty":"Buyer"
}  
    ]
}

Example Response

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

Get Buyer-Initiated Change Order Distribution Details to See Updated Values of Charge Account and Taxes

In this step, Smith gets the change order distribution details to see the updated values of requester and charge account.

Example URL

Use this resource URL format.

GET

curl -u username:password "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/purchaseOrdersUniqID/child/schedules/schedulesUniqID/child/distributions/distributionsUniqID"

Example Response

Here's an example of the response body in JSON format:
{
    "items": [
        {
            "PODistributionId": 300100577198656,
            "DistributionNumber": 1,
            "POHeaderId": 300100577198652,
            "OrderNumber": "1006525",
            "POLineId": 300100577198654,
            "LineNumber": 1,
            "LineLocationId": 300100577198655,
            "ScheduleNumber": 1,
            "Quantity": 20,
            "Amount": null,
            "DeliverToLocationId": 204,
            "DeliverToLocationCode": "V1- New York City",
            "DeliverToLocationInternalCode": "V1-_NEW_YORK_CITY_0_2450399170046",
            "DeliverToLocation": "V1- New York City",
            "POChargeAccountId": 15477,
            "POChargeAccount": "01-520-1630-0000-000",
            "POAccrualAccountId": 12854,
            "POAccrualAccount": "01-000-2210-0000-000",
            "POVarianceAccountId": 15477,
            "POVarianceAccount": "01-520-1630-0000-000",
            "DestinationChargeAccountId": null,
            "DestinationChargeAccount": null,
            "DestinationVarianceAccountId": null,
            "DestinationVarianceAccount": null,
            "RecoverableInclusiveTax": 0,
            "RecoverableExclusiveTax": 15,
            "NonrecoverableInclusiveTax": 0,
            "NonrecoverableExclusiveTax": 5,
            "ConversionRate": null,
            "ConversionRateDate": null,
            "CurrencyCode": "USD",
            "Currency": "US Dollar",
            "UOM": "Each",
            "BudgetDate": null,
            "ChangeAcceptedFlag": null,
            "ChangeOrderAmountCancelled": null,
            "ChangeOrderQuantityCancelled": null,
            "DeliverToCustomerContactId": null,
            "DeliverToCustomerContact": null,
            "DeliverToCustomerId": null,
            "DeliverToCustomer": null,
            "DeliverToCustomerLocationId": null,
            "RequesterId": 300100202455443,
            "Requester": "SSPUSER11",
            "DestinationSubinventory": null,
            "FundsStatusCode": null,
            "FundsStatus": null,
            "ParentDistributionId": null,
            "ParentDistributionNumber": null,
            "ReasonForChange": null,
            "RequisitionHeaderId": null,
            "Requisition": null,
            "RequisitionLineId": null,
            "RequisitionLine": null,
            "RequisitionDistributionId": null,
            "RequisitionDistribution": null,
            "CreationDate": "2023-07-19T14:52:49.856+00:00",
            "CreatedBy": "CVBUYER01",
            "LastUpdateDate": "2023-07-21T11:00:32.791+00:00",
            "LastUpdatedBy": "CVBUYER01",
            "UOMCode": "Ea",
            "links": [
                {
                    "rel": "self",
                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656",
                    "name": "distributions",
                    "kind": "item",
                    "properties": {
                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000A78"
                    }
                },
                {
                    "rel": "canonical",
                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656",
                    "name": "distributions",
                    "kind": "item"
                },
                {
                    "rel": "parent",
                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655",
                    "name": "schedules",
                    "kind": "item"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656/child/DFF",
                    "name": "DFF",
                    "kind": "collection"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656/child/globalDFFs",
                    "name": "globalDFFs",
                    "kind": "collection"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions/300100577198656/child/projectDFF",
                    "name": "projectDFF",
                    "kind": "collection"
                }
            ]
        }
    ],
    "count": 1,
    "hasMore": false,
    "limit": 25,
    "offset": 0,
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/draftPurchaseOrders/300100577198652/child/lines/300100577198654/child/schedules/300100577198655/child/distributions",
            "name": "distributions",
            "kind": "collection"
        }
    ]
}