{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clarifymedical/json-schema/clarifymedical-invitations-response-schema.json",
  "title": "InvitationsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clarifymedical-invitations-api-openapi.yml#/components/schemas/InvitationsResponse",
  "type": "object",
  "properties": {
    "links": {
      "type": "object",
      "properties": {
        "next": {
          "type": [
            "string",
            "null"
          ],
          "description": "URL of the next page, or `null` on the last page."
        },
        "prev": {
          "type": [
            "string",
            "null"
          ],
          "description": "URL of the previous page, or `null` on the first page."
        }
      },
      "required": [
        "next",
        "prev"
      ],
      "description": "Pagination links."
    },
    "meta": {
      "type": "object",
      "properties": {
        "total_records": {
          "type": "number",
          "description": "Total number of records across all pages."
        },
        "total_pages": {
          "type": "number",
          "description": "Total number of pages at the current page size."
        }
      },
      "required": [
        "total_records",
        "total_pages"
      ],
      "description": "Pagination metadata."
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "invitation"
            ],
            "description": "The resource type; matches the `object` path parameter."
          },
          "id": {
            "type": "string",
            "description": "The unique ID of the resource."
          },
          "attributes": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of the invitation."
              },
              "invitee_email": {
                "type": "string",
                "description": "The email address the invitation went to."
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "accepted",
                  "expired",
                  "revoked"
                ],
                "description": "The invitation state: `pending`, `accepted`, `expired`, or `revoked`."
              }
            },
            "required": [
              "id",
              "invitee_email",
              "status"
            ],
            "description": "Field values keyed by field name; available fields depend on the object’s schema."
          },
          "relationships": {
            "type": "object",
            "properties": {},
            "description": "Related resources keyed by relationship name, present when requested via `include`."
          }
        },
        "required": [
          "type",
          "id",
          "attributes"
        ]
      },
      "description": "The page of resources."
    }
  },
  "required": [
    "links",
    "meta",
    "data"
  ]
}