Modern Treasury RoutingDetail API

The RoutingDetail API from Modern Treasury — 2 operation(s) for routingdetail.

OpenAPI Specification

modern-treasury-routingdetail-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Modern Treasury AccountCapability RoutingDetail 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: RoutingDetail
paths:
  /api/{accounts_type}/{account_id}/routing_details:
    get:
      summary: list routing_details
      tags:
      - RoutingDetail
      description: Get a list of routing details for a single internal or external account.
      operationId: listRoutingDetails
      security:
      - basic_auth: []
      parameters:
      - name: accounts_type
        in: path
        schema:
          $ref: '#/components/schemas/accounts_type'
        required: true
      - name: account_id
        in: path
        schema:
          type: string
        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
              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/routing_detail'
    post:
      summary: create routing_detail
      tags:
      - RoutingDetail
      description: Create a routing detail for a single external account.
      operationId: createRoutingDetail
      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
        description: The ID of the account.
        required: true
      responses:
        '201':
          description: successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/routing_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/routing_detail_create_request'
  /api/{accounts_type}/{account_id}/routing_details/{id}:
    get:
      summary: get routing_detail
      tags:
      - RoutingDetail
      description: Get a single routing detail for a single internal or external account.
      operationId: getRoutingDetail
      security:
      - basic_auth: []
      parameters:
      - name: accounts_type
        in: path
        schema:
          $ref: '#/components/schemas/accounts_type'
        required: true
      - name: account_id
        in: path
        schema:
          type: string
        description: The ID of the account.
        required: true
      - name: id
        in: path
        schema:
          type: string
        description: The ID of the routing detail.
        required: true
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/routing_detail'
        '404':
          description: not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_message'
    delete:
      summary: delete routing_detail
      tags:
      - RoutingDetail
      description: Delete a routing detail for a single external account.
      operationId: deleteRoutingDetail
      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
        description: The ID of the account.
        required: true
      - name: id
        in: path
        schema:
          type: string
        description: The ID of the routing detail.
        required: true
      responses:
        '204':
          description: successful
components:
  schemas:
    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
    routing_detail_create_request:
      type: object
      properties:
        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.
      required:
      - routing_number
      - routing_number_type
    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
    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
    accounts_type:
      type: string
      enum:
      - external_accounts
      - internal_accounts
  securitySchemes:
    basic_auth:
      type: http
      scheme: basic