> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ebury.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get beneficiary validation schema (V2)

> Returns the declarative FORM_V1 validation schema (metadata) describing the fields, options, constraints, verification requirements and cross-field rules for creating a beneficiary with the given bank country and currency, in the V2 field-name vocabulary.
Registered before /v2/beneficiaries/{beneficiary_id} so the static validation-schemas segment is not captured as a beneficiary_id.



## OpenAPI

````yaml https://api.ebury.io/openapi.json get /v2/beneficiaries/validation-schemas
openapi: 3.0.0
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'
servers:
  - url: https://{environment}.ebury.io
    variables:
      environment:
        default: api
        enum:
          - api
          - sandbox
security: []
paths:
  /v2/beneficiaries/validation-schemas:
    parameters:
      - $ref: '#/components/parameters/ClientId'
      - $ref: '#/components/parameters/Authorization'
    get:
      tags:
        - Beneficiaries V2
      summary: Get beneficiary validation schema (V2)
      description: >-
        Returns the declarative FORM_V1 validation schema (metadata) describing
        the fields, options, constraints, verification requirements and
        cross-field rules for creating a beneficiary with the given bank country
        and currency, in the V2 field-name vocabulary.

        Registered before /v2/beneficiaries/{beneficiary_id} so the static
        validation-schemas segment is not captured as a beneficiary_id.
      operationId: beneficiaries_v2_validation_schemas_get
      parameters:
        - description: ISO 3166-1 alpha-2 country code of the beneficiary's bank.
          in: query
          name: country_code
          required: true
          schema:
            type: string
            minLength: 2
            maxLength: 2
        - description: ISO 4217 currency code of the beneficiary's bank account.
          in: query
          name: currency_code
          required: true
          schema:
            type: string
            minLength: 3
            maxLength: 3
        - $ref: '#/components/parameters/XBeneficiaryPolicyVersion'
      responses:
        '200':
          $ref: '#/components/responses/BeneficiaryV2ValidationSchema'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/ClientNotFound'
        '422':
          $ref: '#/components/responses/UnsupportedBankCountryOrCurrency'
        '500':
          $ref: '#/components/responses/IntegrationError'
        '502':
          $ref: '#/components/responses/IntegrationError'
components:
  parameters:
    ClientId:
      description: The identifier of a client.
      in: query
      name: client_id
      required: true
      schema:
        type: string
    Authorization:
      description: The access token.
      in: header
      name: Authorization
      required: true
      schema:
        type: string
    XBeneficiaryPolicyVersion:
      description: >-
        The version of the beneficiary validation policy to apply. The latest
        one is used when omitted.
      in: header
      name: X-Beneficiary-Policy-Version
      required: false
      schema:
        type: string
  responses:
    BeneficiaryV2ValidationSchema:
      description: >-
        The declarative FORM_V1 validation schema (metadata) for creating a
        beneficiary with the given bank country and currency.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BeneficiaryV2ValidationSchema'
    ValidationError:
      description: >-
        Formatting, parameter or schema validation error. See error message for
        further details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    Unauthorized:
      description: Access denied due to authentication failure.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    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'
    ClientNotFound:
      description: Client identifier not found.
    UnsupportedBankCountryOrCurrency:
      description: >-
        The requested bank country/currency pair is not supported for
        beneficiary creation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    IntegrationError:
      description: Internal integration error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
  schemas:
    BeneficiaryV2ValidationSchema:
      description: >-
        The declarative FORM_V1 schema describing how to fill in a beneficiary
        for a given bank country and currency, in the V2 field-name vocabulary.
        The compiler is a faithful projection of the resolved policy, so the
        exact set of fields, options and rules varies by bank country/currency.
      properties:
        schema_version:
          description: The FORM_V1 schema shape version.
          type: string
          example: form_v1
        context:
          description: Echoes the request's client, bank country and currency.
          type: object
          properties:
            client_id:
              type: string
            bank_country_code:
              type: string
            bank_account_currency_code:
              type: string
        payee_verification:
          description: >-
            Whether payee/beneficiary verification (e.g. Confirmation of Payee)
            is required for this bank country/currency, and its type.
          type: object
          properties:
            required:
              type: boolean
            type:
              type: string
        bank_account_verification:
          description: >-
            The field groups whose presence triggers a bank-account verification
            check (e.g. an IBAN, or an account number together with a local
            routing identifier).
          type: object
          properties:
            triggers:
              type: array
              items:
                type: object
                properties:
                  fields:
                    type: array
                    items:
                      type: string
        fields:
          description: >-
            The fields that can be submitted when creating a beneficiary for
            this bank country and currency.
          type: array
          items:
            $ref: '#/components/schemas/BeneficiaryV2ValidationSchemaField'
        ignored_fields:
          description: >-
            Fields accepted by the create payload but not used for this bank
            country/currency; any value submitted for them is ignored rather
            than rejected.
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              title:
                type: string
              note:
                type: string
        rules:
          description: >-
            Cross-field validation rules (e.g. a field becoming required when
            another field has a given value) that cannot be expressed on a
            single field alone. Each rule's `type` selects its shape.
          type: array
          items:
            type: object
            additionalProperties: true
      required:
        - schema_version
        - fields
      type: object
    ErrorMessage:
      description: An error message.
      properties:
        code:
          type: string
          description: The code for the error.
        details:
          description: Error details
          type: string
        message:
          type: string
          description: A short description of the cause of the error.
      required:
        - code
        - message
        - details
      type: object
    BeneficiaryV2ValidationSchemaField:
      description: >-
        A single field that can be submitted when creating a beneficiary, and
        how it is validated.
      properties:
        id:
          description: >-
            The field's public name in the V2 vocabulary, e.g.
            `bank_account.holder_name`.
          type: string
        title:
          description: A human-readable label for the field.
          type: string
        data_type:
          description: The field's data type.
          type: string
          enum:
            - string
            - boolean
            - array
        requirement:
          description: >-
            Whether the field must be supplied, and how. A `_derivable` value
            means the Beneficiary-Service can fill it in from other fields when
            omitted.
          type: string
          enum:
            - required
            - optional
            - required_derivable
            - optional_derivable
            - conditionally_required
        constraints:
          description: >-
            Declarative constraints (e.g. minLength, maxLength, pattern, const)
            as data, as opposed to a JSON Schema fragment. Absent instead of
            `item_constraints` unless `data_type` is `array`.
          type: object
          additionalProperties: true
        item_constraints:
          description: >-
            Present instead of `constraints` when `data_type` is `array`; the
            constraints applied to each item.
          type: object
          additionalProperties: true
        options:
          description: Present when the field accepts a closed set of values.
          type: array
          items:
            type: object
            properties:
              value:
                type: string
              label:
                type: string
        affects_other_fields:
          description: >-
            Whether the value chosen for this field can change which other
            fields are required.
          type: boolean
        error_code:
          description: The upstream error code returned when this field fails validation.
          type: string
      required:
        - id
        - title
        - data_type
        - requirement
      type: object

````