{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/monite/json-schema/monite-approval-request-resource-list-schema.json",
  "title": "ApprovalRequestResourceList",
  "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/ApprovalRequestResourceList",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/ApprovalRequestResourceWithMetadata"
      },
      "type": "array"
    },
    "next_pagination_token": {
      "type": "string",
      "description": "A token that can be sent in the `pagination_token` query parameter to get the next page of results, or `null` if there is no next page (i.e. you've reached the last page)."
    },
    "prev_pagination_token": {
      "type": "string",
      "description": "A token that can be sent in the `pagination_token` query parameter to get the previous page of results, or `null` if there is no previous page (i.e. you've reached the first page)."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "ApprovalRequestResourceWithMetadata": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "approved_by": {
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "type": "array"
        },
        "created_by": {
          "type": "string",
          "format": "uuid",
          "description": "ID of the user who created the approval request"
        },
        "object_id": {
          "type": "string",
          "format": "uuid"
        },
        "object_type": {
          "$ref": "#/$defs/ObjectType"
        },
        "rejected_by": {
          "type": "string",
          "format": "uuid"
        },
        "required_approval_count": {
          "type": "integer",
          "minimum": 1.0
        },
        "role_ids": {
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "type": "array"
        },
        "status": {
          "$ref": "#/$defs/ApprovalRequestStatus"
        },
        "user_ids": {
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "type": "array"
        }
      },
      "type": "object",
      "required": [
        "id",
        "created_at",
        "updated_at",
        "approved_by",
        "created_by",
        "object_id",
        "object_type",
        "required_approval_count",
        "role_ids",
        "status",
        "user_ids"
      ]
    },
    "ApprovalRequestStatus": {
      "type": "string",
      "enum": [
        "waiting",
        "approved",
        "rejected",
        "canceled"
      ]
    },
    "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"
      ]
    }
  }
}