Skip to main content

Querying organization invitations

organizationInvitations returns invitations sent by your bank that haven't yet been accepted. Once accepted, the resulting customer appears under Organizations instead.

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

List invitations

The contact person fields appear directly on OrganizationInvitation as chairman* (the contact is treated as the prospective chairman until onboarding is complete).

query listInvitations($first: Int) {
organizationInvitations(first: $first) {
totalCount
nodes {
id
organizationName
vatNumber
externalId
invitationDate
chairmanFirstName
chairmanLastName
chairmanEmail
isInvitationFlowStarted
isInvitationValid
}
pageInfo {
hasNextPage
endCursor
}
}
}

Sortable fields: vatNumber, invitationDate, surrenderedTime. Filterable fields: id, organizationName, vatNumber, isSurrendered, surrenderedTime.

Find an invitation by VAT number

Filter on vatNumber to look up a specific prospective customer.

query findInvitationByVatNumber($vatNumber: String!) {
organizationInvitations(where: { vatNumber: { eq: $vatNumber } }, first: 1) {
nodes {
id
organizationName
vatNumber
externalId
}
}
}

externalId isn't a filterable field on this query — query by vatNumber or organizationName, then read externalId off the result.

query expandedInvitations {
organizationInvitations(first: 5) {
nodes {
id
organizationName
chairmanFirstName
chairmanLastName
chairmanEmail
chairmanCallingCode
chairmanPhoneNumber
branchOffice {
id
name
}
riskGroup {
id
name
}
invitationBankAccounts {
id
bankAccount {
isPrimary
registrationNumber
accountNumber
accountName
}
}
invalidReasons {
reason
}
}
}
}

bankAccounts (a string) is deprecated on OrganizationInvitation — use invitationBankAccounts as shown above.