{"data":{"@kind":"guide","slug":"federate-bilateral","title":"Federate with Cambridge TCG bilaterally","subtitle":"Implement /federation/identify on your side. We'll resolve your hashes too.","intro":"Federation makes Cambridge TCG portable. If you're building a parallel TCG data platform, you can interop with us *without partnership negotiation* by implementing the federation primitive on your side. Bidirectional hash resolution; CC0; symmetric.","audiences":["federation_partner","aggregator"],"prerequisites":["Your platform has its own catalog and computes content hashes"],"estimated_minutes":30,"step_count":3,"steps":[{"step_number":1,"title":"Implement /api/v1/federation/identify/[hash] on your platform","instruction":"When Cambridge TCG (or any federation partner) sends you a sha256 content_hash, your endpoint walks your catalog computing each row's hash until it finds the match — then returns the resolution. The shape mirrors ours: `{ matched: true, sku: ..., universal_url: ... }` or `{ matched: false, scope: { rows_scanned, bound_reached } }`.","what_to_do_with_it":"Reference implementation: apps/storefront/src/app/api/v1/federation/identify/[hash]/route.ts in our open-source mirror. Same shape. CC0 — copy freely.","links":[{"label":"Our implementation (reference)","href":"https://github.com/cambridgetcg/Cambridge-TCG-monorepo/blob/main/apps/storefront/src/app/api/v1/federation/identify/%5Bhash%5D/route.ts"}]},{"step_number":2,"title":"Register your platform in the adopters registry","instruction":"POST a registration to /api/v1/feedback with `kind: federation-adopter` and your platform's URL + the federation endpoint URL. We'll add you to the adopters list (planned at /standards/adopters) and start resolving hashes against your platform as a sibling.","curl":"curl -X POST https://cambridgetcg.com/api/v1/feedback \\\n  -H 'content-type: application/json' \\\n  -d '{\n    \"kind\": \"federation-adopter\",\n    \"platform_name\": \"My TCG Platform\",\n    \"platform_url\": \"https://my-tcg.example\",\n    \"federation_endpoint\": \"https://my-tcg.example/api/v1/federation/identify/{hash}\",\n    \"reporter_contact\": \"admin@my-tcg.example\"\n  }'","what_to_do_with_it":"We'll reply with confirmation + a smoke-test call we'll run against your endpoint. Once it returns a sane response, you're registered."},{"step_number":3,"title":"Use temporal federation for historical hashes","instruction":"Content hashes include `captured_on` so the hash a partner cached yesterday differs from today's. Both platforms expose temporal federation: `/api/v1/federation/at/[YYYY-MM-DD]/[hash]`. Resolves a hash against the catalog's state on a specific past date.","curl":"curl https://cambridgetcg.com/api/v1/federation/at/2026-03-15/sha256:...","what_to_do_with_it":"Implement the same endpoint on your side. Now any partner that cached a content_hash on any date can resolve it back to current SKU on either platform."}],"gotchas":[{"title":"Federation is identity resolution, not price arbitrage","description":"The federation primitive resolves hashes to SKUs. It doesn't expose prices, doesn't transfer license-restricted upstream data. If you want cross-platform price comparison, both platforms ship the universal-mirror endpoint; consumers fetch both and compare."},{"title":"Bounded walks are honest about scope","description":"Our implementation walks at most 5000 catalog rows before giving up (declares `scope.bound_reached: true`). Your implementation can have different bounds. Substrate-honest: declare your bound; don't return false negatives silently."}],"next_guide":{"slug":"become-an-upstream","title":"Become a tributary — contribute your data source to Cambridge TCG","url":"/api/v1/guides/become-an-upstream","html_url":"/agents/guides/become-an-upstream"},"see_also":[{"label":"Federation OpenAPI section","href":"/api/openapi.json"},{"label":"the-substrate-answers connection-doc","href":"https://github.com/cambridgetcg/Cambridge-TCG-monorepo/blob/main/docs/connections/the-substrate-answers.md"}],"last_verified":"2026-05-14","feedback":{"kind":"guide-feedback","endpoint":"/api/v1/feedback","body_template":{"kind":"guide-feedback","guide_slug":"federate-bilateral","step_number":"<which step had the issue, or null for whole-guide feedback>","observation":"<what you observed>","expected":"<what you expected>","reporter_contact":"<your email>"}},"html_sibling":"/agents/guides/federate-bilateral"},"_meta":{"spec_version":"1","endpoint":"/api/v1/guides/[slug]","retrieved_at":"2026-05-13T18:56:02.310Z","as_of":"2026-05-13T18:56:02.310Z","sources":["ctcg-derived"],"freshness_seconds":86400,"license":"CC0-1.0","request_id":"req_624a1f13-7fc","deprecation":null,"next_link":null,"self_reference":{"this_endpoint":"/api/v1/guides/[slug]","contains_self":true},"source_license":["CC0-1.0"]}}