{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/insightgenius-io/json-schema/insightgenius-io-body-tabulate-v1-tabulate-post-schema.json",
  "title": "Body_tabulate_v1_tabulate_post",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/insightgenius-io-openapi.json#/components/schemas/Body_tabulate_v1_tabulate_post",
  "properties": {
    "background_book": {
      "type": "boolean",
      "title": "Background Book",
      "description": "Paid background export budget; not for interactive queries",
      "default": false
    },
    "file": {
      "type": "string",
      "contentMediaType": "application/octet-stream",
      "title": "File",
      "description": ".sav file to tabulate (or use file_id)"
    },
    "file_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "File Id",
      "description": "File session ID from /v1/library/upload"
    },
    "preparation_source": {
      "anyOf": [
        {
          "type": "string",
          "contentMediaType": "application/octet-stream"
        },
        {
          "type": "null"
        }
      ],
      "title": "Preparation Source",
      "description": "Original SAV that the preparation was reviewed against, when file is an enriched SAV"
    },
    "spec": {
      "type": "string",
      "title": "Spec",
      "description": "JSON tabulation specification"
    },
    "ticket": {
      "anyOf": [
        {
          "type": "string",
          "contentMediaType": "application/octet-stream"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ticket",
      "description": "Optional .docx Reporting Ticket — Haiku parses it into a tab plan"
    },
    "webhook_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Webhook Url",
      "description": "URL to POST job result when processing completes. If provided, returns 202 with job_id instead of blocking."
    },
    "response_format": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Response Format",
      "description": "\"xlsx\" (default): the workbook as a binary stream. \"bundle\": JSON with the workbook in base64, the stats, and the assumptions the engine made for THIS run (families, scale source, box nets, what happened to each column). Sync only."
    }
  },
  "type": "object",
  "required": [
    "spec"
  ]
}