- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
I'm trying to create a ProductRatePlanCharge via REST, with a POST to /object/ProductRatePlanCharge.
I get the following error response.
{ "Errors":[ { "Code":"MISSING_REQUIRED_VALUE", "Message":"Missing required value: ProductRatePlanChargeTier." } ],
"Success":false }
Here's my request. I can't see what the problem is.
{ 'AccountingCode': 'Support Deferred', 'ChargeModel': 'Flat Fee Pricing', 'ChargeType': 'OneTime', 'DefaultQuantity': '1', 'DeferredRevenueAccount': 'Support Deferred', 'ListPriceBase': 'Per Billing Period', 'Name': 'Ubuntu Advantage Guest Embedded Public Cloud - Standard fee', 'OverageCalculationOption': 'EndOfSmoothingPeriod', 'OverageUnusedUnitsCreditOption': 'NoCredit', 'PriceChangeOption': 'NoChange', 'PriceIncreasePercentage': '0', 'ProductRatePlanChargeTierData': [ { 'ProductRatePlanChargeTier': { 'Currency': 'USD', 'Price': '1', 'Tier': '1'}}, { 'ProductRatePlanChargeTier': { 'Currency': 'GBP', 'Price': '1', 'Tier': '1'}}, { 'ProductRatePlanChargeTier': { 'Currency': 'EUR', 'Price': '1', 'Tier': '1'}}, { 'ProductRatePlanChargeTier': { 'Currency': 'CAD', 'Price': '1', 'Tier': '1'}}], 'ProductRatePlanId': '2c92c0f96140e5670161644e684b53b7', 'RecognizedRevenueAccount': 'Support Revenue', 'RevenueRecognitionRuleName': 'Manual - Unlimited Billings Recognition', 'TaxCode': 'EU-Tax', 'TaxMode': 'TaxExclusive', 'Taxable': 'true', 'TriggerEvent': 'ContractEffective', 'UpToPeriodsType': 'Billing Periods', 'UseTenantDefaultForPriceChange': 'true'}
If you are investigating this for me, the following threads might be useful:
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi @bolaurent
This Endpoint (/object/ProductRatePlanCharge) does not seem to be accepting "POST" requests.
Actually, only the example of "GET" and "DELETE" are listed in the Reference.
I once created ProductRatePlanCharge (and Tier) with /action/create.
Hopefully this will be an alternative.
https://community.zuora.com/t5/API/How-Do-you-Create-a-Product-Rate-Plan-Rate-Charge-Tiers-via-REST/...
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi @bolaurent
This Endpoint (/object/ProductRatePlanCharge) does not seem to be accepting "POST" requests.
Actually, only the example of "GET" and "DELETE" are listed in the Reference.
I once created ProductRatePlanCharge (and Tier) with /action/create.
Hopefully this will be an alternative.
https://community.zuora.com/t5/API/How-Do-you-Create-a-Product-Rate-Plan-Rate-Charge-Tiers-via-REST/...
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Create ProductRatePlanCharge via REST: MISSING_REQUIRED_VALUE ProductRatePlanChargeTier
Thank you yamasaki1ma. Your post helped me, because looking at your payload I realized that mine was structured slightly wrong (ProductRatePlanChargeTierData contains a map, with ProductRatePlanChargeTier as the sole key, and its value is a list).
I had ProductRatePlanChargeTierData containing a list. When I fixed that, my code worked, and it works with either /object/ProductRatePlanCharge or /action/create (I tested my code both ways).
I think that the documentation is incomplete in this regard.
Here is my corrected payload structure:
{ 'AccountingCode': 'Support Deferred', 'ChargeModel': 'Flat Fee Pricing', 'ChargeType': 'OneTime', 'DefaultQuantity': '1', 'DeferredRevenueAccount': 'Support Deferred', 'ListPriceBase': 'Per Billing Period', 'Name': 'Ubuntu Advantage Guest Embedded Public Cloud - Standard fee', 'OverageCalculationOption': 'EndOfSmoothingPeriod', 'OverageUnusedUnitsCreditOption': 'NoCredit', 'PriceChangeOption': 'NoChange', 'PriceIncreasePercentage': '0', 'ProductRatePlanChargeTierData': { 'ProductRatePlanChargeTier': [ { 'Currency': 'EUR', 'Price': '1', 'Tier': '1'}, { 'Currency': 'CAD', 'Price': '1', 'Tier': '1'}, { 'Currency': 'GBP', 'Price': '1', 'Tier': '1'}, { 'Currency': 'USD', 'Price': '1', 'Tier': '1'}]}, 'ProductRatePlanId': '2c92c0f86140d9b2016164dda91712ef', 'RecognizedRevenueAccount': 'Support Revenue', 'RevenueRecognitionRuleName': 'Manual - Unlimited Billings Recognition', 'TaxCode': 'EU-Tax', 'TaxMode': 'TaxExclusive', 'Taxable': 'true', 'TriggerEvent': 'ContractEffective', 'UpToPeriodsType': 'Billing Periods', 'UseTenantDefaultForPriceChange': 'true'}
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Create ProductRatePlanCharge via REST: MISSING_REQUIRED_VALUE ProductRatePlanChargeTier
I am happy that I can help you.
I also checked that I can call POST to /object/ProductRatePlanCharge. I did not know ...
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Create ProductRatePlanCharge via REST: MISSING_REQUIRED_VALUE ProductRatePlanChargeTier
We've updated the API documentation to include information about setting ProductRatePlanChargeTierData when creating a Product Rate Plan Charge. Please see here:
https://www.zuora.com/developer/api-reference/#operation/Object_POSTProductRatePlanCharge