Happy Business Starts Here

actions/create REST api returning invalid response

Student

actions/create REST api returning invalid response

 

I'm trying to generate usage report from this payload

https://rest.zuora.com/v1/action/create

 

  {
      "objects": [
            {
                "AccountNumber":"A00005982",
                "UOM":"GB",
                "Quantity":"50",
                "StartDateTime":"2020-11-24T02:00:00",
                "EndDateTime":"2020-11-25T02:00:00",
                "SubscriptionNumber":"A-B00006938",
                "ChargeNumber":"C-00264822",
                "Description":"This is a usage charge for Sub A-B00006938"
              }
        ],
        "type": "Usage"
  }

 

 

 

giving me invalid response

 

 

[
    {
        "Success": false,
        "Errors": [
            {
                "Code": "INVALID_VALUE",
                "Message": "The Charge Type must be Usage."
            }
        ]
    }
]

 

 

1 REPLY 1
Zuora Support

Re: actions/create REST api returning invalid response

Hi Spencer,

 

Thanks for contacting Zuora.

 

Your API payload is correct and it should work properly. Since we do not know your tenant Details we couldn't check the Subscription Details by our self.

 

However, in the Subscription "A-B00006938", for the Charge "C-00264822", can you please check if the Type is "Usage"? 

 

If the Type is "Usage", this call will succeed.

 

Please check and feel free to let me know if you have any further questions.

 

Best Regards,

Raj






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