Skip to content

Show specific product details

End-user flow

When your customers select a specific product, the product rate plans and product rate plan charges associated with this product are displayed.

Sample code

The following code sample calls the List product rate plans API while expanding the charges and charge tiers and filtering on the product ID. The product ID can be obtained from the previous call.

The response returns the product rate plans and product rate plan charge details for the SmartLearn Tablet product.

cURL
curl -L -g -X GET 'https://rest.test.zuora.com/object-query/product-rate-plans?expand[]=productrateplancharges%2Cproductrateplancharges.productrateplanchargetiers&filter[]=productId.EQ%8ad081dd90c4bafe0190ded235a71398' \
-H 'Authorization: Bearer d427f8217d6c48de8ad3888a6bf55e9e'

If the request succeeds, you will get a response similar to the following snippet:

{
    "nextPage": "W3sidmFsdWUiOiIyMDIzLTA5LTE0VDA1OjQxOjIwWiIsIm9yZGVyQnkiOnsiZmllbGQiOiJVcGRhdGVkRGF0ZSIsIm9yZGVyIjoiREVTQyJ9fSx7InZhbHVlIjoiOGEzNjk5ZmY4N2I2ZTZjZDAxODdiOGU0ZjY5ODUyZmQiLCJvcmRlckJ5Ijp7ImZpZWxkIjoiSWQiLCJvcmRlciI6IkRFU0MifX1d",
    "data": [
        {
            "createdById": "ebd653b0f1ea46df87835085e26897ce",
            "createdDate": "2024-07-26T02:55:48Z",
            "description": "Ultimate service for top-tier clients who require the best.",
            "effectiveEndDate": "2034-01-01",
            "effectiveStartDate": "2024-01-01",
            "id": "8a8aa19590e7dea30190ecf74de939a9",
            "name": "VIP Package",
            "productId": "8a8aa36c90e7ff7c0190ece0f3153aff",
            "productRatePlanNumber": "PRP-00000071",
            "updatedById": "ebd653b0f1ea46df87835085e26897ce",
            "updatedDate": "2024-07-26T02:55:48Z",
            "productRatePlanCharges": [
                {
                    "accountReceivableAccountingCodeId": "8a368bbf87b6d5910187b80aaa9b0be0",
                    "accountingCode": "Subscription Revenue",
                    "applyToBillingPeriodPartially": false,
                    "billCycleType": "DefaultFromCustomer",
                    "billingPeriod": "Month",
                    "billingPeriodAlignment": "AlignToCharge",
                    "billingTiming": "In Advance",
                    "chargeModel": "Per Unit Pricing",
                    "chargeType": "Recurring",
                    "createdById": "ebd653b0f1ea46df87835085e26897ce",
                    "createdDate": "2024-07-26T02:56:35Z",
                    "defaultQuantity": 1.0,
                    "deferredRevenueAccount": "Subscription Revenue",
                    "deferredRevenueAccountingCodeId": "8a368d0d87b6d5a10187b82c04c62ef7",
                    "description": "No refund if you cancel after 7 days.",
                    "endDateCondition": "SubscriptionEnd",
                    "excludeItemBillingFromRevenueAccounting": false,
                    "excludeItemBookingFromRevenueAccounting": false,
                    "id": "8a8aa19590e7dea30190ecf807da39ab",
                    "includedUnits": 0.0,
                    "isAllocationEligible": false,
                    "isCommitted": false,
                    "isPrepaid": false,
                    "isRollover": false,
                    "isStackedDiscount": false,
                    "isUnbilled": false,
                    "legacyRevenueReporting": false,
                    "listPriceBase": "Per Billing Period",
                    "name": "Recurring per unit fee",
                    "numberOfPeriod": 1,
                    "overageCalculationOption": "EndOfSmoothingPeriod",
                    "overageUnusedUnitsCreditOption": "NoCredit",
                    "priceChangeOption": "NoChange",
                    "priceIncreasePercentage": 0.0,
                    "priceUpsellQuantityStacked": false,
                    "productRatePlanChargeNumber": "PRPC-00000067",
                    "productRatePlanId": "8a8aa19590e7dea30190ecf74de939a9",
                    "recognizedRevenueAccount": "Subscription Revenue",
                    "recognizedRevenueAccountingCodeId": "8a368d0d87b6d5a10187b82c04c62ef7",
                    "revenueRecognitionRuleName": "Recognize upon invoicing",
                    "rolloverApply": "ApplyLast",
                    "rolloverPeriodLength": 0,
                    "rolloverPeriods": 0,
                    "taxCode": "",
                    "taxable": false,
                    "triggerEvent": "ContractEffective",
                    "uOM": "License",
                    "upToPeriodsType": "Billing Periods",
                    "updatedById": "ebd653b0f1ea46df87835085e26897ce",
                    "updatedDate": "2024-07-26T02:56:36Z",
                    "useTenantDefaultForPriceChange": true,
                    "productRatePlanChargeTiers": [
                     {
                            "active": true,
                            "createdById": "ebd653b0f1ea46df87835085e26897ce",
                            "createdDate": "2024-07-26T02:56:36Z",
                            "currency": "USD",
                            "id": "8a8aa19590e7dea30190ecf807da39ac",
                            "isDefault": true,
                            "price": 49.99,
                            "productChargeDefinitionId": "8a8aa19590e7dea30190ecf807da39ab",
                            "productRatePlanChargeId": "8a8aa19590e7dea30190ecf807da39ab",
                            "tier": 1,
                            "updatedById": "ebd653b0f1ea46df87835085e26897ce",
                            "updatedDate": "2024-07-26T02:56:36Z"
                     }
                   ]
                }
            ]
        },

       ...
    ]
}