{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/medianfi-com/json-schema/medianfi-com-create-business-event-request-schema.json",
  "title": "CreateBusinessEventRequest",
  "description": "Business rules (supported event type, resolvable accounts, postable period/account) are enforced by the controller and the resolve-time posting guard, not this schema. Unknown extra keys are allowed.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/medianfi-com-business-events-api-openapi.yml#/components/schemas/CreateBusinessEventRequest",
  "type": "object",
  "properties": {
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "description": "Optional trimmed client operation key, unique per company. Retain it across retries; use a new key for a new intentional operation. Keyless legacy creates remain separate. Customer creates compare canonical request values (object key order ignored) and bind the authorized primary entity; unfinished creates require review and cannot be retried as new postings."
    },
    "eventType": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Generator key, e.g. adjusting_entry. Defaults to \"custom\" when absent."
    },
    "title": {
      "type": "string",
      "maxLength": 300
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 5000
    },
    "amountCents": {
      "type": "integer"
    },
    "eventDate": {
      "type": "string",
      "description": "ISO date (YYYY-MM-DD). Derived from parameters or today when absent."
    },
    "parameters": {
      "type": "object",
      "additionalProperties": true,
      "description": "Generator parameters (e.g. debitAccount, creditAccount, amount)."
    },
    "allowWithoutJournalEntry": {
      "type": "boolean",
      "description": "Opt into the save-now/fix-later flow — the event saves with metadata.jeGenerationSkipped naming the blocker instead of the request failing with 422.\n"
    },
    "entityId": {
      "type": "string",
      "format": "uuid"
    }
  }
}