{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openpayments-io/json-schema/openpayments-io-get-creditor-name-response-schema.json",
  "title": "GetCreditorNameResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openpayments-io-bankgiro-lookup-api-openapi.yml#/components/schemas/GetCreditorNameResponse",
  "type": "object",
  "properties": {
    "creditorName": {
      "type": [
        "string",
        "null"
      ]
    },
    "tppMessages": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/tppMessage2XX_GetCreditorName"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "MessageCode_GetCreditorName2XX": {
      "description": "Message codes for HTTP Error codes 2XX.",
      "type": "string",
      "enum": [
        "OCR_REF_INVALID",
        "CREDITOR_ACCOUNT_INVALID"
      ]
    },
    "tppMessage2XX_GetCreditorName": {
      "type": "object",
      "required": [
        "category",
        "code"
      ],
      "properties": {
        "category": {
          "$ref": "#/$defs/tppMessageCategory"
        },
        "code": {
          "$ref": "#/$defs/MessageCode_GetCreditorName2XX"
        },
        "path": {
          "type": "string"
        },
        "text": {
          "$ref": "#/$defs/tppMessageText"
        }
      }
    },
    "tppMessageCategory": {
      "description": "Category of the TPP message category",
      "type": "string",
      "enum": [
        "INFORMATION",
        "UNMAPPED",
        "ERROR",
        "WARNING"
      ]
    },
    "tppMessageText": {
      "description": "Additional explaining text to the TPP.",
      "type": "string",
      "maxLength": 512
    }
  }
}