# API v2 - How to get Benefits belonging to a Tier?

**URL:** <https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755>\
**Category:** API Feedback\
**Created:** [December 27, 2022, 4:29am UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755 "2022-12-27T04:29:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hoa\_Le\_Minh](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@Hoa\_Le\_Minh](https://www.patreondevelopers.com/u/Hoa_Le_Minh)\
**Post date:** [December 27, 2022, 4:29am UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/1 "2022-12-27T04:29:27Z")

</div>

Hello, I’m using the Patreon API.

I could get Tiers and Benefits that belongs to Campaigns using [https://www.patreon.com/api/oauth2/v2/campaigns?include=tiers,benefits](https://www.patreon.com/api/oauth2/v2/campaigns?include=tiers,benefits)

Is there any APIs to get Benefits belonging to a Tier?

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [December 29, 2022, 7:09am UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/2 "2022-12-29T07:09:52Z")

</div>

You can try getting the benefits resource for the campaign:

[https://docs.patreon.com/#benefit](https://docs.patreon.com/#benefit)

---

<div class="post-metadata">

**Author:** ![Hoa\_Le\_Minh](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@Hoa\_Le\_Minh](https://www.patreondevelopers.com/u/Hoa_Le_Minh)\
**Post date:** [December 29, 2022, 8:29am UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/3 "2022-12-29T08:29:54Z")

</div>

Thanks for your reply. As I stated above, I know how to get all benefits of a campaign and what I need to know if there is any APIs to get benefits attached to a tier. Could you please give me more details on how to get the Benefit Relationships (tiers array[Tier]: The Tiers the benefit has been added to.) in your document link?

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [January 4, 2023, 2:26am UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/4 "2023-01-04T02:26:42Z")

</div>

There isn’t a specific api for this. What you would need to do would be to get a campaign’s tiers, and match the tiers to other resources like benefits over the ids.

---

<div class="post-metadata">

**Author:** ![Hoa\_Le\_Minh](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@Hoa\_Le\_Minh](https://www.patreondevelopers.com/u/Hoa_Le_Minh)\
**Post date:** [January 4, 2023, 7:51am UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/5 "2023-01-04T07:51:01Z")

</div>

[https://docs.patreon.com/#tier](https://docs.patreon.com/#tier)  
[https://docs.patreon.com/#benefit](https://docs.patreon.com/#benefit)  
I don’t see any Tier attributes related to Benefits (ids) and any Benefits attributes related to Tier (ids) so I don’t know how to match them over the ids as you said. Could you please give me more details on how to match them?

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [January 5, 2023, 10:43am UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/6 "2023-01-05T10:43:01Z")

</div>

Those are resources that you can request while making a query over whichever major resource endpoint that they are related to. They should be listed in the includes section in any major resource endpoint. Case in point - the tier resource is an include of the /campaign top level endpoint:

[https://docs.patreon.com/#get-api-oauth2-v2-campaigns-campaign\_id](https://docs.patreon.com/#get-api-oauth2-v2-campaigns-campaign_id)

---

<div class="post-metadata">

**Author:** ![Hoa\_Le\_Minh](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@Hoa\_Le\_Minh](https://www.patreondevelopers.com/u/Hoa_Le_Minh)\
**Post date:** [January 6, 2023, 3:15am UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/7 "2023-01-06T03:15:36Z")

</div>

It could get Tiers and Benefits of a campaign, what I need to know is how to match them over the ids. I don’t see any Tier attributes related to Benefits (ids) and any Benefits attributes related to Tier (ids).

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [January 7, 2023, 4:03pm UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/8 "2023-01-07T16:03:35Z")

</div>

So you need to match benefits to tiers, but you arent able to get tier ids in the benefits details. Is that correct?

---

<div class="post-metadata">

**Author:** ![Hoa\_Le\_Minh](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@Hoa\_Le\_Minh](https://www.patreondevelopers.com/u/Hoa_Le_Minh)\
**Post date:** [January 9, 2023, 3:22am UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/9 "2023-01-09T03:22:44Z")

</div>

Yes it is. I need to know how to get Tier Ids in a Benefit or get Benefit Ids in a Tier.

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [January 9, 2023, 8:01am UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/10 "2023-01-09T08:01:30Z")

</div>

Try requesting the tiers that the benefit has been added to by requesting the tiers as a relationship of the benefit:

[https://docs.patreon.com/#benefit](https://docs.patreon.com/#benefit)

---

<div class="post-metadata">

**Author:** ![Hoa\_Le\_Minh](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@Hoa\_Le\_Minh](https://www.patreondevelopers.com/u/Hoa_Le_Minh)\
**Post date:** [January 9, 2023, 8:45am UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/11 "2023-01-09T08:45:49Z")

</div>

Back to this question:  
Could you please give me more details on how to get the Benefit Relationships (tiers array[Tier]: The Tiers the benefit has been added to.) in your document link?

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [January 10, 2023, 4:48pm UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/12 "2023-01-10T16:48:22Z")

</div>

When you are making the call, add to the includes benefits.tiers while requesting the benefits. Something like…

> campaigns?include=tiers,benefits.tiers,creator,goals

…should work.

---

<div class="post-metadata">

**Author:** ![Hoa\_Le\_Minh](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@Hoa\_Le\_Minh](https://www.patreondevelopers.com/u/Hoa_Le_Minh)\
**Post date:** [January 11, 2023, 4:13am UTC](https://www.patreondevelopers.com/t/api-v2-how-to-get-benefits-belonging-to-a-tier/6755/13 "2023-01-11T04:13:48Z")

</div>

> [@codebard](#):
>
> benefits.tiers

It works. Many thanks.
