[SOLVED][APIv2]How do I get all data of tiers in campaigns or members? I want get full data of Tiers

How do I get all data of tiers in campaigns or members?

I’m use this endpoint: https://www.patreon.com/api/oauth2/v2/campaigns?include=tiers&fields[tier]=amount_cents,created_at,description,discord_role_ids,edited_at,image_url,patron_count,post_count,published,published_at,remaining,requires_shipping,title,unpublished_at,url,user_limit

And I API respons this small data:

[{
  attributes: {},
  id: '5611185',
  relationships: {
    benefits: {
      data: [
        { id: '4798200', type: 'benefit' },
        { id: '4798206', type: 'benefit' },
        { id: '4798211', type: 'benefit' }
      ]
    },
    tiers: { data: [ { id: '6208661', type: 'tier' } ] }
  },
  type: 'campaign'
}]

What can I do with the tier ids?

I also get a similar result when trying to get benefits

You may not have the correct scopes or permissions for this token if you are not using your creator token to access your own account. For code/call examples, you can check the php lib i mentioned in another thread, and also how WP plugin does these calls:

@codebard Thanks, it’s work for me. My problem was that I tried to look at data in data.relationships.tiers, but I was need to look at included

1 Like