{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/gnosis-pay/main/json-schema/gnosis-pay-get-user-response-schema.json",
  "title": "GetUserResponse",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gnosis-pay-openapi.json#/components/schemas/GetUserResponse",
  "type": "object",
  "required": [
    "id",
    "address",
    "email",
    "profileId",
    "accountId",
    "cardholderId",
    "partnerId",
    "createdAt",
    "kycProfile"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "address": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "profileId": {
      "$ref": "#/$defs/uuid"
    },
    "accountId": {
      "anyOf": [
        {
          "$ref": "#/$defs/uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "cardholderId": {
      "anyOf": [
        {
          "$ref": "#/$defs/uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "partnerId": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "kycProfile": {
      "$ref": "#/$defs/UserKycProfile"
    }
  },
  "$defs": {
    "UserKycAddress": {
      "type": "object",
      "required": [
        "id",
        "country",
        "postalCode",
        "city",
        "state",
        "address1",
        "address2"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/uuid"
        },
        "country": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "address1": {
          "type": "string"
        },
        "address2": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "UserKycProfile": {
      "type": "object",
      "required": [
        "id",
        "reference",
        "email",
        "status",
        "tenantId",
        "details"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/uuid"
        },
        "reference": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/UserKycProfileStatus"
        },
        "tenantId": {
          "type": "string"
        },
        "details": {
          "anyOf": [
            {
              "$ref": "#/$defs/UserKycProfileDetails"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "UserKycProfileDetails": {
      "type": "object",
      "required": [
        "fullName",
        "phoneNumber",
        "dateOfBirth",
        "nationality",
        "countryOfResidence",
        "countryOfBirth",
        "taxIdNumber",
        "gender",
        "addresses"
      ],
      "properties": {
        "fullName": {
          "type": "string"
        },
        "phoneNumber": {
          "type": "string"
        },
        "dateOfBirth": {
          "type": "string",
          "format": "date-time"
        },
        "nationality": {
          "type": "string"
        },
        "countryOfResidence": {
          "type": "string"
        },
        "countryOfBirth": {
          "type": "string"
        },
        "taxIdNumber": {
          "type": "string"
        },
        "gender": {
          "type": "string"
        },
        "addresses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserKycAddress"
          }
        }
      }
    },
    "UserKycProfileStatus": {
      "type": "string",
      "enum": [
        "pending",
        "approved",
        "blocked",
        "rejected",
        "requires_action",
        "resubmission_requested"
      ]
    },
    "uuid": {
      "type": "string",
      "format": "uuid"
    }
  }
}