In above API endpoint previously we received the rewards for the appropriate pledges. Recently the responses are not including the rewards data. Is there anything changed recently?
We are getting the URL from campaigns API response value at data >> relationships >> pledges >> links >> first. And not using the raw URL directly in the code.
It is untouched working code for more than 2 weeks. But the problem is raising now only.
Below is the URL we receiving from campaigns API endpoint /oauth2/api/current_user/campaigns?include=rewards,creator,goals,pledges.
If you were using the Links provided and adding on your own include and field query parameters, this might be screwing things up if those parameters are now already in the link. Seems to coincide when things started going wrong for you?
If you were not adding anything extra, then how were you getting the includes? Previously, the links that they provided did not have any of the include or field query parameter.
Perhaps with these changes, rewards aren’t added in by default anymore. Either way, you probably want to verify and modify the link that they are giving you.
I am adding include param in the API call of campaigns endpoint like '/api/current_user/campaigns?include=rewards,creator,goals,pledges&page[count]=100'.
In the response the same include param automatically added into the values at data >> relationships >> pledges >> first & next.
Like /api/campaigns/[ID]/pledges?include=rewards,creator,goals,pledges&page%5Bcount%5D=20&sort=created.
Both are different API endpoints. First one’s include param shouldn’t added to the second. Is it a bug ? yes
After further investigation, it’s become clear that this is a larger issue which requires a more holistic approach to fix. I don’t feel comfortable leaving it in this buggy state, so I’m going to revert the “remember query params in includes” feature. We’ll be addressing this issue in the following weeks. You can expect a revert in the next hour. Sorry about this