> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# consentpurpose

> MDO list provider for ConsentPurpose

## "consentpurpose" MDO List

MDO list provider for ConsentPurpose

Implemented by the <see cref="T:SuperOffice.CRM.Lists.ConsentPurposeProvider">ConsentPurposeProvider</see> class.
The name of the MDO list is 'consentpurpose'.

## Sample Request

```http! theme={null}
GET /api/v1/MDOList/consentpurpose
Authorization: Basic dGplMDpUamUw
Accept: application/json; charset=utf-8
Accept-Language: *

```

## Sample Code

```cs theme={null}
var listProvider = ClassFactory.CreateRequired<SuperOffice.CRM.Lists.ISoListProviderFactory>().Create("consentpurpose", forceFlatList: true);
foreach (var item in listProvider.RootItems) {
    Console.WriteLine("{0} {1} {2} {3}", 
         item.Id, ResourceManager.ParseInlineResources(item.Name), item.StyleHint, item.ExtraInfo);
}
```

## Sample Output

| Id | Name              | StyleHint | ExtraInfo |
| -- | ----------------- | --------- | --------- |
| 1  | Sales and service |           |           |
| 2  | E-marketing       |           |           |

## Related MDO Lists

* "consentpurposeheadings"
* "consentpurposeheadingswithallitem"
* "consentpurposeheadingswithallitemwithnoselection"
* "consentpurposeheadingswithnoselection"
* "consentpurposewithallitem"
* "consentpurposewithallitemwithnoselection"
* "consentpurposewithnoselection"


## Related topics

- [ConsentPurpose](/en/api/archive-providers/reference/consentpurpose.md)
- [ConsentPurpose table](/en/database/tables/consentpurpose.md)
- [SuperOffice.WebApi.Data.ConsentPurpose](/en/api/reference/webapi/SuperOffice.WebApi.Data.ConsentPurpose.md)
- [SuperOffice.WebApi.Agents.IListAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IListAgent.md)
- [SuperOffice.WebApi.Agents.ListAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ListAgent.md)
- [SuperOffice.WebApi.Data.ConsentInfo](/en/api/reference/webapi/SuperOffice.WebApi.Data.ConsentInfo.md)
