# How to Map BUFF, Youpin, and C5Game Item IDs

`GET /v1/schema` exposes known catalog identifiers for BUFF, Youpin, and C5Game. Build the mapping around each row's exact `market_hash_name`, then attach whichever marketplace IDs are present.

The market name should remain your canonical identity. External catalog IDs are marketplace-specific attributes and can be unavailable.

## Build one row per exact item

Retain enough schema context to prevent accidental collisions:

- exact `market_hash_name`;
- item type and exterior;
- StatTrak and Souvenir row state;
- BUFF ID when present;
- Youpin ID when present;
- C5Game ID when present;
- schema `generation_id`.

Do not drop a row merely because one marketplace ID is null. That null means the schema does not currently expose a known identifier for that item on that marketplace.

## Keep the mapping directional

Support both lookups:

| Lookup | Safe key |
| --- | --- |
| Market name to marketplace IDs | Exact `market_hash_name` |
| Marketplace ID to market name | Marketplace name plus its ID |

An integer from BUFF and the same integer from Youpin are unrelated namespaces. Never join external IDs without also naming the marketplace.

## Handle variants explicitly

Phase and specialty variants can have identities nested under a parent item. If a consumer needs them, retain the parent relationship and the variant label instead of flattening away that context.

Do not assign a parent marketplace ID to a child variant unless the schema explicitly provides that relationship. A missing phase-specific ID is not permission to invent one.

## Validate before joining prices

When a marketplace feed supplies both an ID and a market name, compare the name with the schema mapping. Quarantine mismatches rather than silently relabeling price data.

Also track schema `generation_id` with the mapping. The endpoint supports ETag validation, is available on all plans, and is cached for one hour. Refresh the mapping when the generation changes.

For the full schema surface, see [get the CS2 item schema](/resources/how-to-get-cs2-item-schema). When consuming public price data, continue joining on the normalized exact market name as described in [current CS2 item prices](/resources/how-to-get-current-cs2-item-prices).
