Quantum Bank AI By James Burvel O'Callaghan III

Quantum Bank AI By James Burvel O'Callaghan III · GPT-Aktionen

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.
  • POST /counterpartiesCreate a counterparty with bank details.
  • POST /payment_ordersCreate a payment order.
  • GET /external_accountsRetrieve a list of external accounts.
Ursprüngliches API-Schema
{
  "openapi": "3.1.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"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/counterparties": {
      "post": {
        "operationId": "createCounterparty",
        "summary": "Create a counterparty with bank details.",
        "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.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Counterparty"
                }
              }
            }
          }
        }
      }
    },
    "/payment_orders": {
      "post": {
        "operationId": "createPaymentOrder",
        "summary": "Create a payment order.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "Type of payment order, e.g., 'wire' or 'ach'."
                  },
                  "amount": {
                    "type": "integer",
                    "description": "Please provide the amount for the payment order."
                  },
                  "direction": {
                    "type": "string",
                    "description": "Direction of the payment, either 'credit' or 'debit'."
                  },
                  "currency": {
                    "type": "string",
                    "description": "Currency of the payment, e.g., 'USD', 'GBP'."
                  },
                  "originating_account_id": {
                    "type": "string",
                    "description": "Please provide the originating account ID."
                  },
                  "receiving_account_id": {
                    "type": "string",
                    "description": "Please provide the receiving account ID."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Payment order created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentOrder"
                }
              }
            }
          }
        }
      }
    },
    "/external_accounts": {
      "get": {
        "operationId": "listExternalAccounts",
        "summary": "Retrieve a list of external accounts.",
        "responses": {
          "200": {
            "description": "List of external accounts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExternalAccount"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "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"
          }
        }
      },
      "ExternalAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "routing_details": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "routing_number": {
                  "type": "string"
                },
                "routing_number_type": {
                  "type": "string"
                }
              }
            }
          },
          "account_details": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "account_number": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}