Happy Business Starts Here

Highlighted
Tutor

REST API Amendments CreatedDate Missing

I need to get the CreatedDate for an amendment using the REST API.  It appears to be missing.  The SOAP docs show that it exists as optional.  Am I doing this incorrectly? Is there another way to the get created date?

 

Thanks,

 

Mike

2 REPLIES 2
Senior Tutor

Re: REST API Amendments CreatedDate Missing

Looks like there are two ways to get Amendments via the REST API (with the amendment id, that is. You can also get them by subscription, according to the docs). The one that gets you the CreatedDate is the "CRUD" prefixed one, found here: https://www.zuora.com/developer/api-reference/#operation/Object_GETAmendment

 

Since it's a GET, it's just a different endpoint

 

This guy gets you the CreatedDate

"https://rest.zuora.com/v1/object/amendment/{id}"

Whereas this one does not

"https://rest.zuora.com/v1/amendments/{amendment-key}"

 

I don't know the "why" of this. Someone else here may be able to help if you're interested in that part. 

 

Tutor

Re: REST API Amendments CreatedDate Missing

Thanks Brick!

 

That did it.  It would be nice to know the distinction between the two methods.

 

I was using:

"https://api.zuora.com/rest/v1/amendments/subscriptions/{subscription-id}"

This does not have the CreatedDate.  Now I have to make two requests to get the necessary data since I'm starting with Account and working down that way.  Not a big deal for what I'm doing I guess.