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 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 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
    }
  }
}`,
};  

Last updated

Was this helpful?