question

Dylan Hunt avatar image
Dylan Hunt asked

How to call API to get how many coupons left of a certain coupon?

Hi -

For example, I just made a coupon with 100 qty "Veteran Status" to the first 100 that sign up.

I want to display that amount on my website. So as people redeem, on page load, it'll say there's 99 left, 98 left ... 

I'd do something similar with alpha keys later. Similar to mmorpg.com or Alienware Arena:

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Right now, we don't have API methods for creating or accessing the codes - only for redeeming them. However, each key is one-time-use, and so you would need to give each to a unique person who signed up. So you'll need to be tracking on used/unused in any case.

Since the posts are delivered to you as a CSV, what you'll want to do is load that set into your site logic, and mark them off as you hand them out. Also, please note that if you need larger numbers of tokens, we can generate those for you - please write to us at devrel@playfab.com if you need more than 100 at a time. Thanks!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.