{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/argyle9a25/json-schema/argyle9a25-shift-schema.json",
  "title": "Shift",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/argyle9a25-shifts-api-openapi.yml#/components/schemas/Shift",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique ID of the shift."
    },
    "account": {
      "type": "string",
      "format": "uuid",
      "description": "Unique ID of the account associated with the shift."
    },
    "employer": {
      "type": "string",
      "description": "Employer name."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) when the shift object was created."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) when a property value of the shift object most recently changed."
    },
    "status": {
      "type": "string",
      "enum": [
        "scheduled",
        "in_progress",
        "completed",
        "cancelled"
      ],
      "description": "Current state of the shift."
    },
    "type": {
      "type": "string",
      "enum": [
        "hourly",
        "services"
      ],
      "description": "The type of shift."
    },
    "start_datetime": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) when the shift started."
    },
    "end_datetime": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) when the shift ended."
    },
    "all_datetimes": {
      "type": "object",
      "description": "Contains information on when the shift started and ended, and any breaks taken in between.",
      "properties": {
        "shift_start": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) when the shift started."
        },
        "shift_end": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) when the shift ended."
        },
        "breaks": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "break_start": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) when the break started."
              },
              "break_end": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) when the break ended."
              }
            }
          }
        }
      }
    },
    "hours": {
      "type": "string",
      "description": "Time duration of the shift, subtracting breaks. Returned as a decimal string with up to four decimal places.",
      "x-argyle-decimal-places": 4,
      "x-argyle-decimal-mode": "maximum"
    },
    "timezone": {
      "type": "string",
      "description": "Timezone ([IANA](https://www.iana.org/time-zones)) where the shift took place."
    },
    "location": {
      "type": "string",
      "description": "Full address of where the shift took place."
    },
    "metadata": {
      "type": "object",
      "description": "Additional, non-categorized information."
    }
  }
}