{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/animalchecklist-com/json-schema/animalchecklist-com-inat-taxon-detail-schema.json",
  "title": "InatTaxonDetail",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/animalchecklist-com-openapi.json#/components/schemas/InatTaxonDetail",
  "type": "object",
  "required": [
    "inatId",
    "nameSci",
    "taxonRank",
    "parentNameSci",
    "categoryId",
    "family",
    "sourceUrl",
    "animalId"
  ],
  "properties": {
    "inatId": {
      "type": "integer",
      "minimum": 1
    },
    "nameSci": {
      "type": "string"
    },
    "taxonRank": {
      "type": "string",
      "description": "Raw iNaturalist rank."
    },
    "parentNameSci": {
      "type": [
        "string",
        "null"
      ]
    },
    "categoryId": {
      "type": "string",
      "enum": [
        "mammals",
        "birds",
        "reptiles",
        "amphibians",
        "fish",
        "insects",
        "other"
      ]
    },
    "family": {
      "type": [
        "string",
        "null"
      ]
    },
    "sourceUrl": {
      "type": "string",
      "format": "uri"
    },
    "animalId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Existing catalog ID. Null when no legacy catalog entry is linked."
    },
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
      "description": "Slug of the animal taxon, for example `red-fox`."
    },
    "name": {
      "type": "string"
    },
    "nameEn": {
      "type": "string"
    },
    "parentId": {
      "type": [
        "integer",
        "null"
      ]
    },
    "active": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "tickable": {
      "type": "boolean",
      "description": "Active supported leaf taxon. Photo presence is not required."
    },
    "image": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "url"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "names": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "lexicon": {
            "type": "string"
          },
          "sourceKey": {
            "type": "string"
          }
        }
      }
    },
    "lineage": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "inatId": {
            "type": "integer"
          },
          "nameSci": {
            "type": "string"
          },
          "taxonRank": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          }
        }
      }
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "sourceKey",
          "url",
          "snapshotDate",
          "sha256",
          "recordCount",
          "importedAt",
          "complete"
        ],
        "properties": {
          "sourceKey": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "snapshotDate": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "recordCount": {
            "type": "integer"
          },
          "importedAt": {
            "type": "string"
          },
          "complete": {
            "type": "boolean"
          },
          "rights": {
            "type": "object",
            "properties": {
              "license": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "licenseUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              },
              "status": {
                "type": "string",
                "enum": [
                  "not-supplied"
                ]
              },
              "note": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "extinct": {
      "type": "null",
      "description": "The bulk source does not provide this status."
    },
    "acceptedTaxonId": {
      "type": "null",
      "description": "Inactive records do not identify a verified replacement."
    },
    "hybrid": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "True only when the source rank is hybrid."
    },
    "summary": {
      "type": [
        "object",
        "null"
      ],
      "description": "Wikipedia excerpt. Keep attribution, licence and source links, changes and supplied notices. Check source article exceptions.",
      "required": [
        "lang",
        "summary",
        "sourceUrl"
      ],
      "properties": {
        "lang": {
          "type": "string",
          "enum": [
            "en",
            "de",
            "es",
            "fr",
            "it",
            "nl",
            "pt",
            "pl"
          ]
        },
        "summary": {
          "type": "string"
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri"
        },
        "license": {
          "type": "string"
        },
        "licenseUrl": {
          "type": "string",
          "format": "uri"
        },
        "attribution": {
          "type": "string"
        },
        "changes": {
          "type": "string"
        },
        "notice": {
          "type": "string"
        }
      }
    },
    "photo": {
      "anyOf": [
        {
          "type": "object",
          "description": "Photo credit. Check the licence and source before reuse.",
          "required": [
            "url",
            "sourceUrl",
            "license",
            "author",
            "source"
          ],
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "sourceUrl": {
              "type": "string",
              "format": "uri",
              "description": "Page to link when you show it."
            },
            "license": {
              "type": "string",
              "enum": [
                "CC0",
                "Public domain",
                "Pexels License",
                "Pixabay Content License"
              ]
            },
            "licenseUrl": {
              "type": "string",
              "format": "uri",
              "description": "Licence terms or public-domain status guidance."
            },
            "author": {
              "type": "string",
              "description": "Credited author. Empty when the source gives no name."
            },
            "source": {
              "type": "string",
              "enum": [
                "inaturalist",
                "commons",
                "gbif",
                "pexels",
                "pixabay"
              ],
              "description": "Photo source."
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "enrichment": {
      "type": [
        "object",
        "null"
      ],
      "description": "Optional source facts with source URLs. Absent facts remain unknown.",
      "properties": {
        "wikidataId": {
          "type": [
            "string",
            "null"
          ]
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri"
        },
        "checkedAt": {
          "type": "string"
        },
        "retrievalStatus": {
          "type": "string",
          "enum": [
            "available",
            "no_match",
            "partial"
          ]
        },
        "names": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "descriptions": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "facts": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "texts": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "image": {
          "anyOf": [
            {
              "type": "object",
              "description": "Photo credit. Check the licence and source before reuse.",
              "required": [
                "url",
                "sourceUrl",
                "license",
                "author",
                "source"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "sourceUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "Page to link when you show it."
                },
                "license": {
                  "type": "string",
                  "enum": [
                    "CC0",
                    "Public domain",
                    "Pexels License",
                    "Pixabay Content License"
                  ]
                },
                "licenseUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "Licence terms or public-domain status guidance."
                },
                "author": {
                  "type": "string",
                  "description": "Credited author. Empty when the source gives no name."
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "inaturalist",
                    "commons",
                    "gbif",
                    "pexels",
                    "pixabay"
                  ],
                  "description": "Photo source."
                }
              }
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}