# Models

## The ConsentDto object

```json
{"openapi":"3.0.1","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"ConsentDto":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the Consent","format":"uuid"},"name":{"type":"string","description":"The name of the Consent","nullable":true},"status":{"$ref":"#/components/schemas/ConsentStatus"},"source":{"type":"string","description":"The source of the consent (i.e. what system has been connected)","nullable":true},"systemSettingsId":{"type":"string","description":"The selected system settings ID once the consent is accepted. Populated when the consent has a single connected system; see systemSettings for the full dictionary of available system settings.","format":"uuid","nullable":true},"systemSettings":{"type":"object","additionalProperties":{"type":"string","description":"System settings ID (UUID) for this accounting system (value in the dictionary).","format":"uuid"},"description":"\nDictionary of available system settings for the consent.\r\n\nKey: lower-case system identifier (e.g. fortnox, fileone).\r\n\nValue: system settings ID (UUID).\r\n\nSee API description for supported system identifiers.","nullable":true},"createdOn":{"type":"string","description":"The date the consent was created on","format":"date-time"},"updatedOn":{"type":"string","description":"The date the consent was updated on","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Consent resource returned by get and list endpoints. Represents the link between your customer and their connection to an accounting system."},"ConsentStatus":{"enum":[0,1,2,3],"type":"integer","description":"Consent status. Values: CREATED (0), ACCEPTED (1), REVOKED (2), INACTIVE (3).","format":"int32"}}}}
```

## The ConsentDtoPagedResultDto object

```json
{"openapi":"3.0.1","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"ConsentDtoPagedResultDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PagedResultMetadataDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ConsentDto"},"description":"The list of items for the current page.","nullable":true}},"additionalProperties":false,"description":"Paginated list response. Contains a page of items and metadata for total count and pagination."},"PagedResultMetadataDto":{"type":"object","properties":{"totalResources":{"type":"integer","description":"Total number of resources across all pages.","format":"int32"},"totalPages":{"type":"integer","description":"Total number of pages given the page size.","format":"int32"},"currentPage":{"type":"integer","description":"One-based index of the current page.","format":"int32"}},"additionalProperties":false,"description":"Metadata for a paginated result: total count and current page information."},"ConsentDto":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the Consent","format":"uuid"},"name":{"type":"string","description":"The name of the Consent","nullable":true},"status":{"$ref":"#/components/schemas/ConsentStatus"},"source":{"type":"string","description":"The source of the consent (i.e. what system has been connected)","nullable":true},"systemSettingsId":{"type":"string","description":"The selected system settings ID once the consent is accepted. Populated when the consent has a single connected system; see systemSettings for the full dictionary of available system settings.","format":"uuid","nullable":true},"systemSettings":{"type":"object","additionalProperties":{"type":"string","description":"System settings ID (UUID) for this accounting system (value in the dictionary).","format":"uuid"},"description":"\nDictionary of available system settings for the consent.\r\n\nKey: lower-case system identifier (e.g. fortnox, fileone).\r\n\nValue: system settings ID (UUID).\r\n\nSee API description for supported system identifiers.","nullable":true},"createdOn":{"type":"string","description":"The date the consent was created on","format":"date-time"},"updatedOn":{"type":"string","description":"The date the consent was updated on","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Consent resource returned by get and list endpoints. Represents the link between your customer and their connection to an accounting system."},"ConsentStatus":{"enum":[0,1,2,3],"type":"integer","description":"Consent status. Values: CREATED (0), ACCEPTED (1), REVOKED (2), INACTIVE (3).","format":"int32"}}}}
```

## The ConsentStatus object

```json
{"openapi":"3.0.1","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"ConsentStatus":{"enum":[0,1,2,3],"type":"integer","description":"Consent status. Values: CREATED (0), ACCEPTED (1), REVOKED (2), INACTIVE (3).","format":"int32"}}}}
```

## The CreateConsentDto object

```json
{"openapi":"3.0.1","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"CreateConsentDto":{"required":["name"],"type":"object","properties":{"name":{"minLength":1,"type":"string","description":"Display name for the consent (e.g. your customer or integration name)."},"systemsSettings":{"type":"object","additionalProperties":{"type":"string","description":"System settings ID (UUID) for this accounting system (value in the dictionary).","format":"uuid"},"description":"\nOptional dictionary of available system settings for the consent.\r\n\nKey: lower-case system identifier (e.g. fortnox, fileone).\r\n\nValue: system settings ID (UUID).\r\n\nOmit to use client defaults where applicable.\r\n\nSee API description for supported system identifiers.","nullable":true}},"additionalProperties":false,"description":"Request body for creating a new consent. Links a customer in your system to a connection that is completed in the Onboarding Flow."}}}}
```

## The OtcDto object

```json
{"openapi":"3.0.1","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"OtcDto":{"type":"object","properties":{"code":{"type":"string","description":"The one-time code used by the embedded client integration when starting the Onboarding Flow.","nullable":true}},"additionalProperties":false,"description":"One-time code returned when creating an OTC. Use it only inside your embedded client integration when starting the Onboarding Flow. Do not expose it in share links because it can be prematurely consumed."}}}}
```

## The PagedResultMetadataDto object

```json
{"openapi":"3.0.1","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"PagedResultMetadataDto":{"type":"object","properties":{"totalResources":{"type":"integer","description":"Total number of resources across all pages.","format":"int32"},"totalPages":{"type":"integer","description":"Total number of pages given the page size.","format":"int32"},"currentPage":{"type":"integer","description":"One-based index of the current page.","format":"int32"}},"additionalProperties":false,"description":"Metadata for a paginated result: total count and current page information."}}}}
```

## The ProblemDetails object

```json
{"openapi":"3.0.1","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```

## The UpdateConsentDto object

```json
{"openapi":"3.0.1","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"UpdateConsentDto":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ConsentStatus"},"name":{"type":"string","description":"New display name for the consent.","nullable":true}},"additionalProperties":false,"description":"Request body for updating an existing consent. Only provided properties are updated."},"ConsentStatus":{"enum":[0,1,2,3],"type":"integer","description":"Consent status. Values: CREATED (0), ACCEPTED (1), REVOKED (2), INACTIVE (3).","format":"int32"}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.zwapgrid.com/api-guide/consents-api-guide/models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
