Skip to main content

Querying dynamic attorney changes

dynamicAttorneyChanges holds the changes a bank report recorded against your bank's dynamic attorney settings. See the Dynamic attorney changes concept for the type hierarchy — the fields are gated by the DYNAMIC_ATTORNEYS module, and the node is null on reports created with the legacy attorney representation (hasDynamicAttorneyModule: false).

All examples require a JWT — get one from the homepage first.

Walk the full change set

Every change resolves the bank setting it was recorded against (bankAttorneySettingsCard / bankAttorneySettingsProcura) and the person it belongs to (administratorChange — the same entry administratorChanges.administratorChange serves, so the two paths connect without any id juggling).

query bankReportDynamicAttorneyChanges($id: UUID!) {
bankReportById(id: $id) {
id
hasDynamicAttorneyModule
dynamicAttorneyChanges {
cardChanges {
id
changeType
bankAttorneySettingsCard {
title
organizationFriendlyDescription
}
bankAccount {
accountName
registrationNumber
accountNumber
}
administratorChange {
id
... on BoardMemberChange {
boardMember {
user { firstname lastname }
}
}
}
}
procuraChanges {
id
changeType
bankAttorneySettingsProcura {
title
organizationFriendlyDescription
}
bankAccount {
accountName
registrationNumber
accountNumber
}
administratorChange {
id
}
}
}
}
}

A procura change whose bankAccount is null covers every bank account of the organization. cardChanges and procuraChanges are interfaces with an administrator and an invitation implementation — project __typename when you need to tell whether the change belongs to an existing administrator or one invited in this report.

Walk change sets per administrator

The same data is reachable administrator by administrator: every administratorChanges.administratorChange entry carries its own dynamicAttorneyCardChanges, dynamicAttorneyProcuraChanges, and dynamicAttorneyAggregatedProcuraChange.

query administratorDynamicAttorneyChanges($id: UUID!) {
bankReportById(id: $id) {
id
hasDynamicAttorneyModule
administratorChanges {
administratorChange {
id
... on BoardMemberChange {
boardMember {
user { firstname lastname }
}
}
dynamicAttorneyCardChanges {
id
changeType
bankAttorneySettingsCard { title }
bankAccount { accountName registrationNumber accountNumber }
}
dynamicAttorneyProcuraChanges {
id
changeType
bankAttorneySettingsProcura { title }
bankAccount { accountName registrationNumber accountNumber }
}
dynamicAttorneyAggregatedProcuraChange {
id
file { fileName }
signedFile { fileName }
}
}
}
}
}

Project the attorney documents

Card changes carry their own unsigned and signed document. Procura changes don't — their documents are aggregated per administrator under aggregatedProcuraChanges.

query dynamicAttorneyChangeDocuments($id: UUID!) {
bankReportById(id: $id) {
id
dynamicAttorneyChanges {
cardChanges {
id
file { fileName base64 }
signedFile { fileName base64 }
}
aggregatedProcuraChanges {
id
administratorChange { id }
file { fileName base64 }
signedFile { fileName base64 }
}
}
}
}

file is the unsigned PDF, signedFile the signed version — either can be null when the report didn't require a signature.

If your bank doesn't have the dynamic-attorneys module enabled, projecting dynamicAttorneyChanges returns an authorization error.