Happy Business Starts Here

Zuora Support

How to update product charge items in bulk via REST API Call

Question:

How would you suggest that we update the tax rates on ~300 product charge items? Must we do that in the UI one by one?

 
Answer:
We need to follow 2 steps here.
 
First, we need to use the below payload to query out all the Product rate plan charges in from our tenant. Query depends as per requirement.
Method - POST
URL - https://rest.apisandbox.zuora.com/v1/action/query

Body - JSON
{
  "queryString": "select id,taxcode from ProductRatePlanCharge "
}
The above payload will give you the details of product rate plan charges and the previously associated tax codes.
- Update the tax code name to newer one and use in the below payload to update the Tax Code in the tenant. Tax code is the name which you gave for the new Taxation codes.
Method - POST
URL - https://rest.apisandbox.zuora.com/v1/action/update

Body - JSON
{
  "objects": [
    {
            "TaxCode": "Tax Rate New",
            "Id": "2c92c0f866536da30166579276a86xxx"
        },
        {
            "TaxCode": "Tax Rate New",
            "Id": "2c92c0f866536da301665793a61b7xxx"
        }
  ],
  "type": "ProductRatePlanCharge"
}
Please refer to the article for more details on this.

https://www.zuora.com/developer/api-reference/#tag/Actions





If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √