Skip to main content
Solved

Subscriptions field in PurchaseInfo object

  • July 20, 2021
  • 1 reply
  • 96 views

Forum|alt.badge.img+1

Hi, I have the following question

In your documentation, under the Subscription Status tab, it clearly states that the subscriptions field is a collection (array) that stores Subscription objects within it. And this response I expect from the REST API. But as far as I noticed, making request to API "subscriptions" is an object that stores fields in itself - so it is not a collection. And this can be seen in the "Rest API endpoints" documentation where in the "Get or Create Subscriber" request the example "subscriptions" is just an object instead of a collection. Could you please clarify this inaccuracy for me? Because when I currently make a request to the API in "sandbox" mode, I also get the subscriptions{...} object instead of the subscriptions[...] array.

Thanks in advance

.

Best answer by sharif

The documentation is mostly focused on SDK usage, which is why it doesn’t match up perfectly with the API response. For API documentation, I’d stick to the REST API Endpoints page, as that should fully document the endpoints.

The subscriptions object returned by the GET /subscribers endpoint is a map of product identifiers containing information on the most recent purchase for each identifier. It’s meant to be less of a history of the subscriptions a user purchased and more of a representation of the current state of the user’s subscriptions (what is the most recent information?)

View original
Did this post help you find an answer to your question?

1 reply

sharif
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 513 replies
  • Answer
  • July 21, 2021

The documentation is mostly focused on SDK usage, which is why it doesn’t match up perfectly with the API response. For API documentation, I’d stick to the REST API Endpoints page, as that should fully document the endpoints.

The subscriptions object returned by the GET /subscribers endpoint is a map of product identifiers containing information on the most recent purchase for each identifier. It’s meant to be less of a history of the subscriptions a user purchased and more of a representation of the current state of the user’s subscriptions (what is the most recent information?)


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings