> For the complete documentation index, see [llms.txt](https://lern.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lern.sunbird.org/use/developer-guide/user-and-org-service/data-models/cassandra/data-dictionary/user-consent.md).

# User Consent

### sunbird.user\_consent \[PRIMARY KEY (user\_id, consumer\_id, object\_id)]

Table used to store user consent to share PII&#x20;

<table><thead><tr><th width="172.33333333333331">Column Name</th><th width="124">Data Type</th><th>Description</th><th>Sample Data</th></tr></thead><tbody><tr><td>user_id</td><td>text</td><td>UUID of the user</td><td>0dd78c26-4226-4cd5-b883-23e7dc277047</td></tr><tr><td>consumer_id</td><td>text</td><td>organisation Identifier</td><td>01269878797503692810</td></tr><tr><td>object_id</td><td>text</td><td>object Identifier on which consent is provided on</td><td>01269878797503692810 OR do_2130448790797926401216</td></tr><tr><td>categories</td><td>list&#x3C;text></td><td></td><td></td></tr><tr><td>consent_data</td><td>text</td><td></td><td></td></tr><tr><td>consumer_type</td><td>text</td><td></td><td>ORGANISATION</td></tr><tr><td>created_on</td><td>timestamp</td><td>Record created on</td><td>2021-12-06 11:03:09.059000+0000</td></tr><tr><td>expiry</td><td>timestamp</td><td>Record expires on</td><td>2022-03-16 11:03:09.057000+0000</td></tr><tr><td>id</td><td>text</td><td>consent identifier</td><td>usr-consent:ed9d0289-8d5b-4d39-89d2-1a1b5ce69828:01269878797503692810:01269878797503692810</td></tr><tr><td>last_updated_on</td><td>timestamp</td><td>record recently updated on</td><td>2021-12-06 11:03:09.059000+0000</td></tr><tr><td>object_type</td><td>text</td><td>Object type on which user has provided consent to share PII </td><td>Organisation/Collection</td></tr><tr><td>status</td><td>text</td><td>Consent status</td><td>ACTIVE/REVOKED</td></tr></tbody></table>

### sunbird.user\_declarations \[PRIMARY KEY (userid, orgid, persona)]

Table used to store user declared fields details

<table><thead><tr><th width="169.33333333333331">Column Name</th><th width="160">Data Type</th><th>Description</th><th>Sample Data</th></tr></thead><tbody><tr><td>userid</td><td>text</td><td>UUID of the user</td><td>ed9d0289-8d5b-4d39-89d2-1a1b5ce69828</td></tr><tr><td>orgid</td><td>text</td><td>Organisation Identifier to which user belongs to</td><td>01269878797503692810</td></tr><tr><td>persona</td><td>text</td><td>Type of the teacher: default/teacher</td><td>teacher</td></tr><tr><td>createdby</td><td>text</td><td>Not used</td><td></td></tr><tr><td>createdon</td><td>timestamp</td><td>record created on</td><td>2020-12-07 12:06:59.467000+0000</td></tr><tr><td>errortype</td><td>text</td><td>Declared record validation error type</td><td>ERROR-DISTRICT, ERROR-PHONE, ERROR-EMAIL, ERROR-SCHOOL ORG NAME, ERROR-SCHOOL ORG ID, ERROR-ID, ERROR-NAME, ERROR-STATE</td></tr><tr><td>status</td><td>text</td><td>Status of the declaration: <br>SUBMITTED, VALIDATED, REJECTED, ERROR</td><td>SUBMITTED</td></tr><tr><td>updatedby</td><td>text</td><td>Not used</td><td></td></tr><tr><td>updatedon</td><td>timestamp</td><td>Not used</td><td></td></tr><tr><td>userinfo</td><td>map&#x3C;text, text></td><td>User declared information</td><td>{'declared-email': '', 'declared-ext-id': '987654321', 'declared-phone': '', 'declared-school-name': 'PUPS, REDDIYARPATTI', 'declared-school-udise-code': '33291500301'}</td></tr></tbody></table>


---

# 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://lern.sunbird.org/use/developer-guide/user-and-org-service/data-models/cassandra/data-dictionary/user-consent.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.
