{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lindo-ai/json-schema/lindo-ai-batch-website-status-response-schema.json",
  "title": "BatchWebsiteStatusResponse",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/lindo-ai-api-openapi.json#/components/schemas/BatchWebsiteStatusResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "done": {
      "type": "boolean",
      "description": "True once every item has reached a terminal state."
    },
    "status": {
      "type": "string",
      "enum": [
        "scheduled",
        "running",
        "complete",
        "partial",
        "errored"
      ],
      "description": "- `scheduled`: every item is scheduled\n- `running`: at least one item is still running or scheduled\n- `complete`: every item finished cleanly\n- `partial`: every item is terminal but some errored\n- `errored`: every item errored"
    },
    "message": {
      "type": "string",
      "description": "Human-readable summary of the batch, safe to quote."
    },
    "summary": {
      "type": "object",
      "properties": {
        "total": {
          "type": "number",
          "description": "Total items polled"
        },
        "complete": {
          "type": "number",
          "description": "Items complete"
        },
        "running": {
          "type": "number",
          "description": "Items still running (includes scheduled)"
        },
        "partial": {
          "type": "number",
          "description": "Items with partial outcome (website only)"
        },
        "errored": {
          "type": "number",
          "description": "Items errored"
        },
        "not_found": {
          "type": "number",
          "description": "workflow_ids that could not be found (or belong to a different workflow type)."
        }
      },
      "required": [
        "total",
        "complete",
        "running",
        "partial",
        "errored",
        "not_found"
      ]
    },
    "poll_after_ms": {
      "type": "number",
      "description": "Suggested delay before polling again while `done` is false."
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BatchWebsiteStatusItem"
      },
      "description": "Per-workflow status, in the same order as the requested workflow_ids."
    }
  },
  "required": [
    "success",
    "done",
    "status",
    "message",
    "summary",
    "items"
  ],
  "$defs": {
    "BatchWebsiteStatusItem": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "True if the workflow was found and polled. False for not-found or wrong-type workflows."
        },
        "workflow_id": {
          "type": "string",
          "description": "The workflow_id you requested"
        },
        "done": {
          "type": "boolean",
          "description": "Whether this item is in a terminal state (absent when `success` is false)."
        },
        "status": {
          "type": "string",
          "enum": [
            "scheduled",
            "running",
            "complete",
            "partial",
            "errored"
          ],
          "description": "Normalized status for this item (absent when `success` is false)."
        },
        "message": {
          "type": "string",
          "description": "Human-readable message for this item."
        },
        "result": {
          "$ref": "#/$defs/WebsiteWorkflowResult"
        },
        "error": {
          "type": "string",
          "description": "Error message when the item errored or was not found."
        }
      },
      "required": [
        "success",
        "workflow_id"
      ]
    },
    "WebsitePageEntry": {
      "type": "object",
      "properties": {
        "page_id": {
          "type": "string",
          "description": "ID of the published page (absent while running or if errored before publish)"
        },
        "slug": {
          "type": "string",
          "description": "URL slug of the page. Empty string for the home page."
        },
        "path": {
          "type": "string",
          "description": "URL path of the page. '/' for the home page."
        },
        "status": {
          "type": "string",
          "enum": [
            "running",
            "complete",
            "errored"
          ],
          "description": "Status of this individual page"
        },
        "error_message": {
          "type": "string",
          "description": "Error message (only when `status` is `errored`)"
        }
      },
      "required": [
        "slug",
        "path",
        "status"
      ]
    },
    "WebsiteWorkflowResult": {
      "type": "object",
      "properties": {
        "website_id": {
          "type": "string",
          "description": "ID of the website"
        },
        "website_name": {
          "type": "string",
          "description": "Business name of the website"
        },
        "domain": {
          "type": "string",
          "description": "Canonical URL where the website is reachable. Returns the verified custom domain if one has been connected, otherwise the Lindo preview URL."
        },
        "home_page_id": {
          "type": "string",
          "description": "ID of the website's home page (available once published)"
        },
        "pages_summary": {
          "type": "object",
          "properties": {
            "total": {
              "type": "number",
              "description": "Total pages being generated, including the home page"
            },
            "complete": {
              "type": "number",
              "description": "Pages successfully published"
            },
            "running": {
              "type": "number",
              "description": "Pages still being generated"
            },
            "errored": {
              "type": "number",
              "description": "Pages that failed to generate"
            }
          },
          "required": [
            "total",
            "complete",
            "running",
            "errored"
          ],
          "description": "Aggregate progress across the home page and all additional pages."
        },
        "pages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WebsitePageEntry"
          },
          "description": "Every page being generated for the website, including the home page."
        }
      },
      "required": [
        "website_id",
        "pages_summary",
        "pages"
      ],
      "description": "Present as soon as the website record is created. While running, `pages_summary` and `pages` track per-page progress. When `status` is `complete`, every page succeeded; when `partial`, the website exists but one or more additional pages failed."
    }
  }
}