In response to customer request, CG replies with subscription which has it's own id. We're storing this id in our system. Is there any way to get subscription details based on this id in a separate route?
Same question can be extended to all invoices, plans, charges and other parts of models.

#1 Posted by Marc Guyer Support staff on 25 Nov, 2016 02:42 PM
Hi Jack -
There isn't a way to get a customer record by subscription
id. The subscription record can change. A pricing plan change, for example, includes a new subscription record. I expect that you'll want to reference a customer bycodewhich is intended to be used as your system's unique identifier. Using that, you don't have to store any identifier in your app that you're not already storing.When you get the customer record via
customers/get/code/[your_customer_code], you can get a subscription record byidfrom that response but it may not be the current subscription. The latest subscription record is the current one. The others are history.The supported endpoints are specified in the documentation. Generally speaking, you reference records by your defined
code.Jack Zabolotnyi closed this discussion on 29 Nov, 2016 03:05 PM.