Work with REST API Endpoints

The Communications Open Storefront Framework uses the Buying and Billing APIs to retrieve data for the storefront. While designing the layouts and widgets for your storefront, refer to this table for information on the APIs that are integrated with Communications Open Storefront Framework.

Buying Experience APIs

Here are the APIs for the Product Offering entity:

API

Method

Path

Endpoint ID

Endpoint Source

Get Product Offering

GET

/productCatalogManagement/v4/productOffering/{id}

dx4cRetrieveProductOffering

@oracle-dx4c-buying/endpoints/product-offering/retrieve-product-offering

Get all Product Offerings

GET

/productCatalogManagement/v4/productOffering

dx4cListProductOfferings

@oracle-dx4c-buying/endpoints/product-offering/list-product-offerings

Get All Catalogs

GET

/productCatalogManagement/v4/catalog/?catalogType=product dx4cRetrieveCatalogs

@oracle-dx4c-buying/endpoints/catalog/retrieve-catalogs

Get Category

GET

/productCatalogManagement/v4/category/{id} dx4cRetrieveCategory

@oracle-dx4c-buying/endpoints/category/retrieve-category

Get all Categories

GET

/productCatalogManagement/v4/productOffering/ ?catalogId={id} dx4cListCategory

@oracle-dx4c-buying/endpoints/category/list-category

Here are the APIs for the Product entity:

API

Method

Path

Endpoint ID

Endpoint Source

Get a Product

GET

/productInventory/v4/product/{id}

dx4cRetrieveProduct

@oracle-dx4c-buying/endpoints/product/retrieve-product

Get all Products

GET

/productInventory/v4/product

dx4cListProducts

@oracle-dx4c-buying/endpoints/product/list-products

Calculate disconnect penalty for a product

GET

/productInventory/v4/product/{id}/calculateDisconnectPenalty

dx4cCalculateProductPenaltyCharges

@oracle-dx4c-buying/endpoints/product/calculate-product-penalty-charges

Get product change options

GET

/productInventory/v4/product/{id}/changePackage

dx4cRetrieveProductPackageChanges

@oracle-dx4c-buying/endpoints/product/retrieve-product-package-charges

Update a product

PATCH

/productInventory/v4/product/{id}

dx4cPatchProduct

Here are the APIs for the Shopping Cart entity:

API Method Path Endpoint ID

Endpoint Source

Check out a shopping cart

POST /shoppingCart/v4/shoppingCart/{id}/checkout dx4cCheckoutShoppingCart

@oracle-dx4c-buying/endpoints/shopping-cart/checkout-shopping-cart

Create a shopping cart

POST /shoppingCart/v4/shoppingCart dx4cCreateShoppingCart

@oracle-dx4c-buying/endpoints/shopping-cart/create-shopping-cart

Get a shopping cart

GET /shoppingCart/v4/shoppingCart/{id} dx4cRetrieveShoppingCart

@oracle-dx4c-buying/endpoints/shopping-cart/retrieve-shopping-cart

Update a shopping cart

PATCH /shoppingCart/v4/shoppingCart/{id} dx4cPatchShoppingCart

@oracle-dx4c-buying/endpoints/shopping-cart/patch-shopping-cart

Create a subscriber shopping cart POST /shoppingCart/v4/shoppingCart dx4cCreateSubscriberShoppingCart @oracle-dx4c-buying/endpoints/subscriber-shopping-cart/create-subscriber-shopping-cart
Get a subscriber shopping cart by id GET /shoppingCart/v4/shoppingCart/{id} dx4cRetrieveSubscriberShoppingCart @oracle-dx4c-buying/endpoints/subscriber-shopping-cart/retrieve-subscriber-shopping-cart
Update a subscriber shopping cart PATCH /shoppingCart/v4/shoppingCart/{id} dx4cPatchSubscriberShoppingCart @oracle-dx4c-buying/endpoints/subscriber-shopping-cart/patch-subscriber-shopping-cart
Get a subscriber shopping cart by query parameter GET /shoppingCart/v4/shoppingCart?<param_name>=<param_value> dx4cListSubscriberShoppingCart @oracle-dx4c-buying/endpoints/subscriber-shopping-cart/list-subscriber-shopping-cart
Check out a subscriber shopping cart POST /shoppingCart/v4/shoppingCart/{id}/checkout dx4cCheckoutSubscriberShoppingCart @oracle-dx4c-buying/endpoints/subscriber-shopping-cart/checkout-subscriber-shopping-cart

Here are the APIs for the Product Orders entity:

API

Method

Path

Endpoint ID

Endpoint Source

Get a product order

GET

/productOrderingManagement/v4/productOrder/{id}

dx4cRetrieveProductOrder

@oracle-dx4c-buying/endpoints/product-order/retrieve-product-order

Get all product orders

GET

/productOrderingManagement/v4/productOrder

dx4cListProductOrder

@oracle-dx4c-buying/endpoints/product-order/list-product-order

Create a product order

POST

/productOrderingManagement/v4/productOrder

dx4cCreateProductOrder

@oracle-dx4c-buying/endpoints/product-order/create-product-order

Update a product order

PATCH

/productOrderingManagement/v4/productOrder/{id}

dx4cPatchProductOrder

@oracle-dx4c-buying/endpoints/shopping-cart/patch-product-order

Here's the API for the Product Offering Price entity:

API

Method

Path

Endpoint ID

Endpoint Source

Get a product offering price

GET

/productCatalogManagement/v4/productOfferingPrice/{id}

dx4cRetrieveProductOfferingPirce

@oracle-dx4c-buying/endpoints/product-offering-price/retrieve-product-offering-price

Here are the APIs for the Payment Method entity:

API

Method

Path

Endpoint ID

Endpoint Source

Create a payment method

POST

/paymentMethods/v1/paymentMethod

dx4cCreatePaymentMethod

@oracle-dx4c-buying/endpoints/payment-method/create-payment-method

Update a payment method

PATCH

/paymentMethods/v1/paymentMethod/{paymentMethodId}

dx4cPatchPaymentMethod

@oracle-dx4c-buying/endpoints/payment-method/patch-payment-method

Here are the APIs for the Individual entity:

API

Method

Path

Endpoint ID

Endpoint Source

Get all individuals

GET

/party/v4/individual

dx4cListIndividual

@oracle-dx4c-buying/endpoints/individual/list-individual

Create an individual

POST

/party/v4/individual

dx4cCreateIndividual

@oracle-dx4c-buying/endpoints/individual/create-individual

Update an individual

PATCH

/party/v4/individual/{id}

dx4cPatchIndividual

@oracle-dx4c-buying/endpoints/individual/patch-individual

Here are the APIs for the Customer entity:

API

Method

Path

Endpoint ID

Endpoint Source

Get all customers

GET

/customerManagement/v4/customer

dx4cListCustomer

@oracle-dx4c-buying/endpoints/customer/list-customer

Get a customer

GET

/customerManagement/v4/customer/{id}

dx4cRetrieveCustomer

@oracle-dx4c-buying/endpoints/customer/retrieve-customer

Create a customer

POST

/customerManagement/v4/customer

dx4cCreateCustomer

@oracle-dx4c-buying/endpoints/customer/create-customer

Update a customer

PATCH

/customerManagement/v4/customer{id}

dx4cPatchCustomer

@oracle-dx4c-buying/endpoints/customer/patch-customer

Here are the APIs for the Party entity:

API

Method

Path

Endpoint ID

Endpoint Source

Get all party accounts

GET

/accountManagement/v4/partyAccount

dx4cLlistPartyAccount

@oracle-dx4c-buying/endpoints/party-account/list-party-account

Create a party account

POST

/accountManagement/v4/partyAccount/{id}

dx4cCreatePartyAccount

@oracle-dx4c-buying/endpoints/party-account/create-party-account

Update a party account

PATCH

/accountManagement/v4/partyAccount/{id}

dx4cPatchPartyAccount

@oracle-dx4c-buying/endpoints/party-account/patch-party-account

Here is the API for the Product Line entity:

API

Method

Path

Endpoint ID

Endpoint Source

Get a Product Line

GET

/productCatalogManagement/v4/productLine

dx4cRetrieveProductLine

@oracle-dx4c-buying/endpoints/product-line/retrieve-product-line

Here is the API to onboard a user:

API

Method

Path

Endpoint ID

Endpoint Source

Onboard User

POST

/buyingUserManagement/v1/onboardUser

dx4OnboardUser

@oracle-dx4c-buying/endpoints/user/onboarduser

Billing APIs

Here are the APIs for the Billing Cycle Specification entity:

API

Method

Path

Endpoint ID

Endpoint Source

Get all billing cycle specifications

GET

/accountManagement/v4/billingCycleSpecification

dx4cListBillingCycleSpecification

@oracle-dx4c-buying/endpoints/billing-cycle-specifications/list-billing-cycle-specification

Get a billing cycle specification

GET

/accountManagement/v4/billingCycleSpecification{id}

dx4cRetrieveBillingCycleSpecification

@oracle-dx4c-buying/endpoints/billing-cycle-specifications/retrieve-billing-cycle-specification

Here's the API for the Bucket entity:

API

Method

Path

Endpoint ID

Endpoint Source

Get all buckets

GET

/prepayBalanceManagement/v4/bucket

dx4cListBucket

@oracle-dx4c-buying/endpoints/buckets/list-bucket

Here's the API for the Customer Bill entity:

API

Method

Path

Endpoint ID

Endpoint Source

Get all customer bills

GET

/customerBillManagement/v4/customerBill

dx4cListCustomerBill

@oracle-dx4c-buying/endpoints/buckets/list-customer-bill

Here's the API for the Payment entity:

API

Method

Path

Endpoint ID

Endpoint Source

Get all payments

GET

/payment/v4/payment

dx4cListPayment

@oracle-dx4c-buying/endpoints/buckets/list-payment

Transform Endpoint Responses

Typically, the responses received from the Buying and Billing APIs can be quite large and contain complex structures. You may not require all of the information in the response for your storefront. In such cases, use the transform functions in the Communications Open Storefront Framework to convert the Buying and Billing API responses into a more compact UI model, which can be used by your UI components.

Transform functions are located in the @oracle-dx4c-buying/actions/utils/transform directory and they are grouped per API entity.

For example, you can use the functions in the @oracle-dx4c-buying/actions/utils/transform/product-offering/product-offering.js file for transforming the Get a Product API's response.

Here's the sample Get Product API response payload:

{
  "isBundle": false,
  "productSpecification": {
    "id": "0CX-1X8ODC",
    "href": "https://SERVER-INFO/productCatalogManagement/v4/productSpecification/0CX-1X8ODC",
    "name": "Wireless Mustang Handset PS"
  },
  "lifecycleStatus": "active",
  "@type": "ProductOfferingEligibleOracle",
  "marketingFeature": [],
  "description": "Say hello, to the Mustang 11!
A triple-camera system provides gorgeous high fidelity images.
This model has the speedy chip that has the critics in awe.
And it features the highest-quality video in a smartphone, so your memories look better than ever!",
  "productOfferingPrice": [
    {
      "@type": "ProductOfferingPriceOracle",
      "id": "0CX-1X8P6I",
      "href": "https://SERVER-INFO/productCatalogManagement/v4/productOfferingPrice/0CX-1X8P6I",
      "isBundle": false,
      "lifecycleStatus": "active",
      "name": "Mustang 11 USD Variant Price",
      "priceType": "oneTime",
      "constraint": [
        {
          "@type": "ConstraintRefPricingVariantOracle",
          "name": "Mustang 11 - USD Pricing Constraint",
          "productSpecCharUse": [
            {"@type": "ProductSpecificationCharacteristicValueUseOracle", "name": "Capacity", "charSpecSeq": 1}
          ]
        }
      ],
      "price": {"unit": "USD", "value": 599.0},
      "validFor": {"startDateTime": "2021-01-01T00:00:00.000Z"},
      "@baseType": "ProductOfferingPrice",
      "@schemaLocation": "https://SERVER-INFO/productCatalogManagement/v4/productOfferingPrice/describe",
      "compositePopRelationship": [
        {
          "@type": "ProductOfferingPriceOracle",
          "name": "Mustang 11 - USD Variant 1",
          "constraint": [
            {
              "@type": "ConstraintRefPricingVariantOracle",
              "constraintRule": [{"name": "Tag-CapacityModel", "rank": 1, "valueRelationship": [{"value": "32"}]}]
            }
          ],
          "price": {"value": 599.0}
        }
      ],
      "priceList": [{"id": "0CX-1X8P20", "name": "DX4C NA Pricelist"}]
    }
  ],
  "type": "device",
  "offerOption": [],
  "productLine": [
    {
      "id": "0CX-1X8K0V",
      "href": "https://SERVER-INFO/productCatalogManagement/v4/productLine/0CX-1X8K0V",
      "name": "Mustang and Vola Handsets"
    }
  ],
  "offerRecommendation": [],
  "@baseType": "ProductOffering",
  "attachment": [],
  "isCustomizable": true,
  "id": "0CX-1X8P2O",
  "href": "https://SERVER-INFO/productCatalogManagement/v4/productOffering/0CX-1X8P2O",
  "@schemaLocation": "https://SERVER-INFO/productCatalogManagement/v4/productOffering/describe",
  "sku": [
    {
      "sku": "M110R-1WFGT9-25",
      "attributes": [
        {"name": "Model", "value": "Mustang 11"},
        {"name": "Capacity", "value": "32", "unitOfMeasure": "GB"},
        {"name": "Color", "value": "Red", "valueCode": "#FF0000"}
      ]
    },
    {
      "sku": "M110B-1WFGT9-13",
      "attributes": [
        {"name": "Model", "value": "Mustang 11"},
        {"name": "Capacity", "value": "32", "unitOfMeasure": "GB"},
        {"name": "Color", "value": "Black", "valueCode": "#000000"}
      ]
    }
  ],
  "prodSpecCharValueUse": [
    {
      "@type": "ProductSpecificationCharacteristicValueUseOracle",
      "maxCardinality": 1,
      "minCardinality": 1,
      "name": "Color",
      "valueType": "string",
      "isConfigurable": true,
      "productSpecCharacteristicValue": [
        {
          "@type": "ProductSpecificationCharacteristicValueOracle",
          "isDefault": true,
          "valueType": "string",
          "validFor": {"endDateTime": "2999-12-31T00:00:00.000Z", "startDateTime": "2021-01-01T00:00:00.000Z"},
          "value": "Red",
          "@baseType": "ProductSpecificationCharacteristicValue",
          "@schemaLocation": "https://SERVER-INFO/productCatalogManagement/v4/productOffering/describe"
        },
        {
          "@type": "ProductSpecificationCharacteristicValueOracle",
          "isDefault": false,
          "valueType": "string",
          "validFor": {"endDateTime": "2999-12-31T00:00:00.000Z", "startDateTime": "2021-01-01T00:00:00.000Z"},
          "value": "Black",
          "@baseType": "ProductSpecificationCharacteristicValue",
          "@schemaLocation": "https://SERVER-INFO/productCatalogManagement/v4/productOffering/describe"
        }
      ],
      "@baseType": "ProductSpecificationCharacteristicValueUse",
      "@schemaLocation": "https://SERVER-INFO/productCatalogManagement/v4/productOffering/describe"
    },
    {
      "@type": "ProductSpecificationCharacteristicValueUseOracle",
      "maxCardinality": 1,
      "minCardinality": 1,
      "name": "Capacity",
      "valueType": "number",
      "isConfigurable": true,
      "productSpecCharacteristicValue": [
        {
          "@type": "ProductSpecificationCharacteristicValueOracle",
          "isDefault": true,
          "unitOfMeasure": "GB",
          "valueType": "number",
          "validFor": {"endDateTime": "2999-12-31T00:00:00.000Z", "startDateTime": "2021-01-01T00:00:00.000Z"},
          "value": "32",
          "@baseType": "ProductSpecificationCharacteristicValue",
          "@schemaLocation": "https://SERVER-INFO/productCatalogManagement/v4/productOffering/describe"
        },
      ],
      "@baseType": "ProductSpecificationCharacteristicValueUse",
      "@schemaLocation": "https://SERVER-INFO/productCatalogManagement/v4/productOffering/describe"
    },
    {
      "@type": "ProductSpecificationCharacteristicValueUseOracle",
      "description": "Brand",
      "name": "Brand",
      "valueType": "string",
      "isConfigurable": false,
      "productSpecCharacteristicValue": [
        {
          "@type": "ProductSpecificationCharacteristicValueOracle",
          "isDefault": true,
          "value": "Mustang",
          "@baseType": "ProductSpecificationCharacteristicValue",
          "@schemaLocation": "https://SERVER-INFO/productCatalogManagement/v4/productOffering/describe"
        }
      ],
      "@baseType": "ProductSpecificationCharacteristicValueUse",
      "@schemaLocation": "https://SERVER-INFO/productCatalogManagement/v4/productOffering/describe"
    }
  ],
  "validFor": {"startDateTime": "2021-01-01T00:00:00.000Z"},
  "isSellable": true,
  "banner": [],
  "version": "1",
  "lastUpdate": "2021-04-08T12:15:57.000Z",
  "name": "Mustang 11",
  "category": [
    {
      "id": "0CX-1X8K00",
      "href": "https://SERVER-INFO/productCatalogManagement/v4/category/0CX-1X8K00",
      "name": "Mustang"
    },
    {
      "id": "0CX-1X8JZX",
      "href": "https://SERVER-INFO/productCatalogManagement/v4/category/0CX-1X8JZX",
      "name": "Smart Phone"
    }
  ],
  "compatibleOffering": []
}

Here's the simplified output after transforming the Get Product API response:

{
  "productDetails": {
    "id": "0CX-1X8P2O",
    "brand": "Mustang",
    "name": "Mustang 11",
    "sku": [
      {
        "sku": "M110R-1WFGT9-25",
        "attributes": [
          {
            "name": "Model",
            "value": "Mustang 11"
          },
          {
            "name": "Capacity",
            "value": "32",
            "unitOfMeasure": "GB"
          },
          {
            "name": "Color",
            "value": "Red",
            "valueCode": "#FF0000"
          }
        ]
      },
      {
        "sku": "M110B-1WFGT9-13",
        "attributes": [
          {
            "name": "Model",
            "value": "Mustang 11"
          },
          {
            "name": "Capacity",
            "value": "32",
            "unitOfMeasure": "GB"
          },
          {
            "name": "Color",
            "value": "Black",
            "valueCode": "#000000"
          }
        ]
      }
    ],
    "description": "Say hello, to the Mustang 11! A triple-camera system provides gorgeous high fidelity images. This model has the speedy chip that has the critics in awe. And it features the highest-quality video in a smartphone, so your memories look better than ever!",
    "configuration": [
      {
        "name": "Color",
        "isConfigurable": true,
        "valueType": "string",
        "configurationOptions": [
          {
            "isDefault": true,
            "value": "Red",
            "valueCode": "#FF0000"
          },
          {
            "isDefault": false,
            "value": "Black",
            "valueCode": "#000000"
          }
        ]
      },
      {
        "name": "Capacity",
        "isConfigurable": true,
        "valueType": "number",
        "configurationOptions": [
          {
            "isDefault": true,
            "value": "32",
            "unitOfMeasure": "GB"
          }
        ]
      }
    ],
    "hiddenConfiguration": [
      {
        "name": "Brand",
        "description": "Brand",
        "isConfigurable": false,
        "valueType": "string",
        "configurationOptions": [
          {
            "isDefault": true,
            "value": "Mustang",
            "valueCode": ""
          }
        ]
      }
    ]
  },
  "productPricing": {
    "pricingCharacteristics": ["Capacity"],
    "pricingMap": {
      "32": "$599.00"
    }
  },
  "selectedProductConfiguration": {
    "id": "0CX-1X8P2O",
    "configurationOptions": [
      {
        "name": "Color",
        "value": "Red",
        "valueCode": "#FF0000"
      },
      {
        "name": "Capacity",
        "value": "32",
        "unitOfMeasure": "GB"
      }
    ]
  },
  "compatiblePlans": []
}