question

Dylan Hunt avatar image
Dylan Hunt asked

RedeemCoupon client API call returns "Item doesnt exist in catalog", but it's there

Hmm, anyone know what's going on with this one?

10 |1200

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

brendan avatar image
brendan answered

What CatalogVersion did you pass into the call to RedeemCoupon? Please note that this catalog ("Game") is not set as your primary, so you will need to pass that info into the call.

10 |1200

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

Dylan Hunt avatar image
Dylan Hunt answered

I passed none - there wasn't anything actually written about CatalogVersion in the API docs: only that it was optional, and that the example was "5". But I still don't know how it's directly relevant.

I see a starred catalog - I assume this is the "primary".

How do I determine the catalog version? I thought I already chose both the item and from what catalog it came from when I generated the coupons:

In the example it said "5" - is this an index?


If this is an index, would this be version "2"?

I'm still a bit confused about the versions since I thought it's already tied to the coupon - if you could explain it more I'd appreciate it :)

10 |1200

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

brendan avatar image
brendan answered

Those (Plate Armor, Cloth Armor, etc.) actually are the versions of your catalog. In short, the original design of the system was that all a game's items would be in a single catalog version, which could be named whatever you want. As you release new versions of your game, you could then version the catalog as well - the fact that the API methods use the primary catalog was specifically designed for this, so that you could just change the primary catalog and have everything automatically switch to the new version. The stores were designed as the way to have logical subsets of the catalog items.

Since many people are using the catalog the way you are (multiple catalogs in a game), we'll be addressing this in a future update, so that we make a cleaner path for people to use them in that manner.

10 |1200

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

Dylan Hunt avatar image
Dylan Hunt answered
var json = {
                
"CouponCode" : LastSubmittedKey,
CatalogVersion : "Game"
};

Ah so "Game" is actually my CatalogVersion? Ahh... I would've never guessed ;) Thanks for that. I'll give it a shot.

10 |1200

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

brendan avatar image
brendan answered

Yes, whenever you create a new catalog, you are asked for a unique identifier - the Game Manager asks for a "Name", for instance. That is always used as the Catalog Version for the specific catalog.

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.