{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/monite/json-schema/monite-approval-request-create-request-schema.json",
  "title": "ApprovalRequestCreateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/monite-approval-requests-api-openapi.yml#/components/schemas/ApprovalRequestCreateRequest",
  "anyOf": [
    {
      "$ref": "#/$defs/ApprovalRequestCreateByRoleRequest"
    },
    {
      "$ref": "#/$defs/ApprovalRequestCreateByUserRequest"
    }
  ],
  "additionalProperties": false,
  "$defs": {
    "ApprovalRequestCreateByRoleRequest": {
      "properties": {
        "object_id": {
          "type": "string",
          "format": "uuid"
        },
        "object_type": {
          "$ref": "#/$defs/ObjectType"
        },
        "required_approval_count": {
          "type": "integer",
          "minimum": 1.0
        },
        "role_ids": {
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "object_id",
        "object_type",
        "required_approval_count",
        "role_ids"
      ]
    },
    "ApprovalRequestCreateByUserRequest": {
      "properties": {
        "object_id": {
          "type": "string",
          "format": "uuid"
        },
        "object_type": {
          "$ref": "#/$defs/ObjectType"
        },
        "required_approval_count": {
          "type": "integer",
          "minimum": 1.0
        },
        "user_ids": {
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "object_id",
        "object_type",
        "required_approval_count",
        "user_ids"
      ]
    },
    "ObjectType": {
      "type": "string",
      "enum": [
        "account",
        "approval",
        "approval_request",
        "approval_policy",
        "approval_policy_process",
        "audit_trail",
        "comment",
        "counterpart",
        "counterpart_address",
        "counterpart_bank_account",
        "counterpart_contact_person",
        "counterpart_partner_metadata",
        "counterpart_tax_id",
        "counterpart_vat_id",
        "delivery_note",
        "einvoicing",
        "entity",
        "entity_bank_account",
        "entity_settings",
        "entity_token",
        "entity_user",
        "entity_user_token",
        "entity_vat_ids",
        "export",
        "mailbox",
        "monitescript_process",
        "ocr_task",
        "onboarding",
        "overdue_reminder",
        "partner",
        "partner_internal_config",
        "partner_settings",
        "partner_token",
        "payable",
        "payable_line_item",
        "payables_credit_note",
        "payables_purchase_order",
        "payment",
        "payment_intent",
        "payment_link",
        "payment_record",
        "payment_reminder",
        "person",
        "product",
        "project",
        "receivable",
        "reconciliation",
        "recurrence",
        "role",
        "tag",
        "todo_task",
        "todo_task_mute",
        "transaction",
        "webhook",
        "workflow",
        "workflow_pipeline"
      ]
    }
  }
}