{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/datocapital-com/json-schema/datocapital-com-who-am-i-schema.json",
  "title": "WhoAmI",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/datocapital-com-openapi.yaml#/components/schemas/WhoAmI",
  "type": "object",
  "properties": {
    "user_id": {
      "type": "integer"
    },
    "key_mode": {
      "type": "string",
      "enum": [
        "live",
        "test"
      ]
    },
    "plan": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "rank": {
          "type": "integer"
        },
        "limits": {
          "type": "object",
          "additionalProperties": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "features": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          }
        },
        "pricing": {
          "type": "object",
          "description": "`monthly_cents` is the flat subscription fee.\n`per_request_cents` is the overage fee charged for each\nrequest beyond `limits.max_requests_per_month`; null\nmeans the plan is hard-capped at the monthly quota and\nreturns 429 instead of metering the overage.\n",
          "properties": {
            "currency": {
              "type": "string"
            },
            "monthly_cents": {
              "type": "integer"
            },
            "per_request_cents": {
              "type": [
                "integer",
                "null"
              ]
            }
          }
        }
      }
    },
    "entitlements": {
      "type": "object",
      "properties": {
        "fields": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "entity": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "min_plan": {
                "type": "string"
              },
              "accessible": {
                "type": "boolean"
              }
            }
          }
        },
        "endpoints": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "endpoint": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "min_plan": {
                "type": "string"
              },
              "accessible": {
                "type": "boolean"
              }
            }
          }
        }
      }
    }
  }
}