Skip to content

Mercury: Get all auto-transfer rules

Mercury autoTransferRules.getAutoTransferRules: arguments, response, policy and SDK examples.

← Auto transfer rules operations · Get started

Operation mercury.getautotransferrules

Provider route: GET /auto-transfer-rules. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/mercury with npm, or alter-sdk-mercury with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { MercuryIntegration } from "@alter-ai/mercury";
async function execute(input: Parameters<MercuryIntegration["autoTransferRules"]["getAutoTransferRules"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new MercuryIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.autoTransferRules.getAutoTransferRules(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_mercury import MercuryIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = MercuryIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.auto_transfer_rules.get_auto_transfer_rules(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.accountIdstringOptionalID for a Mercury account.
Format: uuid
query.limitintegerOptionalMaximum number of results to return. Allowed range: 1 to 1000. Defaults to 1000
Default: 1000
Format: int64
Maximum: 1000
Minimum: 1
query.start_afterstringOptionalThe ID of the auto-transfer rule to start the page after (exclusive). When provided, results will begin with the auto-transfer rule immediately following this ID. Use this for standard forward pagination to get the next page of results. Cannot be combined with end_before.
Format: uuid
query.end_beforestringOptionalThe ID of the auto-transfer rule to end the page before (exclusive). When provided, results will end just before this ID and work backwards. Use this for reverse pagination or to retrieve previous pages. Cannot be combined with start_after.
Format: uuid
query.orderstringOptionalSort order. Can be ‘asc’ or ‘desc’. Defaults to ‘asc’
Default: asc
One of: asc, desc

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Get all auto-transfer rules — response body

Referenced models: Get all auto-transfer rules — response body

1 more schema is linked from the tables above, on the schema pages.

Get all auto-transfer rules — response body
FieldTypePresenceDescription and constraints
$objectRootA page of the organization's active auto-transfer rules.
pageobjectRequired within parentCursors for navigating to the next and previous pages.
page.nextPagestringOptionalFormat: uuid
page.previousPagestringOptionalFormat: uuid
rulesarrayRequired within parentRules in the current page.
rules[]ModelEach itemExpand Get all auto-transfer rules — response body — rules item

Referenced models: Get all auto-transfer rules — response body — rules item

Get all auto-transfer rules — response body — rules item
FieldTypePresenceDescription and constraints
$objectRootAn active auto-transfer rule.
controlledAccountIdJSONRequired within parent
controlledAccountId (allOf 1)stringAll variants applyID for a Mercury account.
Format: uuid
controlledAccountId (allOf 2)JSONAll variants applyThe account whose balance the rule manages.
descriptionstringRequired within parentA sentence describing what the rule does.
detailsJSONRequired within parent
details (allOf 1)ModelAll variants applyExpand Get all auto-transfer rules — response body — rules item details value
details (allOf 2)JSONAll variants applyThe rule's kind and its kind-specific details.
frequencystringRequired within parentHow often the rule runs, e.g. "Every business day".
idJSONRequired within parent
id (allOf 1)stringAll variants applyFormat: uuid
id (allOf 2)JSONAll variants applyThe rule's ID. Editing a rule replaces it with a new version that has a new ID.
isPausedbooleanRequired within parentWhether the rule is paused.
namestringRequired within parentThe rule's name, as shown in the Mercury dashboard.
nextTransferAtJSONOptional
nextTransferAt (anyOf 1)JSONAlternative
nextTransferAt (anyOf 1) (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
nextTransferAt (anyOf 1) (allOf 2)JSONAll variants applyWhen the rule next runs, if scheduled.
nextTransferAt (anyOf 2)nullAlternative
nicknameJSONOptional
nickname (anyOf 1)stringAlternativeA nickname the user gave the rule, if any.
nickname (anyOf 2)nullAlternative

Referenced models: Get all auto-transfer rules — response body — rules item details value

Get all auto-transfer rules — response body — rules item details value
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternative
$ (anyOf 1).contentsModelRequired within parentExpand Get all auto-transfer rules — response body — rules / item / details / value / kind: distribute Amount contents
$ (anyOf 1).kindstringRequired within parentKnown values: distributeAmount
$ (anyOf 2)objectAlternative
$ (anyOf 2).contentsModelRequired within parentExpand Get all auto-transfer rules — response body — rules / item / details / value / kind: distribute Percentage contents
$ (anyOf 2).kindstringRequired within parentKnown values: distributePercentage
$ (anyOf 3)objectAlternative
$ (anyOf 3).contentsModelRequired within parentExpand Get all auto-transfer rules — response body — rules / item / details / value / kind: maintain Target Balance contents
$ (anyOf 3).kindstringRequired within parentKnown values: maintainTargetBalance

Referenced models: Get all auto-transfer rules — response body — rules / item / details / value / kind: distribute Amount contents, Get all auto-transfer rules — response body — rules / item / details / value / kind: distribute Percentage contents, Get all auto-transfer rules — response body — rules / item / details / value / kind: maintain Target Balance contents

Get all auto-transfer rules — response body — rules / item / details / value / kind: distribute Amount contents
FieldTypePresenceDescription and constraints
$objectRootDistributes fixed amounts from the controlled account to one or more reservoir accounts.
reservoirAccountsarrayRequired within parentThe reservoir accounts and the amount each receives.
reservoirAccounts[]ModelEach itemExpand Get all auto-transfer rules — response body — rules / item / details / value / kind: distribute Amount contents reservoir Accounts item

Referenced models: Get all auto-transfer rules — response body — rules / item / details / value / kind: distribute Amount contents reservoir Accounts item

Get all auto-transfer rules — response body — rules / item / details / value / kind: distribute Percentage contents
FieldTypePresenceDescription and constraints
$objectRootDistributes a percentage of the controlled account's balance to one or more reservoir accounts.
reservoirAccountsarrayRequired within parentThe reservoir accounts and the percentage each receives.
reservoirAccounts[]ModelEach itemExpand Get all auto-transfer rules — response body — rules / item / details / value / kind: distribute Percentage contents reservoir Accounts item

Referenced models: Get all auto-transfer rules — response body — rules / item / details / value / kind: distribute Percentage contents reservoir Accounts item

Get all auto-transfer rules — response body — rules / item / details / value / kind: maintain Target Balance contents
FieldTypePresenceDescription and constraints
$objectRootKeeps the controlled account's balance near a target by moving money between it and a reservoir account.
When the balance moves outside the bounds, the rule moves exactly enough money to bring it back to
targetBalance. A rule with both bounds equal to targetBalance moves money whenever the balance differs
from the target.
lowerBoundJSONOptional
lowerBound (anyOf 1)JSONAlternative
lowerBound (anyOf 1) (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
lowerBound (anyOf 1) (allOf 2)JSONAll variants applyWhen the controlled account's balance falls below this, money moves in from the reservoir account. Omitted when the rule never moves money in.
lowerBound (anyOf 2)nullAlternative
reservoirAccountIdJSONRequired within parent
reservoirAccountId (allOf 1)stringAll variants applyID for a Mercury account.
Format: uuid
reservoirAccountId (allOf 2)JSONAll variants applyThe reservoir account money is moved to or from.
targetBalanceJSONRequired within parent
targetBalance (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
targetBalance (allOf 2)JSONAll variants applyThe balance the rule brings the controlled account back to. Never below lowerBound or above upperBound.
upperBoundJSONOptional
upperBound (anyOf 1)JSONAlternative
upperBound (anyOf 1) (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
upperBound (anyOf 1) (allOf 2)JSONAll variants applyWhen the controlled account's balance rises above this, money moves out to the reservoir account. Omitted when the rule never moves money out.
upperBound (anyOf 2)nullAlternative

Referenced models: Create a product — response body — unit Price value

Get all auto-transfer rules — response body — rules / item / details / value / kind: distribute Amount contents reservoir Accounts item
FieldTypePresenceDescription and constraints
$objectRootA reservoir account and the fixed amount a distribute rule moves to it.
accountIdJSONRequired within parent
accountId (allOf 1)stringAll variants applyID for a Mercury account.
Format: uuid
accountId (allOf 2)JSONAll variants applyThe reservoir account.
amountJSONRequired within parent
amount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amount (allOf 2)JSONAll variants applyThe amount moved to this account each time the rule runs.

Referenced models: Create a product — response body — unit Price value

Create a product — response body — unit Price value
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)numberAlternativeA dollar amount
Format: double
$ (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

SDK function policy ID: mercury.getautotransferrules. Catalog operation: mercury:getAutoTransferRules. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.