{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/simpledock-ai/json-schema/simpledock-ai-patch-appointment-schema.json",
  "title": "PatchAppointment",
  "description": "Provide startTime/doorId to reschedule, and/or any detail fields to edit.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/simpledock-ai-openapi.yml#/components/schemas/PatchAppointment",
  "type": "object",
  "properties": {
    "startTime": {
      "type": "string",
      "format": "date-time"
    },
    "doorId": {
      "type": "string",
      "description": "Move to this door, at every location. Used only with startTime. A door that is booked, closed off, closed, or does not take the type returns 409 with code `conflict` and details.reason = door_unavailable. The appointment never moves to another door. A door from another location returns 404."
    },
    "quiet": {
      "type": "boolean",
      "description": "When true, a move sends no reschedule email to the booker and no alert to the site. Calendar sync and webhooks still run."
    },
    "companyName": {
      "type": "string",
      "maxLength": 200
    },
    "contactEmail": {
      "type": "string",
      "format": "email"
    },
    "contactName": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 120
    },
    "contactPhone": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 40
    },
    "driverName": {
      "type": [
        "string",
        "null"
      ]
    },
    "driverPhone": {
      "type": [
        "string",
        "null"
      ]
    },
    "trailerNumber": {
      "type": [
        "string",
        "null"
      ]
    },
    "poReference": {
      "type": [
        "string",
        "null"
      ],
      "description": "Sets a single purchase order and replaces the list with that one value. Null clears it. Ignored when poNumbers is sent."
    },
    "poNumbers": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Replaces the purchase-order list. Send [] to clear it. Wins over poReference."
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "description": "Operational instructions for staff, such as dock or load handling. Do not include personal or sensitive information."
    },
    "driverNotes": {
      "type": [
        "string",
        "null"
      ],
      "description": "Operational instructions for the driver, such as dock or load handling. Do not include personal or sensitive information."
    }
  }
}