Appearance
Collectible page (web)
A collectible is a digital token the brand defines. A customer gets a copy by scanning a product, on scan to claim, and the copy is their user collectible. The storefront shows them on two pages: the collection grid, and one collectible's detail with the campaigns it counts toward. They are pages rather than a journey, so this one has no player.
The collection grid
| Want | API call | Access |
|---|---|---|
| Every collectible, owned ones marked | GET /api/v1/brand/collectibles | Origin + Brand key + Customer |
| Owned ones only | GET /api/v1/user/collectibles | Origin + Brand key + Customer |
| Featured row | GET /api/v1/brand/loyalty/collectibles/trending | Origin + Brand key |
All three take an optional tag (comma-separated). A collectible matches if it carries any of the tags.
- The full grid comes from
brand/collectibles. It returns every available, unarchived collectible with its assets, in the brand'sorder. Each one has auser_collectiblesarray of this customer's copies. An empty array means locked; its length is how many copies the customer holds. - Owned only comes from
user/collectibles. On the web this response is grouped: an object keyed bycollectible_id, each value an array of copies. It does not include assets, so pair it with the grid call for images. - Featured row —
trendingis the same available, unarchived list, oldest first, with no customer data. It needs no customer token.
Only copies with status APPROVED count as owned. A copy still waiting on a receipt does not appear until the hold is released.
One collectible
| Want | API call | Access |
|---|---|---|
| Name, description, images, video | GET /api/v1/collectible/:id | Origin + Brand key |
| The customer's copy | GET /api/v1/user/collectible/:id | Origin + Brand key + Customer |
| Campaigns it counts toward | GET /api/v1/brand/user/loyalty/collectible/:collectible_id/campaign | Origin + Brand key + Customer |
| One campaign's steps and progress | GET /api/v1/brand/user/loyalty/campaigns/:id | Origin + Brand key + Customer |
The storefront has no call that shows who else holds a collectible.
Load the page in this order:
- The collectible —
collectible/:idreturns the definition and its assets. - The customer's copy —
user/collectible/:idreturns their first approved copy, or fails with Collectible not found for the user. That failure is the page's locked state, not an error to show. - Its campaigns —
…/collectible/:collectible_id/campaignreturns[{ campaign_id, isCompleted }], the campaign ids only. - Each campaign's progress —
campaigns/:idreturns the steps and the customer'sallowed[]/claimed[]arrays. In acollectiblecampaign, each step'sdetail.collectiblelists the collectibles that complete it, with their assets, so the page can show the set this collectible belongs to. What each step state means is on Loyalty campaigns. Claiming a ready step is the earn-and-spend flow.
What the API forces onto this page
:idinuser/collectible/:idis the collectible id, not the id of the copy. The lookup is bycollectible_id, so the same id works for both detail calls. A customer holding several copies gets only one.isCompletedis a one-time banner, not a progress flag. It is true only when every other step of that campaign is reached and this collectible's step is the one still missing. In other words, this collectible is the piece the set needs. The call then records that it reported this, in the progress row'sachievement, and returnsfalsefrom then on. Show the banner when it is true, and take the actual progress from step 4.- That call reads but also writes. Because of the
achievementupdate, do not call it speculatively, for example on hover or a prefetch. The customer would lose the banner. - It only lists campaigns already started. It joins on the customer's progress row, so a campaign the customer has not moved yet is missing. To show "collect this to start…", check the
collectible_idconstraints on the steps of the campaigns fromGET /api/v1/user/loyalty/campaigns. - Only web campaigns appear. These calls return campaigns whose
mediumisallorweb. collectible/:idis not scoped to the brand. It finds any available collectible by id. Only link to ids that came from this brand's grid.- Moving a copy to someone else is a product ownership transfer.