> ## 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.

# legalbase

> MDO list provider for Legal base

## "legalbase" MDO List

MDO list provider for Legal base

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

## Sample Request

```http! theme={null}
GET /api/v1/MDOList/legalbase
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("legalbase", 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  | Consent                 |           |           |
| 2  | Contract                |           |           |
| 3  | Required by law         |           |           |
| 4  | Protect vital interests |           |           |
| 5  | Public interest         |           |           |
| 6  | Legitimate interest     |           |           |
| 7  | Withdrawn               |           |           |

## Related MDO Lists

* "legalbaseheadings"
* "legalbaseheadingswithallitem"
* "legalbaseheadingswithallitemwithnoselection"
* "legalbaseheadingswithnoselection"
* "legalbasewithallitem"
* "legalbasewithallitemwithnoselection"
* "legalbasewithnoselection"


## Related topics

- [LegalBase table](/en/database/tables/legalbase.md)
- [SuperOffice.WebApi.Data.LegalBase](/en/api/reference/webapi/SuperOffice.WebApi.Data.LegalBase.md)
- [SuperOffice.WebApi.Data.ConsentInfo](/en/api/reference/webapi/SuperOffice.WebApi.Data.ConsentInfo.md)
- [SuperOffice.WebApi.Data.UserPreferenceStrings.Gdpr](/en/api/reference/webapi/SuperOffice.WebApi.Data.UserPreferenceStrings.Gdpr.md)
- [SuperOffice.WebApi.Data.ConsentPerson](/en/api/reference/webapi/SuperOffice.WebApi.Data.ConsentPerson.md)
- [Save Legal Base](/en/api/reference/restful/agent/list_agent/save-legal-base.md)
