> For the complete documentation index, see [llms.txt](https://docs.yifi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yifi.io/docs/earn/reference.md).

# Reference

Basic reference data (chains, platforms, categories)

## Get categories

> Returns list of categories.

```json
{"openapi":"3.1.1","info":{"title":"YiFi Yield Aggregator – Data Gateway API","version":"v1"},"tags":[{"description":"Basic reference data (chains, platforms, categories)","name":"Reference"}],"servers":[{"url":"https://core-dev.yifi.io/api/v1"}],"security":[{"BearerToken":[]},{"PartnerApiKey":[]}],"components":{"securitySchemes":{"BearerToken":{"description":"Admin key for privileged operations (create/edit/delete).","type":"apiKey","name":"Authorization","in":"header"},"PartnerApiKey":{"description":"Partner API key used for B2B attribution (wallets, platforms). Requests authenticated with this key are attributed to the owning partner.","type":"apiKey","name":"X-Partner-Api-Key","in":"header"}},"schemas":{"rest.Response":{"type":"object","properties":{"code":{"type":"string"},"data":{},"isError":{"type":"boolean"},"message":{"type":"string"},"success":{"type":"boolean"}}},"common.Category":{"type":"object","properties":{"category_id":{"type":"string"},"description":{"type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"}}},"core.Msg":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/categories":{"get":{"description":"Returns list of categories.","tags":["Reference"],"summary":"Get categories","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/rest.Response"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/common.Category"}}}}]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/core.Msg"}}}}}}}}}
```

## Get chains

> Returns list of blockchain chains.

```json
{"openapi":"3.1.1","info":{"title":"YiFi Yield Aggregator – Data Gateway API","version":"v1"},"tags":[{"description":"Basic reference data (chains, platforms, categories)","name":"Reference"}],"servers":[{"url":"https://core-dev.yifi.io/api/v1"}],"security":[{"BearerToken":[]},{"PartnerApiKey":[]}],"components":{"securitySchemes":{"BearerToken":{"description":"Admin key for privileged operations (create/edit/delete).","type":"apiKey","name":"Authorization","in":"header"},"PartnerApiKey":{"description":"Partner API key used for B2B attribution (wallets, platforms). Requests authenticated with this key are attributed to the owning partner.","type":"apiKey","name":"X-Partner-Api-Key","in":"header"}},"schemas":{"common.Chain":{"type":"object","properties":{"chain_id":{"description":"e.g.: \"ethereum\"","type":"string"},"ecosystem":{"type":"string"},"explorer_url":{"type":"string"},"image_url":{"type":"string"}}}}},"paths":{"/chains":{"get":{"description":"Returns list of blockchain chains.","tags":["Reference"],"summary":"Get chains","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/common.Chain"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}}}}}}
```

## Get platforms

> Returns list of platforms.

```json
{"openapi":"3.1.1","info":{"title":"YiFi Yield Aggregator – Data Gateway API","version":"v1"},"tags":[{"description":"Basic reference data (chains, platforms, categories)","name":"Reference"}],"servers":[{"url":"https://core-dev.yifi.io/api/v1"}],"security":[{"BearerToken":[]},{"PartnerApiKey":[]}],"components":{"securitySchemes":{"BearerToken":{"description":"Admin key for privileged operations (create/edit/delete).","type":"apiKey","name":"Authorization","in":"header"},"PartnerApiKey":{"description":"Partner API key used for B2B attribution (wallets, platforms). Requests authenticated with this key are attributed to the owning partner.","type":"apiKey","name":"X-Partner-Api-Key","in":"header"}},"schemas":{"rest.Response":{"type":"object","properties":{"code":{"type":"string"},"data":{},"isError":{"type":"boolean"},"message":{"type":"string"},"success":{"type":"boolean"}}},"common.Platform":{"type":"object","properties":{"category_ids":{"type":"array","items":{"type":"string"}},"chain_ids":{"description":"\"ethereum\"","type":"array","items":{"type":"string"}},"image":{"type":"string"},"platform_id":{"description":"\"gyroscope\"","type":"string"},"platform_name":{"description":"\"Gyroscope\"","type":"string"}}},"core.Msg":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/platforms":{"get":{"description":"Returns list of platforms.","tags":["Reference"],"summary":"Get platforms","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/rest.Response"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/common.Platform"}}}}]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/core.Msg"}}}}}}}}}
```
