Topolo Docs Topolo Platform
Open workspace

Create availability override — Calendar

Create an override, or update a discovered override by its ID.

Create an override, or update a discovered override by its ID.

Action: app_topolo_calendar.availability.overrides.create · POST /api/admin/availability/overrides

Declared permission: app_topolo_calendar.availability:write. For authorized Calendar users; permissions and resource access still apply.

Before you start

  • Use the current credential to confirm the production organization and inspect this exact action before preparing a call.
  • Declared permission: app_topolo_calendar.availability:write. Permission discovery is not a grant.
  • Discover the authorized Calendar workspace and pass it as resourceType=workspace/resourceId separately from this action input. Calendar records and IDs are scoped to the selected host/workspace.
  • Validate and plan the exact payload, obtain effect-specific authorization, then execute unchanged only in a separately authorized operational task. Do not run these synthetic inputs.

Inputs and field meanings

FieldPresenceDeclared constraintMeaning
idoptionalstringOptional discovered override ID. Omit for a new override; include only a same-host ID to update. A date is not an upsert key.
daterequiredstringLocal calendar date YYYY-MM-DD in the host timezone, not a UTC instant.
startMinuteoptionalnullable/unionInteger minutes after local midnight. Must be less than endMinute when a window is supplied.
endMinuteoptionalnullable/unionInteger end minutes after local midnight; later than startMinute and at most1440.

Worked request and response

Source-reviewed illustration only. Nothing below was executed; all identifiers, counts, states, credentials and URLs are synthetic. Replace identifiers through discovery before any separately authorized call.

Resource context: workspace; it is not an extra action input field.

Illustrative action input:

{
  "date": "2026-11-20",
  "startMinute": null,
  "endMinute": null
}

Illustrative HTTP 200 source response:

{
  "override": {
    "id": "ovr_example",
    "hostId": "hst_example",
    "date": "2026-11-20",
    "startMinute": null,
    "endMinute": null
  },
  "overrides": [
    {
      "id": "ovr_example",
      "hostId": "hst_example",
      "date": "2026-11-20",
      "startMinute": null,
      "endMinute": null
    }
  ]
}

override is the new record and overrides is the host list after writing. This example closes Friday 20 November. Without id, the source generates a new ID; repeating the same date payload is not an established idempotent update.

The illustrative response passes the declared structural schema. This establishes only schema compatibility, not deployed shape, values, authorization or business outcome.

Effects and verification

  • Inserts an override, or updates the matching id only when it belongs to this host.
  • A window replaces the day’s offered hours; both null endpoints close the day.
  1. Read availability.overrides.list and match id, date and both endpoints.

Refusals and recovery

Selected source refusals are listed below; runtime middleware can return additional structured errors.

HTTPErrorSupported response
403forbiddenReconcile the declared permission, organization and verified resource grant with the legitimate access owner; do not switch context to bypass a refusal.
404no_hostRead host.get; if it returns host:null, create the intended workspace host through host.update before retrying.
400invalid_override_windowSupply both integer endpoints with end after start, or omit/both null to close the day.
404not_foundList records in the selected workspace and discover the identifier again. Do not probe another workspace by guessing IDs.

Recovery: For an updated override, restore its prior date/window with the same discovered id. For a newly created override, use overrides.delete after confirming its ID; deletion restores weekly behavior.

After an uncertain mutation, reconcile the named records and provider/delivery evidence before repeating it.

  • app_topolo_calendar.availability.overrides.list: Discover date override IDs before updating or deleting one.
  • app_topolo_calendar.availability.overrides.delete: Remove one override and let the weekly schedule apply again.
  • app_topolo_calendar.availability.get: Read the current host’s complete weekly rules and date overrides.

Declared schemas and provenance

The hidden action guide carries these exact current declared schemas. They are not rewritten to make the illustrations pass.

Input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "startMinute": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 1439
        },
        {
          "type": "null"
        }
      ]
    },
    "endMinute": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 1440
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "date"
  ],
  "additionalProperties": false
}

Output schema:

{
  "type": "object",
  "title": "Create availability override response",
  "description": "Operation result returned by availability.overrides.create.",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "id": {
      "type": "string"
    },
    "data": {
      "oneOf": [
        {
          "type": "object",
          "title": "availability record",
          "properties": {
            "id": {
              "type": "string",
              "description": "Stable identifier when the availability exposes one."
            }
          },
          "additionalProperties": true
        },
        {
          "type": "object",
          "additionalProperties": true
        }
      ]
    },
    "result": {
      "type": "object",
      "additionalProperties": true
    },
    "message": {
      "type": "string"
    }
  },
  "additionalProperties": true,
  "x-topolo-contract-source": "derived-action-metadata",
  "x-topolo-contract-precision": "structural"
}

Source: TopoloCalendar@b378ceb73800ee1d1e6c4ff6f0b4179918cf632c, apps/api/src/routes/admin-availability.ts. Current catalog metadata and source were compared without executing the application.

  • Source-reviewed synthetic input/response; not captured or executed.
  • Source revision is not proof of current deployment, caller access, provider connection or notification delivery.
  • The illustrative response passes the declared structural schema. This establishes only schema compatibility, not deployed shape, values, authorization or business outcome.
  • Source persistence upserts by id, not by date. Reconcile an uncertain create before repeating it.