> For the complete documentation index, see [llms.txt](https://docs.tesseract.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tesseract.fi/earn-direct-and-earn-api/earn-api/data-model-mapping.md).

# Data Model Mapping

At the start of an integration project, Tesseract delivers two sets of credentials. Both are necessary to make the available yield products accessible to end users. Different credentials are required to access each product type and their associated accounts.

The data structure on the Earn API side is straightforward. Each user maintains multiple accounts for storing transactions linked to a specific product. The key consideration is that your data model and code must support mapping to Earn API access using multiple credential sets.

### Example: product list

The product list displayed for your end users is the union of two calls to `GET /v1/products` — one with each credential set.

### Example: creating users

When establishing end users on your platform, you should create two users on Earn API by invoking `POST /v1/users` with the appropriate credential set for each product line. Store the user IDs from responses along with mappings to your end users — these mappings are essential for subsequent operations like account creation.

### Example: partner data model

Design specifics depend on partner requirements. A reference DBML schema is provided as part of integration onboarding and can be imported into online visualization tools to view table relationships and comments.

Typical tables include:

* `tesseract_product_types` — product taxonomy snapshot.
* `tesseract_products` — product catalogue snapshot synced from Earn API.
* `partner_users` — your own user records.
* `tesseract_users` — the two Tesseract user IDs per partner user (one per credential set).
* `tesseract_user_accounts` — per-product / per-currency accounts.
* `tesseract_user_account_transactions` — transaction log for reconciliation.
* `tesseract_wallets` — settlement wallet addresses.
* `tesseract_reports_processed` — tracking for idempotent daily report ingestion.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tesseract.fi/earn-direct-and-earn-api/earn-api/data-model-mapping.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
