The Negotiator
The Negotiator · Acciones GPT
Modern Treasury Payment Order API
API for managing payment orders including account retrieval and counterparty creation in Modern Treasury.
GET /internal_accountsRetrieve a list of internal accounts.GET /external_accountsGet a list of all external accounts.POST /external_accountsCreate an external account.GET /counterpartiesList all counterparties.POST /counterpartiesCreate a counterparty.GET /ledger_accountsList all ledger accounts.POST /ledger_transactionsCreate a ledger transaction.POST /payment_ordersCreate a payment order.
Esquema original API
{
"openapi": "3.0.0",
"info": {
"title": "Modern Treasury Payment Order API",
"description": "API for managing payment orders including account retrieval and counterparty creation in Modern Treasury.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://app.moderntreasury.com/api",
"description": "Modern Treasury API server"
}
],
"paths": {
"/internal_accounts": {
"get": {
"operationId": "listInternalAccounts",
"summary": "Retrieve a list of internal accounts.",
"responses": {
"200": {
"description": "List of internal accounts.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InternalAccount"
}
}
}
}
}
}
}
},
"/external_accounts": {
"get": {
"operationId": "listExternalAccounts",
"summary": "Get a list of all external accounts.",
"responses": {
"200": {
"description": "An array of external accounts"
}
}
},
"post": {
"operationId": "createExternalAccount",
"summary": "Create an external account.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"accounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CounterpartyAccount"
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "External account created"
}
}
}
},
"/counterparties": {
"get": {
"operationId": "listCounterparties",
"summary": "List all counterparties.",
"responses": {
"200": {
"description": "An array of counterparties"
}
}
},
"post": {
"operationId": "createCounterparty",
"summary": "Create a counterparty.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"accounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CounterpartyAccount"
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "Counterparty created successfully."
}
}
}
},
"/ledger_accounts": {
"get": {
"operationId": "listLedgerAccounts",
"summary": "List all ledger accounts.",
"responses": {
"200": {
"description": "An array of ledger accounts"
}
}
}
},
"/ledger_transactions": {
"post": {
"operationId": "createLedgerTransaction",
"summary": "Create a ledger transaction.",
"security": [
{
"BasicAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ledger_entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"direction": {
"type": "string"
},
"ledger_account_id": {
"type": "string"
},
"show_resulting_ledger_account_balances": {
"type": "boolean"
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Ledger transaction successfully created"
}
}
}
},
"/payment_orders": {
"post": {
"operationId": "createPaymentOrder",
"summary": "Create a payment order.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"amount": {
"type": "integer"
},
"direction": {
"type": "string"
},
"currency": {
"type": "string"
},
"originating_account_id": {
"type": "string"
},
"receiving_account_id": {
"type": "string"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Payment order created successfully."
}
}
}
}
},
"components": {
"schemas": {
"InternalAccount": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"balance": {
"type": "integer"
}
}
},
"CounterpartyAccount": {
"type": "object",
"properties": {
"account_type": {
"type": "string"
},
"routing_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"routing_number_type": {
"type": "string"
},
"routing_number": {
"type": "string"
}
}
}
},
"account_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"account_number": {
"type": "string"
}
}
}
}
}
},
"Counterparty": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"accounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CounterpartyAccount"
}
}
}
},
"PaymentOrder": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"amount": {
"type": "integer"
},
"direction": {
"type": "string"
},
"currency": {
"type": "string"
},
"originating_account_id": {
"type": "string"
},
"receiving_account_id": {
"type": "string"
}
}
}
},
"securitySchemes": {
"BasicAuth": {
"type": "http",
"scheme": "basic"
}
}
}
}