{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/CheckInAction/v1/schema.json",
  "title": "CheckInAction",
  "description": "Objects Grid CheckInAction Object. A record that someone came in: a member at the gym, a ticket at the gate, a student at a class. A ticket (a Reservation) is checked in once: a second completed check-in of it is refused with 409 TICKET_ALREADY_USED. Check-ins are records: never updated, a mistake is a new one. Modeled in compliance with https://schema.org/CheckInAction.",
  "type": "object",
  "properties": {
    "at_context": {
      "description": "Schema context",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "https://schema.org"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_type": {
      "description": "The object type",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "CheckInAction"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_id": {
      "description": "This CheckInAction's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>: its JSON-LD @id, which References point to. Set by the service.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "readOnly": true
    },
    "id": {
      "description": "The unique identifier for CheckInAction. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50,
      "readOnly": true
    },
    "identifier": {
      "description": "The unique identifier for CheckInAction. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50,
      "readOnly": true
    },
    "url": {
      "description": "This CheckInAction URL. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "minLength": 1,
      "readOnly": true
    },
    "agent": {
      "x-objectsgrid-erasure": "keep",
      "x-objectsgrid-version": "pinned",
      "description": "Who came in: the URL of a Person, stored as <url>?version=<objectVersion>",
      "x-objectsgrid-rangeIncludes": [
        "Person",
        "Organization"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "object": {
      "description": "What admitted them: a ProgramMembership, or a Reservation (an event ticket, a class, a table)",
      "x-objectsgrid-rangeIncludes": [
        "ProgramMembership",
        "Reservation"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "location": {
      "description": "Where: the Place",
      "x-objectsgrid-rangeIncludes": [
        "Place"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "instrument": {
      "description": "The staff member who checked them in",
      "x-objectsgrid-rangeIncludes": [
        "EmployeeRole"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "startTime": {
      "description": "When; the time it was created when not given",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "actionStatus": {
      "description": "CompletedActionStatus (the default) when they were let in, FailedActionStatus when refused",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/ActionStatusType/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "description": "Why entry was refused, e.g. 'Membership expired'",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 500
    },
    "additionalProperty": {
      "description": "Other facts, e.g. name gate, value North",
      "type": [
        "array",
        "null"
      ],
      "maxItems": 20,
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/PropertyValue/v1/schema.json"
      }
    },
    "tags": {
      "description": "Tags an ABAC policy can decide on. A name may repeat; the same name and value appear once. Every stored object has them: created empty when not sent, kept by a replacement (PUT) that does not mention them, unchanged by a patch that does not mention them, cleared by null or [].",
      "type": "array",
      "default": [],
      "uniqueItems": true,
      "maxItems": 50,
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Tag/v1/schema.json"
      }
    },
    "meta": {
      "description": "System-managed metadata for the object (version, audit fields). Assigned by the server.",
      "$ref": "https://objectsgrid.com/.well-known/objects-catalog/ObjectMeta/v1/schema.json",
      "readOnly": true
    }
  },
  "required": [
    "object"
  ]
}
