{
  "openapi": "3.0.4",
  "info": {
    "title": "PSD2 B2B API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://b2b-api.moneygate.com/"
    }
  ],
  "paths": {
    "/api/Accounts/{accountNumber}/Transactions/{referenceNumber}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "Get the details of a particular transaction",
        "operationId": "Transactions_GetTransaction",
        "parameters": [
          {
            "name": "referenceNumber",
            "in": "path",
            "description": "The reference number of the transaction to retrieve",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountNumber",
            "in": "path",
            "description": "The account number of the transaction",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionDetail"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/Clients/summary": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "Get a list of client summary information that the user has access to",
        "operationId": "Clients_GetClientsInformation",
        "parameters": [
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IncludeAll",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "\n\n0 = Ascending\n\n1 = Descending",
            "schema": {
              "$ref": "#/components/schemas/SortOrder"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ClientInformationPagedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientInformationPagedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientInformationPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/Clients/{clientId}/accounts": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "Get the accounts of a particular client",
        "operationId": "Clients_GetAccounts",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "The clientId to search for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IncludeAll",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "\n\n0 = Ascending\n\n1 = Descending",
            "schema": {
              "$ref": "#/components/schemas/SortOrder"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AccountPagedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountPagedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/Transactions/search": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Retrieve a number of transactions based on the query parameters",
        "operationId": "Transactions_GetTransactions",
        "parameters": [
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "maximum": 500,
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IncludeAll",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "\n\n0 = Ascending\n\n1 = Descending",
            "schema": {
              "$ref": "#/components/schemas/SortOrder"
            }
          }
        ],
        "requestBody": {
          "description": "The query parameters to search for",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionsQuery"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionsQuery"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionsQuery"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionPagedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionPagedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Account": {
        "required": [
          "accountNumber",
          "baseCurrency",
          "currency"
        ],
        "type": "object",
        "properties": {
          "accountNumber": {
            "maxLength": 20,
            "minLength": 1,
            "type": "string",
            "description": "The account number of the bank account"
          },
          "accountName": {
            "maxLength": 25,
            "type": "string",
            "description": "The name of the account",
            "nullable": true
          },
          "accountAlias": {
            "maxLength": 25,
            "type": "string",
            "description": "The secondary name/account alias (usually the nick name) of the account",
            "nullable": true
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string",
            "description": "The currency of the account \nISO 4217 three letter alpha currency code. e.g. EUR, GBP etc"
          },
          "currentBalance": {
            "type": "number",
            "description": "The current booked balance of the account",
            "format": "double"
          },
          "availableBalance": {
            "type": "number",
            "description": "The available balance of the account",
            "format": "double"
          },
          "baseCurrency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string",
            "description": "The base currency of the institution\nISO 4217 three letter alpha currency code. e.g. EUR, GBP etc"
          },
          "currentBalanceBase": {
            "type": "number",
            "description": "The current booked balance of the account",
            "format": "double"
          },
          "availableBalanceBase": {
            "type": "number",
            "description": "The available balance of the account",
            "format": "double"
          },
          "iban": {
            "maxLength": 40,
            "type": "string",
            "description": "The Iban of the account",
            "nullable": true
          },
          "swiftCode": {
            "maxLength": 11,
            "type": "string",
            "description": "The Swift/Bic Code of the account",
            "nullable": true
          },
          "branchCode": {
            "maxLength": 5,
            "type": "string",
            "description": "Branch code",
            "nullable": true
          },
          "productCode": {
            "maxLength": 10,
            "type": "string",
            "description": "Internal product Code",
            "nullable": true
          },
          "productDescription": {
            "maxLength": 25,
            "type": "string",
            "description": "Product description",
            "nullable": true
          },
          "clientId": {
            "maxLength": 10,
            "type": "string",
            "description": "Client Id",
            "nullable": true
          },
          "clientName": {
            "maxLength": 30,
            "type": "string",
            "description": "Client Name",
            "nullable": true
          },
          "openingDate": {
            "type": "string",
            "description": "Date the account was openned",
            "format": "date-time",
            "nullable": true
          },
          "isConnectedToCard": {
            "type": "boolean",
            "description": "Indicates if account is connected to a card",
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "A bank account"
      },
      "AccountPagedResponse": {
        "type": "object",
        "properties": {
          "currentPage": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalRows": {
            "type": "integer",
            "format": "int64"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Account"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ClientInformation": {
        "type": "object",
        "properties": {
          "id": {
            "maxLength": 20,
            "type": "string",
            "description": "The id of this client",
            "nullable": true
          },
          "name": {
            "maxLength": 200,
            "type": "string",
            "description": "The name of the client",
            "nullable": true
          },
          "clientType": {
            "maxLength": 1,
            "minLength": 1,
            "type": "string",
            "description": "The type of client",
            "nullable": true
          },
          "phone": {
            "maxLength": 25,
            "type": "string",
            "description": "The main phone number of this client",
            "nullable": true
          },
          "email": {
            "maxLength": 200,
            "type": "string",
            "description": "An email address of this account",
            "nullable": true
          },
          "responsiblePerson": {
            "maxLength": 200,
            "type": "string",
            "description": "The person responsible for this client",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Corporate or individual client information"
      },
      "ClientInformationPagedResponse": {
        "type": "object",
        "properties": {
          "currentPage": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalRows": {
            "type": "integer",
            "format": "int64"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientInformation"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SortOrder": {
        "enum": [
          0,
          1
        ],
        "type": "integer",
        "description": "\n\n0 = Ascending\n\n1 = Descending",
        "format": "int32",
        "x-enumNames": [
          "Ascending",
          "Descending"
        ]
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "transactionType": {
            "$ref": "#/components/schemas/TransactionType"
          },
          "clientName": {
            "type": "string",
            "description": "Our client name",
            "nullable": true
          },
          "accountNumber": {
            "type": "string",
            "description": "Our account number",
            "nullable": true
          },
          "accountName": {
            "type": "string",
            "description": "Our account name",
            "nullable": true
          },
          "referenceNumber": {
            "type": "string",
            "description": "A reference number to group related transactions",
            "nullable": true
          },
          "balanceAfterTransaction": {
            "type": "number",
            "description": "The balance after the transaction was posted \nThis does not include any fees, deducted due to this transaction",
            "format": "double"
          },
          "operationCodeDescription": {
            "type": "string",
            "description": "The transaction type description",
            "nullable": true
          },
          "transactionDate": {
            "type": "string",
            "description": "The date the transaction was created",
            "format": "date-time",
            "nullable": true
          },
          "valueDate": {
            "type": "string",
            "description": "The value date of the transaction",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "accountCurrency": {
            "type": "string",
            "description": "The currency of the from/originator account\nISO 4217 three letter alpha currency code. e.g. EUR, GBP etc",
            "nullable": true
          },
          "accountAmount": {
            "type": "number",
            "description": "Amount of the transaction in the account currency",
            "format": "double"
          },
          "counterPartyAccountNumber": {
            "type": "string",
            "description": "Counter party account number",
            "nullable": true
          },
          "counterPartyAccountName": {
            "type": "string",
            "description": "Counter party account name",
            "nullable": true
          },
          "counterPartytBic": {
            "type": "string",
            "description": "Counter party BIC",
            "nullable": true
          },
          "counterPartyAddress": {
            "type": "string",
            "description": "Counter party Address",
            "nullable": true
          },
          "counterPartyCountryCode": {
            "type": "string",
            "description": "Counter party Country Code",
            "nullable": true
          },
          "counterPartyBankName": {
            "type": "string",
            "description": "Counter party Bank Name",
            "nullable": true
          },
          "counterPartyBankAddress": {
            "type": "string",
            "description": "Counter party Bank Address",
            "nullable": true
          },
          "counterPartyBankCode": {
            "type": "string",
            "description": "Counter party bank code (ABA/BSB/Sort number etc)",
            "nullable": true
          },
          "counterPartyCity": {
            "type": "string",
            "description": "Coutner party City",
            "nullable": true
          },
          "counterPartyState": {
            "type": "string",
            "description": "Counter party state",
            "nullable": true
          },
          "counterPartyPostalCode": {
            "type": "string",
            "description": "Counter party postal code",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the transaction",
            "nullable": true
          },
          "paymentDetails": {
            "type": "string",
            "description": "Payment details of the transfer",
            "nullable": true
          },
          "isFee": {
            "type": "boolean",
            "description": "This transaction is a fee transaction if this is true, otherwise it's a payment/transfer"
          },
          "fees": {
            "type": "number",
            "description": "Any fees related to this transaction",
            "format": "double",
            "nullable": true
          },
          "purposeCode": {
            "type": "string",
            "description": "Purpose of payment",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A representation of a transaction posted to an account"
      },
      "TransactionDetail": {
        "type": "object",
        "properties": {
          "transactionType": {
            "$ref": "#/components/schemas/TransactionType"
          },
          "clientName": {
            "type": "string",
            "description": "Our client name",
            "nullable": true
          },
          "accountNumber": {
            "type": "string",
            "description": "Our account number",
            "nullable": true
          },
          "accountName": {
            "type": "string",
            "description": "Our account name",
            "nullable": true
          },
          "referenceNumber": {
            "type": "string",
            "description": "A reference number to group related transactions",
            "nullable": true
          },
          "balanceAfterTransaction": {
            "type": "number",
            "description": "The balance after the transaction was posted \nThis does not include any fees, deducted due to this transaction",
            "format": "double"
          },
          "operationCodeDescription": {
            "type": "string",
            "description": "The transaction type description",
            "nullable": true
          },
          "transactionDate": {
            "type": "string",
            "description": "The date the transaction was created",
            "format": "date-time",
            "nullable": true
          },
          "valueDate": {
            "type": "string",
            "description": "The value date of the transaction",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "accountCurrency": {
            "type": "string",
            "description": "The currency of the from/originator account\nISO 4217 three letter alpha currency code. e.g. EUR, GBP etc",
            "nullable": true
          },
          "accountAmount": {
            "type": "number",
            "description": "Amount of the transaction in the account currency",
            "format": "double"
          },
          "counterPartyAccountNumber": {
            "type": "string",
            "description": "Counter party account number",
            "nullable": true
          },
          "counterPartyAccountName": {
            "type": "string",
            "description": "Counter party account name",
            "nullable": true
          },
          "counterPartytBic": {
            "type": "string",
            "description": "Counter party BIC",
            "nullable": true
          },
          "counterPartyAddress": {
            "type": "string",
            "description": "Counter party Address",
            "nullable": true
          },
          "counterPartyCountryCode": {
            "type": "string",
            "description": "Counter party Country Code",
            "nullable": true
          },
          "counterPartyBankName": {
            "type": "string",
            "description": "Counter party Bank Name",
            "nullable": true
          },
          "counterPartyBankAddress": {
            "type": "string",
            "description": "Counter party Bank Address",
            "nullable": true
          },
          "counterPartyBankCode": {
            "type": "string",
            "description": "Counter party bank code (ABA/BSB/Sort number etc)",
            "nullable": true
          },
          "counterPartyCity": {
            "type": "string",
            "description": "Coutner party City",
            "nullable": true
          },
          "counterPartyState": {
            "type": "string",
            "description": "Counter party state",
            "nullable": true
          },
          "counterPartyPostalCode": {
            "type": "string",
            "description": "Counter party postal code",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the transaction",
            "nullable": true
          },
          "paymentDetails": {
            "type": "string",
            "description": "Payment details of the transfer",
            "nullable": true
          },
          "isFee": {
            "type": "boolean",
            "description": "This transaction is a fee transaction if this is true, otherwise it's a payment/transfer"
          },
          "fees": {
            "type": "number",
            "description": "Any fees related to this transaction",
            "format": "double",
            "nullable": true
          },
          "purposeCode": {
            "type": "string",
            "description": "Purpose of payment",
            "nullable": true
          },
          "transactionCurrency": {
            "type": "string",
            "description": "The transaction currency\nISO 4217 three letter alpha currency code. e.g. EUR, GBP etc",
            "nullable": true
          },
          "transactionAmount": {
            "type": "number",
            "description": "Amount of the transaction in the transaction currency",
            "format": "double",
            "nullable": true
          },
          "exchangeRate": {
            "type": "number",
            "description": "The exchange rate used for this transaction (if cross currency)",
            "format": "double",
            "nullable": true
          },
          "canBeAddedToFavorites": {
            "type": "boolean",
            "description": "If true, then this is a user generated transaction (e.g. outgoing transfer) that can be added to the user's favorites"
          },
          "userHasAccessToCounterPartyAccount": {
            "type": "boolean",
            "description": "True if user has access to the counter party account i.e. this is \"own\" account transfer"
          },
          "bulkReferenceNumber": {
            "type": "string",
            "description": "If this is part of a bulk payment, then this will contain the reference number of the bulk header, that can be used to get details/receipt of the bulk payment",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A representation of a transaction posted to an account, including payment details if available"
      },
      "TransactionPagedResponse": {
        "type": "object",
        "properties": {
          "currentPage": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalRows": {
            "type": "integer",
            "format": "int64"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TransactionStatus": {
        "enum": [
          0,
          1
        ],
        "type": "integer",
        "description": "Transaction Status\n\n0 = Pending\n\n1 = Completed",
        "format": "int32",
        "x-enumNames": [
          "Pending",
          "Completed"
        ]
      },
      "TransactionType": {
        "enum": [
          0,
          10,
          11,
          20,
          21,
          30,
          44,
          45
        ],
        "type": "integer",
        "description": "Type of transactions\n\n0 = Other\n\n10 = InternalTransfer\n\n11 = InternalTransferFx\n\n20 = ExternalTransfer\n\n21 = BulkTransfer\n\n30 = Card\n\n44 = TransactionFee\n\n45 = OtherFee",
        "format": "int32",
        "x-enumNames": [
          "Other",
          "InternalTransfer",
          "InternalTransferFx",
          "ExternalTransfer",
          "BulkTransfer",
          "Card",
          "TransactionFee",
          "OtherFee"
        ]
      },
      "TransactionTypeSearchFilter": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7
        ],
        "type": "integer",
        "description": "Transaction type search filter\n\n0 = InternalTransfers\n\n1 = ExternalTransfers\n\n2 = BulkTransfers\n\n3 = Card\n\n4 = AccountFees\n\n5 = CardAuthorization\n\n6 = CardFeesAuthorization\n\n7 = CardFees",
        "format": "int32",
        "x-enumNames": [
          "InternalTransfers",
          "ExternalTransfers",
          "BulkTransfers",
          "Card",
          "AccountFees",
          "CardAuthorization",
          "CardFeesAuthorization",
          "CardFees"
        ]
      },
      "TransactionsQuery": {
        "required": [
          "accountNumbers",
          "clientId",
          "fromDate",
          "toDate"
        ],
        "type": "object",
        "properties": {
          "clientId": {
            "minLength": 1,
            "type": "string",
            "description": "The client id which owns the accounts to search"
          },
          "accountNumbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of account numbers to search for"
          },
          "type": {
            "$ref": "#/components/schemas/TransactionTypeSearchFilter"
          },
          "debit": {
            "type": "boolean",
            "description": "If true will return debit transactions\nIf false will not return debit transactions\nDefault is true"
          },
          "credit": {
            "type": "boolean",
            "description": "If true will return credit transactions\nIf false will not return credit transactions\nDefault is true"
          },
          "fromDate": {
            "type": "string",
            "description": "The start date of the query",
            "format": "date-time"
          },
          "toDate": {
            "type": "string",
            "description": "The end date of the query",
            "format": "date-time"
          },
          "paymentDetails": {
            "type": "string",
            "description": "If provided the results will contain transactions that contain this value in the payment details",
            "nullable": true
          },
          "minAmount": {
            "maximum": 999999999999,
            "minimum": 0,
            "type": "number",
            "description": "If provided will return transactions with an amount more or equal to MinAmount",
            "format": "double",
            "nullable": true
          },
          "maxAmount": {
            "maximum": 999999999999,
            "minimum": 0,
            "type": "number",
            "description": "If provided will return transactions with an amount less or equal to MaxAmount",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Query to retrieve transactions posted to an account"
      },
      "ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": { }
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "All API requests must be authenticated using a Bearer token retrieved by the OAuth server",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://auth2.moneygate.com/connect/authorize",
            "tokenUrl": "https://auth2.moneygate.com/connect/token",
            "scopes": {
              "b2b-account-information": "b2b-account-information"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": [
        "b2b-account-information"
      ]
    }
  ]
}