Use REST API to Manage Pricing Details
You can use REST API to create, read, update, or delete pricing details.
Create and Approve a Price List
Assume you need to create a price list named My Price List for the Vision Operations business unit. You can use REST API to create and approve it.
- 
                    
Send a REST API request to create the price list.
- 
                            
Use a POST action with the priceLists resource.
Here's the cURL command.
https://servername/fscmRestApi/resources/version/priceLists - 
                            
Here's the body.
"PriceListName": "My Price List", "PriceListDescription": "Created from REST API", "PriceListType": "Segment price list", "PriceListTypeCode": "SEGMENT", "BusinessUnit": "VISION OPERATIONS", "Currency": "US Dollar", "CurrencyCode": "USD", "Status": "Approved", "StatusCode": "APPROVED", "StartDate": "2021-01-01T19:58:00+00:00", "EndDate": null, "PricingChargeDefinition": "Sale Price", "PricingChargeDefinitionCode": "QP_SALE_PRICE", "LineType": "Buy", "LineTypeCode": "ORA_BUY", "CalculationMethod": "Price", "CalculationMethodCode": "PRICE", "items": [ { "Item": "PMC - Std Item", "PricingUOM": "Each", "PricingUOMCode": "Ea", "LineType": "Buy", "LineTypeCode": "ORA_BUY", "PrimaryPricingUOM": "Y", "ServiceDurationPeriod": null, "ServiceDurationPeriodCode": null, "ServiceDuration": null, "ItemLevelCode": "ITEM", "ItemLevel": "Item", "charges": [ { "PricingChargeDefinition": "Sale Price", "PricingChargeDefinitionCode": "QP_SALE_PRICE", "PricePeriodicity": null, "PricePeriodicityCode": null, "CalculationMethod": "Price", "CalculationMethodCode": "PRICE", "CalculationType": null, "CalculationTypeCode": null, "AllowManualAdjustment": "Y", "BasePrice": 10, "CostCalculationAmount": null, "StartDate": "2000-04-06T22:30:00+00:00", "EndDate": null, "ChargeLineNumber": 1, "MatrixId": null } ] } ], "accessSets": [ { "AccessSetName": "Common Set", "AccessSetCode": "COMMON", "AccessSetId": 0, "AccessSetDescription": null } ] } - 
                            
Assume you receive a response.
"PriceListName": "My Price List", "PriceListId": 300000081320934, "PriceListDescription": "Created from REST API", "PriceListType": "Segment price list", "PriceListTypeCode": "SEGMENT", "BusinessUnit": "VISION OPERATIONS", "BusinessUnitId": 300000002843138, "Currency": "US Dollar", "CurrencyCode": "USD", "Status": "Approved", "StatusCode": "IN_PROGRESS", "StartDate": "2021-01-01T19:58:00+00:00", . . .Notice that your request includes
"Status": "Approved", and"StatusCode": "APPROVED", but the response includes"Status": "Approved", and"StatusCode": "IN_PROGRESS". The POST action can set StatusCode to IN_PROGRESS but not APPROVED. Next, you will send a PATCH request to set StatusCode to APPROVED. 
 - 
                            
 - 
                    
Approve the price list. Use a PATCH action with the priceLists resource.
- 
                            
Here's the cURL format.
https://servername/fscmRestApi/resources/version/priceLists/PriceListIdHere's the cURL command for this example.
https://servername/fscmRestApi/resources/version/priceLists/300000081320934 - 
                            
Here's the body.
{ "Status": "Approved", "StatusCode": "APPROVED" } 
 - 
                            
 
Get Pricing Details for Configured Items
You can use these attributes in your priceSalesTransaction REST API payload to get charge details for the parent model and the model's children.
| Attribute | Description | 
|---|---|
| RootLineId | Specify the line number that contains the configuration model. | 
| 
                                 ComponentIdPath 
  | 
                            
                                 Specify the InventoryItemNumber of the configuration model, and then the inventory item ID of the child. Assume the model's ID is PTO54222, and the child's is OP44136. Here's your code: 
  | 
                        
Assume you have this configuration model.
PTO54222 Laptop Computer
  OP44136 Keyboard Option Class
    KB18761 Standard Keyboard
    KB18759 Keyboard with Touchpad
where
- PTO54222 identifies the parent model.
 - OP44136 identifies an option class that's in the PTO54222 model.
 - KB18761 identifies a configure option that's in the OP44136 option class.
 - KB18759 identifies a configure option that's in the OP44136 option class.
 
Here's an example payload that gets price details for the parent model and it's children.
{
    "Header": [
        {
            "AllowCurrencyOverrideFlag": false,
            "CalculatePricingChargesFlag": true,
            "CalculateShippingChargesFlag": false,
            "CalculateTaxFlag": false,
            "CustomerId": 1006,
            "HeaderId": 1,
            "SellingBusinessUnitId": 204,
            "SellingLegalEntityId": 204,
            "TransactionTypeCode": "ORA_SALES_ORDER"
        }
    ],
    "Line": [
        {
            "HeaderId": 1,
            "InventoryItemNumber": "PTO54222",
            "InventoryOrganizationId": 204,
            "LineCategoryCode": "ORDER",
            "LineId": 1001,
            "LineQuantityUOMCode": "Ea",
            "LineQuantity": {
                "Value": 1,
                "UomCode": "Ea"
            },
            "LineTypeCode": "ORA_BUY"           
        },
        {
            "HeaderId": 1,
            "ComponentPath": "PTO54222> OP44136",
            "InventoryItemNumber": "KB18759",
            "InventoryOrganizationId": 204,
            "LineCategoryCode": "ORDER",
            "LineId": 1002,
            "LineQuantityUOMCode": "Ea",
            "LineQuantity": {
                "Value": 1,
                "UomCode": "Ea"
            },
            "LineTypeCode": "ORA_BUY",
            "RootLineId": 1001
        },
        {
            "HeaderId": 1,
            "ComponentPath": "PTO54222> OP44136",
            "InventoryItemNumber": "KB18761",
            "InventoryOrganizationId": 204,
            "LineCategoryCode": "ORDER",
            "LineId": 1003,
            "LineQuantityUOMCode": "Ea",
            "LineQuantity": {
                "Value": 1,
                "UomCode": "Ea"
            },
            "LineTypeCode": "ORA_BUY",
            "RootLineId": 1001
        }
    ],
    "PricingServiceParameter": {
        "PricingContext": "SALES",
        "PerformValueIdConversionsFlag": "true"
    }
}
For more, go to REST API for Oracle Supply Chain Management
                Cloud, expand Order Management > Document Prices,, then click
                Price Sales Transaction.Troubleshoot REST API
| Trouble | Shoot | 
|---|---|
| 
                                 I use the value SYSDATE to set the start date for the unit price for my item in a priceSalesTransaction REST API payload. However, after I finish the import, the date that I see in the Pricing Administration work area is different than what I expected.  | 
                            
                                 Make sure you use the correct UTC format, which is YYYY-MM-DDTHH:MM:SS. For example, 2019-08-20T10:40:51.88. Note that UTC is on 24 hour clock, not 12 hour. For details, see:  | 
                        
For more, see Troubleshoot Your Pricing Setups and Manage Price Lists That Have Rate Plans.