Modern Treasury BulkResult API
The BulkResult API from Modern Treasury — 2 operation(s) for bulkresult.
The BulkResult API from Modern Treasury — 2 operation(s) for bulkresult.
openapi: 3.0.1
info:
title: Modern Treasury AccountCapability BulkResult API
version: v1
contact:
name: Modern Treasury Engineering Team
url: https://moderntreasury.com
description: The Modern Treasury REST API. Please see https://docs.moderntreasury.com for more details.
servers:
- url: http://localhost:3000
- url: https://app.moderntreasury.com
tags:
- name: BulkResult
paths:
/api/bulk_results:
get:
summary: list bulk_results
tags:
- BulkResult
operationId: listBulkResults
security:
- basic_auth: []
parameters:
- name: after_cursor
in: query
schema:
type: string
nullable: true
required: false
- name: per_page
in: query
required: false
schema:
type: integer
- name: status
in: query
schema:
type: string
enum:
- pending
- successful
- failed
required: false
description: One of successful or failed.
- name: request_type
in: query
schema:
type: string
enum:
- bulk_request
required: false
description: The type of the request that created this result. bulk_request is the only supported `request_type`
- name: request_id
in: query
schema:
type: string
required: false
description: Unique identifier for the request that created this bulk result. This is the ID of the bulk request when `request_type` is bulk_request
- name: entity_type
in: query
schema:
type: string
enum:
- payment_order
- ledger_account
- ledger_transaction
- expected_payment
- transaction
- entity_link
- transaction_line_item
- bulk_error
required: false
description: The type of the request that created this result. bulk_request is the only supported `request_type`
- name: entity_id
in: query
schema:
type: string
required: false
description: Unique identifier for the result entity object.
responses:
'200':
description: successful
headers:
X-After-Cursor:
schema:
type: string
nullable: true
required: false
description: The cursor for the next page. Including this in a call as `after_cursor` will return the next page.
X-Per-Page:
schema:
type: integer
nullable: true
description: The current `per_page`.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/bulk_result'
'401':
description: unsuccessful
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
'403':
description: unsuccessful
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
/api/bulk_results/{id}:
parameters:
- name: id
in: path
description: id
required: true
schema:
type: string
get:
summary: get bulk_result
tags:
- BulkResult
operationId: getBulkResult
security:
- basic_auth: []
responses:
'200':
description: successful
content:
application/json:
schema:
$ref: '#/components/schemas/bulk_result'
'401':
description: unsuccessful
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
'403':
description: unsuccessful
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
'404':
description: not found
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
components:
schemas:
transaction:
type: object
properties:
id:
type: string
format: uuid
object:
type: string
live_mode:
type: boolean
description: This field will be true if this object exists in the live environment or false if it exists in the test environment.
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
discarded_at:
type: string
format: date-time
nullable: true
amount:
type: integer
description: Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.
currency:
$ref: '#/components/schemas/currency'
description: Currency that this transaction is denominated in.
direction:
type: string
description: Either `credit` or `debit`.
vendor_description:
type: string
nullable: true
description: The transaction detail text that often appears in on your bank statement and in your banking portal.
vendor_code:
type: string
nullable: true
description: When applicable, the bank-given code that determines the transaction's category. For most banks this is the BAI2/BTRS transaction code.
vendor_code_type:
type: string
enum:
- bai2
- banking_circle
- bankprov
- bnk_dev
- cleartouch
- coinbase_prime
- column
- cross_river
- currencycloud
- dc_bank
- dwolla
- evolve
- fake_vendor
- goldman_sachs
- iso20022
- jpmc
- modern_treasury
- mx
- paxos
- paypal
- pnc
- signet
- silvergate
- swift
- us_bank
- user
- western_alliance
nullable: true
description: The type of `vendor_code` being reported. Can be one of `bai2`, `bankprov`, `bnk_dev`, `cleartouch`, `currencycloud`, `cross_river`, `dc_bank`, `dwolla`, `evolve`, `goldman_sachs`, `iso20022`, `jpmc`, `mx`, `signet`, `silvergate`, `swift`, `us_bank`, or others.
vendor_id:
type: string
nullable: true
description: An identifier given to this transaction by the bank.
as_of_date:
type: string
nullable: true
format: date
description: The date on which the transaction occurred.
as_of_time:
type: string
nullable: true
format: time
description: The time on which the transaction occurred. Depending on the granularity of the timestamp information received from the bank, it may be `null`.
as_of_timezone:
type: string
nullable: true
description: The timezone in which the `as_of_time` is represented. Can be `null` if the bank does not provide timezone info.
internal_account_id:
type: string
format: uuid
description: The ID of the relevant Internal Account.
metadata:
type: object
description: Additional data represented as key-value pairs. Both the key and value must be strings.
additionalProperties:
type: string
example:
key: value
foo: bar
modern: treasury
posted:
type: boolean
description: This field will be `true` if the transaction has posted to the account.
vendor_customer_id:
type: string
nullable: true
description: An identifier given to this transaction by the bank, often `null`.
reconciled:
type: boolean
description: This field will be `true` if a transaction is reconciled by the Modern Treasury system. This means that it has transaction line items that sum up to the transaction's amount.
details:
type: object
additionalProperties:
type: string
description: 'This field contains additional information that the bank provided about the transaction. This is structured data. Some of the data in here might overlap with what is in the `vendor_description`. For example, the OBI could be a part of the vendor description, and it would also be included in here. The attributes that are passed through the details field will vary based on your banking partner. Currently, the following keys may be in the details object: `originator_name`, `originator_to_beneficiary_information`.'
type:
type: string
enum:
- ach
- au_becs
- bacs
- book
- card
- chats
- check
- cross_border
- dk_nets
- eft
- gb_fps
- hu_ics
- interac
- masav
- mx_ccen
- neft
- nics
- nz_becs
- pl_elixir
- provxchange
- ro_sent
- rtp
- se_bankgirot
- sen
- sepa
- sg_giro
- sic
- signet
- sknbi
- stablecoin
- wire
- zengin
- other
description: The type of the transaction. Examples could be `card, `ach`, `wire`, `check`, `rtp`, `book`, or `sen`.
foreign_exchange_rate:
$ref: '#/components/schemas/foreign_exchange_rate'
nullable: true
description: Associated serialized foreign exchange rate information.
custom_identifiers:
type: object
description: An object containing key-value pairs, each with a custom identifier as the key and a string value.
additionalProperties:
type: string
example:
key: value
foo: bar
modern: treasury
additionalProperties: false
minProperties: 23
required:
- id
- object
- live_mode
- created_at
- updated_at
- discarded_at
- amount
- currency
- direction
- vendor_code
- vendor_code_type
- vendor_id
- as_of_date
- as_of_time
- as_of_timezone
- internal_account_id
- metadata
- posted
- vendor_customer_id
- reconciled
- type
- foreign_exchange_rate
- custom_identifiers
payment_order_subtype:
type: string
enum:
- 0C
- 0N
- 0S
- CCD
- CIE
- CTX
- IAT
- PPD
- TEL
- WEB
- au_becs
- bacs
- base
- chats
- dk_nets
- eft
- ethereum
- hu_ics
- masav
- mx_ccen
- neft
- nics
- nz_becs
- pl_elixir
- polygon
- ro_sent
- se_bankgirot
- sepa
- sg_giro
- sic
- sknbi
- solana
- zengin
nullable: true
description: An additional layer of classification for the type of payment order you are doing. This field is only used for `ach` payment orders currently. For `ach` payment orders, the `subtype` represents the SEC code. We currently support `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
x-stainless-renameMap:
bacs_new_instruction: 0C
bacs_cancellation_instruction: 0N
bacs_conversion_instruction: 0S
reconciliation_rule_variable:
type: object
properties:
amount_upper_bound:
type: integer
description: The highest amount this expected payment may be equal to. Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.
amount_lower_bound:
type: integer
description: The lowest amount this expected payment may be equal to. Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.
direction:
type: string
enum:
- credit
- debit
description: One of credit or debit. When you are receiving money, use credit. When you are being charged, use debit.
internal_account_id:
type: string
format: uuid
description: The ID of the Internal Account for the expected payment
type:
type: string
nullable: true
enum:
- ach
- au_becs
- bacs
- book
- card
- chats
- check
- cross_border
- dk_nets
- eft
- gb_fps
- hu_ics
- interac
- masav
- mx_ccen
- neft
- nics
- nz_becs
- pl_elixir
- provxchange
- ro_sent
- rtp
- se_bankgirot
- sen
- sepa
- sg_giro
- sic
- signet
- sknbi
- stablecoin
- wire
- zengin
description: One of ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen, sepa, signet wire
currency:
$ref: '#/components/schemas/currency'
description: Must conform to ISO 4217. Defaults to the currency of the internal account
date_upper_bound:
type: string
format: date
nullable: true
description: The latest date the payment may come in. Format is yyyy-mm-dd
date_lower_bound:
type: string
format: date
nullable: true
description: The earliest date the payment may come in. Format is yyyy-mm-dd
counterparty_id:
type: string
format: uuid
nullable: true
description: The ID of the counterparty you expect for this payment
custom_identifiers:
type: object
description: A hash of custom identifiers for this payment
nullable: true
additionalProperties:
type: string
additionalProperties: false
minProperties: 10
required:
- amount_upper_bound
- amount_lower_bound
- direction
- internal_account_id
account_capability:
type: object
properties:
id:
type: string
format: uuid
object:
type: string
live_mode:
type: boolean
description: This field will be true if this object exists in the live environment or false if it exists in the test environment.
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
discarded_at:
type: string
format: date-time
nullable: true
direction:
type: string
enum:
- credit
- debit
description: One of `debit` or `credit`. Indicates the direction of money movement this capability is responsible for.
_x-stainless-modelDefPath: $shared.transaction_direction
identifier:
type: string
nullable: true
description: A unique reference assigned by your bank for tracking and recognizing payment files. It is important this is formatted exactly how the bank assigned it.
payment_type:
type: string
enum:
- ach
- au_becs
- bacs
- book
- card
- chats
- check
- cross_border
- dk_nets
- eft
- gb_fps
- hu_ics
- interac
- masav
- mx_ccen
- neft
- nics
- nz_becs
- pl_elixir
- provxchange
- ro_sent
- rtp
- se_bankgirot
- sen
- sepa
- sg_giro
- sic
- signet
- sknbi
- stablecoin
- wire
- zengin
description: Indicates the the type of payment this capability is responsible for originating.
additionalProperties: true
minProperties: 9
maxProperties: 9
required:
- id
- object
- live_mode
- created_at
- updated_at
- discarded_at
- direction
- identifier
- payment_type
bulk_result:
type: object
properties:
id:
type: string
format: uuid
object:
type: string
live_mode:
type: boolean
description: This field will be true if this object exists in the live environment or false if it exists in the test environment.
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
request_id:
type: string
format: uuid
description: Unique identifier for the request that created this bulk result. This is the ID of the bulk request when `request_type` is bulk_request
request_type:
type: string
enum:
- bulk_request
description: The type of the request that created this result. bulk_request is the only supported `request_type`
status:
type: string
enum:
- pending
- successful
- failed
description: One of successful or failed.
request_params:
type: object
description: An optional object that contains the provided input params for the request that created this result. This is an item in the `resources` array for the bulk_request
additionalProperties:
type: string
nullable: true
entity_id:
type: string
format: uuid
description: Unique identifier for the result entity object.
entity_type:
type: string
enum:
- payment_order
- ledger_account
- ledger_transaction
- expected_payment
- transaction
- entity_link
- transaction_line_item
- bulk_error
description: The type of the result entity object. For a successful bulk result, this is the same as the `resource_type` of the bulk request. For a failed bulk result, this is always bulk_error
entity:
description: An object with type as indicated by `entity_type`. This is the result object that is generated by performing the requested action on the provided input `request_params`.
anyOf:
- $ref: '#/components/schemas/payment_order'
- $ref: '#/components/schemas/expected_payment'
- $ref: '#/components/schemas/ledger_transaction'
- $ref: '#/components/schemas/ledger_account'
- $ref: '#/components/schemas/transaction'
- $ref: '#/components/schemas/bulk_error'
additionalProperties: false
minProperties: 12
required:
- id
- object
- live_mode
- created_at
- updated_at
- request_id
- request_type
- status
- request_params
- entity_id
- entity_type
- entity
currency:
type: string
enum:
- AED
- AFN
- ALL
- AMD
- ANG
- AOA
- ARS
- AUD
- AWG
- AZN
- BAM
- BBD
- BCH
- BDT
- BGN
- BHD
- BIF
- BMD
- BND
- BOB
- BRL
- BSD
- BTC
- BTN
- BWP
- BYN
- BYR
- BZD
- CAD
- CDF
- CHF
- CLF
- CLP
- CNH
- CNY
- COP
- CRC
- CUC
- CUP
- CVE
- CZK
- DJF
- DKK
- DOP
- DZD
- EEK
- EGP
- ERN
- ETB
- ETH
- EUR
- EURC
- FJD
- FKP
- GBP
- GBX
- GEL
- GGP
- GHS
- GIP
- GMD
- GNF
- GTQ
- GYD
- HKD
- HNL
- HRK
- HTG
- HUF
- IDR
- ILS
- IMP
- INR
- IQD
- IRR
- ISK
- JEP
- JMD
- JOD
- JPY
- KES
- KGS
- KHR
- KMF
- KPW
- KRW
- KWD
- KYD
- KZT
- LAK
- LBP
- LKR
- LRD
- LSL
- LTL
- LVL
- LYD
- MAD
- MDL
- MGA
- MKD
- MMK
- MNT
- MOP
- MRO
- MRU
- MTL
- MUR
- MVR
- MWK
- MXN
- MYR
- MZN
- NAD
- NGN
- NIO
- NOK
- NPR
- NZD
- OMR
- OP
- PAB
- PEN
- PGK
- PHP
- PKR
- PLN
- PYG
- PYUSD
- QAR
- RON
- RSD
- RUB
- RWF
- SAR
- SBD
- SCR
- SDG
- SEK
- SGD
- SHP
- SKK
- SLE
- SLL
- SOS
- SRD
- SSP
- STD
- STN
- SVC
- SYP
- SZL
- THB
- TJS
- TMM
- TMT
- TND
- TOP
- TRY
- TTD
- TWD
- TZS
- UAH
- UGX
- USD
- USDB
- USDC
- USDG
- USDP
- USDT
- UYU
- UZS
- VEF
- VES
- VND
- VUV
- WST
- XAF
- XAG
- XAU
- XBA
- XBB
- XBC
- XBD
- XCD
- XCG
- XDR
- XFU
- XOF
- XPD
- XPF
- XPT
- XTS
- YER
- ZAR
- ZMK
- ZMW
- ZWD
- ZWG
- ZWL
- ZWN
- ZWR
description: Three-letter ISO currency code.
error_message:
type: object
properties:
errors:
type: object
properties:
code:
type: string
enum:
- parameter_invalid
- parameter_missing
- resource_not_found
- not_found
- forbidden
- invalid_ip
- invalid_key
- header_invalid
- expired_key
- conflict
- too_many_requests
message:
type: string
parameter:
type: string
required:
- errors
ledger_account:
type: object
properties:
id:
type: string
format: uuid
object:
type: string
live_mode:
type: boolean
description: This field will be true if this object exists in the live environment or false if it exists in the test environment.
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
discarded_at:
type: string
format: date-time
nullable: true
name:
type: string
description: The name of the ledger account.
description:
type: string
description: The description of the ledger account.
nullable: true
normal_balance:
type: string
enum:
- credit
- debit
description: The normal balance of the ledger account.
_x-stainless-modelDefPath: $shared.transaction_direction
balances:
$ref: '#/components/schemas/ledger_balances_with_effective_at'
description: The pending, posted, and available balances for this ledger account. The posted balance is the sum of all posted entries on the account. The pending balance is the sum of all pending and posted entries on the account. The available balance is the posted incoming entries minus the sum of the pending and posted outgoing amounts.
lock_version:
type: integer
description: Lock version of the ledger account.
ledger_id:
type: string
format: uuid
description: The id of the ledger that this account belongs to.
ledgerable_id:
type: string
format: uuid
nullable: true
description: If the ledger account links to another object in Modern Treasury, the id will be populated here, otherwise null.
external_id:
type: string
nullable: true
description: An optional user-defined 180 character unique identifier.
ledgerable_type:
type: string
enum:
- counterparty
- external_account
- internal_account
- virtual_account
nullable: true
description: If the ledger account links to another object in Modern Treasury, the type will be populated here, otherwise null. The value is one of internal_account or external_account.
metadata:
type: object
description: Additional data represented as key-value pairs. Both the key and value must be strings.
additionalProperties:
type: string
example:
key: value
foo: bar
modern: treasury
additionalProperties: false
minProperties: 16
required:
- id
- object
- live_mode
- created_at
- updated_at
- discarded_at
- name
- description
- normal_balance
- balances
- lock_version
- ledger_id
- ledgerable_id
- external_id
- ledgerable_type
- metadata
routing_detail:
type: object
properties:
id:
type: string
format: uuid
object:
type: string
live_mode:
type: boolean
description: This field will be true if this object exists in the live environment or false if it exists in the test environment.
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
discarded_at:
type: string
format: date-time
nullable: true
routing_number:
type: string
description: The routing number of the bank.
routing_number_type:
type: string
enum:
- aba
- au_bsb
- br_codigo
- ca_cpa
- chips
- cnaps
- dk_interbank_clearing_code
- gb_sort_code
- hk_interbank_clearing_code
- hu_interbank_clearing_code
- id_sknbi_code
- il_bank_code
- in_ifsc
- jp_zengin_code
- mx_bank_identifier
- my_branch_code
- nz_national_clearing_code
- pl_national_clearing_code
- se_bankgiro_clearing_code
- sg_interbank_clearing_code
- swift
- za_national_clearing_code
description: The type of routing number. See https://docs.moderntreasury.com/platform/reference/routing-detail-object for more details.
payment_type:
type: string
enum:
- ach
- au_becs
- bacs
- book
- card
- chats
- check
- cross_border
- dk_nets
- eft
- gb_fps
- hu_ics
- interac
- masav
- mx_ccen
- neft
- nics
- nz_becs
- pl_elixir
- provxchange
- ro_sent
- rtp
- se_bankgirot
- sen
- sepa
- sg_giro
- sic
- signet
- sknbi
- stablecoin
- wire
- zengin
nullable: true
description: If the routing detail is to be used for a specific payment type this field will be populated, otherwise null.
bank_name:
type: string
description: The name of the bank.
bank_address:
$ref: '#/components/schemas/address'
additionalProperties: false
minProperties: 11
required:
- id
- object
- live_mode
- created_at
- updated_at
- discarded_at
- routing_number
- routing_number_type
- payment_type
- bank_name
- bank_address
address:
type: object
properties:
id:
type: string
format: uuid
object:
type: string
live_mode:
type: boolean
description: This field will be true if this object exists in the live environment or false if it exists in the test environment.
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
line1:
type: string
nullable: true
line2:
type: string
nullable: true
locality:
type: string
nullable: true
description: Locality or City.
region:
type: string
nullable: true
description: Region or State.
postal_code:
type: string
description: The postal code of the address.
nullable: true
country:
type: string
description: Country code conforms to [ISO 3166-1 alpha-2]
nullable: true
nullable: true
additionalProperties: false
minProperties: 11
required:
- id
- object
- live_mode
- created_at
- updated_at
- line1
- line2
- locality
- region
- postal_code
- country
account_detail:
type: object
properties:
id:
type: string
format: uuid
object:
type: string
live_mode:
type: boolean
description: This field will be true if this object exists in the live environment or false if it exists in the test environment.
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
discarded_at:
type: string
format: date-time
nullable: true
account_number:
type: string
description: The account number for the bank account.
account_number_type:
type: string
enum:
- au_number
- base_address
- card_token
- clabe
- ethereum_address
- hk_number
- iban
- id_number
- nz_number
- other
- pan
- polygon_address
- sg_number
- solana_address
- wallet_address
description: One of `iban`, `clabe`, `wallet_address`, or `other`. Use `other` if the bank account number is in a generic format.
account_number_safe:
type: string
description: The last 4 digits of the account_number.
additionalProperties: false
minProperties: 8
maxProperties: 9
required:
- id
- object
- live_mode
- created_at
- updated_at
- discarded_at
- account_number_type
- account_number_safe
ledger_balances:
type: object
properties:
pending_balance:
$ref: '#/components/schemas/ledger_balance'
description: The pending_balance is the sum of all pending and posted entries.
posted_balance:
$ref: '#/components/schemas/ledger_balance'
description: The posted_balance is the sum of all posted entries.
available_balance:
$ref: '#/components/schemas/ledger_balance'
description: The available_balance is the sum of all posted inbound entries and pending outbound entries. For credit normal, available_amount = posted_credits - pending_debits; for debit normal, available_amount = posted_debits - pending_credits.
additionalProperties: false
minProperties: 3
required:
- pending_balance
- posted_balance
- available_balance
internal_account:
type: object
properties:
id:
type: string
format: uuid
object:
type: string
live_mode:
type: boolean
# --- truncated at 32 KB (88 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/modern-treasury/refs/heads/main/openapi/modern-treasury-bulkresult-api-openapi.yml