{
  "$schema": "https://abhcr.github.io/comcom-protocol/releases/v0.2.0/schemas/comcom-meta.schema.json",
  "$id": "https://abhcr.github.io/comcom-protocol/releases/v0.2.0/profiles/v0.2/transactions.scheduling/comcom-appointment-reschedule/schemas/input.schema.json",
  "title": "Appointment Reschedule input",
  "description": "Reschedule appointment using an exact, schema-validated Comcom interaction.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "capability",
    "parameters"
  ],
  "properties": {
    "capability": {
      "const": "comcom.appointment.reschedule"
    },
    "parameters": {
      "type": "object",
      "description": "Appointment Reschedule parameters.",
      "additionalProperties": false,
      "required": [
        "appointmentId",
        "expectedRevision",
        "changes"
      ],
      "properties": {
        "appointmentId": {
          "type": "string",
          "description": "Appointment URI.",
          "format": "uri-reference"
        },
        "expectedRevision": {
          "type": "integer",
          "minimum": 0
        },
        "changes": {
          "type": "object",
          "description": "Permitted Appointment changes.",
          "additionalProperties": false,
          "required": [],
          "properties": {
            "statusCode": {
              "type": "string",
              "description": "Profile-defined business state.",
              "pattern": "^[a-z][a-zA-Z0-9.-]{0,63}$"
            },
            "offeringId": {
              "type": "string",
              "description": "Bookable offering or service URI.",
              "format": "uri-reference"
            },
            "customerId": {
              "type": "string",
              "description": "Customer URI.",
              "format": "uri-reference"
            },
            "providerId": {
              "type": "string",
              "description": "Provider URI.",
              "format": "uri-reference"
            },
            "start": {
              "type": "string",
              "description": "Inclusive start instant.",
              "format": "date-time"
            },
            "end": {
              "type": "string",
              "description": "Exclusive end instant.",
              "format": "date-time"
            },
            "timeZone": {
              "type": "string",
              "description": "IANA time-zone identifier.",
              "pattern": "^[A-Za-z_]+(?:/[A-Za-z0-9_+.-]+)+$"
            },
            "locationId": {
              "type": "string",
              "description": "Location URI.",
              "format": "uri-reference"
            },
            "partySize": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          }
        }
      }
    }
  }
}
