> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/products/open-agri-stack/administration/collecting-a-consent.md).

# Collecting a Consent

Recording a farmer's consent.

Records a farmer's consent in the Exchange's Consent Manager, made from a consent template (one of the partner's use cases), collected in person by a partner's staff. Once approved, the partner queries the Composite for that farmer without sending a consent. Why consents work this way: [Consent](https://docs.openg2p.org/products/open-agri-stack/architecture/consent.md) and [consent collection](https://docs.openg2p.org/platform/platform-services/consent-management/design/consent-collection.md).

**Needs:** the partner onboarded with a policy for the use case ([Managing Partners](https://docs.openg2p.org/products/open-agri-stack/administration/managing-partners.md)), and a partner portal account for the staff member ([partner portal accounts](https://docs.openg2p.org/products/open-agri-stack/administration/managing-partners.md#partner-portal-accounts)).

## Partner staff: record the consent

In the partner portal (`https://consent-partner-portal.<Exchange domain>`), logged in with the partner portal account:

1. **Consents → New consent**, choose the **consent template** (each is a use case granted to the partner; the **Consent templates** tab lists them). Optional scopes may be left out; required ones stay.
2. Enter the farmer's national ID and, if known (or required by the install), the Farmer ID (`946053125409`, `FR-0007` in the sample data).
3. **Authenticate with national ID**: the farmer logs in with eSignet in the popup.
4. **Upload the signed paper form:** the farmer signs the printed consent form by hand; scan or photograph it and upload the file. **Submit**.

## Consent Approver: approve it

In the Exchange's CM console (`https://consent-manager.<Exchange domain>`), **Consent Approvals**: check the request, the scanned form and the national-ID login, **Approve**. The consent is then active.

## Check

The consent shows as active in the CM console, and under **Consents** in the partner portal. The partner's queries for that farmer, for any use case with the template's purpose, now use it without sending a consent (the most recent active consent for the farmer and purpose is used). Trying it with the test script: [Testing](https://docs.openg2p.org/products/open-agri-stack/deployment/testing.md).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openg2p.org/products/open-agri-stack/administration/collecting-a-consent.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
