Bank accounts (Portal)

Get a sweep

Fetches one sweep together with every payment rolled into it and a summary of what the sweep amounted to after fees.

GET
https://api.portal.magicdoor.com/company-app/bank-accounts/{bankAccountId}/sweeps/{sweepId}

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Path parameters

bankAccountIdstringrequired

The bank account the sweep belongs to. A Snowflake id sent as a decimal string.

example: 1801556677120004096
sweepIdstringrequired

The sweep to fetch. A Snowflake id sent as a decimal string.

example: 1831004477398404096

Response

200 · The sweep, its items, and the summary.

idstring

The sweep record held by MagicDoor. A Snowflake id sent as a decimal string.

bankAccountIdstring

The bank account the sweep moves money for. Absent when the sweep has not been matched to one.

amountnumber

How much the sweep moves, in dollars and cents. Always positive; type says which way it goes.

typeenum<string>

deposit moves money out of the provider's ledger and into the bank account. withdraw takes money from the bank account into the ledger.

depositwithdraw
sweepStatusenum<string>

Where the sweep is in the provider's lifecycle, mirrored from Plaid.

pendingpostedsettledfundsAvailablereturnedfailed
postedstring · date-time

When the provider posted the sweep, in the company's timezone. Absent until then.

settledstring · date-time

When the sweep settled, in the company's timezone. Absent until then.

fundsAvailablestring · date-time

When the money became available, in the company's timezone. Absent until then.

failedstring · date-time

When the sweep failed, in the company's timezone. Absent unless it failed.

returnedstring · date-time

When the sweep was returned, in the company's timezone. Absent unless it was returned.

returnCodestring

The ACH return code the provider reported. Absent unless the sweep was returned.

failureReasonstring

Why the sweep failed, as reported by the provider. Absent unless it failed.

plaidSweepIdstring

Plaid's own id for the sweep. An opaque provider token — do not parse it.

plaidOriginatorIdstring

Plaid's id for the originator the sweep runs under. An opaque provider token.

plaidLedgerIdstring

Plaid's id for the ledger the money moves through. An opaque provider token.

plaidAccountIdstring

Plaid's id for the funding account. An opaque provider token.

lastSyncedstring · date-time

When MagicDoor last refreshed this record from the provider, in the company's timezone. Absent when it has never been refreshed.

createdstring · date-time

When the sweep record was created, in the company's timezone.

itemsSweepItem[]

Every payment and fee rolled into this sweep, with the property, unit, lease and person behind each one resolved.

summaryobject

What the sweep came to in total.

401 · The access token is missing, expired, or does not belong to a property manager.

404 · No bank account with that id exists for the caller's company. One belonging to another company reads the same way.

404 · No sweep with that id belongs to this bank account.