openapi: 3.0.0
servers:
  - url: https://{environment}.ebury.io/
    variables:
      environment:
        default: api
        enum:
          - api
          - sandbox
info:
  description: |
    Ebury API allows customers:
      to retrieve accounts, balances, beneficiaries, and transactions;
      to get buy/sell estimates and quotes, book trades and retrieve trade history;
      to allocate payments to a trade and beneficiary, and to submit payments in bulk;
      to download documents such as trade receipt, payment instruction and payment receipt;
      to manage the authorised persons on their account.
    The Metadata API allows applications to clarify some parts of the Ebury API
      that are impractical to express schematically.
  termsOfService: https://docs.ebury.io/#terms-of-use
  title: Ebury API
  version: "0.1"
paths:
  /account-details:
    get:
      tags:
        - Account details
      summary: Get the list of account details of the referred client
      description: |
        Retrieve the account details of the client, possibly filtered by some criteria
      parameters:
        - name: Authorization
          in: header
          description: The access token
          required: true
          schema:
            type: string
        - name: client_id
          in: query
          description: ID of the client that owns the account details
          required: true
          schema:
            type: string
            minLength: 1
        - name: account_details_type
          in: query
          description: Filter by the type of the account details
          required: false
          schema:
            type: string
            enum:
              - dedicated
              - pooled
        - name: account_id
          in: query
          description: Filter by the unique ID of the account
          required: false
          schema:
            type: string
            minLength: 36
            maxLength: 36
        - name: country
          in: query
          description: Filter by the country of the account details (ISO Code 2)
          required: false
          schema:
            type: string
            minLength: 2
            maxLength: 2
            pattern: '[A-Z]{2}'
        - name: currency
          in: query
          required: false
          description: Filter by the currency of the account details
          schema:
            type: string
            minLength: 3
            maxLength: 3
            pattern: '[A-Z]{3}'
        - name: alias
          in: query
          required: false
          description: |-
            Filter by the user-friendly alias of the account details.
            Only dedicated accounts can be filtered by alias.
          schema:
            type: string
            minLength: 1
            maxLength: 50
        - name: page
          in: query
          description: Page number to retrieve
          required: false
          schema:
            type: integer
            minimum: 1
        - name: page_size
          in: query
          description: Maximum number of items to include in each page
          required: false
          schema:
            type: integer
            minimum: 1
      responses:
        "200":
          description: Account details
          headers:
            x-total-count:
              description: Total number of available entries
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAccountDetailsDomesticInternationalResponse'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "429":
          description: Too many requests
  /account-details-beta: {}
  /account-details/all:
    get:
      tags:
        - Account details
      summary: Get all the account details (pooled, virtual, segregated)
      description: |
        Retrieve the account details of the client all grouped together
      parameters:
        - name: Authorization
          in: header
          description: The access token
          required: true
          schema:
            type: string
        - name: client_id
          in: query
          description: ID of the client that owns the account details
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        "200":
          description: List of account details
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccountDetailsAllResponse'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "404":
          description: Client ID not found
        "429":
          description: Too many requests
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
  account-details/request:
    post:
      tags:
        - Account details
      summary: Request a Dedicated account for a currency+country pair.
      description: |
        Send a request for an Account creation to the Ebury dealers, for a specific currency+country pair. The request can only be sent if the capability is enabled for provided currency and country. Requests are cached to avoid multiple requests for the same account at once.
      parameters:
        - name: Authorization
          in: header
          description: The access token
          required: true
          schema:
            type: string
        - name: client_id
          in: query
          description: ID of the client that owns the account
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestAccount'
        description: Request Payload
        required: true
      responses:
        "200":
          description: Account requested successfully.
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: |
            Missing client_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "409":
          description: |
            Account cannot be requested (capability might be disabled)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "429":
          description: Too many requests
  /account-details/{account_details_id}:
    patch:
      tags:
        - Account details
      summary: Update the alias of an account details
      description: |-
        Change the alias of the referred account details.
        Only dedicated accounts can be patched, trying to patch a pooled account will return an error.
      parameters:
        - name: Authorization
          in: header
          description: The access token
          required: true
          schema:
            type: string
        - name: account_details_id
          in: path
          description: Unique ID of account details
          required: true
          schema:
            type: string
        - name: client_id
          in: query
          description: ID of the client that owns the account
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchAccountDetailsRequest'
        description: Payload to patch the referred account details
        required: true
      responses:
        "200":
          description: Account details updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountDetailsDomesticInternationalResponse'
        "401":
          description: Access denied due to authentication failure
        "404":
          description: Account details not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "405":
          description: Cannot patch pooled account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "422":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "429":
          description: Too many requests
  /account-details/{account_details_id}/make-default:
    post:
      tags:
        - Account details
      summary: Mark the account as primary (default) for its holder and currency
      description: |
        Mark the account as primary (default) for its holder and currency.
        Only dedicated accounts can be set as primary, trying this operation for a pooled account will return an error.
      parameters:
        - name: Authorization
          in: header
          description: The access token
          required: true
          schema:
            type: string
        - name: account_details_id
          in: path
          description: Unique ID of account details
          required: true
          schema:
            type: string
            format: uuid
        - name: client_id
          in: query
          description: ID of the client that owns the account
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        "204":
          description: Account details marked as primary
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: |
            Missing client_id
            Access token not valid for the requested client_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Account details not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "405":
          description: Cannot make default a pooled account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "409":
          description: |
            Account details not active.
            Invalid client ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "429":
          description: Too many requests
  /account-details/virtual/<currency>:
    post:
      tags:
        - Account details
      summary: Assign a new Virtual account for a currency
      description: |
        Assigns a virtual account to a currency the customer is allowed to assign virtual accounts for. Only one Dedicated (virtual+segregated) account per currency is allowed.
      parameters:
        - name: Authorization
          in: header
          description: The access token
          required: true
          schema:
            type: string
        - name: currency
          in: path
          description: Currency code of the Virtual account to assign
          required: true
          schema:
            type: string
        - name: client_id
          in: query
          description: ID of the client that owns the account
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        "200":
          description: Virtual account assigned
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VirtualAccountDetails'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: |
            Missing client_id
            Access token not valid for the requested client_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "409":
          description: |
            Conflict assigning account (another one might already exist).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "429":
          description: Too many requests
  /accounts:
    get:
      description: |
        Retrieve a list of accounts for a given client ID and a list of currencies
      parameters:
        - description: A comma-separated list of currencies
          in: query
          name: currencies
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Accounts retrieved
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AccountData'
                type: array
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "409":
          description: Could not update contact due to data constraint or conflict with contact status. Refer to error message for additional details
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Retrieve a list of accounts
      tags:
        - Accounts
      x-tags:
        - tag: Accounts
  /accounts/{account_id}:
    get:
      description: Get an account with a specific UUID
      parameters:
        - description: Account UUID
          in: path
          name: account_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Returns the requested account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountData'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID or account UUID not found
        "409":
          description: Could not update contact due to data constraint or conflict with contact status. Refer to error message for additional details
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get an account
      tags:
        - Accounts
      x-tags:
        - tag: Accounts
  /funding-account:
    get:
      description: |
        Get a pre-selected funding account for a client by currency or account ID. Exactly one of currency or account_id must be provided.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: Currency code (ISO 4217). Either currency or account_id required.
          in: query
          name: currency
          required: false
          schema:
            type: string
            minLength: 3
            maxLength: 3
            pattern: '[A-Z]{3}'
        - description: Account UUID. Either currency or account_id required.
          in: query
          name: account_id
          required: false
          schema:
            type: string
            minLength: 36
            maxLength: 36
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Returns the funding account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FundingAccountData'
        "400":
          description: Validation error - must provide exactly one of currency or account_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "404":
          description: No funding account found for the specified criteria
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get funding account
      tags:
        - Accounts
      x-tags:
        - tag: Accounts
  /accounts/currency-accounts:
    get:
      description: |
        Retrieve a simplified list of currency accounts for a given client. Returns account IDs and their associated currencies.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Returns the list of currency accounts
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    account_id:
                      type: integer
                      description: The unique identifier of the currency account
                      example: 1844
                    currency:
                      type: string
                      description: The currency code (ISO 4217)
                      pattern: '[A-Z]{3}'
                      example: GBP
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Retrieve currency accounts
      tags:
        - Accounts
      x-tags:
        - tag: Accounts
  /accounts/{account_id}/balances:
    get:
      description: Retrieve all balances for a single account by account ID
      parameters:
        - description: The UUID of the account
          in: path
          name: account_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The balance types to be retrieved. Multiple types can be specified by repeating the parameter (e.g., balance_types=InterimAvailable&balance_types=Outgoing).
          in: query
          name: balance_types
          required: false
          style: form
          explode: true
          schema:
            type: array
            default:
              - InterimAvailable
            items:
              type: string
              enum:
                - InterimAvailable
                - RequiredFunds
                - RequiredFundsImmediate
                - Outgoing
                - Incoming
                - InitialMargin
                - MarginCall
                - Processing
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Returns the requested balance
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BalanceData'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID or account UUID not found
        "409":
          description: Could not update contact due to data constraint or conflict with contact status. Refer to error message for additional details
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get a balance for a single account
      tags:
        - Balances
      x-tags:
        - tag: Balances
  /accounts/{account_id}/statements/file:
    post:
      description: Generate a statement asynchronously in PDF, CSV, MT940 or XLS format for a given account.
      parameters:
        - description: Account UUID
          in: path
          name: account_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
        - description: The format of the statement to generate
          in: query
          name: format
          required: false
          schema:
            type: string
            default: pdf
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewStatement'
        description: Request Payload
        required: true
      responses:
        "202":
          description: Statement processing started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementFileData'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "409":
          description: Could not update contact due to data constraint or conflict with contact status. Refer to error message for additional details
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Create statement file for an account
      tags:
        - Statements Create
      x-tags:
        - tag: Accounts
  /accounts/{account_id}/statements/{statement_id}/file:
    get:
      description: Get a statement for a given account by UUID
      parameters:
        - description: Account UUID
          in: path
          name: account_id
          required: true
          schema:
            type: string
        - description: Statement UUID
          in: path
          name: statement_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Returns the requested statement file
        "202":
          description: Returns the current status of the statement
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementFileStatus'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID or account UUID not found
        "409":
          description: Could not update contact due to data constraint or conflict with contact status. Refer to error message for additional details
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get an account
      tags:
        - Statement Fetch
      x-tags:
        - tag: Statements
  /statements/accounts:
    post:
      description: |
        Request an accounts statement to be sent via email. The statement will be generated asynchronously and sent to the client's registered email address. Supports pdf, csv, xls and coda formats.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - date_from
                - date_to
              properties:
                date_from:
                  type: string
                  format: date
                  description: Start date for the statement (YYYY-MM-DD)
                  example: "2020-01-01"
                date_to:
                  type: string
                  format: date
                  description: End date for the statement (YYYY-MM-DD)
                  example: "2020-01-31"
                format:
                  type: string
                  enum:
                    - pdf
                    - csv
                  default: pdf
                  description: The format of the statement
                currencies:
                  type: string
                  pattern: ^([A-Z]{3},?)+$
                  description: Comma-separated list of currency codes (ISO 4217)
                  example: EUR,GBP,USD
        description: Statement request parameters
        required: true
      responses:
        "202":
          description: Request accepted, you will receive an email with the statement
          content:
            text/plain:
              schema:
                type: string
                example: Request accepted, you will receive an email with the statement.
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Request accounts statement via email
      tags:
        - Statements
      x-tags:
        - tag: Statements
  /statements/mt940:
    post:
      description: |
        Request an MT940 statement to be sent via email. The statement will be generated asynchronously and sent to the client's registered email address.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - date_from
              properties:
                date_from:
                  type: string
                  format: date
                  description: Start date for the statement (YYYY-MM-DD)
                  example: "2020-01-01"
                date_to:
                  type: string
                  format: date
                  description: End date for the statement (YYYY-MM-DD)
                  example: "2020-01-31"
                account_ids:
                  type: array
                  items:
                    type: integer
                  description: List of account IDs to include. If not provided, all accounts will be included.
                  example:
                    - 1844
                    - 1850
                sub_tags:
                  type: boolean
                  default: false
                  description: Whether to include sub-tags in the MT940 format
        description: MT940 statement request parameters
        required: true
      responses:
        "202":
          description: Request accepted, you will receive an email with the statement
          content:
            text/plain:
              schema:
                type: string
                example: Request accepted, you will receive an email with the statement.
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Request MT940 statement via email
      tags:
        - Statements
      x-tags:
        - tag: Statements
  /statements/trades:
    post:
      description: |
        Request a trades statement to be sent via email. The statement will be generated asynchronously and sent to the client's registered email address. Date format can be either YYYY-MM (monthly) or YYYY-MM-DD (daily).
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - date_from
              properties:
                date_from:
                  type: string
                  description: Date for the statement in YYYY-MM or YYYY-MM-DD format. Cannot be in the future.
                  pattern: ^\d{4}-\d{2}(-\d{2})?$
                  example: 2020-01
        description: Trades statement request parameters
        required: true
      responses:
        "202":
          description: Request accepted, you will receive an email with the statement
          content:
            text/plain:
              schema:
                type: string
                example: Request accepted, you will receive an email with the statement.
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Request trades statement via email
      tags:
        - Statements
      x-tags:
        - tag: Statements
  /statements/incoming-funds:
    post:
      description: |
        Request an incoming funds statement to be sent via email. The statement will be generated asynchronously and sent to the client's registered email address. Supports csv, pdf and xlx formats.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - date_from
                - date_to
              properties:
                date_from:
                  type: string
                  format: date
                  description: Start date for the statement (YYYY-MM-DD)
                  example: "2020-01-13"
                date_to:
                  type: string
                  format: date
                  description: End date for the statement (YYYY-MM-DD)
                  example: "2020-01-31"
                format:
                  type: string
                  enum:
                    - csv
                    - pdf
                  default: csv
                  description: The format of the statement
        description: Incoming funds statement request parameters
        required: true
      responses:
        "202":
          description: Request accepted, you will receive an email with the statement
          content:
            text/plain:
              schema:
                type: string
                example: Request accepted, you will receive an email with the statement.
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Request incoming funds statement via email
      tags:
        - Statements
      x-tags:
        - tag: Statements
  /accounts/{account_id}/transactions:
    get:
      description: Retrieve all transactions for a single account by account ID, optionally filtered by value date and time with pagination support
      parameters:
        - description: The UUID of the account
          in: path
          name: account_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: Filter transactions by debit/credit type
          in: query
          name: credit_debit_indicator
          required: false
          schema:
            type: string
            enum:
              - credit
              - debit
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
        - description: Only return transactions with value date and time after this UTC date and time. YYYY-MM-DDThh:mm format
          in: query
          name: from_value_datetime
          schema:
            type: string
        - description: Only return transactions with value date and time before this UTC date and time. YYYY-MM-DDThh:mm format
          in: query
          name: to_value_datetime
          schema:
            type: string
        - description: The desired page number for pagination
          in: query
          name: page
          schema:
            type: integer
            default: 1
        - description: The number of items per page for pagination
          in: query
          name: page_size
          schema:
            type: integer
            default: 50
        - $ref: '#/components/parameters/TransactionTypeFilter'
      responses:
        "200":
          description: Returns the requested transactions
          headers:
            x-total-count:
              description: Total number of available entries
              schema:
                type: integer
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TransactionData'
                type: array
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID or account UUID not found
        "409":
          description: Could not update contact due to data constraint or conflict with contact status. Refer to error message for additional details
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "504":
          description: Timeout error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get transactions for a single account
      tags:
        - Transactions
      x-tags:
        - tag: Transactions
  /accounts/{account_id}/transactions/{transaction_id}:
    get:
      description: Retrieve a single transaction for an account by account id and transaction id
      parameters:
        - description: The UUID of the account
          in: path
          name: account_id
          required: true
          schema:
            type: string
        - description: The UUID of the transaction
          in: path
          name: transaction_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Returns the requested transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionData'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID or account UUID not found
        "409":
          description: Could not update contact due to data constraint or conflict with contact status. Refer to error message for additional details
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "504":
          description: Timeout error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get a single transactions for an account
      tags:
        - Transactions
      x-tags:
        - tag: Transactions
  /approvals-workflow/config:
    get:
      description: Get the Approvals Workflow configuration for a given client ID, including both the groups and the rules defined for the client.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Client Approvals Workflow configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalsWorkflowConfig'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID or config for the specified client not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get the Approvals Workflow configuration
      tags:
        - Approvals Workflow
      x-tags:
        - tag: Approvals Workflow
    post:
      description: Update the full Approvals Workflow configuration for a specific client. This requires sending the complete configuration, including both the groups and the rules.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApprovalsWorkflowConfig'
        description: Client Approvals Workflow configuration to be set
        required: true
      responses:
        "200":
          description: Updated client Approvals Workflow configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalsWorkflowConfig'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID or config for the specific client not found. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "409":
          description: A request to update the configuration already exists. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "500":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Update the Approvals Workflow configuration
      tags:
        - Approvals Workflow
      x-tags:
        - tag: Approvals Workflow
  /approvals-workflow/settings:
    get:
      description: Get the Approvals Workflow seetings for a given client ID
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Client Approvals Workflow settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalsWorkflowSettings'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID or settings for the client not found
        "500":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get the Approvals Workflow settings
      tags:
        - Approvals Workflow
      x-tags:
        - tag: Approvals Workflow
    post:
      description: Update the Approvals Workflow settings for a specific client.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApprovalsWorkflowSettings'
        description: Client Approvals Workflow settings to be set
        required: true
      responses:
        "200":
          description: Updated client Approvals Workflow settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalsWorkflowSettings'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID or settings for the client not found. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "500":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Update the Approvals Workflow settings
      tags:
        - Approvals Workflow
      x-tags:
        - tag: Approvals Workflow
  /authenticate:
    get:
      tags:
        - OAuth2.0
      summary: Authenticate
      description: Retrieve the login template
      parameters:
        - name: scope
          in: query
          description: The OAuth 2.0 scope parameter. Must include the value openid. No other values required.
          required: true
          schema:
            type: string
        - name: response_type
          in: query
          description: The response type required from the Authorization Server. This must be set to code
          required: true
          schema:
            type: string
            enum:
              - code
        - name: client_id
          in: query
          description: Your Authorization Client ID, identifies your application to the Authorisation Server
          required: true
          schema:
            type: string
        - name: redirect_uri
          in: query
          description: The redirect URL that is registered for your application. This must match the value we hold.
          required: true
          schema:
            type: string
        - name: state
          in: query
          description: The OAuth 2.0 state parameter.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: HTML login template
          content:
            application/json:
              schema:
                type: string
            text/html:
              schema:
                type: string
        "400":
          description: Formatting or schema validation error or invalid data.See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
            text/html:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
        "429":
          description: Too many requests
          content: {}
        "495":
          description: Certificate Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
            text/html:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
    post:
      tags:
        - OAuth2.0
      summary: Authenticate
      description: Retrieve the login template
      requestBody:
        description: The OAuth 2.0 state parameter.
        content:
          '*/*': {}
        required: true
      responses:
        "200":
          description: HTML login template
          content:
            application/json:
              schema:
                type: string
            text/html:
              schema:
                type: string
        "400":
          description: Formatting or schema validation error or invalid data.See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
            text/html:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "429":
          description: Too many requests
          content: {}
        "495":
          description: Certificate Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
            text/html:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      x-codegen-request-body-name: state
  /balances:
    get:
      description: Retrieve a list of the client's balances, optionally filtered by currency
      parameters:
        - description: A comma-separated list of currency codes compliant to ISO 4217
          in: query
          name: currencies
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The balance types to be retrieved. Multiple types can be specified by repeating the parameter (e.g., balance_types=InterimAvailable&balance_types=Outgoing).
          in: query
          name: balance_types
          required: false
          style: form
          explode: true
          schema:
            type: array
            default:
              - InterimAvailable
            items:
              type: string
              enum:
                - InterimAvailable
                - RequiredFunds
                - RequiredFundsImmediate
                - Outgoing
                - Incoming
                - InitialMargin
                - MarginCall
                - Processing
        - description: Page number (1-indexed) for paginated results
          in: query
          name: page
          required: false
          schema:
            type: integer
            minimum: 1
        - description: Number of items per page (default 50, max 100)
          in: query
          name: page_size
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - description: Field to sort results by. Use 'currency' to sort alphabetically by currency code, or a balance type name to sort by that balance's amount.
          in: query
          name: sort_by
          required: false
          schema:
            type: string
            enum:
              - currency
              - InterimAvailable
              - RequiredFunds
              - RequiredFundsImmediate
              - Outgoing
              - Incoming
              - InitialMargin
              - MarginCall
              - Processing
        - description: Sort order for results
          in: query
          name: sort_order
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
        - description: Comma-separated list of currency codes to pin to the top of results
          in: query
          name: pinned_currencies
          required: false
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: A list with the client's balances.
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/BalanceData'
                type: array
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "409":
          description: Could not update contact due to data constraint or conflict with contact status. Refer to error message for additional details
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Retrieve a list of the client's balances
      tags:
        - Balances
      x-tags:
        - tag: Balances
  /currencies:
    get:
      description: Retrieve a list of the client's currencies, optionally filtered by trade_type
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The trade types to be retrieved
          in: query
          name: trade_type
          required: false
          schema:
            type: string
            default: spot
            enum:
              - spot
              - forward
      responses:
        "200":
          description: A list with the client's currencies.
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/CurrencyInfo'
                type: array
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Retrieve a list of the client's currencies
      tags:
        - Currencies
      x-tags:
        - tag: Currencies
  /beneficiaries:
    get:
      description: Get all beneficiaries for a given client.
      operationId: beneficiaries_get
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: Filter. The account number of the beneficiary you want to search.
          in: query
          name: account_number
          required: false
          schema:
            type: string
        - description: Filter. The iban of the account of the beneficiary you want to search.
          in: query
          name: iban
          required: false
          schema:
            type: string
        - description: Filter. The bank identifier of the account of the beneficiary you want to search.
          in: query
          name: bank_identifier
          required: false
          schema:
            type: string
        - description: The desired page number for pagination. By default is 1.
          in: query
          name: page
          required: false
          schema:
            type: integer
            format: int32
        - description: The number of items per page for pagination. By default is 50.
          in: query
          name: page_size
          required: false
          schema:
            type: integer
            format: int32
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          $ref: '#/components/responses/BeneficiaryList'
        "400":
          $ref: '#/components/responses/ValidationError'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/Forbidden'
        "404":
          $ref: '#/components/responses/ClientNotFound'
        "502":
          $ref: '#/components/responses/IntegrationError'
      summary: Get beneficiaries
      tags:
        - Beneficiaries
    parameters:
      - $ref: '#/components/parameters/ClientId'
      - $ref: '#/components/parameters/Authorization'
      - $ref: '#/components/parameters/XContactID'
    post:
      description: Create a new beneficiary. Beneficiary will require verification before payments can be made.
      operationId: beneficiaries_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewBeneficiary'
        description: Request payload.
        required: true
      responses:
        "201":
          $ref: '#/components/responses/BeneficiaryCreated'
        "400":
          $ref: '#/components/responses/ValidationError'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/Forbidden'
        "404":
          $ref: '#/components/responses/ClientNotFound'
        "409":
          $ref: '#/components/responses/Conflict'
        "502":
          $ref: '#/components/responses/IntegrationError'
      summary: Create a new beneficiary
      tags:
        - Beneficiaries
  /beneficiaries/{beneficiary_id}:
    delete:
      description: Delete a beneficiary by beneficiary's identifier.
      operationId: beneficiary_delete
      responses:
        "204":
          $ref: '#/components/responses/BeneficiaryDeleted'
        "400":
          $ref: '#/components/responses/ValidationError'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/Forbidden'
        "404":
          $ref: '#/components/responses/BeneficiaryOrClientNotFound'
        "502":
          $ref: '#/components/responses/IntegrationError'
      summary: Delete a beneficiary
      tags:
        - Beneficiaries
    get:
      description: Get a beneficiary by beneficiary's identifier.
      operationId: beneficiary_get
      responses:
        "200":
          $ref: '#/components/responses/Beneficiary'
        "400":
          $ref: '#/components/responses/ValidationError'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/Forbidden'
        "404":
          $ref: '#/components/responses/BeneficiaryOrClientNotFound'
        "502":
          $ref: '#/components/responses/IntegrationError'
      summary: Get a beneficiary
      tags:
        - Beneficiaries
    parameters:
      - $ref: '#/components/parameters/BeneficiaryId'
      - $ref: '#/components/parameters/ClientId'
      - $ref: '#/components/parameters/Authorization'
      - $ref: '#/components/parameters/XContactID'
    patch:
      description: Update a beneficiary by beneficiary's identifier.
      operationId: beneficiary_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBeneficiary'
        description: List of field names and values for update an existing beneficiary.
        required: true
      responses:
        "204":
          $ref: '#/components/responses/BeneficiaryUpdated'
        "400":
          $ref: '#/components/responses/ValidationError'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/Forbidden'
        "404":
          $ref: '#/components/responses/BeneficiaryOrClientNotFound'
        "409":
          $ref: '#/components/responses/Forbidden'
        "502":
          $ref: '#/components/responses/IntegrationError'
      summary: Update a beneficiary
      tags:
        - Beneficiaries
  /clients:
    get:
      description: Get all clients for a contact.
      operationId: clients_get
      responses:
        "200":
          $ref: '#/components/responses/ClientList'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "429":
          description: Too many requests
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get clients
      tags:
        - Clients
    parameters:
      - $ref: '#/components/parameters/Authorization'
      - $ref: '#/components/parameters/XContactID'
      - name: brand
        in: query
        description: Filter clients by brand code (e.g., EBP, FXF)
        required: false
        schema:
          type: string
  /contacts:
    get:
      description: Get all contacts for a given client.
      operationId: contacts_get
      responses:
        "200":
          $ref: '#/components/responses/ContactList'
        "400":
          $ref: '#/components/responses/ValidationError'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/Forbidden'
        "404":
          $ref: '#/components/responses/ClientNotFound'
        "502":
          $ref: '#/components/responses/IntegrationError'
      summary: Get contacts
      tags:
        - Contacts
    parameters:
      - $ref: '#/components/parameters/ClientId'
      - $ref: '#/components/parameters/Authorization'
      - $ref: '#/components/parameters/XContactID'
  /contacts/{contact_id}:
    get:
      description: Get a contact by contact's identifier.
      operationId: contact_get
      responses:
        "200":
          $ref: '#/components/responses/Contact'
        "400":
          $ref: '#/components/responses/ValidationError'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/Forbidden'
        "404":
          $ref: '#/components/responses/ContactOrClientNotFound'
        "502":
          $ref: '#/components/responses/IntegrationError'
      summary: Get a contact
      tags:
        - Contacts
    parameters:
      - $ref: '#/components/parameters/ContactId'
      - $ref: '#/components/parameters/ClientId'
      - $ref: '#/components/parameters/Authorization'
      - $ref: '#/components/parameters/XContactID'
    patch:
      description: Update a contact by contact's identifier.
      operationId: contact_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactUpdate'
        description: List of field names and values for update an existing contact.
        required: true
      responses:
        "204":
          $ref: '#/components/responses/ContactUpdated'
        "400":
          $ref: '#/components/responses/ValidationError'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/Forbidden'
        "404":
          $ref: '#/components/responses/ContactOrClientNotFound'
        "409":
          $ref: '#/components/responses/Conflict'
        "502":
          $ref: '#/components/responses/IntegrationError'
      summary: Update a contact
      tags:
        - Contacts
  /documents:
    get:
      description: Get a document for a given client.
      operationId: document_get
      responses:
        "200":
          $ref: '#/components/responses/Document'
        "400":
          $ref: '#/components/responses/ValidationError'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/Forbidden'
        "404":
          $ref: '#/components/responses/DocumentOrClientNotFound'
        "502":
          $ref: '#/components/responses/IntegrationError'
      summary: Get a document
      tags:
        - Documents
    parameters:
      - $ref: '#/components/parameters/Type'
      - $ref: '#/components/parameters/Id'
      - $ref: '#/components/parameters/ClientId'
      - $ref: '#/components/parameters/Authorization'
      - $ref: '#/components/parameters/XContactID'
  /drawdowns:
    post:
      description: |
        Create a drawdown from an existing forward trade. You need to have a valid forward trade_id to create a drawdown.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The ID of the forward trade to draw down from
          in: query
          name: trade_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewDrawdown'
        description: Request Payload
        required: true
      responses:
        "201":
          description: Drawdown created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmedDrawdown'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client or trade ID not found
        "409":
          description: Requested drawdown causes a conflict that can be corrected, see response body for details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Create a drawdown
      tags:
        - Drawdowns
      x-tags:
        - tag: Drawdowns
  /drawdowns/available_margin:
    post:
      description: |
        Calculate the amount of initial margin that is currently available on a window forward so you can determine how much of a drawdown can be funded from margin.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The ID of the forward trade to draw down from
          in: query
          name: trade_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DrawdownAvailableMarginRequest'
        description: Request Payload
        required: true
      responses:
        "200":
          description: Available margin calculated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DrawdownAvailableMargin'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client or trade ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get available drawdown margin
      tags:
        - Drawdowns
      x-tags:
        - tag: Drawdowns
  /info/available-contacts:
    get:
      tags:
        - OAuth2.0
      summary: Available contacts
      description: Get the available contacts of a client
      parameters:
        - name: Authorization
          in: header
          description: Where credentials is a Base64 encoded string of auth_client_id:auth_client_secret
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Listf of contacts IDs that are from the given client
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactsList'
        "400":
          description: Formatting or schema validation error or invalid data.See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
        "429":
          description: Too many requests
          content: {}
        "495":
          description: Certificate Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
  /login:
    post:
      tags:
        - OAuth2.0
      summary: Login
      description: Retrieve the login template
      parameters:
        - name: password
          in: query
          description: Your password
          required: true
          schema:
            type: string
            enum:
              - code
      requestBody:
        description: The OAuth 2.0 state parameter.
        content:
          '*/*': {}
        required: true
      responses:
        "200":
          description: HTML 2FA template
          content:
            application/json:
              schema:
                type: string
            text/html:
              schema:
                type: string
        "302":
          description: Redirect to your redirect_url
          content:
            application/json:
              schema:
                type: string
            text/html:
              schema:
                type: string
        "400":
          description: Formatting or schema validation error or invalid data.See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
            text/html:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
        "401":
          description: Unauthorized. See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
            text/html:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
        "429":
          description: Too many requests
          content: {}
        "495":
          description: Certificate Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
            text/html:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
      x-codegen-request-body-name: state
  /metadata/beneficiary:
    get:
      description: Describe a new beneficiary.
      responses:
        "200":
          $ref: '#/components/responses/BeneficiaryMetadata'
        "400":
          $ref: '#/components/responses/ValidationError'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/Forbidden'
        "502":
          $ref: '#/components/responses/IntegrationError'
      summary: Get beneficiary metadata
      tags:
        - Metadata
  /metadata/currency:
    get:
      description: Describe a currency.
      responses:
        "200":
          $ref: '#/components/responses/CurrencyMetadata'
        "400":
          $ref: '#/components/responses/ValidationError'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/Forbidden'
        "502":
          $ref: '#/components/responses/IntegrationError'
      summary: Get currency metadata
      tags:
        - Metadata
    parameters:
      - $ref: '#/components/parameters/DataOnly'
  /multipayments:
    post:
      description: Create a new multi payment instruction. Requires either a sell currency or existing trade ID to create the instruction
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: Trade ID to book payments against. Omit if trade should be executed to fund payments
          in: query
          name: trade_id
          required: false
          schema:
            type: string
        - description: If trade_id omitted, a sell currency must be supplied
          in: query
          name: sell_currency
          required: false
          schema:
            type: string
        - description: Accept a partially successful instruction. If true, send successful instructions for payment. If false, reject the entire instruction
          in: query
          name: accept_partial
          required: false
          schema:
            type: boolean
            default: true
        - description: Set to true. Accept quote immediately, do not require confirmation
          in: query
          name: accept_immediately
          required: true
          schema:
            type: boolean
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
        - description: VoP authorization ID to confirm not full-match payment
          in: query
          name: vop_authorization_id
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewMultiPayment'
        description: Request Payload
        required: true
      responses:
        "201":
          description: Multi payment created, see response body for status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MultiPaymentResponse'
        "202":
          description: Multi payment accepted with errors, see response body for status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MultiPaymentResponse'
        "400":
          description: Formatting or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "409":
          description: All payments invalid or partial instruction not allowed, see response body for details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MultiPaymentErrorMessage'
        "422":
          description: VoP check failed, or provided `vop_authorization_id` is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Create a multi payment instruction
      tags:
        - Multi Payments
      x-tags:
        - tag: Multi Payments
  /multipayments/{multipayment_id}:
    delete:
      description: Rejects a multi payment trade and cancels the payments
      parameters:
        - description: The multi payment ID
          in: path
          name: multipayment_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "204":
          description: Multi payment rejected
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Multi payment or client ID not found
        "409":
          description: Multi payment already rejected
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Rejects a multi payment
      tags:
        - Multi Payments
      x-tags:
        - tag: Multi Payments
    patch:
      description: Accept a multi payment generated trade and book in payments
      parameters:
        - description: The multi payment ID
          in: path
          name: multipayment_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Multi payment accepted and payments booked (pending back office operations)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccount'
        "400":
          description: Formatting or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Multi payment or client ID not found
        "409":
          description: Multi payment already accepted or rejected
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Accept a multi payment
      tags:
        - Multi Payments
      x-tags:
        - tag: Multi Payments
  /mass-payments:
    get:
      description: Fetch payment instructions of a mass payment
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the multipayment
          in: query
          name: mass_payment_id
          required: false
          schema:
            type: string
        - description: The external reference of the multipayment
          in: query
          name: external_reference_id
          required: false
          schema:
            type: string
        - description: The sell currency of the multipayment
          in: query
          name: sell_currency
          required: false
          schema:
            type: string
        - description: The desired page number for pagination. By default is 1.
          in: query
          name: page
          required: false
          schema:
            type: integer
            format: int32
        - description: The number of items per page for pagination. By default is 50.
          in: query
          name: page_size
          required: false
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: List of payment instructions
          headers:
            x-total-count:
              description: Total number of payment instructions available
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMassPaymentsResponse'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "409":
          description: Invalid mass payment id
        "429":
          description: Too many requests
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Fetch payment instructions of a mass payment
      tags:
        - Multi Payments
      x-tags:
        - tag: Multi Payments
    post:
      description: Submit mass payment request in async mode. Requires either a sell currency or existing trade ID to create the instruction
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
        - description: VoP authorization ID to confirm not full-match payment
          in: query
          name: vop_authorization_id
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewMassPayment'
        description: Request Payload
        required: true
      responses:
        "202":
          description: Masspayment request accepted, see response body for status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MassPaymentResponse'
        "400":
          description: Formatting or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "422":
          description: VoP check failed, or provided `vop_authorization_id` is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "502":
          description: Internal integration error. Contact support,
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Create a mass payment instruction
      tags:
        - Multi Payments
      x-tags:
        - tag: Multi Payments
  /mass-payments/{mass_payment_id}/confirm:
    post:
      description: Confirm (commit) mass payment instructions, which can be hold because `auto_commit` was false, or because there were some errors.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "202":
          description: Masspayment confirmation accepted, see response body for status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MassPaymentResponse'
        "400":
          description: Formatting or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "502":
          description: Internal integration error. Contact support,
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Confirm multi payment instructions
      tags:
        - Multi Payments
      x-tags:
        - tag: Multi Payments
  /mass-payments/{mass_payment_id}/payments-received:
    get:
      description: Fetch the payment instructions submitted for a mass payment
      parameters:
        - description: The mass payment ID
          in: path
          name: mass_payment_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The desired page number for pagination. By default is 1.
          in: query
          name: page
          required: false
          schema:
            type: integer
            format: int32
        - description: The number of items per page for pagination. By default is 50.
          in: query
          name: page_size
          required: false
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: List of payment instructions
          headers:
            x-total-count:
              description: Total number of payment instructions available
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MassPaymentPaymentsReceivedResponse'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "409":
          description: Invalid mass payment id
        "429":
          description: Too many requests
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Fetch the payment instructions submitted for a mass payment
      tags:
        - Multi Payments
      x-tags:
        - tag: Multi Payments
  /mass-payments/{mass_payment_id}/errors:
    get:
      description: Fetch the payment instructions with errors for a mass payment
      parameters:
        - description: The mass payment ID
          in: path
          name: mass_payment_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The desired page number for pagination. By default is 1.
          in: query
          name: page
          required: false
          schema:
            type: integer
            format: int32
        - description: The number of items per page for pagination. By default is 50.
          in: query
          name: page_size
          required: false
          schema:
            type: integer
            format: int32
        - description: Filter by payment currency
          in: query
          name: payment_currency
          required: false
          schema:
            type: string
      responses:
        "200":
          description: List of payment instructions with errors
          headers:
            x-total-count:
              description: Total number of payment instructions with errors available
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MassPaymentErrorsResponse'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "409":
          description: Invalid mass payment id
        "429":
          description: Too many requests
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Fetch the payment instructions with errors for a mass payment
      tags:
        - Multi Payments
      x-tags:
        - tag: Multi Payments
  /payments:
    get:
      description: Search or retrieve all payments for a given client ID
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The ID of the Payment(could be more than one, comma separated)
          in: query
          name: payment_ids
          required: true
          example: PI001,PI002
          schema:
            type: string
        - description: Filter by related mass payment's uuid.
          in: query
          name: mass_payment_id
          required: false
          schema:
            type: string
        - description: Filter by related mass payment's external reference.
          in: query
          name: mass_payment_external_reference_id
          required: false
          schema:
            type: string
        - description: Filter by payment currencies
          in: query
          name: payment_currency
          required: false
          example: EUR,USD
          schema:
            type: string
        - description: Filter by amount. Requires 'amount_range' to be provided.
          in: query
          name: amount
          required: false
          schema:
            type: integer
            format: int32
        - description: Filter by amount range. Requires 'amount' to be provided.
          in: query
          name: amount_range
          schema:
            type: string
            enum:
              - over
              - below
              - equal
            required: false
        - description: The desired page number for pagination. By default is 1.
          in: query
          name: page
          required: false
          schema:
            type: integer
            format: int32
        - description: The number of items per page for pagination. By default is 50.
          in: query
          name: page_size
          required: false
          schema:
            type: integer
            format: int32
        - description: Sort direction for results.
          in: query
          name: order
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - description: Field used to sort results.
          in: query
          name: order_by
          required: false
          schema:
            type: string
            enum:
              - order_date
              - value_date
            default: order_date
        - description: Filter payments by reference.
          in: query
          name: reference
          required: false
          schema:
            type: string
        - description: Filter payments by trade_id.
          in: query
          name: trade_id
          required: false
          schema:
            type: string
        - description: Filter by beneficiary ID.
          in: query
          name: beneficiary_id
          required: false
          schema:
            type: string
        - description: Filter payments by from_payment_date.
          in: query
          name: from_payment_date
          required: false
          schema:
            type: string
            format: date
        - description: Filter payments by to_payment_date.
          in: query
          name: to_payment_date
          required: false
          schema:
            type: string
            format: date
        - description: Filter payments by from_created_date.
          in: query
          name: from_created_date
          required: false
          schema:
            type: string
            format: date
        - description: Filter payments by to_created_date.
          in: query
          name: to_created_date
          required: false
          schema:
            type: string
            format: date
        - description: Filter payments by status (and NEyes Plus status (if available)).
          in: query
          name: status
          required: false
          schema:
            enum:
              - pending
              - pending_to_authorise
              - authorised
              - cancelled
              - rejected
              - complete
              - pending_your_approval
              - pending_others_approval
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Client payments
          headers:
            x-total-count:
              description: Total number of available entries
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentsWithApprovalFields'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Search or retrieve payments
      tags:
        - Payments
      x-tags:
        - tag: Payments
    post:
      description: Create one or more payments with an existing trade_id, beneficiary ID and account ID. Payment processing can be made asynchronous by setting the async flag in the request body.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
        - description: VoP authorization ID to confirm not full-match payment
          in: query
          name: vop_authorization_id
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewPayment'
        description: Request Payload
        required: true
      responses:
        "201":
          description: Payment(s) created synchronously
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/NewPaymentItem'
                type: array
        "204":
          description: Payment(s) processing started (asynchronously)
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/NewPaymentItem'
                type: array
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Trade, beneficiary or account ID not found. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "409":
          description: Payment instruction could not be completed due to issues with input data. See error message for further details. NB if multiple payments were sent all will fail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "422":
          description: VoP check failed, or provided `vop_authorization_id` is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Create one or more payments
      tags:
        - Payments
      x-tags:
        - tag: Payments
  /payments/{payment_id}:
    delete:
      description: Delete a payment with a given payment ID
      parameters:
        - description: Unique idenifier for payment
          in: path
          name: payment_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "204":
          description: Payment successfully deleted
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Payment or client ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Delete a payment
      tags:
        - Payments
      x-tags:
        - tag: Payments
    get:
      description: Retrieve a payment with a given payment ID
      parameters:
        - description: Unique idenifier for payment
          in: path
          name: payment_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: The client payment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentWithApprovalFields'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client or payment ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Retrieve a payment
      tags:
        - Payments
      x-tags:
        - tag: Payments
    patch:
      description: |
        Authorise or reject a payment with a given payment ID (the requirement to authorise or reject payments depends on your account configuration)

        Note that a **different** Contact ID to needs to be used to authorise payments
      parameters:
        - description: Unique idenifier for payment
          in: path
          name: payment_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The action to take (authorise or reject)
          in: query
          name: action
          required: true
          schema:
            type: string
            enum:
              - authorise
              - reject
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "204":
          description: Payment successfully authorised or rejected
        "400":
          description: Formatting or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Payment or client ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Authorise or reject a payment
      tags:
        - Payments
      x-tags:
        - tag: Payments
  /payments/fees:
    get:
      tags:
        - Payments
      summary: Get the fee of payments
      description: Retrieve the payment fee for sending a payment
      parameters:
        - name: client_id
          in: query
          description: The ID of the client
          required: true
          schema:
            type: string
        - name: beneficiary_id
          in: query
          description: The ID of the beneficiary
          required: true
          schema:
            type: string
        - name: Authorization
          description: The access token
          in: header
          required: true
          schema:
            type: string
        - name: payment_amount
          in: query
          description: The amount of the payment
          required: true
          schema:
            type: number
            format: float
      responses:
        "200":
          description: The payment estimate fee
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentFee'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Forbidden
        "404":
          description: Client ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      x-tags:
        - tag: Payments
  /payments/fees_estimate:
    get:
      tags:
        - Payments
      summary: Get the estimate fee of payments
      description: Retrieve the potential payment fee for sending a payment
      parameters:
        - name: client_id
          in: query
          description: The ID of the client
          required: true
          schema:
            type: string
        - name: Authorization
          description: The access token
          in: header
          required: true
          schema:
            type: string
        - name: X-Contact-ID
          description: The ID of the contact
          in: header
          required: true
          schema:
            type: string
        - name: payment_amount
          in: query
          description: The amount of the payment
          required: true
          schema:
            type: number
            format: float
        - name: payment_currency
          in: query
          description: The currency of the payment
          required: true
          schema:
            type: string
        - name: payment_country
          in: query
          description: The destination country of the payment
          required: false
          schema:
            type: string
        - name: payment_intra_Ebury
          in: query
          description: boolean flag to filter by Ebury intra payments or not
          required: false
          schema:
            type: boolean
      responses:
        "200":
          description: The list of payment estimate fee
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentFeeEstimate'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      x-tags:
        - tag: Payments
  /ping:
    get:
      description: Get a successful response, to test connectivity
      responses:
        "200":
          description: Everything is right
      summary: Test connectivity
      tags:
        - Ping
      x-tags:
        - tag: Ping
    post:
      description: Get a successful response, to test connectivity
      responses:
        "200":
          description: Everything is right
      summary: Test connectivity
      tags:
        - Ping
      x-tags:
        - tag: Ping
  /quotes:
    post:
      description: |
        Get an estimate or firm quote. An estimate is as it's described:
        * The current rates on offer within the Ebury platform with no firm quote.
        * A firm quote returns a reference than can be used to book a trade.
      parameters:
        - description: The quote type. A quote_type of quote returns a quote ID which a trade can be booked against
          in: query
          name: quote_type
          required: true
          schema:
            type: string
            enum:
              - estimate
              - quote
        - description: The ID of the client this quote is for
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteRequest'
        description: Request Payload
        required: true
      responses:
        "200":
          description: Estimated rates response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EstimateOrQuoteResponse'
        "201":
          description: Quote created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EstimateOrQuoteResponse'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "409":
          description: Requested quote causes a conflict, see response body for details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get an estimate or firm quote
      tags:
        - Quotes
      x-tags:
        - tag: Quotes
  /quotes/fx-availability:
    get:
      description: |
        Get if the FX markets are available at this time or not
        * True if the FX market is available for creating quote and trades
        * False if the FX market is not available.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Get if the FX markets are available at the time or not
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FxAvailability'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "409":
          description: Requested quote causes a conflict, see response body for details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get the availability for FX markets
      tags:
        - Quotes
      x-tags:
        - tag: Quotes
  /token:
    post:
      tags:
        - OAuth2.0
      summary: Token
      description: Get an access token or refresh an existing one. The access token is passed in the Authorization header parameter in endpoints that require authentication.
      parameters:
        - name: Authorization
          in: header
          description: Where credentials is a Base64 encoded string of auth_client_id:auth_client_secret
          required: true
          schema:
            type: string
      requestBody:
        description: One of the last 10 refresh tokens, issued within the last 28 days.
        content:
          '*/*': {}
        required: false
      responses:
        "200":
          description: Listf of contacts IDs that are from the given client
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostTokenResponse'
        "400":
          description: Formatting or schema validation error or invalid data.See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
        "401":
          description: Unauthorized. See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
        "429":
          description: Too many requests
          content: {}
        "495":
          description: Certificate Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
      x-codegen-request-body-name: refresh_token
  /token/{contact_id}:
    post:
      tags:
        - TrustedAuthentication
      summary: Token for a Contact
      description: Get an access token or refresh an existing one. The access token is passed in the Authorization header parameter in endpoints that require authentication.
      parameters:
        - name: Authorization
          in: header
          description: Where credentials is a Base64 encoded string of auth_client_id:auth_client_secret
          required: true
          schema:
            type: string
        - name: contact_id
          in: path
          description: The id of the contact
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Listf of contacts IDs that are from the given client
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostTokenForContactResponse'
        "400":
          description: Formatting or schema validation error or invalid data.See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
        "401":
          description: Unauthorized. See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
        "429":
          description: Too many requests
          content: {}
        "495":
          description: Certificate Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
        "496":
          description: No Cert. There was not certificate provided.
          content: {}
        "497":
          description: HTTP to HTTPS. The connection was made using HTTP instead of HTTPS.
          content: {}
  /trades:
    get:
      description: Get all the trades for a given client ID
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The trade type. The list will be filtered to include only trades with a matching trade type.
          in: query
          name: trade_type
          required: false
          style: form
          explode: false
          schema:
            type: array
            items:
              enum:
                - spot
                - forward
                - window_forward
                - drawdown
                - ndf
              type: string
        - description: Parent identifier for drawdown trades
          in: query
          name: parent_trade_id
          required: false
          schema:
            type: string
        - description: The desired page number for pagination. By default is 1.
          in: query
          name: page
          required: false
          schema:
            type: integer
            format: int32
        - description: The number of items per page for pagination. By default is 50.
          in: query
          name: page_size
          required: false
          schema:
            type: integer
            format: int32
        - description: Filter by payment level's external_reference_id.
          in: query
          name: external_reference_id
          required: false
          schema:
            type: string
        - description: Filter by related mass payment's uuid.
          in: query
          name: mass_payment_id
          required: false
          schema:
            type: string
        - description: Filter by related mass payment's external reference.
          in: query
          name: mass_payment_external_reference_id
          required: false
          schema:
            type: string
        - description: Filter by the buy currency
          in: query
          name: buy_currency
          required: false
          schema:
            type: string
        - description: Filter trades by comma separated statuses
          in: query
          name: status
          required: false
          schema:
            type: array
            items:
              enum:
                - Created
                - Funds In Partially
                - Funds In Full
                - Funds Out Partially Allocated
                - Closed
                - Cancelled
              type: string
          example: Funds In Full,Closed
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: List of trades
          headers:
            x-total-count:
              description: Total number of available entries
              schema:
                type: integer
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/BookedTrade'
                type: array
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client or quote ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get all trades
      tags:
        - Trades
      x-tags:
        - tag: Trades
    post:
      description: |
        Initiate a new trade. You need to have an existing quote_id to do this
      parameters:
        - description: The identifier of the quote
          in: query
          name: quote_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTrade'
        description: Request Payload
        required: true
      responses:
        "201":
          description: Trade created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmedTrade'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client or quote ID not found
        "409":
          description: Requested trade causes a conflict that can be corrected, see response body for details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Create a Trade
      tags:
        - Trades
      x-tags:
        - tag: Trades
  /trades/{trade_id}:
    get:
      description: Get a trade with a specific trade_id
      parameters:
        - description: Trade identifier
          in: path
          name: trade_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Returns a BookedTrade model
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BookedTrade'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client or trade ID not found
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get a trade
      tags:
        - Trades
      x-tags:
        - tag: Trades
  /transactions:
    get:
      description: Retrieve a list of the client's transactions, optionally filtered by currency and value date and time with pagination support
      parameters:
        - description: A comma-separated list of currency codes compliant to ISO 4217
          in: query
          name: currencies
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: Filter transactions by debit/credit type
          in: query
          name: credit_debit_indicator
          required: false
          schema:
            type: string
            enum:
              - credit
              - debit
        - description: The access token
          in: header
          name: Authorization
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
        - description: Only return transactions with value date and time after this UTC date and time. YYYY-MM-DDThh:mm format
          in: query
          name: from_value_datetime
          schema:
            type: string
        - description: Only return transactions with value date and time before this UTC date and time. YYYY-MM-DDThh:mm format
          in: query
          name: to_value_datetime
          schema:
            type: string
        - description: The desired page number for pagination
          in: query
          name: page
          schema:
            type: integer
            minimum: 1
            default: 1
        - description: The number of items per page for pagination
          in: query
          name: page_size
          schema:
            type: integer
            minimum: 1
            default: 50
        - $ref: '#/components/parameters/TransactionTypeFilter'
      responses:
        "200":
          description: A list with the client's transactions.
          headers:
            x-total-count:
              description: Total number of available entries
              schema:
                type: integer
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TransactionData'
                type: array
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "409":
          description: Could not update contact due to data constraint or conflict with contact status. Refer to error message for additional details
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "504":
          description: Timeout error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Get transactions for all client accounts
      tags:
        - Transactions
      x-tags:
        - tag: Transactions
  /verify:
    post:
      tags:
        - OAuth2.0
      summary: Verify
      description: Validate 2FA code
      parameters:
        - name: Authorization
          in: header
          description: Where credentials is a Base64 encoded string of auth_client_id:auth_client_secret
          required: true
          schema:
            type: string
        - name: client_id
          in: query
          description: Your Authorization Client ID, identifies your application to the Authorisation Server
          required: true
          schema:
            type: string
        - name: code
          in: query
          description: Your Authorization Client ID, identifies your application to the Authorisation Server
          required: true
          schema:
            type: string
        - name: redirect_uri
          in: query
          description: The redirect URL that is registered for your application. This must match the value we hold.
          required: true
          schema:
            type: string
      requestBody:
        description: 2FA code to verify
        content:
          '*/*': {}
        required: true
      responses:
        "302":
          description: Redirect to your redirect_url
          content:
            application/json:
              schema:
                type: string
            text/html:
              schema:
                type: string
        "400":
          description: Formatting or schema validation error or invalid data.See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
            text/html:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
        "401":
          description: Unauthorized. See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
            text/html:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
        "429":
          description: Too many requests
          content: {}
        "495":
          description: Certificate Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
            text/html:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
      x-codegen-request-body-name: verify
  /send-verification-code:
    post:
      tags:
        - OAuth2.0
      summary: Send verification code
      description: Send 2fa verification code in case the user did not recived the past ones
      parameters:
        - name: Authorization
          in: header
          description: Where credentials is a Base64 encoded string of auth_client_id:auth_client_secret
          required: true
          schema:
            type: string
        - name: client_id
          in: query
          description: Your Authorization Client ID, identifies your application to the Authorisation Server
          required: true
          schema:
            type: string
        - name: code
          in: query
          description: Your Authorization Client ID, identifies your application to the Authorisation Server
          required: true
          schema:
            type: string
      responses:
        "204":
          description: Verification code has been resended correctly.
        "400":
          description: Formatting or schema validation error or invalid data.See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
            text/html:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
        "401":
          description: Unauthorized. See error message for further details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
            text/html:
              schema:
                $ref: '#/components/schemas/AuthErrorMessage'
  /webhooks/graphql:
    post:
      description: Execute a GraphQL query over the webhooks API
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhooksRequest'
        description: Request Payload
        required: true
      responses:
        "200":
          description: Query was executed and the result is in the body
        "400":
          description: Invalid request
        "401":
          description: Access denied due to authentication failure
      summary: Execute a GraphQL query over the webhooks API
      tags:
        - Webhooks
      x-tags:
        - tag: Webhooks
  /webhooks/ping/{subscription_id}:
    post:
      description: Ping a subscription to get a realistic notification in the configured URL
      parameters:
        - description: The UUID of the subscription
          in: path
          name: subscription_id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: Ping was successful
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details
      summary: Ping a subscription
      tags:
        - Webhooks
      x-tags:
        - tag: Webhooks
  /vop:
    post:
      description: Obtains the Verification of Payee result for each of the provided beneficiaries. A full-match means that the provided data is the same as the one in the actual Bank information. Other results mean that the provided data is not the same in the bank, and can potentially turn into a scam.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                beneficiaries:
                  type: array
                  description: List of beneficiaries to check.
                  items:
                    type: object
                    properties:
                      beneficiary_id:
                        type: string
                        description: ID of the beneficiary.
                      account_id:
                        type: string
                        description: ID of the bank account.
                      beneficiary_name:
                        type: string
                        description: Full name of the beneficiary. If this is provided, beneficiary_id and account_id should not be.
                      iban:
                        type: string
                        description: IBAN of the beneficiary. If this is provided, beneficiary_id and account_id should not be.
                      swift_code:
                        type: string
                        description: SWIFT/BIC code of the beneficiary's bank. If this is provided, beneficiary_id and account_id should not be.
            required:
              - beneficiaries
        required: true
      responses:
        "200":
          description: The Verification of Payee outcome with a list of `results`, one for each provided beneficiary dataset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VopCheckDetails'
        "400":
          description: Formatting, parameter or schema validation error. See error message for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Access denied due to authentication failure
        "403":
          description: Could not complete action due to data constraints. Refer to error message for additional details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "404":
          description: Client ID not found
        "409":
          description: Could not update contact due to data constraint or conflict with contact status. Refer to error message for additional details
        "502":
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "504":
          description: Timeout error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      summary: Run a standalone Verification of Payee check for a list of beneficiaries
      tags:
        - VoP
      x-tags:
        - tag: VoP
security:
  - api_key: []
components:
  parameters:
    Authorization:
      description: The access token.
      in: header
      name: Authorization
      required: true
      schema:
        type: string
    BeneficiaryId:
      description: The identifier of a beneficiary.
      in: path
      name: beneficiary_id
      required: true
      schema:
        type: string
    ClientId:
      description: The identifier of a client.
      in: query
      name: client_id
      required: true
      schema:
        type: string
    ContactId:
      description: The identifier of a contact.
      in: path
      name: contact_id
      required: true
      schema:
        type: string
    DataOnly:
      description: Used to generate a flat array.
      in: query
      name: data_only
      required: false
      schema:
        type: boolean
    Id:
      description: The ID of the entity that generated this document e.g. payment, trade, etc.
      in: query
      name: id
      required: true
      schema:
        type: string
    TransactionTypeFilter:
      description: A comma-separated list of transaction types.
      in: query
      name: transaction_type
      required: false
      schema:
        type: string
        enum:
          - credit
          - debit
          - incoming
          - margin
          - payment_returned
    Type:
      description: 'The document type: pi (payment instruction), pr (payment receipt), tr (trade receipt).'
      in: query
      name: type
      required: true
      schema:
        type: string
        enum:
          - pi
          - pr
          - tr
    XContactID:
      description: The identifier of a contact.
      in: header
      name: X-Contact-ID
      required: false
      schema:
        type: string
  responses:
    Beneficiary:
      description: The data of a beneficiary.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Beneficiary'
    BeneficiaryCreated:
      description: Beneficiary created.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Beneficiary'
    BeneficiaryDeleted:
      description: Beneficiary deleted.
    BeneficiaryList:
      description: Will successfully list the requested beneficiaries
      headers:
        x-total-count:
          description: Total number of available entries
          schema:
            type: integer
      content:
        application/json:
          schema:
            items:
              $ref: '#/components/schemas/Beneficiary'
            type: array
    BeneficiaryMetadata:
      description: Beneficiary metadata.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BeneficiaryMetadata'
    BeneficiaryOrClientNotFound:
      description: Beneficiary or client identifier not found.
    BeneficiaryUpdated:
      description: Beneficiary updated.
    ClientList:
      description: List of clients
      content:
        application/json:
          schema:
            items:
              $ref: '#/components/schemas/Client'
            type: array
    ClientNotFound:
      description: Client identifier not found.
    Conflict:
      description: Request invalid due to beneficiary management rules. Refer to error message for additional details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    Contact:
      description: The data of a contact.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Contact'
    ContactList:
      description: List of contacts.
      content:
        application/json:
          schema:
            items:
              $ref: '#/components/schemas/Contact'
            type: array
    ContactOrClientNotFound:
      description: Contact or client identifier not found.
    ContactUpdated:
      description: Contact updated.
    CurrencyMetadata:
      description: Currency metadata
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CurrencyMetadata'
    Document:
      description: Base 64 encoded document content.
      content:
        application/json:
          schema:
            format: byte
            type: string
    DocumentOrClientNotFound:
      description: Document or client identifier not found.
    Forbidden:
      description: Could not complete action due to data constraints. Refer to error message for additional details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    IntegrationError:
      description: Internal integration error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    Unauthorized:
      description: Access denied due to authentication failure.
    ValidationError:
      description: Formatting, parameter or schema validation error. See error message for further details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
  securitySchemes:
    api_key:
      description: An API Key.
      in: header
      name: x-api-key
      type: apiKey
  schemas:
    AccountData:
      properties:
        account_details:
          description: The list of `AccountDetail`s for this `currency`
          items:
            $ref: '#/components/schemas/AccountDetails'
          type: array
        account_id:
          description: The UUID of the account
          type: string
        account_subtype:
          $ref: '#/components/schemas/AccountSubType'
        account_type:
          $ref: '#/components/schemas/AccountType'
        currency:
          description: Identification of the currency in which the account is held
          type: string
        status:
          $ref: '#/components/schemas/AccountStatus'
      required:
        - currency
        - account_details
        - status
        - account_id
        - account_type
        - account_subtype
      type: object
    FundingAccountData:
      description: Funding account data with flat fields for Token IO integration
      properties:
        currency:
          description: The currency code (ISO 4217)
          type: string
          example: GBP
        holder:
          description: The account holder name
          type: string
          example: Ebury Partners UK
        holder_address:
          description: The account holder address
          type: string
          example: Level 3, 100 Victoria Street, London SW1E 5JL
        swift:
          description: The SWIFT/BIC code
          type: string
          example: BARCGB22
        iban:
          description: The International Bank Account Number
          type: string
          example: GB57BARC20060565878033
        account_number:
          description: The local bank account number
          type: string
          example: "65878033"
        bank_identifier:
          description: The bank identifier (e.g. Sort Code)
          type: string
          example: "200605"
        bank_identifier_type:
          description: The type of bank identifier
          type: string
          example: Sort Code
      type: object
    AccountDetails:
      properties:
        account_address:
          description: The address of the account
          type: string
        account_name:
          description: The name or names of the account owner(s) represented at an account level
          type: string
        account_number:
          description: The number of the account
          type: string
        account_number_type:
          $ref: '#/components/schemas/AccountNumberType'
        bank_identifier:
          description: The identifier of the bank
          type: string
        bank_identifier_type:
          $ref: '#/components/schemas/BankIdentifierType'
      required:
        - account_address
        - account_name
        - account_number
        - account_number_type
        - bank_identifier
        - bank_identifier_type
      type: object
    AccountDetailsResponse:
      type: object
      required:
        - account_id
        - account_detail_id
        - account_details_type
        - bank_account_number
        - bank_identifier
        - bank_identifier_type
        - bic
        - country
        - currency
        - financial_institution_name
        - financial_institution_address
        - holder_address
        - holder_name
        - iban
        - reference_for_payment
        - status
      properties:
        account_id:
          description: |
            Unique ID of the currency account these details belong to.
            Can be null for pooled accounts.
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
          nullable: true
        account_detail_id:
          description: Unique ID of the account details
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
        account_details_type:
          description: Type of account details
          type: string
          enum:
            - dedicated
            - pooled
        alias:
          description: |
            User-friendly alias for the account details.
            Only present (and mandatory) for dedicated accounts.
          type: string
          minLength: 1
          maxLength: 50
        bank_account_number:
          description: Domestic account number
          type: string
          minLength: 1
          maxLength: 50
          pattern: '[A-Z0-9]{1,50}'
          nullable: true
        bank_identifier:
          description: Domestic bank identifier
          type: string
          minLength: 1
          maxLength: 11
          pattern: ^[A-Z0-9]{1,11}$
          nullable: true
        bank_identifier_type:
          description: Type of domestic bank identifier
          example: USABA
          type: string
          minLength: 1
          maxLength: 5
          pattern: '[A-Z]{1,5}'
          nullable: true
        bic:
          description: Bank international code
          type: string
          minLength: 8
          maxLength: 11
          pattern: '[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}(?:[A-Z0-9]{3})?'
          nullable: true
        country:
          description: Country of the account details (ISO Code 2)
          example: GB
          type: string
          minLength: 2
          maxLength: 2
          pattern: '[A-Z]{2}'
          nullable: true
        currency:
          description: Currency of the account details (ISO Code 3)
          example: GBP
          type: string
          minLength: 3
          maxLength: 3
          pattern: '[A-Z]{3}'
        financial_institution_name:
          description: Name of the underlying financial institution
          type: string
          minLength: 1
          maxLength: 255
          nullable: true
        financial_institution_address:
          description: Address of the underlying financial institution
          type: string
          minLength: 1
          maxLength: 4000
          nullable: true
        holder_name:
          description: Name of the holder of the account details
          type: string
          minLength: 1
          maxLength: 1500
          nullable: true
        holder_address:
          description: Address of the holder of the account details
          type: string
          minLength: 0
          maxLength: 4000
          nullable: true
        iban:
          description: International account number
          type: string
          maxLength: 34
          nullable: true
        primary:
          description: |
            Primary (default) account.
            Only present (and mandatory) for dedicated accounts.
          type: boolean
        reference_for_payment:
          description: Reference that a client should use to transfer money to this account details
          type: string
        status:
          description: Status of the account details
          type: string
          enum:
            - pending
            - confirmed
            - failed
    AccountDetailsDomesticInternationalResponse:
      type: object
      required:
        - account_id
        - account_details_id
        - account_details_type
        - country
        - currency
        - status
        - domestic
        - international
      properties:
        account_id:
          description: |-
            Unique ID of the account these details belong to.
            Can be null for pooled accounts.
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
        account_details_id:
          description: Unique ID of the account details
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
        account_details_type:
          description: Type of account details
          type: string
          enum:
            - dedicated
            - pooled
        alias:
          description: |-
            User-friendly alias for the account details.
            Only present (and mandatory) for dedicated accounts.
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
        country:
          description: Country of the account details (ISO Code 2)
          example: GB
          type: string
          minLength: 2
          maxLength: 2
          pattern: '[A-Z]{2}'
          nullable: true
        currency:
          description: Currency of the account details
          example: GBP
          type: string
          minLength: 3
          maxLength: 3
          pattern: '[A-Z]{3}'
          nullable: true
        financial_institution_name:
          description: Name of the underlying financial institution
          type: string
          minLength: 1
          maxLength: 255
          nullable: true
        financial_institution_address:
          description: Address of the underlying financial institution
          type: string
          minLength: 1
          maxLength: 4000
          nullable: true
        account_holder_name:
          description: Name of the holder of the account details
          type: string
          minLength: 1
          maxLength: 1500
          nullable: true
        account_holder_address:
          description: Address of the holder of the account details
          type: string
          minLength: 0
          maxLength: 4000
          nullable: true
        primary:
          description: |-
            Primary (default) account.
            Only present (and mandatory) for dedicated accounts.
          type: boolean
        status:
          description: Status of the account details
          type: string
          enum:
            - pending
            - confirmed
            - failed
        created:
          description: Datetime of creation. Only on dedicated account details.
          type: string
          nullable: true
        modified:
          description: Datetime of last modification. Only on dedicated account details.
          type: string
          nullable: true
        domestic:
          allOf:
            - $ref: '#/components/schemas/DomesticInternationalAccountData'
          description: Domestic information of the account
          type: object
          nullable: true
        international:
          allOf:
            - $ref: '#/components/schemas/DomesticInternationalAccountData'
          description: International information of the account
          type: object
          nullable: true
    GetCapabilitiesResponse:
      type: array
      items:
        $ref: '#/components/schemas/Capability'
    AccountNumberType:
      description: The type of the account number.
      enum:
        - IBAN
        - BBAN
      type: string
    AccountStatus:
      description: The status of the account.
      enum:
        - Enabled
        - Disabled
        - Deleted
      type: string
    AccountSubType:
      description: The sub-type of the account.
      enum:
        - EMoney
      type: string
    AccountType:
      description: The type of the account.
      enum:
        - Personal
        - Business
      type: string
    Amount:
      properties:
        amount:
          description: The amount of the transaction.
          type: string
        currency:
          description: The ISO 4217 code of the transaction currency
          type: string
      required:
        - amount
        - currency
      type: object
    AuthErrorMessage:
      type: object
      properties:
        error:
          type: string
          description: The code for the error.
        error_description:
          type: string
          description: A short description of the cause of the error.
      description: An error message.
    BalanceAmount:
      properties:
        amount:
          description: The amount of the balance.
          type: string
        currency:
          description: The ISO 4217 code of the balance currency
          type: string
      required:
        - amount
        - currency
      type: object
    BalanceData:
      properties:
        account_id:
          description: The UUID of the account. Null for aggregate balance types (Incoming, Outgoing, RequiredFundsImmediate, Processing) which are calculated across all accounts for a currency.
          type: string
          nullable: true
        amount:
          $ref: '#/components/schemas/BalanceAmount'
        credit_debit_indicator:
          $ref: '#/components/schemas/CreditDebitIndicator'
        datetime:
          description: The date and time when the balance was calculated.
          type: string
        type:
          $ref: '#/components/schemas/BalanceType'
      required:
        - account_id
        - amount
        - credit_debit_indicator
        - datetime
        - type
      type: object
    BalanceType:
      description: |
        Balance type enumeration.
        RequiredFundsImmediate: items due now (same as Ebury Online).
        RequiredFunds: includes future-dated items (kept for backwards compatibility).
      enum:
        - InterimAvailable
        - RequiredFunds
        - RequiredFundsImmediate
        - Outgoing
        - Incoming
        - InitialMargin
        - MarginCall
        - Processing
      type: string
    BankAccount:
      allOf:
        - $ref: '#/components/schemas/BankAccountCoreData'
      description: A bank account.
      properties:
        account_id:
          description: The identifier of the bank account.
          type: integer
      required:
        - account_id
      type: object
    BankAccountCoreData:
      description: The data of the bank account. Refer to the Metadata API for valid field combinations.
      properties:
        account_number:
          description: The account number of the bank account.
          type: string
        bank_address_line_1:
          description: The first address line of the bank.
          type: string
        bank_country_code:
          description: The ISO 3166-1 alpha-2 code of the bank's country.
          pattern: '[A-Z]{2}'
          type: string
        bank_currency_code:
          description: The ISO 4217 code of the bank account's currency.
          pattern: '[A-Z]{3}'
          type: string
        bank_identifier:
          description: The identifier of the bank.
          type: string
        bank_name:
          description: Name of the bank account holder.
          type: string
        correspondent_account:
          description: The account for the correspondant account of the bank.
          type: string
        correspondent_swift_code:
          description: The SWIFT code for the correspondant account of the bank.
          type: string
        iban:
          description: The IBAN of the bank account.
          type: string
        inn:
          description: The INN of the bank account.
          type: string
        kbk:
          description: The KBK of the bank account.
          type: string
        kio:
          description: The KIO of the bank account.
          type: string
        kpp:
          description: The KPP of the bank account.
          type: string
        purpose_of_payment:
          description: Text explaining the purpose of payment. Required by the Central Bank for all payments sent to China (CHN) in the Chinese Renminbi (CNY) currency or United Arab Emirates in any currency (GDE to RDA) [Coming soon].
          enum:
            - /CGODDR/
            - /CGODDR/PART/
            - /CGODDR/RETN/
            - /CSTRDR/
            - /CSTRDR/PART/
            - /CSTRDR/RETN/
            - /COCADR/
            - /COCADR/RTN/
            - /CCTFDR/
            - /CCTFDR/PART/
            - /CCTFDR/RETN/
            - /CCDNDR/
            - /CCDNDR/RTN/
            - GDE
            - GDI
            - GMS
            - STS
            - ATS
            - OTS
            - STR
            - SCO
            - INS
            - FIS
            - IPC
            - TCS
            - ITS
            - IFS
            - RDS
            - PMS
            - TTS
            - PRS
            - GOS
            - SAL
            - IGD
            - IID
            - PIP
            - PRR
            - DOE
            - ISH
            - ISL
            - ISS
            - IOL
            - IOD
            - GRI
            - CHC
            - EDU
            - ALW
            - AES
            - LAS
            - OVT
            - TKT
            - SAA
            - COP
            - COM
            - EOS
            - BON
            - PEN
            - UTL
            - DCP
            - LND
            - LIP
            - IPO
            - POR
            - RNT
            - LNC
            - EMI
            - DIV
            - ACM
            - CCP
            - POS
            - MCR
            - CIN
            - TOF
            - IGT
            - OAT
            - SVI
            - SVO
            - SVP
            - MWI
            - MWO
            - MWP
            - PRP
            - PRW
            - IRP
            - IRW
            - CEA
            - PPA
            - DSF
            - DLF
            - FSA
            - FIA
            - DSA
            - DLA
            - FDA
            - AFA
            - SLA
            - LLA
            - LEA
            - RFS
            - TCR
            - CEL
            - PPL
            - LDS
            - LDL
            - FSL
            - FIL
            - DSL
            - DLL
            - FDL
            - AFL
            - SLL
            - LLL
            - LEL
            - RLS
            - TCP
            - TAX
            - REL
            - RDL
            - REA
            - RDA
          type: string
        reason_for_trade:
          description: The reason for trade of the bank account.
          type: string
        reference_information:
          description: The reference information of the bank account.
          type: string
        russian_central_bank_account:
          description: The Russian central account number of the bank account.
          type: string
        swift_code:
          description: The SWIFT code of the bank account.
          type: string
        vo:
          description: The VO of the bank account.
          type: string
      required:
        - bank_country_code
        - bank_currency_code
      type: object
    BankIdentifierType:
      description: The type of the bank identifier, to comply with ISO20022 `code`s related to [Clearing System Identification](https://www.iso20022.org/sites/default/files/2020-05/ExternalCodeSets_1Q2020_February2020_v1.xls), with the addition of `SWBIC` for swift international payments.
      type: string
    Beneficiary:
      allOf:
        - $ref: '#/components/schemas/BeneficiaryCoreData'
      description: The data of a beneficiary.
      properties:
        active:
          description: True if beneficiary is active, False otherwise.
          type: boolean
        aml_status:
          description: AML status of the beneficiary.
          enum:
            - OK
            - Pending Review
            - Pending information
            - Blocked
          type: string
        bank_accounts:
          description: The list of beneficiary's bank accounts.
          items:
            $ref: '#/components/schemas/BankAccount'
          type: array
        beneficiary_id:
          description: The identifier of the beneficiary.
          type: string
        created:
          description: Creation date of the beneficiary.
          format: date
          type: string
      required:
        - beneficiary_id
        - created
        - active
        - aml_status
        - bank_accounts
      type: object
    BeneficiaryCoreData:
      description: The core data of a beneficiary.
      properties:
        address_line_1:
          description: The first address line of the beneficiary.
          type: string
        beneficiary_reference:
          description: The reference for the beneficiary.
          type: string
        country_code:
          description: The ISO 3166-1 alpha-2 code of the beneficiary's country.
          pattern: '[A-Z]{2}'
          type: string
        email_addresses:
          description: The list of beneficiary's email addresses.
          items:
            format: email
            type: string
          type: array
        email_notification:
          description: Whether the beneficiary should receive email notification of payments.
          type: boolean
        name:
          description: The name of the beneficiary.
          type: string
        post_code:
          description: The post code of the beneficiary.
          type: string
      type: object
    BeneficiaryMetadata:
      items:
        $ref: '#/components/schemas/BeneficiaryMetadataItem'
      type: array
    BeneficiaryMetadataItem:
      properties:
        country:
          description: The country, expressed as an ISO 3166-1 alpha-2 value.
          type: string
        currencies:
          description: The requirements for a given currency for this country.
          items:
            properties:
              currency:
                description: The currency code, expressed as an ISO 4217 alpha code. The value 'default' means the requirements for any currency not otherwise listed for this country.
                type: string
              mandatory_data:
                description: The data that must provided to provision a beneficiary for the country and currency, provided in groups i.e. one of the groups must be matched to provision a beneficiary for the country/currency combination.
                items:
                  description: A list of field names. Additional context available where | then a value is included in the definition e.g. bank_identifier|Sort Code.
                  items:
                    type: string
                  type: array
                type: array
              optional_data:
                description: Data that can optionally be included to provision a beneficiary. Additional context available where  then a value is included in the definition e.g. bank_identifierSort Code.
                items:
                  type: string
                type: array
            type: object
          type: array
        reason_required:
          description: Whether or not a reason for trade for the country needs to be supplied.
          type: boolean
      type: object
    BookedTrade:
      properties:
        buy_amount:
          description: Buy amount
          format: float
          type: number
        buy_currency:
          description: Buy currency code
          type: string
        fee_amount:
          description: Fee amount
          format: float
          type: number
        fee_currency:
          description: Fee currency
          type: string
        maturity_date:
          description: Limit date and time (UTC) in which funds must be received by Ebury
          format: date
          type: string
        order_date:
          description: Order date
          format: date
          type: string
        parent_trade_id:
          description: Parent trade ID (not null for drawdown deals)
          type: string
        rate:
          description: Booked rate
          format: float
          type: number
        rate_symbol:
          description: The symbol of booked rate
          type: string
        reference:
          description: 'Additional trade reference. Example: Invoice number.'
          type: string
        sell_amount:
          description: Sell amount
          format: float
          type: number
        sell_currency:
          description: Sell currency code
          type: string
        status:
          $ref: '#/components/schemas/TradeStatus'
        synthetic:
          description: Identifies as a synthetic future contracts
          format: boolean
          type: boolean
        trade_id:
          description: Trade identifier
          type: string
        trade_receipt:
          description: The URL to get the trade receipt
          format: uri
          type: string
        trade_type:
          description: Trade type
          type: string
      required:
        - buy_amount
        - buy_currency
        - fee_amount
        - fee_currency
        - maturity_date
        - order_date
        - parent_trade_id
        - rate
        - rate_symbol
        - sell_amount
        - sell_currency
        - status
        - trade_id
        - trade_type
        - synthetic
      type: object
    Capability:
      description: Virtual account creation capability
      type: object
      required:
        - auto_create
        - country
        - currency
      properties:
        auto_create:
          description: The account can be created and assigned automatically
          type: boolean
        country:
          description: Country for the account
          type: string
          minLength: 2
          maxLength: 2
          pattern: '[A-Z]{2}'
        currency:
          description: Currency for the account
          type: string
          minLength: 3
          maxLength: 3
          pattern: '[A-Z]{3}'
    Client:
      properties:
        address_line_1:
          description: The first address line of a client.
          type: string
        address_line_2:
          description: The second address line of a client.
          type: string
        city:
          description: The city name of a client.
          type: string
        client_id:
          description: Identifier of the client.
          type: string
        client_name:
          description: Name of the client.
          type: string
        client_entity_id:
          description: The identifier of the client's legal Ebury entity.
          type: string
        client_entity_name:
          description: The name of the client's legal Ebury entity.
          type: string
        post_code:
          description: The post code of the client.
          type: string
        state_province:
          description: The state or province of the client.
          type: string
        status:
          description: Status of the client.
          enum:
            - Active
            - Inactive
            - Closed
            - Blocked
          type: string
        brand_name:
          description: Brand name of the client.
          type: string
      required:
        - client_id
        - client_name
        - status
        - brand_name
      type: object
    ConfirmedTrade:
      properties:
        bank_account:
          description: An existing bank account
          properties:
            account_number:
              type: string
            bank_address_line_1:
              type: string
            bank_address_line_2:
              type: string
            bank_city:
              type: string
            bank_identifier:
              type: string
            bank_identifier_type:
              type: string
            bank_name:
              type: string
            bank_post_code:
              type: string
            iban:
              type: string
            swift_code:
              type: string
          required:
            - account_number
            - iban
            - swift_code
            - bank_identifier
            - bank_identifier_type
            - bank_address_line_1
            - bank_address_line_2
            - bank_city
            - bank_post_code
          type: object
        initial_margin_amount:
          description: Only for forwards. Trade's deposit amount.
          format: double
          type: number
        initial_margin_due_date:
          description: Only for forwards. Date on or before which deposit must be received by Ebury. Date and time are in UTC.
          format: date
          type: string
        maturity_date:
          description: Limit date and time (UTC) in which funds must be received by Ebury
          format: date
          type: string
        trade_id:
          description: Trade identifier
          type: string
      required:
        - trade_id
        - bank_account
        - maturity_date
      type: object
    ConfirmedDrawdown:
      properties:
        trade_id:
          description: Drawdown trade identifier
          type: string
        amount_to_transfer:
          description: The amount to be transferred
          format: double
          type: number
        buy_amount:
          description: The amount in the buy currency
          format: double
          type: number
        sell_amount:
          description: The amount in the sell currency
          format: double
          type: number
        rate:
          description: The exchange rate applied
          type: string
        reason_for_trade:
          description: The reason for trade specified in the request
          type: string
        external_reference_id:
          description: Your external reference ID if provided
          type: string
        convert:
          description: Whether funds will be converted
          type: boolean
        value_date:
          description: The value date for the drawdown
          type: string
        deposit_not_used:
          description: Amount of deposit not used from the forward trade
          type: string
        bank_account:
          description: Bank account details for funding the drawdown
          type: object
        fee:
          description: Fee details for the drawdown, including payment and trade fees
          type: object
        fee_bank_account:
          description: Bank account details for the fee payment
          type: object
      required:
        - trade_id
      type: object
    Contact:
      allOf:
        - $ref: '#/components/schemas/ContactData'
        - $ref: '#/components/schemas/ContactUpdateableData'
      description: The data of a contact.
      properties:
        contact_id:
          description: The identifier of the contact.
          type: string
      required:
        - contact_id
      type: object
    ContactData:
      description: The data of a contact.
      properties:
        address_line_1:
          description: The first address line of a contact.
          type: string
        address_line_2:
          description: The second address line of a contact.
          type: string
        city:
          description: The city name of a contact.
          type: string
        country_code:
          description: The ISO 3166-1 alpha-2 code of the contact's country.
          pattern: '[A-Z]{2}'
          type: string
        country_name:
          description: The name of the contact's country.
          type: string
        email_address:
          description: The email address of a contact.
          format: email
          type: string
        first_name:
          description: The first name of the contact.
          type: string
        home_contact_number:
          description: The home contact number of a contact.
          type: string
        last_name:
          description: The last name of the contact.
          type: string
        mobile_contact_number:
          description: The mobile contact number of a contact.
          type: string
        name:
          description: The full name of a contact.
          type: string
        password_reset_required:
          description: True if contact needs to reset his password, False otherwise.
          type: boolean
        post_code:
          description: The post code of the contact.
          type: string
        work_contact_number:
          description: The work contact number of a contact.
          type: string
      required:
        - email_address
      type: object
    ContactsList:
      type: object
      properties:
        data:
          type: array
          description: The code for the error.
          items:
            type: string
      description: A contact list
    ContactUpdate:
      allOf:
        - $ref: '#/components/schemas/ContactUpdateableData'
      description: The data to update a contact.
      type: object
    ContactUpdateableData:
      description: The data of a contact which can be updated.
      properties:
        can_authorise_payments:
          description: True if contact can authorise payments, False otherwise.
          type: boolean
        can_make_same_currency_payments:
          description: True if contact can create trades and assign same currency payments, False otherwise.
          type: boolean
        can_manage_beneficiaries:
          description: True if contact can manage beneficiaries, False otherwise.
          type: boolean
        can_manage_beneficiaries_groups:
          description: True if can manage beneficiaries groups, False otherwise.
          type: boolean
        can_manage_contacts:
          description: True if contact can manage contacts, False otherwise.
          type: boolean
        can_manage_fix_forwards:
          description: True if contact can manage fixed forwards, False otherwise.
          type: boolean
        can_manage_multipayments:
          description: True if contact can manage multipayments, False otherwise.
          type: boolean
        can_manage_payments:
          description: True if contact can manage payments, False otherwise.
          type: boolean
        can_manage_permissions:
          description: True if contact can manage permissions, False otherwise.
          type: boolean
        can_trade:
          description: True if contact can execute trades, False otherwise.
          type: boolean
        can_make_independent_payments:
          description: True if contact can make independent payments, False otherwise.
          type: boolean
        can_drawdown:
          description: True if contact can create drawdowns, False otherwise.
          type: boolean
        can_get_paid:
          description: True if contact can see/create get paid requests, False otherwise.
          type: boolean
        can_manage_third_parties:
          description: True if contact can manage third parties, False otherwise.
          type: boolean
        can_authorize_payment_lvl_1:
          description: True if contact can authorise payments at level 1, False otherwise.
          type: boolean
        can_authorize_payment_lvl_2:
          description: True if contact can authorise payments at level 2, False otherwise.
          type: boolean
        can_authorize_payment_lvl_3:
          description: True if contact can authorise payments at level 3, False otherwise.
          type: boolean
        can_authorize_payment_lvl_4:
          description: True if contact can authorise payments at level 4, False otherwise.
          type: boolean
        can_trade_finance:
          description: True if contact can access trade finance, False otherwise.
          type: boolean
        can_select_multipayment_delivery_date:
          description: True if contact can select delivery date in multipayments, False otherwise.
          type: boolean
        can_manage_trade_finance_permissions:
          description: True if contact can manage trade finance permissions, False otherwise.
          type: boolean
        can_create_card_topup:
          description: True if contact can create card topup transactions, False otherwise.
          type: boolean
        can_create_card_offload:
          description: True if contact can create card offload transactions, False otherwise.
          type: boolean
        has_online_access:
          description: True if contact has access to Ebury Online, False otherwise.
          type: boolean
        language:
          description: The ISO 639-1:2002 code of the contact's language.
          pattern: '[a-z]{2}'
          type: string
        locale:
          description: The ISO 639-1:2002 code of the contact's locale.
          pattern: '[a-z]{2}'
          type: string
        time_zone:
          description: The time zone of the contact.
          type: string
      type: object
    CreditDebitIndicator:
      description: Whether the balance is credit or debit
      enum:
        - Credit
        - Debit
      type: string
    CreditorDebtorAccount:
      properties:
        account_name:
          description: The name of the account's owner
          type: string
        account_number:
          description: Account number
          type: string
        bank_identifier:
          description: Account bank identifier
          type: string
        bank_identifier_code:
          description: Account bank identifier code (UK sort code, US ABA/FedWire, etc.)
          type: string
        iban:
          description: Account IBAN
          type: string
        swift:
          description: Account SWIFT code
          type: string
      type: object
    CurrencyMetadata:
      items:
        $ref: '#/components/schemas/CurrencyMetadataItem'
      type: array
    CurrencyMetadataItem:
      properties:
        buy:
          $ref: '#/components/schemas/CutOffItem'
        currency:
          description: The currency code, expressed as an ISO 4217 alpha code.
          type: string
        invalid_value_dates:
          $ref: '#/components/schemas/InvalidValueDateItem'
        reason_required:
          description: Whether or not a reason for trade for the currency needs to be supplied.
          type: boolean
        sell:
          $ref: '#/components/schemas/CutOffItem'
      type: object
    CutOffItem:
      properties:
        cutoff_days:
          description: The cutoff T+n days, expressed as an integer. The value '0' means there is not cutoff day for this currency.
          type: integer
        cutoff_time:
          description: The cutoff time, expressed as an string. The value 'null' means there is not cutoff time for this currency.
          type: string
      type: object
    CurrencyInfo:
      type: object
      properties:
        currency:
          type: string
          description: Currency symbol
        available_for_trading:
          type: boolean
          description: Is this currency available to trade
        credit_limit:
          type: string
          description: Limit of the credit
        default:
          type: boolean
          description: Is this default currency of the client
        holidays:
          type: array
          description: List of holidays in a format ISO-8601
          items:
            type: string
        currency_limit:
          type: string
          description: Limit of the currency
        decimals:
          type: integer
          description: Decimal settings of the client for the currency
        cutoff:
          type: object
          properties:
            day:
              type: integer
              description: Cutoff days for the currency. The value 0 means there is not cutoff day for this currency.
            time:
              type: string
              description: Cutoff time for the currency. Includes TZ data in ISO format
        buy_allowed:
          type: boolean
          description: Is client allowed to buy this currency
        sell_allowed:
          type: boolean
          description: Is client allowed to sell this currency
    DomesticInternationalAccountData:
      type: object
      required:
        - account_number
        - bank_identifier
        - bank_identifier_type
        - account_number_type
      properties:
        account_number:
          description: Account number
          type: string
          minLength: 1
          maxLength: 50
        bank_identifier:
          description: Bank identifier
          type: string
          minLength: 1
          maxLength: 11
          pattern: ^[A-Z0-9]{1,11}$
        bank_identifier_type:
          description: Type of bank identifier
          example: USABA
          type: string
          minLength: 1
          maxLength: 5
          pattern: '[A-Z]{1,5}'
        account_number_type:
          description: Type of Account number
          type: string
    EnumMassPaymentStatus:
      description: This is an enumeration of the status of a MassPayment
      enum:
        - Queued for processing
        - Processing
        - Processed
        - Queued for creating
        - Creating
        - Created
        - Cancelled
        - Failed
      type: string
    ErrorMessage:
      description: An error message.
      properties:
        code:
          description: The code for the error.
          type: string
        details:
          description: Error details
          type: string
        message:
          description: A short description of the cause of the error.
          type: string
      required:
        - code
        - message
        - details
      type: object
    EstimateResponse:
      properties:
        estimated_rate:
          description: The estimated rate
          format: double
          type: number
        estimated_rate_symbol:
          description: The symbol of estimated rate
          type: string
        fee_amount:
          description: Fee amount
          format: float
          type: number
        fee_currency:
          description: Fee currency
          type: string
        inverse_rate:
          description: Inverse rate
          format: double
          type: number
        inverse_rate_symbol:
          description: The symbol of inverse rate
          type: string
        value_date:
          description: Date on which quote is requested
          format: date
          type: string
        warning:
          description: A warning is only returned if the requested value date was not valid and the next available date has been returned.
          type: string
      required:
        - estimated_rate
        - estimated_rate_symbol
        - inverse_rate
        - inverse_rate_symbol
        - fee_amount
        - fee_currency
        - value_date
      type: object
    GetAccountDetailsDomesticInternationalResponse:
      type: array
      items:
        $ref: '#/components/schemas/AccountDetailsDomesticInternationalResponse'
    GetAccountDetailsResponse:
      type: array
      items:
        $ref: '#/components/schemas/AccountDetailsResponse'
    GetMassPaymentItem:
      properties:
        mass_payment_id:
          description: The UUID of the MassPayment
          type: string
          format: uuid
        external_reference_id:
          description: External reference of the mass payment
          type: string
        error:
          $ref: '#/components/schemas/ErrorMessage'
        mass_payment_status:
          $ref: '#/components/schemas/EnumMassPaymentStatus'
        sell_currency:
          description: Sell currency
          type: string
        sell_amount:
          description: Sell amount
          type: string
        trades_created:
          description: Number of trades created
          type: number
        payments_summary:
          $ref: '#/components/schemas/PaymentsSummaryGetMassPaymentItem'
        links:
          $ref: '#/components/schemas/LinksGetMassPaymentItem'
      type: object
    GetMassPaymentsResponse:
      items:
        $ref: '#/components/schemas/GetMassPaymentItem'
      type: array
    InvalidValueDateItem:
      properties:
        YYYY-MM-DD:
          description: Reason of invalid trading date.
          type: string
      type: object
    LinksGetMassPaymentItem:
      properties:
        payments_errored_href:
          description: Payments errored URL
          type: string
        payments_created_href:
          description: Payments created URL
          type: string
        trades_href:
          description: Payment trades URL
          type: string
        funding_account_href:
          description: Funding account URL
          type: string
      type: object
    MultiPaymentError:
      allOf:
        - $ref: '#/components/schemas/NewPayment'
        - items:
            properties:
              code:
                description: The exception label
                type: string
              message:
                description: The exception message
                type: string
            required:
              - code
              - message
            type: object
          type: array
    MultiPaymentErrorMessage:
      items:
        $ref: '#/components/schemas/MultiPaymentError'
      type: array
    MultiPaymentResponse:
      example:
        account_details:
          - account_number: 99999999
            bank_identifier: 999999
            bank_identifier_type: SC UK Sort Code
            iban: GB82TEST9999999999999999
            swift_code: TESTGB99
        multipayment_id: 1
        trade_details:
          - buy_amount: 32
            buy_currency: EUR
            client_rate: 0.814273
            client_rate_symbol: EURGBP
            inverse_rate: 1.228089
            inverse_rate_symbol: GBPEUR
            sell_amount: 26.06
            sell_currency: GBP
            value_date: "2016-04-18T00:00:00.000Z"
          - buy_amount: 110
            buy_currency: NZD
            client_rate: 2.013132
            client_rate_symbol: GBPNZD
            inverse_rate: 0.496738
            inverse_rate_symbol: NZDGBP
            sell_amount: 54.64
            sell_currency: GBP
            value_date: "2016-04-18T00:00:00.000Z"
      properties:
        account_details:
          allOf:
            - $ref: '#/components/schemas/BankAccount'
          type: object
        invalid_payments:
          items:
            $ref: '#/components/schemas/MultiPaymentError'
          type: array
        multipayment_id:
          description: The multipayment ID
          format: int32
          type: integer
        trade_details:
          items:
            properties:
              buy_amount:
                format: float
                type: number
              buy_currency:
                type: string
              client_rate:
                format: float
                type: number
              client_rate_symbol:
                type: string
              inverse_rate:
                format: float
                type: number
              inverse_rate_symbol:
                type: string
              sell_amount:
                format: float
                type: number
              sell_currency:
                type: string
              value_date:
                format: date
                type: string
            type: object
          type: array
      required:
        - multipayment_id
      type: object
    MassPaymentResponse:
      properties:
        mass_payment_id:
          description: The UUID of the MassPayment just created
          type: string
          format: uuid
        external_reference_id:
          description: The external reference for the MassPayment, if supplied
          type: string
        mass_payment_status:
          $ref: '#/components/schemas/EnumMassPaymentStatus'
    MassPaymentConfirmResponse:
      properties:
        mass_payment_status:
          $ref: '#/components/schemas/EnumMassPaymentStatus'
    MassPaymentPaymentsReceivedResponse:
      items:
        $ref: '#/components/schemas/NewMultiPaymentItem'
      type: array
    MassPaymentErrorsResponse:
      items:
        $ref: '#/components/schemas/PaymentInstructionWithErrors'
      type: array
    NewBeneficiary:
      allOf:
        - $ref: '#/components/schemas/BankAccountCoreData'
        - $ref: '#/components/schemas/BeneficiaryCoreData'
      description: The data to create a new beneficiary.
      required:
        - country_code
        - name
        - email_notification
      type: object
    NewDrawdown:
      properties:
        amount:
          description: The amount to draw down
          format: double
          type: number
          minimum: 0.01
        direction:
          description: The direction of the amount
          enum:
            - buy
            - sell
          type: string
        value_date:
          description: The T+2 value date for the drawdown in YYYY-MM-DD or YYYY/MM/DD format
          type: string
          pattern: ^\d{4}[-/]\d{2}[-/]\d{2}$
        reason_for_trade:
          description: Reason for trade
          enum:
            - charitable_aid
            - payment_for_goods
            - capital_investment
            - payment_for_services
            - repatriation_of_goods
            - repatriation_of_services
            - property_purchase
            - mortage_repayment
            - property_rental_or_maintenance
            - salary_payroll
            - travel_costs
            - living_costs
            - repayment_of_loan
            - balance_hedging
            - repatriation_from_investment
            - portfolio_netting
            - other
          type: string
        use_margin:
          description: Whether to use any available margin from the forward trade to fund the drawdown
          type: boolean
          default: false
        convert:
          description: Intention behind the drawdown. When set to true, drawdown will be executed and funds will be transferred between two Ebury wallets. When false, drawdown will be executed only when it is linked to at least one payment
          type: boolean
          default: false
        auto_confirm_value_date:
          description: When set to true, the next available value date will be used if the requested T+2 date is invalid. When false, the request will fail if the value date is not valid
          type: boolean
          default: false
        external_reference_id:
          description: API external reference id for the drawdown. Maximum 128 characters. Alphanumeric, hyphens, and underscores only
          type: string
          maxLength: 128
          pattern: ^[a-zA-Z0-9_-]*$
      required:
        - amount
        - direction
        - value_date
        - reason_for_trade
        - use_margin
        - convert
      type: object
    DrawdownAvailableMarginRequest:
      properties:
        drawdown_sell_amount:
          description: Amount you plan to sell as part of the drawdown
          format: double
          type: number
          minimum: 0.01
        value_date:
          description: The value date for the drawdown format
          type: string
          pattern: ^\d{4}[-/]\d{2}[-/]\d{2}$
      required:
        - drawdown_sell_amount
        - value_date
      type: object
    DrawdownAvailableMargin:
      properties:
        drawdown_initial_margin:
          description: Amount of margin that can be used to fund the drawdown
          format: double
          type: number
      type: object
    NewMassPayment:
      required:
        - auto_commit
        - payment_instructions
      type: object
      properties:
        external_reference_id:
          description: 'The external reference: unique ID supplied by customer which can be used later to filter.'
          type: string
          default: ""
        auto_commit:
          description: If true, send successful instructions for payment. If false, hold until customer hits commit endpoint.
          type: boolean
        sell_currency:
          description: If `trade_id` omitted, `sell_currency` must be supplied.
          type: string
        trade_id:
          description: Trade ID to book payments against. If customer wants the trade to be auto booked then this parameter should not be supplied.
          type: string
        payment_instructions:
          description: Array of multiple payment instruction given by the customer.
          type: array
          items:
            $ref: '#/components/schemas/NewMultiPaymentItem'
    NewMultiPayment:
      example:
        - account_number: 9999999999
          bank_address: 1 Test Street
          bank_code: 999999
          bank_country: "N"
          bank_name: Test Bank 1
          beneficiary_address: 2 Test Street
          beneficiary_country: NZ
          beneficiary_name: Functional Test New Zealand
          beneficiary_reference: Beneficiary bank
          direction: buy
          iban: null
          inn: null
          kio: null
          payment_amount: 110.01
          payment_currency: NZD
          payment_reference: MULTIPAYMENTSTEST
          purpose_of_payment: null
          reason_for_trade: Execute payments
          russian_central_bank_account: null
          swift_code: TESTNZ99
          trade_type: spot
          value_date: "2016-04-18T00:00:00.000Z"
          vo: null
        - account_number: null
          bank_address: 1 Test Street
          bank_code: null
          bank_country: ES,
          bank_name: Test Bank 2
          beneficiary_address: 2 Test Street
          beneficiary_country: GB
          beneficiary_name: Test beneficiary
          beneficiary_reference: null
          direction: buy
          iban: ES6710067038260971665568
          inn: null
          kio: null
          payment_amount: 32.02
          payment_currency: EUR
          payment_reference: MULTIPAYMENTSTEST
          purpose_of_payment: null
          reason_for_trade: Execute payments
          russian_central_bank_account: null
          swift_code: TESTES99
          trade_type: spot
          value_date: "2016-04-18T00:00:00.000Z"
          vo: null
      items:
        $ref: '#/components/schemas/NewMultiPaymentItem'
      type: array
    NewMultiPaymentItem:
      required:
        - account_number
        - bank_address
        - bank_code
        - bank_country
        - bank_name
        - beneficiary_address
        - beneficiary_country
        - beneficiary_name
        - direction
        - iban
        - payment_amount
        - payment_currency
        - reason_for_trade
        - swift_code
        - trade_type
        - value_date
      properties:
        account_number:
          description: Destination account number
          type: string
          nullable: true
        bank_address:
          description: Destination bank address
          type: string
          nullable: true
        bank_code:
          description: Destination bank code
          type: string
          nullable: true
        bank_country:
          description: Destination bank country
          type: string
          minLength: 1
        bank_name:
          description: Destination bank name
          type: string
          nullable: true
        beneficiary_address:
          description: Address of beneficiary
          type: string
          nullable: true
        beneficiary_name:
          description: Name of beneficiary
          type: string
          nullable: true
        beneficiary_country:
          description: Country of beneficiary
          type: string
          nullable: true
        direction:
          description: Type of payment, 'buy' or 'sell'
          type: string
          enum:
            - buy
            - sell
        iban:
          description: IBAN of the destination account
          type: string
          nullable: true
        payment_currency:
          description: Destination currency
          type: string
          minLength: 1
        payment_amount:
          description: Amount to be paid
          type: number
          format: float
          minimum: 0
        reason_for_trade:
          description: Reason for trade
          type: string
          nullable: true
        payment_reference:
          description: Reference of payment
          type: string
          nullable: true
        swift_code:
          description: SWIFT code of destination bank
          type: string
          nullable: true
        trade_type:
          description: Type of trade. 'spot' is the only supported value at the moment
          type: string
          enum:
            - spot
        value_date:
          description: Date when the transaction will be performed
          type: string
          nullable: true
        beneficiary_reference:
          description: Reference of beneficiary
          type: string
          nullable: true
        purpose_of_payment:
          description: Text describing the purpose of the payment
          type: string
          nullable: true
        reference:
          description: Payment reference
          type: string
          nullable: true
        inn:
          description: The INN of the bank account
          type: string
          pattern: ^[0-9]{10}([0-9]{2})?$
          nullable: true
        vo:
          description: The VO of the bank account
          type: string
          nullable: true
        kio:
          description: The KIO of the bank account
          type: string
          nullable: true
        russian_central_bank_account:
          description: Russian central bank account
          type: string
          nullable: true
      type: object
    NewPayment:
      description: A list of payments with known beneficiary/bank account IDs.
      properties:
        async:
          description: Create the payment(s) asynchronously. Payments are created synchronously by default.
          type: boolean
        payments:
          description: A list of payments
          items:
            properties:
              account_id:
                description: The ID of the beneficiary's bank account
                type: string
              amount:
                description: The payment amount
                format: float
                type: number
              beneficiary_id:
                description: The ID of the beneficiary
                type: string
              email_beneficiary:
                default: false
                description: Whether the beneficiary should receive and email on payment
                type: boolean
              payment_date:
                description: The date on which payment is required
                format: date
                type: string
              reference:
                description: Payment reference
                type: string
            required:
              - beneficiary_id
              - account_id
              - amount
              - payment_date
              - reference
            type: object
          type: array
        trade_id:
          description: Unique identifier of the trade the payment is allocated to
          type: string
      type: object
    NewPaymentItem:
      properties:
        fee_amount:
          description: Fee amount
          format: float
          type: number
        fee_currency:
          description: Fee currency
          type: string
        payment_id:
          description: The payment identifier
          type: string
        payment_instruction:
          description: URI to download payment instruction
          format: uri
          type: string
        payment_receipt:
          description: URI to download payment receipt
          format: uri
          type: string
        reference:
          description: Payment reference
          type: string
        status:
          description: The current status of the payment
          enum:
            - Need more beneficiary information
            - Validating beneficiary information
            - Waiting for payment date
            - Payment complete
            - Executing Payment
            - Payment pending of authorization
            - Payment rejected
            - Payment cancelled
          type: string
        warning:
          description: A warning is only returned if the requested value date was not valid and the next available date has been returned.
          type: string
      type: object
    NewStatement:
      properties:
        from_value_datetime:
          description: Only return transactions with value date after this date. Time ignored, considered always to be the start of the day. YYYY-MM-DDThh:mm format
          type: string
        to_value_datetime:
          description: Only return transactions with value date before this date. Time ignored, considered always to be the end of the day. YYYY-MM-DDThh:mm format
          type: string
      required:
        - from_value_datetime
      type: object
    NewTrade:
      properties:
        reason:
          description: Reason for trade. The 'not_related_to_goods_or_services' reason is only for spot type.
          enum:
            - payment_for_goods
            - payment_for_services
            - repatriation_of_goods
            - repatriation_of_services
            - intercompany_funding_operational_purposes
            - salary_payroll
            - tax_related
            - direct_investment
            - property_purchase_sale
            - payment_living_costs
            - repayment_of_loan
            - balance_hedging
            - repatriation_from_investment
            - other_not_related_to_goods_or_services
            - charitable_aid
            - capital_investment
            - property_purchase
            - mortage_repayment
            - property_rental_or_maintenance
            - travel_costs
            - living_costs
            - portfolio_netting
            - not_related_to_goods_or_services
            - other
          type: string
        reference:
          description: Reference for the trade.
          type: string
        trade_type:
          description: Currently ignored (DEPRECATED)
          type: string
        external_reference_id:
          description: API external reference id
          type: string
      required:
        - reason
      type: object
    PatchAccountDetailsRequest:
      type: object
      required:
        - alias
      properties:
        alias:
          description: New alias for the account details
          type: string
    Payment:
      example:
        AML_overdue: false
        AML_status: 4
        fully_funded: false
        executed: false
        verified: false
        cancelled: false
        returned: false
        over_paid: false
        hold: false
        amount: 32
        authorisation_workflow: 4-eyes
        authorised_by: TAICON99999
        authorised_date: "2016-04-28T00:00:00.000Z"
        beneficiary_name: Test beneficiary
        cancelled_by: TAICON99999
        cancelled_date: "2016-04-28T00:00:00.000Z"
        contact_id: TAICON99999
        created_date: "2016-04-28T00:00:00.000Z"
        iban: GB99TEST999999999999
        payment_currency: GBP
        payment_date: "2016-04-28T00:00:00.000Z"
        payment_id: PI186294
        payment_instruction: /documents?client_id=TAICLI99999&type=pi&reference=PI186294
        reference: My payment reference
        rejected_by: TAICON99999
        rejected_date: "2016-04-28T00:00:00.000Z"
        status: Validating beneficiary information
        swift_code: TESTES99
        trade_id: EBPOTR372760
      properties:
        account_number:
          type: string
        amount:
          description: Payment amount
          format: float
          type: number
        authorisation_workflow:
          description: The authorisation workflow of the payment
          enum:
            - simple
            - 4-eyes
            - 6-eyes
            - 8-eyes
            - 10-eyes
          type: string
        AML_overdue:
          description: Flag indicating if AML check is overdue
          type: boolean
        AML_status:
          description: Status code for AML checks
          type: integer
        authorised_by:
          description: The user who authorised the payment
          type: string
        authorised_date:
          description: The date when payment was authorised
          format: date
          type: string
        bank_identifier:
          type: string
        beneficiary_name:
          description: Name of the beneficiary
          type: string
        beneficiary_verified:
          description: Flag indicating if beneficiary is verified
          type: boolean
        beneficiary_active:
          description: Flag indicating if beneficiary is verified
          type: boolean
        beneficiary_completed:
          description: Flag indicating if beneficiary completed verification
          type: boolean
        beneficiary_authorised:
          description: Flag indicating if beneficiary has been authorised
          type: boolean
        beneficiary_blocked:
          description: Flag indicating if beneficiary is blocked
          type: boolean
        fully_funded:
          description: Flag indicating if payment is fully funded
          type: boolean
        executed:
          description: Flag indicating if payment has been executed
          type: boolean
        verified:
          description: Flag indicating if payment has been verified
          type: boolean
        cancelled:
          description: Flag indicating if payment has been cancelled
          type: boolean
        returned:
          description: Flag indicating if payment has been returned
          type: boolean
        over_paid:
          description: Flag indicating if payment is over paid
          type: boolean
        hold:
          description: Flag indicating if payment is on hold
          type: boolean
        cancelled_by:
          description: The user who cancelled the payment
          type: string
        cancelled_date:
          description: The date when payment was cancelled
          format: date
          type: string
        contact_id:
          description: Unique identifier of the contact who booked the payment
          type: string
        created_date:
          description: Payment instruction created date
          format: date
          type: string
        fee_amount:
          description: Fee amount
          format: float
          type: number
        fee_currency:
          description: Fee currency
          type: string
        iban:
          type: string
        invoice_required:
          description: Whether or not the payment requires an invoice
          type: boolean
        payment_currency:
          description: Currency the payment was made in
          type: string
        payment_date:
          description: Target payment date
          format: date
          type: string
        payment_id:
          description: Unique identifier for the payment
          type: string
        payment_instruction:
          description: URI to download payment instruction
          format: uri
          type: string
        payment_receipt:
          description: URI to download payment receipt
          format: uri
          type: string
        reference:
          description: Payment reference
          type: string
        rejected_by:
          description: The user who rejected the payment
          type: string
        rejected_date:
          description: The date when payment was rejected
          format: date
          type: string
        status:
          $ref: '#/components/schemas/PaymentStatus'
        swift_code:
          type: string
        trade_id:
          description: Unique identifier of the trade the payment is allocated to
          type: string
      required:
        - payment_id
        - contact_id
        - trade_id
      type: object
    PaymentInstructionWithErrors:
      allOf:
        - $ref: '#/components/schemas/NewMultiPaymentItem'
        - type: object
          properties:
            errors:
              items:
                properties:
                  code:
                    description: A short code for the error
                    type: string
                  message:
                    description: The detailed explanation of the error
                    type: string
                required:
                  - code
                  - message
                type: object
              type: array
      type: object
    PaymentStatus:
      description: The current status of the payment
      enum:
        - Need more beneficiary information
        - Validating beneficiary information
        - Waiting for payment date
        - Payment complete
        - Executing Payment
        - Payment pending of authorization
        - Payment rejected
        - Payment cancelled
      type: string
    Payments:
      items:
        $ref: '#/components/schemas/Payment'
      type: array
    PaymentsSummaryGetMassPaymentItem:
      properties:
        payments_received:
          description: Payments received count
          type: number
        payments_processed:
          description: Payments processed count
          type: number
        payments_errored:
          description: Payment errored count
          type: number
        payments_created:
          description: Funding created count
          type: number
      type: object
    PaymentFee:
      description: This model is a representation of a payment fee.
      type: object
      properties:
        fee_amount:
          description: Fee amount
          type: number
          format: float
        fee_currency:
          description: Fee currency
          type: string
        payment_amount:
          description: Payment amount
          type: number
          format: float
        payment_currency:
          description: Currency the payment was made in
          type: string
        payment_country:
          description: The destination country of the payment
          type: string
        beneficiary_id:
          description: Beneficiary identifier
          type: string
        payment_is_intra:
          type: boolean
          description: True if payment is Ebury intra payments, False otherwise
      required:
        - fee_amount
        - fee_currency
        - payment_currency
        - payment_country
        - beneficiary_id
    PaymentFeeEstimate:
      description: This model is a representation of a payment fee estimate.
      type: object
      properties:
        fee_amount:
          description: Fee amount
          type: number
          format: float
        fee_currency:
          description: Fee currency
          type: string
        payment_amount:
          description: Payment amount
          type: number
          format: float
        payment_currency:
          description: Currency the payment was made in
          type: string
        payment_country:
          description: The destination country of the payment
          type: string
        payment_instruction:
          description: payment instruction
          type: string
        payment_is_intra:
          type: boolean
          description: True if payment is Ebury intra payments, False otherwise
      required:
        - fee_amount
        - fee_currency
        - payment_currency
        - payment_country
        - payment_instruction
    PostTokenForContactResponse:
      type: object
      properties:
        access_token:
          type: string
          description: An OAuth access token that can be used to call the API
        token_type:
          type: string
          description: The Authorization header scheme to use when making requests, will be Bearer.
          enum:
            - Bearer
        expires_in:
          type: string
          description: Expiry period in seconds from time token returned, currently returns 3600 (1 hour).
        id_token:
          type: string
          description: A signed, base 64 encoded JSON Web Token that provides verification of the identity that authorized the request. The token includes the client identifier, which is a required parameter on the majority of API calls.
      description: Access token data
    PostTokenResponse:
      type: object
      properties:
        access_token:
          type: string
          description: An OAuth access token that can be used to call the API
        token_type:
          type: string
          description: The Authorization header scheme to use when making requests, will be Bearer.
          enum:
            - Bearer
        refresh_token:
          type: string
          description: An OAuth refresh token that can be used to get a new access token when when the last expires.
        expires_in:
          type: string
          description: Expiry period in seconds from time token returned, currently returns 3600 (1 hour).
        id_token:
          type: string
          description: A signed, base 64 encoded JSON Web Token that provides verification of the identity that authorized the request. The token includes the client identifier, which is a required parameter on the majority of API calls.
      description: Access token and refresh token data
    QuoteRequest:
      properties:
        amount:
          description: Amount
          format: double
          type: number
        buy_currency:
          description: Buy currency
          type: string
        operation:
          description: Operation (buy or sell)
          enum:
            - buy
            - sell
          type: string
        sell_currency:
          description: Sell currency
          type: string
        trade_type:
          description: The trade type
          enum:
            - spot
            - forward
          type: string
        value_date:
          description: |
            Value date for the trade. If the value date is not valid then the quote will be returned for next available value date. If the value date is not provided, then the quote will be returned for the next available valid value date.
          format: date
          type: string
      required:
        - amount
        - buy_currency
        - operation
        - sell_currency
        - trade_type
      type: object
    FxAvailability:
      properties:
        fx_available:
          description: True if FX markets are available at this time, False otherwise.
          type: boolean
      required:
        - fx_available
      type: object
    EstimateOrQuoteResponse:
      properties:
        book_trade:
          description: Call this endpoint to book the trade (refer to Trades documentation for required payload)
          format: uri
          type: string
        buy_amount:
          description: Buy amount
          format: double
          type: number
        buy_currency:
          description: Buy currency
          type: string
        inverse_rate:
          description: The inverse rate
          format: double
          type: number
        inverse_rate_symbol:
          description: The symbol of inverse rate
          type: string
        quote_id:
          description: Quote identifier. Used to create book a trade at the Trades endpoint
          type: string
        quoted_rate:
          description: The rate quoted
          format: double
          type: number
        quoted_rate_symbol:
          description: The symbol of rate quoted
          type: string
        sell_amount:
          description: Sell amount
          format: double
          type: number
        sell_currency:
          description: Sell currency
          type: string
        estimated_rate:
          description: The estimated rate
          format: double
          type: number
        estimated_rate_symbol:
          description: The symbol of estimated rate
          type: string
        fee_amount:
          description: Fee amount
          format: float
          type: number
        fee_currency:
          description: Fee currency
          type: string
        value_date:
          description: Date on which quote is requested
          format: date
          type: string
        warning:
          description: A warning is only returned if the requested value date was not valid and the next available date has been returned.
          type: string
      required:
        - inverse_rate
        - inverse_rate_symbol
        - value_date
      type: object
    QuoteResponse:
      properties:
        book_trade:
          description: Call this endpoint to book the trade (refer to Trades documentation for required payload)
          format: uri
          type: string
        buy_amount:
          description: Buy amount
          format: double
          type: number
        buy_currency:
          description: Buy currency
          type: string
        inverse_rate:
          description: The inverse rate
          format: double
          type: number
        inverse_rate_symbol:
          description: The symbol of inverse rate
          type: string
        quote_id:
          description: Quote identifier. Used to create book a trade at the Trades endpoint
          type: string
        quoted_rate:
          description: The rate quoted
          format: double
          type: number
        quoted_rate_symbol:
          description: The symbol of rate quoted
          type: string
        sell_amount:
          description: Sell amount
          format: double
          type: number
        sell_currency:
          description: Sell currency
          type: string
        value_date:
          description: Date on which trade active
          format: date
          type: string
        warning:
          description: A warning is only returned if the requested value date was not valid and the next available date has been returned.
          type: string
      required:
        - buy_amount
        - buy_currency
        - inverse_rate
        - inverse_rate_symbol
        - quote_id
        - quoted_rate
        - quoted_rate_symbol
        - sell_amount
        - sell_currency
        - value_date
      type: object
    StatementFileData:
      properties:
        url:
          description: The url needed to retrieve the statement. It contains two UUID values, the first one (from the left) is the account id and the second one is the statement id.
          type: string
      required:
        - url
      type: object
    StatementFileStatus:
      properties:
        status:
          $ref: '#/components/schemas/StatementStatus'
      type: object
    StatementStatus:
      description: The status of the statement.
      enum:
        - Pending
        - Failed
      type: string
    TradeStatus:
      description: Status of the trade
      enum:
        - Created
        - Funds In Partially
        - Funds in Full
        - Funds Out Partially Allocated
        - Funds Out Full Allocated
        - Closed
        - Cancelled
      type: string
    TransactionData:
      properties:
        account_id:
          description: The UUID of the account.
          type: string
        additional_transaction_information:
          description: Additional information for the transaction.
          type: string
        amount:
          $ref: '#/components/schemas/Amount'
        balance:
          $ref: '#/components/schemas/BalanceData'
        booking_datetime:
          description: Date and time (UTC) when the transaction was booked
          type: string
        client_id:
          description: Identifier of the client.
          type: string
        credit_debit_indicator:
          $ref: '#/components/schemas/CreditDebitIndicator'
        creditor_account:
          $ref: '#/components/schemas/CreditorDebtorAccount'
        creditor_name:
          description: Name of the creditor
          type: string
        debtor_account:
          $ref: '#/components/schemas/CreditorDebtorAccount'
        debtor_name:
          description: Name of the debtor
          type: string
        status:
          $ref: '#/components/schemas/TransactionStatus'
        transaction_id:
          description: The UUID of the transaction.
          type: string
        transaction_information:
          description: Basic information for the transaction
          type: string
        transaction_reference:
          description: Reference for the transaction
          type: string
        transaction_type:
          description: Type of the transaction
          type: string
          enum:
            - credit
            - debit
            - incoming
            - margin
            - payment_returned
        value_datetime:
          description: Value date and time (UTC) of the transaction
          type: string
      required:
        - account_id
        - additional_transaction_information
        - amount
        - balance
        - booking_datetime
        - client_id
        - credit_debit_indicator
        - status
        - transaction_id
        - transaction_information
        - transaction_reference
        - transaction_type
        - value_datetime
      type: object
    TransactionStatus:
      description: This is an enumeration of the types of status for a transaction.
      enum:
        - Booked
      type: string
    UpdateBeneficiary:
      allOf:
        - $ref: '#/components/schemas/BankAccountCoreData'
        - $ref: '#/components/schemas/BeneficiaryCoreData'
      description: The data to update a beneficiary. After a beneficiary has received a payment, the only fields available for modification are email_addresses, email_notification and beneficiary_reference.
      type: object
    VopCheckDetails:
      description: The details of a Verification of Payee check.
      properties:
        authorization_id:
          description: The ID of the VoP check. Can be provided in payment requests as `vop_authorization_id` queryparam to confirm VoP checks.
          type: string
        results:
          description: The list of VoP results, one for each beneficiary data object provided.
          type: array
          items:
            $ref: '#/components/schemas/VopResult'
        status:
          description: Summary of the VoP status of the whole batch. It is the highest priority status of all the results.
          type: string
    VopResult:
      description: The result of a Verification of Payee check.
      properties:
        message:
          description: Details about the result returned.
          type: string
        name:
          description: If the beneficiary name is a close match, this contains the actual names.
          type: string
        scheme_response_codes:
          description: List of response codes related to the response.
          type: array
          items:
            type: string
        status:
          description: The actual VoP status
          type: string
    WebhooksRequest:
      properties:
        query:
          description: The GraphQL query
          type: string
        variables:
          description: The GraphQL variables
          type: string
      required:
        - query
      description: The GraphQL query to execute
      type: object
    PaymentWithApprovalFields:
      example:
        amount: 32
        approvals_workflow:
          authorisations:
            - date: 2025-09-01T14:04:24.532
              status: 3
              contact_id: TAICON99999
              level: 100
              contact_name: Contact
          contact_authorisation_actions:
            allowed:
              - authorise
              - reject
            executed:
              - authorise
          n_eyes_plus_status: Awaiting approval
          minimum_remaining_authorisations: 1
        authorisation_workflow: 4-eyes
        authorised_by: TAICON99999
        authorised_date: "2016-04-28T00:00:00.000Z"
        beneficiary_name: Test beneficiary
        beneficiary_id: 16764
        beneficiary_aml_id: EBPBEN16764
        beneficiary_active: false
        beneficiary_authorised: false
        beneficiary_blocked: false
        beneficiary_completed: false
        beneficiary_verified: false
        cancelled_by: TAICON99999
        cancelled_date: "2016-04-28T00:00:00.000Z"
        charges: /SHA
        contact_id: TAICON99999
        created_date: "2016-04-28T00:00:00.000Z"
        iban: GB99TEST999999999999
        ordered_by_name: Test Trade User
        multipayment: EBPMP000001
        multipayment_id: 0001,
        multipayment_unique_id: 3c6288e4-1449-4525-83e4-f22e5efcf1bc
        payment_currency: GBP
        payment_date: "2016-04-28T00:00:00.000Z"
        payment_id: PI186294
        payment_instruction: /documents?client_id=TAICLI99999&type=pi&reference=PI186294
        reference: My payment reference
        rejected_by: TAICON99999
        rejected_date: "2016-04-28T00:00:00.000Z"
        status: Validating beneficiary information
        uuid: e064e4aa-df4b-4004-a62c-d8974387c2dd
        is_uuid_used_for_tracking: true
        swift_code: TESTES99
        trade_id: EBPOTR372760
      properties:
        account_number:
          type: string
        amount:
          description: Payment amount
          format: float
          type: number
        approvals_workflow:
          description: Neyes-Plus workflow related fields
          type: object
          properties:
            authorisations:
              properties:
                date:
                  description: Date when an approval / rejection was received for an Neyes Plus payment
                  type: string
                status:
                  description: Status of the payment
                  type: number
                contact_id:
                  description: Id of the contact who approved / rejected the Neyes Plus payment
                  type: string
                level:
                  description: Payment authorisation level
                  type: number
                contact_name:
                  description: Name of the contact who approved / rejected the Neyes Plus payment
                  type: string
            contact_authorisation_actions:
              description: List of allowed and executed authorisation actions for the user making the request
              type: object
              properties:
                allowed:
                  items:
                    enum:
                      - authorise
                      - reject
                      - cancel
                    type: string
                  type: array
                executed:
                  enum:
                    - authorise
                    - reject
                    - cancel
                  type: string
            n_eyes_plus_status:
              type: string
            minimum_remaining_authorisations:
              description: Minimum number of remaining authorisations required for the payment to be approved
              type: integer
        authorisation_workflow:
          description: The authorisation workflow of the payment
          enum:
            - simple
            - 4-eyes
            - 6-eyes
            - 8-eyes
            - 10-eyes
          type: string
        authorised_by:
          description: The user who authorised the payment
          type: string
        authorised_date:
          description: The date when payment was authorised
          format: date
          type: string
        bank_identifier:
          type: string
        beneficiary_name:
          description: Name of the beneficiary
          type: string
        beneficiary_id:
          description: id of the beneficiary
          type: string
        beneficiary_aml_id:
          description: a beneficiary id formatted
          type: string
        beneficiary_active:
          description: Flag indicating if the beneficiary is active
          type: boolean
        beneficiary_authorised:
          description: Flag indicating if the beneficiary is authorised
          type: boolean
        beneficiary_blocked:
          description: Flag indicating if the beneficiary is blocked
          type: boolean
        beneficiary_completed:
          description: Flag indicating if the beneficiary is completed
          type: boolean
        beneficiary_verified:
          description: Flag indicating if the beneficiary is verified
          type: boolean
        cancelled_by:
          description: The user who cancelled the payment
          type: string
        cancelled_date:
          description: The date when payment was cancelled
          format: date
          type: string
        charges:
          description: Charges associated with the payment
          type: string
        contact_id:
          description: Unique identifier of the contact who booked the payment
          type: string
        created_date:
          description: Payment instruction created date
          format: date
          type: string
        fee_amount:
          description: Fee amount
          format: float
          type: number
        fee_currency:
          description: Fee currency
          type: string
        iban:
          type: string
        invoice_required:
          description: Whether or not the payment requires an invoice
          type: boolean
        ordered_by_name:
          description: name of who make the order
          type: string
        multipayment:
          type: string
          description: The formatted, human-readable display identifier (e.g., 'EBPMP001067'). Often used for invoices and customer support.
        multipayment_id:
          type: string
          description: The internal database sequential numeric identifier.
        multipayment_unique_id:
          type: string
          format: uuid
          description: A universally unique identifier (UUID) used for secure API lookups and to prevent ID enumeration.
        payment_currency:
          description: Currency the payment was made in
          type: string
        payment_date:
          description: Target payment date
          format: date
          type: string
        payment_id:
          description: Unique identifier for the payment
          type: string
        payment_instruction:
          description: URI to download payment instruction
          format: uri
          type: string
        payment_receipt:
          description: URI to download payment receipt
          format: uri
          type: string
        reference:
          description: Payment reference
          type: string
        rejected_by:
          description: The user who rejected the payment
          type: string
        rejected_date:
          description: The date when payment was rejected
          format: date
          type: string
        status:
          $ref: '#/components/schemas/PaymentStatus'
        swift_code:
          type: string
        trade_id:
          description: Unique identifier of the trade the payment is allocated to
          type: string
        uuid:
          type: string
          format: uuid
          description: |
            The unique internal identifier for the payment. **Note:** This field is also used as the **UETR** (Unique End-to-end Transaction Reference) for SWIFT gpi tracking purposes when `is_uuid_used_for_tracking` is true.
        is_uuid_used_for_tracking:
          type: boolean
          description: |
            Indicates if the `uuid` can be used as a valid UETR for SWIFT tracking. It returns `true` only if the following conditions are met: * The payment schema is `SCHEMA_SWIFT`. * The transaction is recent (less than 124 days old). * The payment is not marked as invalid or canceled. * The date is subsequent to the `CAN_TRACK_SWIFT_PAYMENT_SINCE` setting.
      required:
        - payment_id
        - contact_id
        - trade_id
      type: object
    PaymentsWithApprovalFields:
      items:
        $ref: '#/components/schemas/PaymentWithApprovalFields'
      type: array
    ApprovalsWorkflowConfig:
      description: The configuration of the Approvals Workflow for a client.
      properties:
        groups:
          description: The groups (payment and admin) configured for the client.
          type: array
          items:
            $ref: '#/components/schemas/ApprovalsWorkflowGroup'
        ruleset:
          description: The payment approval ruleset for the client.
          $ref: '#/components/schemas/ApprovalsWorkflowRuleset'
      required:
        - groups
        - ruleset
      type: object
    ApprovalsWorkflowRuleset:
      description: A ruleset containing approval rules with a specific currency for a client.
      properties:
        currency:
          description: The currency this ruleset applies to.
          type: string
        rules:
          description: The payment approval rules configured for the client.
          type: array
          items:
            $ref: '#/components/schemas/ApprovalsWorkflowRule'
      required:
        - currency
        - rules
      type: object
    ApprovalsWorkflowGroup:
      description: A group in the Approvals Workflow configuration.
      properties:
        name:
          description: The name of the group.
          type: string
        scope:
          description: The scope of the group (either 'admin' or 'payments').
          type: string
        users:
          description: The users in the group.
          type: array
          items:
            $ref: '#/components/schemas/ApprovalsWorkflowGroupUser'
      required:
        - name
        - scope
        - users
      type: object
    ApprovalsWorkflowGroupUser:
      description: A user in an Approvals Workflow group.
      properties:
        id:
          description: The identifier of the user (contact ID).
          type: string
        name:
          description: The name of the user.
          type: string
        email:
          description: The email of the user.
          type: string
      required:
        - id
        - name
        - email
      type: object
    ApprovalsWorkflowRule:
      description: A payment approval rule in the Approvals Workflow configuration.
      properties:
        groups:
          description: The groups this rule applies to.
          type: array
          items:
            $ref: '#/components/schemas/ApprovalsWorkflowRuleGroup'
        minimum_threshold:
          description: The minimum amount threshold for this rule.
          format: float
          type: number
      required:
        - groups
        - minimum_threshold
      type: object
    ApprovalsWorkflowRuleGroup:
      description: A combination of groups in a payment approval rule.
      properties:
        one_of:
          description: Possible approval group combinations required.
          type: array
          items:
            $ref: '#/components/schemas/ApprovalsWorkflowRuleGroupCombination'
      required:
        - one_of
      type: object
    ApprovalsWorkflowRuleGroupCombination:
      description: Which groups are required to approve in this combination.
      properties:
        all_of:
          description: The group names that must approve.
          type: array
          items:
            type: string
      required:
        - all_of
      type: object
    ApprovalsWorkflowSettings:
      description: The Approvals Workflow settings for a client.
      properties:
        payment_approvals_enabled:
          description: Whether the Approvals Workflow is enabled for payments.
          type: boolean
        payment_creator_approval_enabled:
          description: Whether the creator of a payment can act as an approver.
          type: boolean
      required:
        - payment_approvals_enabled
        - payment_creator_approval_enabled
      type: object
    AccountDetailsAllResponse:
      type: object
      properties:
        account_id:
          type: string
        currency:
          type: string
        pooled_account_details:
          type: array
          items:
            $ref: '#/components/schemas/PooledAccountDetails'
        segregated_account_details:
          type: array
          items:
            $ref: '#/components/schemas/SegregatedAccountDetails'
        virtual_account_details:
          type: array
          items:
            $ref: '#/components/schemas/VirtualAccountDetails'
    VirtualAccountDetails:
      type: object
      properties:
        account_details_id:
          type: string
        account_details_type:
          type: string
        account_holder_address:
          type: string
        account_holder_name:
          type: string
        account_id:
          type: string
        alias:
          type: string
        country:
          type: string
        created:
          type: string
          format: date-time
        currency:
          type: string
        domestic:
          $ref: '#/components/schemas/DomesticDetails'
        international:
          $ref: '#/components/schemas/InternationalDetails'
        financial_institution_address:
          type: string
        financial_institution_name:
          type: string
        modified:
          type: string
          format: date-time
        primary:
          type: boolean
        status:
          type: string
    SegregatedAccountDetails:
      type: object
      properties:
        account_details_id:
          type: string
        account_details_type:
          type: string
        account_holder_name:
          type: string
        account_id:
          type: string
        alias:
          type: string
        country:
          type: string
        created:
          type: string
          format: date-time
        currency:
          type: string
        domestic:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/DomesticDetails'
            - type: "null"
        financial_institution_address:
          type: string
        financial_institution_name:
          type: string
        international:
          $ref: '#/components/schemas/InternationalDetails'
        modified:
          type: string
          format: date-time
        primary:
          type: boolean
        status:
          type: string
    PooledAccountDetails:
      type: object
      properties:
        account_details_id:
          type: string
        account_details_type:
          type: string
          enum:
            - pooled
        account_holder_address:
          type: string
        account_holder_name:
          type: string
        account_id:
          type: string
        country:
          type: string
        currency:
          type: string
        domestic:
          $ref: '#/components/schemas/DomesticDetails'
        international:
          $ref: '#/components/schemas/InternationalDetails'
        financial_institution_address:
          type: string
        financial_institution_name:
          type: string
        status:
          type: string
    DomesticDetails:
      type: object
      properties:
        account_number:
          type: string
        account_number_type:
          type: string
        bank_identifier:
          type: string
        bank_identifier_type:
          type: string
    InternationalDetails:
      type: object
      properties:
        account_number:
          type: string
        account_number_type:
          type: string
        bank_identifier:
          type: string
        bank_identifier_type:
          type: string
    RequestAccount:
      description: This model is a representation of the request account body.
      type: object
      properties:
        currency:
          description: Currency code
          type: string
        country:
          description: Country code
          type: string
      required:
        - currency
        - country
