Query sub-clients
Available queries
Query for a single sub-client
const bodyJSON = {
variables: {
id: "606d28675a2d931bc925fec2",
input: {
currencies: ["EUR","USD","HKD","CNY"],
},
},
query: `
query ($id: ID!, $input: FundingAccountQueryInput!) {
subClient(id: $id) {
id fullName legalName tradingAsNam clientType status
primaryContact {
firstName middleName lastName email dob mobile
}
address {
building street suburb state country postcode
}
postalAddress {
building street suburb state country postcode
}
businessNumber bsb accountNo externalId
fundingAccounts(input: $input) {
iban accountNo bic currency externalReference
}
}
}`,
};query($id: ID!, $input: FundingAccountQueryInput!) {
subClient(id: $id) {
id
fullName
legalName
tradingAsName
clientType
status
primaryContact {
firstName
middleName
lastName
email
dob
mobile
}
address {
building
street
suburb
state
country
postcode
}
postalAddress {
building
street
suburb
state
country
postcode
}
businessNumber
bsb
accountNo
externalId
fundingAccounts(input: $input) {
iban
accountNo
bic
currency
externalReference
}
}
}{
"id": "606d28675a2d931bc925fec2",
"input": {
"currencies": ["EUR", "USD", "HKD", "CNY"]
}
}{
"data": {
"subClient": {
"id": "606d28675a2d931bc925fec2",
"fullName": "ACME Corp",
"legalName": "ACME Corp",
"tradingAsName": null,
"clientType": "COMPANY",
"status": "ACTIVE",
"primaryContact": {
"firstName": "John",
"middleName": null,
"lastName": "Smith",
"email": "[email protected]",
"dob": "1980-12-12",
"mobile": "+61 422 832 849"
},
"address": {
"building": "25",
"street": "Moore St",
"suburb": "Waterloo",
"state": "NSW",
"country": "AU",
"postcode": "2017"
},
"postalAddress": {
"building": "25",
"street": "Moore St",
"suburb": "Waterloo",
"state": "NSW",
"country": "AU",
"postcode": "2017"
},
"businessNumber": "91383840265",
"bsb": "802919",
"accountNo": "1066419",
"externalId": "991188227733"
}
}
}Query for multiple sub-clients
const bodyJSON = {
variables: {
input: {
},
},
query: `
query ($input: SubClientQueryInput!) {
subClients(input: $input) {
id fullName legalName clientType status businessNumber
bsb accountNo externalId
}
}`,
}; query($input: SubClientQueryInput!){
subClients(input: $input) {
id
fullName
legalName
clientType
status
businessNumber
bsb
accountNo
externalId
# any other set of properties
}
} {
"input": {
}
}{
"data": {
"subClients": [
{
"id": "5fb314cb9224595df522db61",
"fullName": "Richard Smith",
"legalName": null,
"clientType": "INDIVIDUAL",
"status": "ACTIVE",
"businessNumber": null,
"bsb": "802919",
"accountNo": "1963041",
"externalId": null
},
{
"id": "60612f00a4d7dd5c96e37676",
"fullName": "ABC Capital",
"legalName": "ABC Co",
"clientType": "COMPANY",
"status": "ACTIVE",
"businessNumber": "839399923932",
"bsb": "802919",
"accountNo": "1914920",
"externalId": null
}
]
}
}Query for multiple sub-clients with filters
const bodyJSON = {
variables: {
input: {
clientType: "INDIVIDUAL",
status: "ACTIVE",
firstName: "John",
lastName: "Smith",
address: {
country: "AU",
},
},
},
query: `
query ($input: SubClientQueryInput!) {
subClients(input: $input) {
id fullName clientType status
primaryContact {
firstName lastName
}
address {
country
}
}
}`,
}; query($input: SubClientQueryInput!){
subClients(input: $input) {
id
fullName
clientType
status
primaryContact {
firstName
lastName
}
address {
country
}
# any other set of properties
}
}{
# more filters available, see SubClientQueryInput in API schema
"input": {
"clientType": "INDIVIDUAL",
"status": "ACTIVE",
"firstName": "John",
"lastName": "Smith",
"address": {
"country": "AU"
}
}
}{
"data": {
"subClients": [
{
"id": "5fb314cb9224595df522db61",
"fullName": "John Smith",
"clientType": "INDIVIDUAL",
"status": "ACTIVE",
"primaryContact": {
"firstName": "John",
"lastName": "Smith"
},
"address": {
"country": "AU"
}
}
]
}
}Last updated
Was this helpful?