Question

Missing data in V2 REST API

  • 16 May 2023
  • 2 replies
  • 109 views

Badge +3

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?


2 replies

Userlevel 6
Badge +8

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.

Badge

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

Reply