updateBankAccount
Requires permission payments:bank-account:update.
Updates a bank account's details. The running balance cannot be set here; use adjustBankAccountBalance. Requires permission to update bank accounts.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation UpdateBankAccount($id: ID!, $input: UpdateBankAccountInput!) {
updateBankAccount(id: $id, input: $input) {
id
accountNumber
branchCode
currencyCode
swiftCode
accountName
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UpdateBankAccount($id: ID!, $input: UpdateBankAccountInput!) {\n updateBankAccount(id: $id, input: $input) {\n id\n accountNumber\n branchCode\n currencyCode\n swiftCode\n accountName\n }\n}",
"variables": {
"id": "id",
"input": {}
}
}
EOF
Variables:
{
"id": "id",
"input": {}
}
Response:
{
"data": {
"updateBankAccount": {
"id": "id",
"accountNumber": "string",
"branchCode": "string",
"currencyCode": "string",
"swiftCode": "string",
"accountName": "string"
}
}
}
updateBankAccount(
id: ID!
input: UpdateBankAccountInput!
): BankAccount!
Arguments
updateBankAccount.id ● ID! non-null scalar
The ID of the bank account.
updateBankAccount.input ● UpdateBankAccountInput! non-null input
The fields to change.
Type
BankAccount object
A bank account the organization receives money into or pays from, in one currency.