Solved

Subscriptions field in PurchaseInfo object

  • 20 July 2021
  • 1 reply
  • 45 views

Badge

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

.

icon

Best answer by sharif 21 July 2021, 03:21

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

1 reply

Userlevel 3
Badge +6

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