Quickstart
The first walk a distributor takes with Yutai, using only these docs: get a key, install the web SDK, read a holder's benefits, and show the seal the benefits module draws, all on your own page.
Get a key
Every call to Yutai's distributor API presents one key, and Yutai issues the keys. Ask your operator at Yutai for the key your integration calls with, and keep it where a server keeps it: the key never rides code a browser loads.
The get started page carries the path to a first call: what to send an operator, who approves the request, and how the key reaches you once.
The API reference names the key a call presents and what one key may call.
Install the web SDK
Add this one script tag to the page that draws Yutai's elements, once, ahead of any element it writes:
The script tag<script src="https://yutai.com/sdk/v1/yutai-sdk-web.min.js"></script>The script registers Yutai's elements, and each element's attributes and tokens are documented on its own page: the credential card page carries the card's.
Read a holder's benefits
Paste this call where your page runs its server code, with the placeholder replaced by the key from the first step. The answer carries the wallet's holdings and the benefits each holding reaches.
The call to pasteimport { connectDistributorApi } from "@yutai/sdk-web/client"; const client = connectDistributorApi({ base: "https://api.yutai.com", key: "ytk_your-key" }); const answer = await client.askEligibility(["0xcd8a4c3f9d3ab5c8817729a4d1420b95869b5928"]);The call is the exact one the example wallet page runs and prints, and that page draws the same wallet's answer as a list, so you can see the shape before you wire your own screen.
Beneath it, the sample answer the API's own document carries for this read: the document's own example, with its own example wallet, never a live read.
The sample answer for GET /v1/eligibility{ "wallets": [ { "wallet": "0xabc0000000000000000000000000000000000001", "read": true, "sourceMode": "SIMULATED", "tokens": [ { "issuer": null, "security": { "name": "Sample Global Holdings", "isin": "US0000000009" }, "wrapper": "Sample token programme", "chain": "eip155:88880", "shares": "15", "daysHeld": 452, "tier": "Patron", "benefits": [ { "benefitId": "bft_01K4V9QG000000000000000001", "name": "Sample lounge access", "type": "ACCESS", "delivery": "VENUE_REDEMPTION", "state": "eligible", "illustrative": true } ] } ] }, { "wallet": "0xdef0000000000000000000000000000000000002", "read": false, "sourceMode": "SIMULATED", "unreadReason": "Yutai has not read this wallet yet." } ] }Show the seal
Hand the answer to the benefits module: the element draws one row per token, the benefits each holding reaches beneath it, and the claim sheet runs end to end inside the element, so no key reaches the browser.
Sample figures: a simulated holder's tokens and benefits, not a real holder's. The element's markup and its attributes are documented on the benefits module page.