Account Management

Account Management Examples Overview:

This page provides comprehensive examples of GraphQL queries and mutations for managing client accounts in the ANZ Cash Management Central (ACMC) system. These operations cover various aspects of account management, including opening accounts, querying account status, retrieving account details, and closing accounts. Each example is accompanied by explanations of input fields, sample requests, and response structures to help developers effectively integrate with the ACMC API for account-related operations.

  1. Open a Client Account
  2. Query Account Open Status
  3. Query Account Details
  4. Query Account Transaction History
  5. Close Client Account

Open a Client Account

Mutation: OpenAccount

This mutation creates a new client account in the ACMC system.

mutation ($acct: OpenAccountInput!) {
  openAccount (i: $acct)
  {
    commandId
  }
}

Variables:

{
    "acct": {
        "name": "Mark Account1",
        "customerId": "Q3VzdG9tZXI6MDVkM2VmZWQ2MTYyZDEzZTlkOGYyMTI1YTBhZTQwOGVmMmQ4MDQyMGU5MjA1N2YwNmViNGIxYjc2YTA2ZDMwZA==",
        "reference": "Mark acc 455",
        "product": "UHJvZHVjdDpkM2UzNmZhN2Q0ODIzZDllZjA2NWUyMjc1NWY1NWMzNDI3MjZjZmI0YzI5Zjc1NzRkNWE0YTA2MmQ2YmE4ZWUx",
        "parties": [
            {
                "partyId": "UGFydHlJbmRpdmlkdWFsOmJkMWNjZjVmNTYzY2NmNGQwZGQzNmJmYjIzYTJkMjNhMDBiYWEwOTcwNzE2NzdiM2VkOWY5ZTVmNDI3ZGNlNDU=",
                "roles": [
                    "BENEFICIARY"
                ]
            }
        ]
    }
}

Input Fields

Field Type Description
name String! Name of the account
customerId ID! Unique identifier for the customer
reference String Reference for the account
product ID! Identifier for the product associated with the account
parties [AccountPartyInput!]! List of parties associated with the account

Query Account Open Status

Query: AccountOpenStatus

This query checks the status of an account opening request.

query QueryCommand {
    node(id: "Q29tbWFuZDo3YWIzOGEyZi1kNTUxLTQwMTEtOTJlZC1lYzQwZWY1MTlmOTg=") {
        __typename
        ... on GenericCommand {
            action
            state
            step
            invalid {
                field
                reason
            }
        }
        ... on OpenAccountCommand {
            action
            account {
                accountNumber
                bankCode
                id
            }
            state
            invalid {
                field
                reason
            }
            action
            state
            id
            step
        }
    }
}

Input Fields

Field Type Description
id ID! The ID of the command to query

Query Account Details

Query: Account

This query retrieves detailed information about a client account.

query QueryCommand {
    node(
        id: "QWNjb3VudDoyN2ViNWEzZGZhY2Y1Y2FkN2I4OWVlNzk0MWYxNGRkYmQzMTk3MGI3ODJhNThhYTg4OWE3ZWRlODY2OWQ3ODBk"
    ) {
        ... on Account {
            customer {
                fullName
            }
            accountNumber
            name
            openState
            id
            product {
                name
                currencies
            }
            balances {
                current {
                    creditDebit
                    currency
                    value
                }
                available {
                    creditDebit
                    currency
                    value
                }
            }
            parties {
                party {
                    roles
                    ... on PartyIndividual {
                        givenName
                        familyName
                    }
                    id
                }
            }
        }
    }
}

Response:

{
  "data": {
    "node": {
      "customer": {
        "fullName": "Test Trading Pty Ltd"
      },
      "accountNumber": "173360933",
      "name": "Mark Account1",
      "openState": "OPEN",
      "id": "QWNjb3VudDoyN2ViNWEzZGZhY2Y1Y2FkN2I4OWVlNzk0MWYxNGRkYmQzMTk3MGI3ODJhNThhYTg4OWE3ZWRlODY2OWQ3ODBk",
      "product": {
        "name": "Testing Trading – Non Retail Direct - Client",
        "currencies": [
          "AUD"
        ]
      },
      "balances": [
        {
          "current": {
            "creditDebit": "CREDIT",
            "currency": "AUD",
            "value": "0.00"
          },
          "available": {
            "creditDebit": "CREDIT",
            "currency": "AUD",
            "value": "0.00"
          }
        }
      ],
      "parties": [
        {
          "party": {
            "roles": [
              "TRUSTEE"
            ],
            "id": "UGFydHlDb21wYW55OjA3Y2RmNTgzNDRkYjQxZWFhOTZlZTA5YmI3MWQ1MmYyNWUzNjQ0MzQ1OWQ5NzA3MDNmZmY3ODJmMjAwMjE0ODk="
          }
        },
        {
          "party": {
            "roles": [
              "BENEFICIARY"
            ],
            "givenName": "Mark",
            "familyName": "Te",
            "id": "UGFydHlJbmRpdmlkdWFsOmJkMWNjZjVmNTYzY2NmNGQwZGQzNmJmYjIzYTJkMjNhMDBiYWEwOTcwNzE2NzdiM2VkOWY5ZTVmNDI3ZGNlNDU="
          }
        }
      ]
    }
  }
}

Response Fields:

Field Description
customer.fullName The full name of the customer associated with the account
accountNumber The unique account number
name The name given to the account
openState The current state of the account (e.g., “OPEN”)
id The unique identifier for the account
product.name The name of the product associated with the account
product.currencies The currencies supported by the product (e.g., [“AUD”])
balances List of balance information for the account
balances[].current The current balance of the account
balances[].available The available balance of the account
balances[].current.creditDebit Indicates whether the current balance is a credit or debit
balances[].current.currency The currency of the current balance
balances[].current.value The numerical value of the current balance
balances[].available.creditDebit Indicates whether the available balance is a credit or debit
balances[].available.currency The currency of the available balance
balances[].available.value The numerical value of the available balance
parties List of parties associated with the account
parties[].party.roles The roles of the associated party (e.g., “TRUSTEE”, “BENEFICIARY”)
parties[].party.id The unique identifier for the associated party
parties[].party.givenName The given name of the individual party (if applicable)
parties[].party.familyName The family name of the individual party (if applicable)

Query Account Transaction History

Query: getTransHistoryByDate

This query fetches the transaction history for a client account.

query getTransHistoryByDate($accno: AccountNumber, $from: DateTime, $when: DateTime) {
  bank {
    accounts(filter: { accountNumberExact: $accno }) {
      edges {
        node {
          name
          accountNumber
          balances {
            current {
              creditDebit
              currency
              value
            }
          }
          transactionEntries(
            filter: { from: $from, until: $when }
            first: 3
          ) {
            edges {
              node {
                transactionType
                initiatedTimestamp
                transaction {
                  valueDate
                }
              }
            }
          }
        }
      }
    }
  }
}

Input Fields

Field Description
accno The account number to query
from Start date for transaction history
when End date for transaction history

Response:

{
  "data": {
    "bank": {
      "accounts": {
        "edges": [
          {
            "node": {
              "name": "2909 Test Account",
              "accountNumber": "173355850",
              "balances": [
                {
                  "current": {
                    "creditDebit": "CREDIT",
                    "currency": "AUD",
                    "value": "25255.54"
                  }
                }
              ],
              "transactionEntries": {
                "edges": [
                  {
                    "node": {
                      "transactionType": "aggregate-payment",
                      "initiatedTimestamp": "2024-10-09T05:40:11.770Z",
                      "transaction": {
                        "valueDate": "2024-10-09"
                      }
                    }
                  },
                  {
                    "node": {
                      "transactionType": "aggregate-payment",
                      "initiatedTimestamp": "2024-10-09T05:34:23.928Z",
                      "transaction": {
                        "valueDate": "2024-10-09"
                      }
                    }
                  },
                  {
                    "node": {
                      "transactionType": "aggregate-payment",
                      "initiatedTimestamp": "2024-10-09T03:17:46.912Z",
                      "transaction": {
                        "valueDate": "2024-10-09"
                      }
                    }
                  }
                ]
              }
            }
          }
        ]
      }
    }
  }
}

Response Fields:

Field Description
node.name The name of the account
node.accountNumber The unique account number associated with the account
node.balances.current.creditDebit Indicates whether the current balance is a credit or debit (Enum: CREDIT or DEBIT)
node.balances.current.currency The currency of the current balance (Enum: e.g., AUD, USD)
node.balances.current.value The numerical value of the current balance as a string
node.transactionEntries.edges[].node.transactionType The type of transaction (Enum: various transaction types)
node.transactionEntries.edges[].node.initiatedTimestamp The timestamp when the transaction was initiated (DateTime)
node.transactionEntries.edges[].node.transaction.valueDate The value date of the transaction (Date)

Note: The edges[] and node notation in the transactionEntries field represents the GraphQL connection pattern used for pagination. The actual transaction data is contained within these node objects.

Close Client Account

Mutation: CloseClientAccount

This mutation closes a client account.

mutation ($acct: CloseAccountInput!) {
  closeAccount (i: $acct)
   {
    commandId
  }
}

Variables:

{
    "acct": {
        "accountId": "QWNjb3VudDozMzQ1ZTdiNzVlYjM4YjgxZTE1YmVmMTlhMTY0NzUxMTIzYTlmYzA0ZWIxOThiNWQ2NWZjNTBmYWNhZTNkOGI0",
        "fundsDestination": {
            "accountNumber": "841703632",
            "bankCode": "013056",
            "name": "Multi Test Corp Ltd"
        }
    }
}

Input Fields

Field Description
accountId The unique identifier of the account to be closed. It’s typically a base64 encoded string that includes the account type and a unique identifier.
fundsDestination.accountNumber The account number where remaining funds will be transferred upon closure of the account.
fundsDestination.bankCode The bank code (often called BSB in Australia) of the destination account for remaining funds.
fundsDestination.name The name associated with the destination account for remaining funds.

Note: The fundsDestination object contains details about where any remaining funds in the account should be transferred upon closure. All fields shown in this example are required for the account closure process to ensure proper handling of any remaining funds in the account being closed.


This documentation provides a comprehensive overview of the account management operations available in the ACMC API. Each section includes a GraphQL query or mutation, input field tables, relevant enums, and example variables to demonstrate usage.