{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/medcehub/json-schema/medcehub-conference-document-schema.json",
  "title": "ConferenceDocument",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/medcehub-openapi.yml#/components/schemas/ConferenceDocument",
  "type": "object",
  "properties": {
    "jsonapi": {
      "$ref": "#/$defs/JsonApi"
    },
    "data": {
      "$ref": "#/$defs/Conference"
    }
  },
  "$defs": {
    "Conference": {
      "type": "object",
      "required": [
        "type",
        "id",
        "attributes"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "conferences"
        },
        "id": {
          "type": "string"
        },
        "attributes": {
          "$ref": "#/$defs/ConferenceAttributes"
        },
        "relationships": {
          "type": "object",
          "properties": {
            "professions": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/ResourceIdentifier"
                  }
                }
              }
            },
            "specialties": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/ResourceIdentifier"
                  }
                }
              }
            }
          }
        },
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "string",
              "format": "uri"
            },
            "medcehub": {
              "type": "string",
              "format": "uri"
            }
          }
        }
      }
    },
    "ConferenceAttributes": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "series": {
          "type": "string"
        },
        "short_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "start_date": {
          "type": "string",
          "format": "date"
        },
        "end_date": {
          "type": "string",
          "format": "date"
        },
        "dates_text": {
          "type": "string"
        },
        "timezone": {
          "type": [
            "string",
            "null"
          ]
        },
        "format": {
          "type": "string",
          "enum": [
            "in_person",
            "online",
            "hybrid"
          ]
        },
        "is_cruise": {
          "type": "boolean",
          "description": "CME cruise or CME vacation at sea"
        },
        "status": {
          "type": "string",
          "enum": [
            "scheduled",
            "postponed",
            "cancelled"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": [
            "string",
            "null"
          ],
          "description": "Two-letter US state code"
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "venue": {
          "type": [
            "string",
            "null"
          ]
        },
        "latitude": {
          "type": [
            "number",
            "null"
          ]
        },
        "longitude": {
          "type": [
            "number",
            "null"
          ]
        },
        "professions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Ids from /professions.json"
        },
        "specialties": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Ids from /specialties.json"
        },
        "topics": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Mandatory CE topics covered, ids from /topics.json"
        },
        "credits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Credit"
          }
        },
        "credits_text": {
          "type": [
            "string",
            "null"
          ]
        },
        "max_credits": {
          "type": [
            "number",
            "null"
          ]
        },
        "price_from_usd": {
          "type": [
            "number",
            "null"
          ]
        },
        "price_to_usd": {
          "type": [
            "number",
            "null"
          ]
        },
        "early_bird_until": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "credit_claim_deadline": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "cme_provider": {
          "type": [
            "string",
            "null"
          ]
        },
        "organizer": {
          "type": [
            "string",
            "null"
          ]
        },
        "organizer_website": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "organizer_kind": {
          "type": [
            "string",
            "null"
          ]
        },
        "official_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "registration_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "summary": {
          "type": [
            "string",
            "null"
          ]
        },
        "checked_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "Date the facts were last checked on the official page"
        },
        "medcehub_url": {
          "type": "string",
          "format": "uri",
          "description": "Conference page on MedCE Hub (link here when you use the record)"
        }
      }
    },
    "Credit": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "amount": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "JsonApi": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string"
        }
      }
    },
    "ResourceIdentifier": {
      "type": "object",
      "required": [
        "type",
        "id"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "id": {
          "type": "string"
        }
      }
    }
  }
}