Happy Business Starts Here

Student

REST API CRUD: Create Usage Endpoint

I'm writing a small script for testing a particular use case for Zuora. I just want to create a single Usage record via the REST API

 

Using the apisandbox, I've been able to authenticate by sending the creds the connection endpoint

https://apisandbox-api.zuora.com/rest/v1/connections

 

However, when I try to create a usage object using the Create Usage endpoint

https://apisandbox-api.zuora.com/rest/v1/object/usage

I receive a 404 response, which makes me think I've made a mistake with the url path, but it looks to me like I've following the pattern here:

https://www.zuora.com/developer/api-reference/#operation/Object_POSTUsage

 

Any ideas regarding why I'm receiving a 404? Is there something wrong with that URL that I'm missing?

 
7 REPLIES 7
Zuora Alumni

Re: REST API CRUD: Create Usage Endpoint

Hi,

 

Can you try to use the below endpoint?

 

https://rest.apisandbox.zuora.com/v1/object/usage

 

 



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

Student

Re: REST API CRUD: Create Usage Endpoint

I tried the same request to

https://rest.apisandbox.zuora.com/v1/object/usage

 

I get a 500 instead of a 404, which suggests that I could be hitting a valid endpoint now, but still not successfully

Zuora Alumni

Re: REST API CRUD: Create Usage Endpoint

Hi,

 

We will need more detail information from you.   Can you please create a ticket at our Zuora site and provide to us your full REST request and RESPONSE?   Thanks.

 

Robert



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

Student

Re: REST API CRUD: Create Usage Endpoint

After tweaking the request a bit I got it to work, so that base url is the only piece I was missing. Is that documented anywhere?

Guru

Re: REST API CRUD: Create Usage Endpoint

@asykes The entire REST API is documented here: https://www.zuora.com/developer/api-reference/

 

It also includes details such as API base URLs and authentication requirements.

Guru

Re: REST API CRUD: Create Usage Endpoint

@Robert i do see some minor discrepancies between the new Developer site: https://www.zuora.com/developer/api-reference/ and the older REST documentation on Knowledge Center: https://knowledgecenter.zuora.com/DC_Developers/C_REST_API/A_REST_basics 

 

You may want to forward this to the doc team so they can update the references or note the ones that may be "legacy".

Zuora Alumni

Re: REST API CRUD: Create Usage Endpoint

@feisley Thank you for pointing that out.



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