Happy Business Starts Here

CRUD vs GET by subscription key


CRUD vs GET by subscription key

There are currently two ways I can retrieve a subscription using REST and a subscription id.


The first way is to use "Get subscriptions by key" - /v1/subscriptions/{subscription-key}


The second way is to use CRUD: Retrieve Subscription - /v1/object/subscription/{id}


I went through a couple of blogs and posts to figure out which way was better, my understanding from https://community.zuora.com/t5/Engineering-Blog/Moving-Fast-from-SOAP-to-REST/ba-p/16160 is that the CRUD APIs in Zuora are REST endpoints which map to the old SOAP APIs. However, are these more supported over the normal GET? Are APIs moving to the CRUD representation or was that simply a way to make the old SOAP APIs available via REST?


My issue lies with the fact that though both these APIs return the same data, the JSON objects differ. The first one uses lower camel case (lowerCamelCase) for property names and the latter uses camel case (CamelCase) for property names. This is a little difficult to maintain in our code base and makes mapping the GET and POST calls difficult. It would be nicer to use either CRUD or the normal API get, but which is preferred?


Tags (3)
Support SME

Re: CRUD vs GET by subscription key

You are correct, the CRUD APIs in Zuora are REST endpoints which map to the old SOAP APIs, they are actual soap. The CRUD call will be 'translated' by our internal api proxy to soap call.


Here is the suggestion. If you open our soap call api homepage: https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API You will find 'Going forward, new features will only be available through the REST API. We strongly recommend that all integrations are done using the REST API. For more information, please see this announcement.' So it is suggested to use "Get subscriptions by key" - /v1/subscriptions/{subscription-key}.