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.

  1. 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.

  2. Approve the price list. Use a PATCH action with the priceLists resource.

    • Here's the cURL format.

      https://servername/fscmRestApi/resources/version/priceLists/PriceListId

      Here's the cURL command for this example.

      https://servername/fscmRestApi/resources/version/priceLists/300000081320934

    • Here's the body.

      {
          "Status": "Approved",
          "StatusCode": "APPROVED"
      }

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.