Skip to main content
Question

Missing data in V2 REST API


Forum|alt.badge.img+4

Hi there!

 

Why does the GET https://api.revenuecat.com/v2/projects/{project_id}/products/{product_id} endpoint return the following for any subscription product until that product is purchased at least once?

{
 ...
  "subscription": {
    "duration": null,
    "grace_period_duration": null,
    "trial_duration": null
  }
 ...
}

Right after purchasing the endpoint starts to return correct data:

{
 ...
  "subscription": {
    "duration": "P1M",
    "grace_period_duration": "P3D",
    "trial_duration": "P1W"
  }
 ...
}

Is V2 REST API production ready?

This post has been closed for comments

2 replies

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 501 replies
  • May 18, 2023

Hey @dmitry-b-d504d1! 👋

Since RevenueCat ‘learns’ from purchases that occur, we first need to see a transaction for the product before we’ll have accurate data to return from the API. Before a purchase occurs, all we know is the product identifier - but once we detect a purchase from the SDK, we’ll be able to provide the additional details via the API.


fon
RevenueCat Staff
Forum|alt.badge.img
  • RevenueCat Staff
  • 4 replies
  • May 22, 2023

Hi @dmitry-b-d504d1 ,

Can you please send the `product_id` over through https://app.revenuecat.com/settings/support ?

I see a few in your account but want to make sure I have the right details to debug.

Thanks


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