{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amigo/main/json-schema/amigo-fhir-organization-list-response-schema.json",
  "title": "FhirOrganizationListResponse",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amigo-fhir-api-openapi.yml#/components/schemas/FhirOrganizationListResponse",
  "properties": {
    "organizations": {
      "items": {
        "$ref": "#/$defs/FhirOrganizationView"
      },
      "type": "array",
      "title": "Organizations"
    },
    "total": {
      "type": "integer",
      "title": "Total"
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More",
      "default": false
    },
    "next_offset": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Offset"
    }
  },
  "type": "object",
  "required": [
    "organizations",
    "total"
  ],
  "$defs": {
    "FhirOrganizationView": {
      "properties": {
        "entity_id": {
          "type": "string",
          "format": "uuid",
          "title": "Entity Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Phone"
        },
        "domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Domain"
        },
        "industry": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Industry"
        },
        "address": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Address"
        },
        "source_system": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source System"
        },
        "canonical_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Canonical Id"
        },
        "event_count": {
          "type": "integer",
          "title": "Event Count",
          "default": 0
        },
        "last_event_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Event At"
        }
      },
      "type": "object",
      "required": [
        "entity_id"
      ],
      "title": "FhirOrganizationView"
    }
  }
}