> For the complete documentation index, see [llms.txt](https://docs.zwapgrid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zwapgrid.com/api-guide/consents-api-guide/models.md).

# Models

## The BjornLundenConnectionCredentials object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"BjornLundenConnectionCredentials":{"title":"Björn Lundén credentials","required":["companyPublicKey"],"type":"object","properties":{"companyPublicKey":{"maxLength":256,"minLength":1,"type":"string","description":"Company public key obtained through the provider setup process. Treat it as a credential.","writeOnly":true}},"additionalProperties":false}}}}
```

## The BjornLundenConnectionRequest object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"BjornLundenConnectionRequest":{"title":"Björn Lundén","required":["source","credentials"],"type":"object","properties":{"source":{"enum":["bjornlunden"],"type":"string"},"credentials":{"$ref":"#/components/schemas/BjornLundenConnectionCredentials"}},"additionalProperties":false,"description":"[Björn Lundén onboarding guide](https://docs.zwapgrid.com/onboarding-flow/headless-onboarding/bjorn-lunden)."},"BjornLundenConnectionCredentials":{"title":"Björn Lundén credentials","required":["companyPublicKey"],"type":"object","properties":{"companyPublicKey":{"maxLength":256,"minLength":1,"type":"string","description":"Company public key obtained through the provider setup process. Treat it as a credential.","writeOnly":true}},"additionalProperties":false}}}}
```

## The BusinessCentralConnectionCredentials object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"BusinessCentralConnectionCredentials":{"title":"Business Central credentials","required":["accessToken","refreshToken","tenantId","environment","companyId"],"type":"object","properties":{"accessToken":{"maxLength":8192,"minLength":1,"type":"string","description":"Access token.","writeOnly":true},"refreshToken":{"maxLength":4096,"minLength":1,"type":"string","description":"Refresh token.","writeOnly":true},"tenantId":{"type":"string","description":"Selected tenant or organization UUID.","format":"uuid"},"environment":{"maxLength":100,"minLength":1,"type":"string","description":"Environment name: letters, digits, underscores or hyphens.","writeOnly":true},"companyId":{"type":"string","description":"Selected company UUID.","format":"uuid"}},"additionalProperties":false}}}}
```

## The BusinessCentralConnectionRequest object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"BusinessCentralConnectionRequest":{"title":"Business Central","required":["source","credentials"],"type":"object","properties":{"source":{"enum":["businesscentral"],"type":"string"},"credentials":{"$ref":"#/components/schemas/BusinessCentralConnectionCredentials"}},"additionalProperties":false,"description":"[Business Central onboarding guide](https://docs.zwapgrid.com/onboarding-flow/headless-onboarding/business-central)."},"BusinessCentralConnectionCredentials":{"title":"Business Central credentials","required":["accessToken","refreshToken","tenantId","environment","companyId"],"type":"object","properties":{"accessToken":{"maxLength":8192,"minLength":1,"type":"string","description":"Access token.","writeOnly":true},"refreshToken":{"maxLength":4096,"minLength":1,"type":"string","description":"Refresh token.","writeOnly":true},"tenantId":{"type":"string","description":"Selected tenant or organization UUID.","format":"uuid"},"environment":{"maxLength":100,"minLength":1,"type":"string","description":"Environment name: letters, digits, underscores or hyphens.","writeOnly":true},"companyId":{"type":"string","description":"Selected company UUID.","format":"uuid"}},"additionalProperties":false}}}}
```

## The ConnectionResponse object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"ConnectionResponse":{"title":"Completed connection","required":["id","source","state"],"type":"object","properties":{"id":{"type":"string","description":"Connection ID.","format":"uuid"},"source":{"enum":["fortnox","xero","businesscentral","procountor","vismaeaccounting","bjornlunden","vismanetvisor"],"type":"string"},"state":{"enum":["completed"],"type":"string"}},"additionalProperties":false}}}}
```

## The ConsentDto object

```json
{"openapi":"3.0.4","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.\n\nKey: lower-case system identifier (e.g. fortnox, fileone).\n\nValue: system settings ID (UUID).\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.4","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.\n\nKey: lower-case system identifier (e.g. fortnox, fileone).\n\nValue: system settings ID (UUID).\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.4","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.4","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.\n\nKey: lower-case system identifier (e.g. fortnox, fileone).\n\nValue: system settings ID (UUID).\n\nOmit to use client defaults where applicable.\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 FortnoxConnectionCredentials object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"FortnoxConnectionCredentials":{"title":"Fortnox credentials","required":["authorizationCode","redirectUri"],"type":"object","properties":{"authorizationCode":{"maxLength":2048,"minLength":1,"type":"string","description":"Unused authorization code.","writeOnly":true},"redirectUri":{"maxLength":2048,"minLength":1,"type":"string","description":"Registered HTTPS redirect URI, or HTTP loopback. No fragment or user information.","format":"uri"}},"additionalProperties":false}}}}
```

## The FortnoxConnectionRequest object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"FortnoxConnectionRequest":{"title":"Fortnox","required":["source","credentials"],"type":"object","properties":{"source":{"enum":["fortnox"],"type":"string"},"credentials":{"$ref":"#/components/schemas/FortnoxConnectionCredentials"}},"additionalProperties":false,"description":"[Fortnox onboarding guide](https://docs.zwapgrid.com/onboarding-flow/headless-onboarding/fortnox). PKCE is not currently supported; support is planned."},"FortnoxConnectionCredentials":{"title":"Fortnox credentials","required":["authorizationCode","redirectUri"],"type":"object","properties":{"authorizationCode":{"maxLength":2048,"minLength":1,"type":"string","description":"Unused authorization code.","writeOnly":true},"redirectUri":{"maxLength":2048,"minLength":1,"type":"string","description":"Registered HTTPS redirect URI, or HTTP loopback. No fragment or user information.","format":"uri"}},"additionalProperties":false}}}}
```

## The NetvisorConnectionCredentials object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"NetvisorConnectionCredentials":{"title":"Netvisor credentials","required":["userIdentifier","customerKey","businessId"],"type":"object","properties":{"userIdentifier":{"maxLength":256,"minLength":1,"type":"string","description":"Netvisor integration user identifier.","writeOnly":true},"customerKey":{"maxLength":256,"minLength":1,"type":"string","description":"Netvisor customer key; visible ASCII without whitespace.","writeOnly":true},"businessId":{"maxLength":9,"minLength":1,"type":"string","description":"Finnish business ID: seven digits, a hyphen and one digit.","writeOnly":true}},"additionalProperties":false}}}}
```

## The NetvisorConnectionRequest object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"NetvisorConnectionRequest":{"title":"Netvisor","required":["source","credentials"],"type":"object","properties":{"source":{"enum":["vismanetvisor"],"type":"string"},"credentials":{"$ref":"#/components/schemas/NetvisorConnectionCredentials"}},"additionalProperties":false,"description":"[Netvisor onboarding guide](https://docs.zwapgrid.com/onboarding-flow/headless-onboarding/netvisor)."},"NetvisorConnectionCredentials":{"title":"Netvisor credentials","required":["userIdentifier","customerKey","businessId"],"type":"object","properties":{"userIdentifier":{"maxLength":256,"minLength":1,"type":"string","description":"Netvisor integration user identifier.","writeOnly":true},"customerKey":{"maxLength":256,"minLength":1,"type":"string","description":"Netvisor customer key; visible ASCII without whitespace.","writeOnly":true},"businessId":{"maxLength":9,"minLength":1,"type":"string","description":"Finnish business ID: seven digits, a hyphen and one digit.","writeOnly":true}},"additionalProperties":false}}}}
```

## The OtcDto object

```json
{"openapi":"3.0.4","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.4","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.4","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 ProcountorConnectionCredentials object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"ProcountorConnectionCredentials":{"title":"Procountor credentials","required":["authorizationCode","redirectUri"],"type":"object","properties":{"authorizationCode":{"maxLength":2048,"minLength":1,"type":"string","description":"Unused authorization code.","writeOnly":true},"redirectUri":{"maxLength":2048,"minLength":1,"type":"string","description":"Registered HTTPS redirect URI, or HTTP loopback. No fragment or user information. No query string.","format":"uri"}},"additionalProperties":false}}}}
```

## The ProcountorConnectionRequest object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"ProcountorConnectionRequest":{"title":"Procountor","required":["source","credentials"],"type":"object","properties":{"source":{"enum":["procountor"],"type":"string"},"credentials":{"$ref":"#/components/schemas/ProcountorConnectionCredentials"}},"additionalProperties":false,"description":"[Procountor onboarding guide](https://docs.zwapgrid.com/onboarding-flow/headless-onboarding/procountor)."},"ProcountorConnectionCredentials":{"title":"Procountor credentials","required":["authorizationCode","redirectUri"],"type":"object","properties":{"authorizationCode":{"maxLength":2048,"minLength":1,"type":"string","description":"Unused authorization code.","writeOnly":true},"redirectUri":{"maxLength":2048,"minLength":1,"type":"string","description":"Registered HTTPS redirect URI, or HTTP loopback. No fragment or user information. No query string.","format":"uri"}},"additionalProperties":false}}}}
```

## The SpirisConnectionCredentials object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"SpirisConnectionCredentials":{"title":"Spiris credentials","required":["authorizationCode","redirectUri"],"type":"object","properties":{"authorizationCode":{"maxLength":2048,"minLength":1,"type":"string","description":"Unused authorization code.","writeOnly":true},"redirectUri":{"maxLength":2048,"minLength":1,"type":"string","description":"Registered HTTPS redirect URI, or HTTP loopback. No fragment or user information.","format":"uri"},"codeVerifier":{"maxLength":128,"type":"string","description":"Original PKCE verifier when used: 43–128 ASCII letters, digits or -._~. Omit, null or empty if unused.","nullable":true,"writeOnly":true}},"additionalProperties":false}}}}
```

## The SpirisConnectionRequest object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"SpirisConnectionRequest":{"title":"Spiris","required":["source","credentials"],"type":"object","properties":{"source":{"enum":["vismaeaccounting"],"type":"string"},"credentials":{"$ref":"#/components/schemas/SpirisConnectionCredentials"}},"additionalProperties":false,"description":"[Spiris onboarding guide](https://docs.zwapgrid.com/onboarding-flow/headless-onboarding/spiris)."},"SpirisConnectionCredentials":{"title":"Spiris credentials","required":["authorizationCode","redirectUri"],"type":"object","properties":{"authorizationCode":{"maxLength":2048,"minLength":1,"type":"string","description":"Unused authorization code.","writeOnly":true},"redirectUri":{"maxLength":2048,"minLength":1,"type":"string","description":"Registered HTTPS redirect URI, or HTTP loopback. No fragment or user information.","format":"uri"},"codeVerifier":{"maxLength":128,"type":"string","description":"Original PKCE verifier when used: 43–128 ASCII letters, digits or -._~. Omit, null or empty if unused.","nullable":true,"writeOnly":true}},"additionalProperties":false}}}}
```

## The UpdateConsentDto object

```json
{"openapi":"3.0.4","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"}}}}
```

## The XeroConnectionCredentials object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"XeroConnectionCredentials":{"title":"Xero credentials","required":["accessToken","refreshToken","tenantId"],"type":"object","properties":{"accessToken":{"maxLength":8192,"minLength":1,"type":"string","description":"Access token.","writeOnly":true},"refreshToken":{"maxLength":4096,"minLength":1,"type":"string","description":"Refresh token.","writeOnly":true},"tenantId":{"type":"string","description":"Selected tenant or organization UUID.","format":"uuid"}},"additionalProperties":false}}}}
```

## The XeroConnectionRequest object

```json
{"openapi":"3.0.4","info":{"title":"Consents API","version":"v1"},"components":{"schemas":{"XeroConnectionRequest":{"title":"Xero","required":["source","credentials"],"type":"object","properties":{"source":{"enum":["xero"],"type":"string"},"credentials":{"$ref":"#/components/schemas/XeroConnectionCredentials"}},"additionalProperties":false,"description":"[Xero onboarding guide](https://docs.zwapgrid.com/onboarding-flow/headless-onboarding/xero)."},"XeroConnectionCredentials":{"title":"Xero credentials","required":["accessToken","refreshToken","tenantId"],"type":"object","properties":{"accessToken":{"maxLength":8192,"minLength":1,"type":"string","description":"Access token.","writeOnly":true},"refreshToken":{"maxLength":4096,"minLength":1,"type":"string","description":"Refresh token.","writeOnly":true},"tenantId":{"type":"string","description":"Selected tenant or organization UUID.","format":"uuid"}},"additionalProperties":false}}}}
```


---

# 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.zwapgrid.com/api-guide/consents-api-guide/models.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.
