Liminal Publisher
Liminal Publisher · GPT-Aktionen
Modern Treasury API
Interact with Modern Treasury to fetch financial data.
GET /api/{accounts_type}/{account_id}/account_detailslist account_detailsGet a list of account details for a single internal or external account.
POST /api/{accounts_type}/{account_id}/account_detailscreate account_detailCreate an account detail for an external account.
GET /api/{accounts_type}/{account_id}/account_details/{id}get account_detailGet a single account detail for a single internal or external account.
DELETE /api/{accounts_type}/{account_id}/account_details/{id}delete account_detailDelete a single account detail for an external account.
GET /api/internal_accounts/{internal_account_id}/balance_reportslist balance_reportsGet all balance reports for a given internal account.
POST /api/internal_accounts/{internal_account_id}/balance_reportscreate balance reportsGET /api/internal_accounts/{internal_account_id}/balance_reports/{id}get balance_reportGet a single balance report for a given internal account.
DELETE /api/internal_accounts/{internal_account_id}/balance_reports/{id}delete balance_reportDeletes a given balance report.
GET /api/bulk_requestslist bulk_requestsPOST /api/bulk_requestscreate bulk_requestGET /api/bulk_requests/{id}get bulk_requestGET /api/bulk_resultslist bulk_resultsGET /api/bulk_results/{id}get bulk_resultGET /api/connectionslist connectionsGet a list of all connections.
POST /api/counterparties/{id}/collect_accountcollect account detailsSend an email requesting account details.
Ursprüngliches API-Schema
{
"openapi": "3.0.0",
"info": {
"title": "Modern Treasury API",
"version": "1.0.0",
"description": "Interact with Modern Treasury to fetch financial data."
},
"servers": [
{
"url": "https://app.moderntreasury.com/api/"
}
],
"paths": {
"/api/{accounts_type}/{account_id}/account_details": {
"get": {
"summary": "list account_details",
"tags": [
"AccountDetail"
],
"description": "Get a list of account details for a single internal or external account.",
"operationId": "listAccountDetails",
"security": [
{
"basic_auth": []
}
],
"parameters": [
{
"name": "accounts_type",
"in": "path",
"schema": {
"type": "string",
"enum": [
"external_accounts",
"internal_accounts"
]
},
"required": true
},
{
"name": "account_id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"description": "The ID of the account.",
"required": true
},
{
"name": "after_cursor",
"in": "query",
"schema": {
"type": "string",
"nullable": true
},
"required": false
},
{
"name": "per_page",
"in": "query",
"required": false,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "successful",
"headers": {
"X-After-Cursor": {
"schema": {
"type": "string",
"nullable": true
},
"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/account_detail"
}
}
}
}
}
}
},
"post": {
"summary": "create account_detail",
"tags": [
"AccountDetail"
],
"description": "Create an account detail for an external account.",
"operationId": "createAccountDetail",
"security": [
{
"basic_auth": []
}
],
"parameters": [
{
"name": "Idempotency-Key",
"in": "header",
"required": false,
"description": "This key should be something unique, preferably something like an UUID.",
"schema": {
"type": "string"
}
},
{
"name": "accounts_type",
"in": "path",
"schema": {
"type": "string",
"enum": [
"external_accounts"
]
},
"required": true
},
{
"name": "account_id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"description": "The ID of the account.",
"required": true
}
],
"responses": {
"201": {
"description": "successful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/account_detail"
}
}
}
},
"404": {
"description": "unsuccessful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
},
"422": {
"description": "unsuccessful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/account_detail_create_request"
}
}
}
}
}
},
"/api/{accounts_type}/{account_id}/account_details/{id}": {
"get": {
"summary": "get account_detail",
"tags": [
"AccountDetail"
],
"description": "Get a single account detail for a single internal or external account.",
"operationId": "getAccountDetail",
"security": [
{
"basic_auth": []
}
],
"parameters": [
{
"name": "accounts_type",
"in": "path",
"schema": {
"type": "string",
"enum": [
"external_accounts",
"internal_accounts"
]
},
"required": true
},
{
"name": "account_id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"description": "The ID of the account.",
"required": true
},
{
"name": "id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"description": "The ID of the account detail.",
"required": true
}
],
"responses": {
"200": {
"description": "successful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/account_detail"
}
}
}
},
"404": {
"description": "not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
}
}
},
"delete": {
"summary": "delete account_detail",
"tags": [
"AccountDetail"
],
"description": "Delete a single account detail for an external account.",
"operationId": "deleteAccountDetail",
"security": [
{
"basic_auth": []
}
],
"parameters": [
{
"name": "accounts_type",
"in": "path",
"schema": {
"type": "string",
"enum": [
"external_accounts"
]
},
"required": true
},
{
"name": "account_id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"description": "The ID of the account.",
"required": true
},
{
"name": "id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"description": "The ID of the account detail.",
"required": true
}
],
"responses": {
"204": {
"description": "successful"
}
}
}
},
"/api/internal_accounts/{internal_account_id}/balance_reports": {
"get": {
"summary": "list balance_reports",
"tags": [
"BalanceReport"
],
"description": "Get all balance reports for a given internal account.",
"operationId": "listBalanceReports",
"security": [
{
"basic_auth": []
}
],
"parameters": [
{
"name": "internal_account_id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"required": true
},
{
"name": "as_of_date",
"in": "query",
"schema": {
"type": "string",
"format": "date"
},
"required": false,
"description": "The date of the balance report in local time."
},
{
"name": "balance_report_type",
"in": "query",
"schema": {
"type": "string",
"enum": [
"intraday",
"other",
"previous_day",
"real_time"
]
},
"required": false,
"description": "The specific type of balance report. One of `intraday`, `previous_day`, `real_time`, or `other`."
},
{
"name": "after_cursor",
"in": "query",
"schema": {
"type": "string",
"nullable": true
},
"required": false
},
{
"name": "per_page",
"in": "query",
"required": false,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "successful",
"headers": {
"X-After-Cursor": {
"schema": {
"type": "string",
"nullable": true
},
"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/balance_report"
}
}
}
}
},
"403": {
"description": "forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
}
}
},
"post": {
"summary": "create balance reports",
"tags": [
"BalanceReport"
],
"operationId": "createBalanceReport",
"security": [
{
"basic_auth": []
}
],
"parameters": [
{
"name": "internal_account_id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"required": true
},
{
"name": "Idempotency-Key",
"in": "header",
"required": false,
"description": "This key should be something unique, preferably something like an UUID.",
"schema": {
"type": "string"
}
}
],
"responses": {
"201": {
"description": "successful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/balance_report"
}
}
}
},
"422": {
"description": "unsuccessful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/balance_report_create_request"
}
}
}
}
}
},
"/api/internal_accounts/{internal_account_id}/balance_reports/{id}": {
"get": {
"summary": "get balance_report",
"tags": [
"BalanceReport"
],
"description": "Get a single balance report for a given internal account.",
"operationId": "getBalanceReport",
"security": [
{
"basic_auth": []
}
],
"parameters": [
{
"name": "internal_account_id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"required": true
},
{
"name": "id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"required": true,
"description": "Either the unique identifier of the balance report or latest for the latest balance report."
}
],
"responses": {
"200": {
"description": "successful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/balance_report"
}
}
}
},
"404": {
"description": "not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
}
}
},
"delete": {
"summary": "delete balance_report",
"tags": [
"BalanceReport"
],
"description": "Deletes a given balance report.",
"operationId": "deleteBalanceReport",
"security": [
{
"basic_auth": []
}
],
"parameters": [
{
"name": "internal_account_id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"required": true
},
{
"name": "id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"required": true,
"description": "Either the unique identifier of the balance report or latest for the latest balance report."
}
],
"responses": {
"204": {
"description": "no content"
},
"403": {
"description": "forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
},
"404": {
"description": "not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
},
"422": {
"description": "not allowed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
}
}
}
},
"/api/bulk_requests": {
"get": {
"summary": "list bulk_requests",
"tags": [
"BulkRequest"
],
"operationId": "listBulkRequests",
"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",
"processing",
"completed"
]
},
"required": false,
"description": "One of pending, processing, or completed."
},
{
"name": "resource_type",
"in": "query",
"schema": {
"type": "string",
"enum": [
"payment_order",
"ledger_transaction",
"expected_payment"
]
},
"required": false,
"description": "One of payment_order, expected_payment, or ledger_transaction."
},
{
"name": "action_type",
"in": "query",
"schema": {
"type": "string",
"enum": [
"create",
"update"
]
},
"required": false,
"description": "One of create, or update."
},
{
"$ref": "#/components/parameters/metadata_query"
}
],
"responses": {
"200": {
"description": "successful",
"headers": {
"X-After-Cursor": {
"schema": {
"type": "string",
"nullable": true
},
"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_request"
}
}
}
}
},
"401": {
"description": "unsuccessful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
},
"403": {
"description": "unsuccessful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
}
}
},
"post": {
"summary": "create bulk_request",
"tags": [
"BulkRequest"
],
"operationId": "createBulkRequest",
"security": [
{
"basic_auth": []
}
],
"parameters": [
{
"name": "Idempotency-Key",
"in": "header",
"required": false,
"description": "This key should be something unique, preferably something like an UUID.",
"schema": {
"type": "string"
}
}
],
"responses": {
"201": {
"description": "successful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/bulk_request"
}
}
}
},
"401": {
"description": "unsuccessful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
},
"403": {
"description": "unsuccessful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
},
"422": {
"description": "unsuccessful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/bulk_request_create_request"
}
}
}
}
}
},
"/api/bulk_requests/{id}": {
"parameters": [
{
"name": "id",
"in": "path",
"description": "id",
"required": true,
"schema": {
"type": "string"
}
}
],
"get": {
"summary": "get bulk_request",
"tags": [
"BulkRequest"
],
"operationId": "getBulkRequest",
"security": [
{
"basic_auth": []
}
],
"responses": {
"200": {
"description": "successful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/bulk_request"
}
}
}
},
"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"
}
}
}
}
}
}
},
"/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",
"format": "uuid"
},
"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_transaction",
"expected_payment",
"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",
"format": "uuid"
},
"required": false,
"description": "Unique identifier for the result entity object."
}
],
"responses": {
"200": {
"description": "successful",
"headers": {
"X-After-Cursor": {
"schema": {
"type": "string",
"nullable": true
},
"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"
}
}
}
}
}
}
},
"/api/connections": {
"get": {
"summary": "list connections",
"tags": [
"Connection"
],
"operationId": "listConnections",
"description": "Get a list of all connections.",
"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": "vendor_customer_id",
"in": "query",
"schema": {
"type": "string",
"format": "uuid"
},
"required": false,
"description": "An identifier assigned by the vendor to your organization."
},
{
"name": "entity",
"in": "query",
"schema": {
"type": "string"
},
"required": false,
"description": "A string code representing the vendor (i.e. bank)."
}
],
"responses": {
"200": {
"description": "successful",
"headers": {
"X-After-Cursor": {
"schema": {
"type": "string",
"nullable": true
},
"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/connection"
}
}
}
}
}
}
}
},
"/api/counterparties/{id}/collect_account": {
"post": {
"summary": "collect account details",
"tags": [
"Counterparty"
],
"operationId": "collectAccountDetails",
"description": "Send an email requesting account details.",
"security": [
{
"basic_auth": []
}
],
"parameters": [
{
"name": "Idempotency-Key",
"in": "header",
"required": false,
"description": "This key should be something unique, preferably something like an UUID.",
"schema": {
"type": "string"
}
},
{
"name": "id",
"in": "path",
"schema": {
"type": "string",
"format": "uuid"
},
"description": "counterparty id",
"required": true
}
],
"responses": {
"200": {
"description": "successful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/counterparty_collect_account_response"
}
}
}
},
"422": {
"description": "unsuccessful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_message"
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/counterparty_collect_account_request"
}
}
}
}
}
}
}
}