{
  "components": {
    "schemas": {
      "BlankEnum": {
        "enum": [
          ""
        ]
      },
      "CaseActivityLog": {
        "properties": {
          "_created": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "title": " created",
            "type": "string"
          },
          "activity": {
            "nullable": true,
            "type": "string"
          },
          "case_id": {
            "readOnly": true,
            "type": "integer"
          },
          "content": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "instance": {
            "nullable": true,
            "type": "integer"
          },
          "message": {
            "readOnly": true,
            "type": "string"
          },
          "needed_document": {
            "nullable": true,
            "type": "integer"
          },
          "user": {
            "readOnly": true,
            "type": "string"
          },
          "user_readable_id": {
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "_created",
          "activity",
          "case_id",
          "content",
          "id",
          "message",
          "user",
          "user_readable_id"
        ],
        "type": "object"
      },
      "CaseConversationDetail": {
        "properties": {
          "_created": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "title": " created",
            "type": "string"
          },
          "case": {
            "type": "integer"
          },
          "conversation_name": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "information_value": {
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "maxLength": 128,
            "nullable": true,
            "type": "string"
          },
          "tenant": {
            "type": "integer"
          },
          "user": {
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "_created",
          "case",
          "conversation_name",
          "id",
          "tenant"
        ],
        "type": "object"
      },
      "CaseConversationDetailRequest": {
        "properties": {
          "case": {
            "type": "integer"
          },
          "information_value": {
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "maxLength": 128,
            "nullable": true,
            "type": "string"
          },
          "tenant": {
            "type": "integer"
          },
          "user": {
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "case",
          "tenant"
        ],
        "type": "object"
      },
      "CaseConversationList": {
        "properties": {
          "_created": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "title": " created",
            "type": "string"
          },
          "case": {
            "type": "integer"
          },
          "conversation_name": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "information_value": {
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "readOnly": true,
            "type": "string"
          },
          "user": {
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "_created",
          "case",
          "conversation_name",
          "id",
          "name"
        ],
        "type": "object"
      },
      "CaseConversationMessage": {
        "properties": {
          "_created": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "title": " created",
            "type": "string"
          },
          "content": {
            "readOnly": true,
            "type": "string"
          },
          "finish_reason": {
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "_created",
          "content",
          "id"
        ],
        "type": "object"
      },
      "CaseConversationMessageRequest": {
        "properties": {
          "finish_reason": {
            "minLength": 1,
            "type": "string"
          },
          "role": {
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ConfigurationConversationDetail": {
        "properties": {
          "_created": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "title": " created",
            "type": "string"
          },
          "conversation_name": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "name": {
            "maxLength": 128,
            "nullable": true,
            "type": "string"
          },
          "parent": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ParentEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              },
              {
                "$ref": "#/components/schemas/NullEnum"
              }
            ]
          },
          "parent_field": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ParentFieldEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              },
              {
                "$ref": "#/components/schemas/NullEnum"
              }
            ]
          },
          "tenant": {
            "type": "integer"
          },
          "user": {
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "_created",
          "conversation_name",
          "id",
          "tenant"
        ],
        "type": "object"
      },
      "ConfigurationConversationDetailRequest": {
        "properties": {
          "name": {
            "maxLength": 128,
            "nullable": true,
            "type": "string"
          },
          "parent": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ParentEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              },
              {
                "$ref": "#/components/schemas/NullEnum"
              }
            ]
          },
          "parent_field": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ParentFieldEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              },
              {
                "$ref": "#/components/schemas/NullEnum"
              }
            ]
          },
          "tenant": {
            "type": "integer"
          },
          "user": {
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "ConfigurationConversationList": {
        "properties": {
          "_created": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "title": " created",
            "type": "string"
          },
          "conversation_name": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "name": {
            "readOnly": true,
            "type": "string"
          },
          "parent": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ParentEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              },
              {
                "$ref": "#/components/schemas/NullEnum"
              }
            ]
          },
          "parent_field": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ParentFieldEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              },
              {
                "$ref": "#/components/schemas/NullEnum"
              }
            ]
          },
          "user": {
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "_created",
          "conversation_name",
          "id",
          "name"
        ],
        "type": "object"
      },
      "ConfigurationConversationMessage": {
        "properties": {
          "_created": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "title": " created",
            "type": "string"
          },
          "content": {
            "readOnly": true,
            "type": "string"
          },
          "finish_reason": {
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "_created",
          "content",
          "id"
        ],
        "type": "object"
      },
      "ConfigurationConversationMessageRequest": {
        "properties": {
          "finish_reason": {
            "minLength": 1,
            "type": "string"
          },
          "role": {
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CrossCaseInstance": {
        "properties": {
          "case_id": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "instance_id": {
            "readOnly": true,
            "type": "integer"
          },
          "source_case_id": {
            "readOnly": true,
            "type": "integer"
          },
          "source_case_name": {
            "readOnly": true,
            "type": "string"
          },
          "source_case_process_name": {
            "readOnly": true,
            "type": "string"
          },
          "source_case_state": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "source_case_state_type": {
            "readOnly": true,
            "type": "string"
          },
          "source_case_user_readable_id": {
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "case_id",
          "id",
          "instance_id",
          "source_case_id",
          "source_case_name",
          "source_case_process_name",
          "source_case_state",
          "source_case_state_type",
          "source_case_user_readable_id"
        ],
        "type": "object"
      },
      "DocumentsOverview": {
        "properties": {
          "document_id": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "languages": {
            "readOnly": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "ordering": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "user_readable_id": {
            "type": "string"
          }
        },
        "required": [
          "document_id",
          "id",
          "languages",
          "name",
          "user_readable_id"
        ],
        "type": "object"
      },
      "InstanceValueChangeHistory": {
        "properties": {
          "case_reference": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "nullable": true,
            "type": "integer"
          },
          "changed_by": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "manual_instance_action_title": {
            "readOnly": true,
            "type": "string"
          },
          "new_value": {
            "readOnly": true,
            "type": "string"
          },
          "old_value": {
            "readOnly": true,
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "source_name": {
            "readOnly": true,
            "type": "string"
          },
          "timestamp": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "changed_by",
          "id",
          "manual_instance_action_title",
          "new_value",
          "old_value",
          "reason",
          "source_name",
          "timestamp"
        ],
        "type": "object"
      },
      "InteractionLog": {
        "properties": {
          "description": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "interaction_log_type": {
            "type": "string"
          },
          "interaction_time": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "interaction_log_type",
          "interaction_time"
        ],
        "type": "object"
      },
      "InteractionLogRequest": {
        "properties": {
          "description": {
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "interaction_log_type": {
            "minLength": 1,
            "type": "string"
          },
          "interaction_time": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "interaction_log_type",
          "interaction_time"
        ],
        "type": "object"
      },
      "NullEnum": {
        "enum": [
          null
        ]
      },
      "PaginatedCaseActivityLogList": {
        "properties": {
          "meta": {
            "properties": {
              "pagination": {
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "pages": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/CaseActivityLog"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PaginatedCaseConversationListList": {
        "properties": {
          "meta": {
            "properties": {
              "pagination": {
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "pages": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/CaseConversationList"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PaginatedCaseConversationMessageList": {
        "properties": {
          "meta": {
            "properties": {
              "pagination": {
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "pages": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/CaseConversationMessage"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PaginatedConfigurationConversationListList": {
        "properties": {
          "meta": {
            "properties": {
              "pagination": {
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "pages": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/ConfigurationConversationList"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PaginatedConfigurationConversationMessageList": {
        "properties": {
          "meta": {
            "properties": {
              "pagination": {
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "pages": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/ConfigurationConversationMessage"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PaginatedCrossCaseInstanceList": {
        "properties": {
          "meta": {
            "properties": {
              "pagination": {
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "pages": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/CrossCaseInstance"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PaginatedDocumentsOverviewList": {
        "properties": {
          "meta": {
            "properties": {
              "pagination": {
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "pages": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/DocumentsOverview"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PaginatedInstanceValueChangeHistoryList": {
        "properties": {
          "meta": {
            "properties": {
              "pagination": {
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "pages": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/InstanceValueChangeHistory"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PaginatedInteractionLogList": {
        "properties": {
          "meta": {
            "properties": {
              "pagination": {
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "pages": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/InteractionLog"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PaginatedSignatoryRequestList": {
        "properties": {
          "meta": {
            "properties": {
              "pagination": {
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "pages": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/SignatoryRequest"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PaginatedValuesList": {
        "properties": {
          "meta": {
            "properties": {
              "pagination": {
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "pages": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/Values"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ParentEnum": {
        "description": "* `ai_case_check` - ai_case_check\n* `adx_template` - adx_template\n* `document` - document\n* `document_box` - document_box\n* `document_section` - document_section\n* `information` - information\n* `information_structure_item` - information_structure_item\n* `ontology` - ontology\n* `manual_instance_action` - manual_instance_action\n* `page` - page\n* `process` - process\n* `rule` - rule\n* `rule_action` - rule_action\n* `scheduled_rule` - scheduled_rule\n* `tab` - tab\n* `tab_item` - tab_item\n* `tenant_settings` - tenant_settings\n* `transition` - transition\n* `translation` - translation\n* `user_function` - user_function\n* `wizard_node` - wizard_node\n* `wizard_node_item` - wizard_node_item\n* `wizard_template` - wizard_template",
        "enum": [
          "ai_case_check",
          "adx_template",
          "document",
          "document_box",
          "document_section",
          "information",
          "information_structure_item",
          "ontology",
          "manual_instance_action",
          "page",
          "process",
          "rule",
          "rule_action",
          "scheduled_rule",
          "tab",
          "tab_item",
          "tenant_settings",
          "transition",
          "translation",
          "user_function",
          "wizard_node",
          "wizard_node_item",
          "wizard_template"
        ],
        "type": "string"
      },
      "ParentFieldEnum": {
        "description": "* `ai_prompt_output_assignments` - ai_prompt_output_assignments\n* `adx_template` - adx_template\n* `assignments` - assignments\n* `case_assignee_formula` - case_assignee_formula\n* `color_formula` - color_formula\n* `condition` - condition\n* `constants` - constants\n* `expression` - expression\n* `file_formula` - file_formula\n* `filename_formula` - filename_formula\n* `formula` - formula\n* `function` - function\n* `icon_formula` - icon_formula\n* `is_optional_formula` - is_optional_formula\n* `is_read_only_formula` - is_read_only_formula\n* `sub_taxonomy_expression` - sub_taxonomy_expression\n* `input_assignments` - input_assignments\n* `instance_relationship_condition` - instance_relationship_condition\n* `jinja_prompt_template` - jinja_prompt_template\n* `lifecycle_case_creation_condition` - lifecycle_case_creation_condition\n* `name_formula` - name_formula\n* `output_assignments` - output_assignments\n* `problem_description` - problem_description\n* `read_only_formula` - read_only_formula\n* `translation` - translation",
        "enum": [
          "ai_prompt_output_assignments",
          "adx_template",
          "assignments",
          "case_assignee_formula",
          "color_formula",
          "condition",
          "constants",
          "expression",
          "file_formula",
          "filename_formula",
          "formula",
          "function",
          "icon_formula",
          "is_optional_formula",
          "is_read_only_formula",
          "sub_taxonomy_expression",
          "input_assignments",
          "instance_relationship_condition",
          "jinja_prompt_template",
          "lifecycle_case_creation_condition",
          "name_formula",
          "output_assignments",
          "problem_description",
          "read_only_formula",
          "translation"
        ],
        "type": "string"
      },
      "PatchedCaseConversationDetailRequest": {
        "properties": {
          "case": {
            "type": "integer"
          },
          "information_value": {
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "maxLength": 128,
            "nullable": true,
            "type": "string"
          },
          "tenant": {
            "type": "integer"
          },
          "user": {
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PatchedCaseConversationMessageRequest": {
        "properties": {
          "finish_reason": {
            "minLength": 1,
            "type": "string"
          },
          "role": {
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PatchedConfigurationConversationDetailRequest": {
        "properties": {
          "name": {
            "maxLength": 128,
            "nullable": true,
            "type": "string"
          },
          "parent": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ParentEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              },
              {
                "$ref": "#/components/schemas/NullEnum"
              }
            ]
          },
          "parent_field": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ParentFieldEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              },
              {
                "$ref": "#/components/schemas/NullEnum"
              }
            ]
          },
          "tenant": {
            "type": "integer"
          },
          "user": {
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PatchedConfigurationConversationMessageRequest": {
        "properties": {
          "finish_reason": {
            "minLength": 1,
            "type": "string"
          },
          "role": {
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PatchedInteractionLogRequest": {
        "properties": {
          "description": {
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "interaction_log_type": {
            "minLength": 1,
            "type": "string"
          },
          "interaction_time": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PatchedSignatoryRequestRequest": {
        "properties": {
          "request_url": {
            "nullable": true,
            "type": "string"
          },
          "signatory_email": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "signatory_name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "signatory_phone_number": {
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SignatoryRequest": {
        "properties": {
          "created": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "id_filename": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "information_value_ids": {
            "readOnly": true,
            "type": "string"
          },
          "needed_document_ids": {
            "readOnly": true,
            "type": "string"
          },
          "request_url": {
            "nullable": true,
            "type": "string"
          },
          "signatory_email": {
            "maxLength": 255,
            "type": "string"
          },
          "signatory_name": {
            "maxLength": 255,
            "type": "string"
          },
          "signatory_phone_number": {
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "status": {
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "created",
          "id",
          "id_filename",
          "information_value_ids",
          "needed_document_ids",
          "signatory_email",
          "signatory_name",
          "status"
        ],
        "type": "object"
      },
      "SignatoryRequestRequest": {
        "properties": {
          "request_url": {
            "nullable": true,
            "type": "string"
          },
          "signatory_email": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "signatory_name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "signatory_phone_number": {
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "signatory_email",
          "signatory_name"
        ],
        "type": "object"
      },
      "Values": {
        "properties": {
          "case_id": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
          },
          "ensured_by": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "information": {
            "nullable": true,
            "type": "integer"
          },
          "information_key": {
            "readOnly": true,
            "type": "string"
          },
          "information_user_readable_id": {
            "readOnly": true,
            "type": "string"
          },
          "instance_id": {
            "readOnly": true,
            "type": "string"
          },
          "is_touched": {
            "type": "boolean"
          },
          "needed_document_id": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
          },
          "value": {
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "case_id",
          "id",
          "information_key",
          "information_user_readable_id",
          "instance_id",
          "needed_document_id",
          "value"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "description": "`Api-Key <your key>`. Create keys in the admin area under Integrations.",
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "Work with cases, instances, values, proofs and documents from your own systems.",
    "title": "Atfinity API",
    "version": "1"
  },
  "openapi": "3.0.3",
  "paths": {
    "/api/1/case_activity_log": {
      "get": {
        "operationId": "case_activity_log_list",
        "parameters": [
          {
            "description": "Which field to use when ordering the results.",
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A page number within the paginated result set.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to return per page.",
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "A search term.",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCaseActivityLogList"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List the activity log of a case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/api/1/cases": {
      "get": {
        "description": "Returns the cases the API key's tenant can see, newest first. Paginated.",
        "operationId": "cases_retrieve",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Response": {
                    "value": {
                      "data": [
                        {
                          "id": 4711,
                          "name": "Onboarding Jane Doe",
                          "state_key": "in_review",
                          "user_readable_id": "#4711"
                        },
                        {
                          "id": 4712,
                          "name": "Onboarding Acme AG",
                          "state_key": "draft",
                          "user_readable_id": "#4712"
                        }
                      ],
                      "meta": {
                        "pagination": {
                          "count": 24,
                          "page": 1,
                          "pages": 3
                        }
                      }
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": true,
                        "properties": {
                          "calculated_name": {
                            "nullable": true,
                            "type": "string"
                          },
                          "color": {
                            "type": "string"
                          },
                          "created": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "given_name": {
                            "nullable": true,
                            "type": "string"
                          },
                          "id": {
                            "type": "integer"
                          },
                          "is_created": {
                            "type": "boolean"
                          },
                          "is_dirty": {
                            "type": "boolean"
                          },
                          "is_editable": {
                            "type": "boolean"
                          },
                          "last_modified": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "last_transition_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "outcome_instance_id": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "preferred_language": {
                            "nullable": true,
                            "type": "string"
                          },
                          "state_id": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "state_key": {
                            "nullable": true,
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "use_given_name": {
                            "type": "boolean"
                          },
                          "user_readable_id": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "pagination": {
                          "properties": {
                            "count": {
                              "type": "integer"
                            },
                            "page": {
                              "type": "integer"
                            },
                            "pages": {
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "One page of cases. Each entry carries the case list columns, not the full case."
          }
        },
        "summary": "List cases",
        "tags": [
          "Cases"
        ]
      },
      "post": {
        "description": "Starts a new case for a process. The rule engine runs before the response is returned, so the\nresponse already contains the questions the case asks.",
        "operationId": "cases_create",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "Request": {
                  "value": {
                    "name": "Onboarding Jane Doe",
                    "owner_email": "advisor@example.com",
                    "process_key": "onboarding"
                  }
                }
              },
              "schema": {
                "anyOf": [
                  {
                    "required": [
                      "process_id"
                    ]
                  },
                  {
                    "required": [
                      "process_key"
                    ]
                  }
                ],
                "properties": {
                  "assignee_email": {
                    "format": "email",
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "outcome_instance_id": {
                    "type": "integer"
                  },
                  "owner_email": {
                    "format": "email",
                    "type": "string"
                  },
                  "predefined_objects": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "preferred_language_key": {
                    "type": "string"
                  },
                  "process_id": {
                    "type": "integer"
                  },
                  "process_key": {
                    "type": "string"
                  },
                  "transition_with_transition_key": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Create a case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/api/1/cases/{case_pk}/activity_log": {
      "get": {
        "operationId": "cases_activity_log_list",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Which field to use when ordering the results.",
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A page number within the paginated result set.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to return per page.",
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "A search term.",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCaseActivityLogList"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List the activity log of a case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/api/1/cases/{case_pk}/booklets/{id}/download": {
      "post": {
        "operationId": "cases_booklets_download_create",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "document_ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "file_information_proof_ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "instance_id": {
                    "type": "integer"
                  },
                  "proof_ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The booklet as a PDF, built from the documents and proofs given."
          }
        },
        "summary": "Download a booklet",
        "tags": [
          "Documents and booklets"
        ]
      }
    },
    "/api/1/cases/{case_pk}/booklets/{id}/send": {
      "post": {
        "operationId": "cases_booklets_send_create",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "email_address": {
                    "format": "email",
                    "type": "string"
                  },
                  "email_body": {
                    "type": "string"
                  },
                  "email_subject": {
                    "type": "string"
                  },
                  "instance_id": {
                    "type": "integer"
                  },
                  "recipient_name": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The booklet was sent to the given address."
          }
        },
        "summary": "Send a booklet by email",
        "tags": [
          "Documents and booklets"
        ]
      }
    },
    "/api/1/cases/{case_pk}/comments": {
      "post": {
        "description": "`text` is the comment body and is required. Set `is_issue` to raise it as an issue rather\nthan a plain comment, `assigned_user` to make it a task for that user, and `reply_to` to\nanswer an existing comment.",
        "operationId": "cases_comments_create",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "Request": {
                  "value": {
                    "text": "The passport scan is unreadable.",
                    "title": "Missing proof"
                  }
                }
              },
              "schema": {
                "properties": {
                  "assigned_user": {
                    "type": "integer"
                  },
                  "deadline": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "is_issue": {
                    "type": "boolean"
                  },
                  "referenced_value": {
                    "type": "integer"
                  },
                  "reply_to": {
                    "type": "integer"
                  },
                  "text": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Comment on a case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/api/1/cases/{case_pk}/documents/{id}": {
      "get": {
        "operationId": "cases_documents_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The generated document as a PDF."
          }
        },
        "summary": "Get a document",
        "tags": [
          "Documents and booklets"
        ]
      }
    },
    "/api/1/cases/{case_pk}/documents/{id}/preview": {
      "get": {
        "operationId": "cases_documents_preview_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "A preview of the generated document as a PDF."
          }
        },
        "summary": "Download a document preview",
        "tags": [
          "Documents and booklets"
        ]
      }
    },
    "/api/1/cases/{case_pk}/documents/{id}/signed": {
      "get": {
        "operationId": "cases_documents_signed_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The signed document as a PDF."
          }
        },
        "summary": "Download a signed document",
        "tags": [
          "Documents and booklets"
        ]
      }
    },
    "/api/1/cases/{case_pk}/instances": {
      "post": {
        "description": "Creates an instance of the given ontology inside the case. Identify the ontology by\n`ontology_id` or by `ontology_key`. `fields` sets initial values, keyed by information key.",
        "operationId": "cases_instances_create",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "Request": {
                  "value": {
                    "fields": {
                      "first_name": "Jane",
                      "last_name": "Doe"
                    },
                    "ontology_key": "Person"
                  }
                }
              },
              "schema": {
                "anyOf": [
                  {
                    "required": [
                      "ontology_id"
                    ]
                  },
                  {
                    "required": [
                      "ontology_key"
                    ]
                  }
                ],
                "properties": {
                  "fields": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "ontology_id": {
                    "type": "integer"
                  },
                  "ontology_key": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Add an instance to a case",
        "tags": [
          "Instances"
        ]
      }
    },
    "/api/1/cases/{case_pk}/instances/{id}": {
      "delete": {
        "description": "A draft instance is deleted. An instance that exists outside the case keeps existing: it is\nunlinked from the case and its values in that case are removed. Refused for managed ontologies.",
        "operationId": "cases_instances_destroy",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Remove an instance from a case",
        "tags": [
          "Instances"
        ]
      }
    },
    "/api/1/cases/{case_pk}/instances/{id}/link": {
      "delete": {
        "description": "Gives the case its own copy of the instance again, so later changes stay inside this case.",
        "operationId": "cases_instances_link_destroy",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "summary": "Unlink a case instance",
        "tags": [
          "Instances"
        ]
      },
      "post": {
        "description": "Replaces the instance in the case with `new_instance_id`, so the case points at an instance\nthat is shared with other cases. Refused when the instance does not allow link changes.",
        "operationId": "cases_instances_link_create",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "Request": {
                  "value": {
                    "new_instance_id": 5001
                  }
                }
              },
              "schema": {
                "properties": {
                  "new_instance_id": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Link a case instance to a shared instance",
        "tags": [
          "Instances"
        ]
      }
    },
    "/api/1/cases/{case_pk}/instances/{instance_pk}/roles": {
      "post": {
        "description": "Identify the role by `role_id` or by `role_key`. The role has to be one the instance's\nontology can hold.",
        "operationId": "cases_instances_roles_create",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "Request": {
                  "value": {
                    "role_key": "AccountHolder"
                  }
                }
              },
              "schema": {
                "anyOf": [
                  {
                    "required": [
                      "role_id"
                    ]
                  },
                  {
                    "required": [
                      "role_key"
                    ]
                  }
                ],
                "properties": {
                  "role_id": {
                    "type": "integer"
                  },
                  "role_key": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Give an instance a role in a case",
        "tags": [
          "Instances"
        ]
      }
    },
    "/api/1/cases/{case_pk}/instances/{instance_pk}/roles/{id}": {
      "delete": {
        "description": "The last path segment is the role id or the role key.",
        "operationId": "cases_instances_roles_destroy",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Take a role away from an instance in a case",
        "tags": [
          "Instances"
        ]
      }
    },
    "/api/1/cases/{case_pk}/proofs": {
      "post": {
        "description": "Send the file as `multipart/form-data`. The upload only stores the proof on the case; use the\nassign endpoint to attach it to a needed document.",
        "operationId": "cases_proofs_create",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "format": "binary",
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Upload a proof",
        "tags": [
          "Proofs"
        ]
      }
    },
    "/api/1/cases/{case_pk}/proofs/{id}": {
      "delete": {
        "operationId": "cases_proofs_destroy",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Delete a proof",
        "tags": [
          "Proofs"
        ]
      },
      "get": {
        "operationId": "cases_proofs_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The proof file, with its appendices merged in."
          }
        },
        "summary": "Get a proof",
        "tags": [
          "Proofs"
        ]
      },
      "patch": {
        "operationId": "cases_proofs_partial_update",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "format": "binary",
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Update a proof",
        "tags": [
          "Proofs"
        ]
      }
    },
    "/api/1/cases/{case_pk}/proofs/{id}/assign": {
      "post": {
        "operationId": "cases_proofs_assign_create",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "Request": {
                  "value": {
                    "assign_to": 3301
                  }
                }
              },
              "schema": {
                "properties": {
                  "assign_to": {
                    "type": "integer"
                  },
                  "information_value_id": {
                    "type": "integer"
                  }
                },
                "required": [
                  "assign_to"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Assign a proof to a needed document",
        "tags": [
          "Proofs"
        ]
      }
    },
    "/api/1/cases/{case_pk}/proofs/{id}/original": {
      "get": {
        "operationId": "cases_proofs_original_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The proof file as it was uploaded, without appendices."
          }
        },
        "summary": "Download the original file of a proof",
        "tags": [
          "Proofs"
        ]
      }
    },
    "/api/1/cases/{case_pk}/proofs/{id}/unassign": {
      "post": {
        "operationId": "cases_proofs_unassign_create",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Unassign a proof",
        "tags": [
          "Proofs"
        ]
      }
    },
    "/api/1/cases/{case_pk}/values": {
      "get": {
        "operationId": "cases_values_list",
        "parameters": [
          {
            "in": "path",
            "name": "case_pk",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Which field to use when ordering the results.",
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A page number within the paginated result set.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to return per page.",
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "A search term.",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Response": {
                    "value": {
                      "meta": {
                        "pagination": {
                          "count": 1,
                          "page": 1,
                          "pages": 1
                        }
                      },
                      "results": [
                        {
                          "case_id": 4711,
                          "id": 90001,
                          "information_key": "date_of_birth",
                          "information_user_readable_id": "person.date_of_birth",
                          "instance_id": 5001,
                          "is_touched": true,
                          "value": "1985-04-12"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PaginatedValuesList"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List all values of a case",
        "tags": [
          "Values"
        ]
      }
    },
    "/api/1/cases/{id}": {
      "delete": {
        "operationId": "cases_destroy",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "enum": [
                "json",
                "text"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The case, its files and its unused instances are deleted."
          }
        },
        "summary": "Delete a case",
        "tags": [
          "Cases"
        ]
      },
      "get": {
        "description": "The full case: instances, information values, documents, buttons and workflow state.",
        "operationId": "cases_retrieve_2",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "enum": [
                "json",
                "text"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "text/plain": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Get a case",
        "tags": [
          "Cases"
        ]
      },
      "patch": {
        "description": "Writes field values, the owner, the assignee, the name, the language and the tags. Send only the\nkeys you want to change. `field` addresses one value, `fields` a list of them, and a value is\naddressed either by `case_field_key`, or by `information_key` together with `instance_id`. Add\n`structure_occurrence_index` and `structure_occurrence_information_key` for a value inside a\nstructure. The rule engine runs afterwards, so the response reflects the recalculated case.\n\n`given_name` only applies when the case's process allows given names.",
        "operationId": "cases_partial_update",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "enum": [
                "json",
                "text"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "Request": {
                  "value": {
                    "fields": [
                      {
                        "information_key": "date_of_birth",
                        "instance_id": 5001,
                        "value": "1985-04-12"
                      },
                      {
                        "case_field_key": "Person.first_name",
                        "value": "Jane"
                      }
                    ]
                  }
                }
              },
              "schema": {
                "properties": {
                  "assignee_email": {
                    "format": "email",
                    "type": "string"
                  },
                  "assignee_id": {
                    "type": "integer"
                  },
                  "field": {
                    "properties": {
                      "case_field_key": {
                        "type": "string"
                      },
                      "information_key": {
                        "type": "string"
                      },
                      "instance_id": {
                        "type": "integer"
                      },
                      "needed_document_id": {
                        "type": "integer"
                      },
                      "remove_file_id": {
                        "type": "integer"
                      },
                      "structure_occurrence_index": {
                        "type": "integer"
                      },
                      "structure_occurrence_information_key": {
                        "type": "string"
                      },
                      "value": {}
                    },
                    "type": "object"
                  },
                  "fields": {
                    "items": {
                      "properties": {
                        "case_field_key": {
                          "type": "string"
                        },
                        "information_key": {
                          "type": "string"
                        },
                        "instance_id": {
                          "type": "integer"
                        },
                        "needed_document_id": {
                          "type": "integer"
                        },
                        "remove_file_id": {
                          "type": "integer"
                        },
                        "structure_occurrence_index": {
                          "type": "integer"
                        },
                        "structure_occurrence_information_key": {
                          "type": "string"
                        },
                        "value": {}
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "given_name": {
                    "type": "string"
                  },
                  "owner_email": {
                    "format": "email",
                    "type": "string"
                  },
                  "owner_id": {
                    "type": "integer"
                  },
                  "preferred_language": {
                    "type": "string"
                  },
                  "remove_file": {
                    "type": "integer"
                  },
                  "tags": {
                    "items": {
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "key": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "use_given_name": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "text/plain": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Update a case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/api/1/cases/{id}/all_proofs": {
      "get": {
        "description": "One zip archive of every provided proof file on the case.",
        "operationId": "cases_all_proofs_retrieve",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "enum": [
                "json",
                "text"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "A zip archive named proofs.zip."
          }
        },
        "summary": "Download all proofs of a case",
        "tags": [
          "Documents and booklets"
        ]
      }
    },
    "/api/1/cases/{id}/booklet": {
      "get": {
        "description": "`booklet_id` selects the booklet and is required. Append the instance id to it, separated by a\ndash, to render the booklet for one instance of the case.",
        "operationId": "cases_booklet_retrieve",
        "parameters": [
          {
            "description": "Id of the booklet, optionally `<booklet_id>-<instance_id>`.",
            "in": "query",
            "name": "booklet_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Language key for the rendered document, for example `en`. Defaults to the case's.",
            "in": "query",
            "name": "language",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The booklet as a PDF."
          }
        },
        "summary": "Download the case booklet",
        "tags": [
          "Documents and booklets"
        ]
      }
    },
    "/api/1/cases/{id}/case_history": {
      "get": {
        "description": "The cases that share the outcome instance of this case, newest first, which is the client's\nhistory rather than revisions of this case.",
        "operationId": "cases_case_history_retrieve",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "enum": [
                "json",
                "text"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": true,
                        "properties": {
                          "calculated_name": {
                            "nullable": true,
                            "type": "string"
                          },
                          "color": {
                            "type": "string"
                          },
                          "created": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "given_name": {
                            "nullable": true,
                            "type": "string"
                          },
                          "id": {
                            "type": "integer"
                          },
                          "is_created": {
                            "type": "boolean"
                          },
                          "is_dirty": {
                            "type": "boolean"
                          },
                          "is_editable": {
                            "type": "boolean"
                          },
                          "last_modified": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "last_transition_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "outcome_instance_id": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "preferred_language": {
                            "nullable": true,
                            "type": "string"
                          },
                          "state_id": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "state_key": {
                            "nullable": true,
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "use_given_name": {
                            "type": "boolean"
                          },
                          "user_readable_id": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "pagination": {
                          "properties": {
                            "count": {
                              "type": "integer"
                            },
                            "page": {
                              "type": "integer"
                            },
                            "pages": {
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              },
              "text/plain": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": true,
                        "properties": {
                          "calculated_name": {
                            "nullable": true,
                            "type": "string"
                          },
                          "color": {
                            "type": "string"
                          },
                          "created": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "given_name": {
                            "nullable": true,
                            "type": "string"
                          },
                          "id": {
                            "type": "integer"
                          },
                          "is_created": {
                            "type": "boolean"
                          },
                          "is_dirty": {
                            "type": "boolean"
                          },
                          "is_editable": {
                            "type": "boolean"
                          },
                          "last_modified": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "last_transition_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "outcome_instance_id": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "preferred_language": {
                            "nullable": true,
                            "type": "string"
                          },
                          "state_id": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "state_key": {
                            "nullable": true,
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "use_given_name": {
                            "type": "boolean"
                          },
                          "user_readable_id": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "pagination": {
                          "properties": {
                            "count": {
                              "type": "integer"
                            },
                            "page": {
                              "type": "integer"
                            },
                            "pages": {
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "One page of the cases sharing the outcome instance."
          }
        },
        "summary": "List the other cases of this case's outcome instance",
        "tags": [
          "Cases"
        ]
      }
    },
    "/api/1/cases/{id}/copy": {
      "post": {
        "operationId": "cases_copy_create",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "enum": [
                "json",
                "text"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "text/plain": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Copy a case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/api/1/cases/{id}/has_ongoing_tasks": {
      "get": {
        "description": "Useful after a transition that freezes documents: poll this until it returns false before\ndownloading them.",
        "operationId": "cases_has_ongoing_tasks_retrieve",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "enum": [
                "json",
                "text"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Response": {
                    "value": {
                      "has_ongoing_tasks": true
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "has_ongoing_tasks": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              },
              "text/plain": {
                "schema": {
                  "properties": {
                    "has_ongoing_tasks": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Whether background work on the case, for example freezing documents, is still running."
          }
        },
        "summary": "Check for background tasks still running on a case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/api/1/cases/{id}/set_tags": {
      "post": {
        "operationId": "cases_set_tags_create",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "enum": [
                "json",
                "text"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "Request": {
                  "value": {
                    "tags": [
                      {
                        "id": 12,
                        "key": "high_risk"
                      },
                      {
                        "id": 15,
                        "key": "eu"
                      }
                    ]
                  }
                }
              },
              "schema": {
                "properties": {
                  "tags": {
                    "items": {
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "key": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "tags"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The tags of the case are now exactly the ones given."
          }
        },
        "summary": "Set the tags of a case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/api/1/cases/{id}/signed_booklet": {
      "get": {
        "description": "Available once the booklet has been signed.",
        "operationId": "cases_signed_booklet_retrieve",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "enum": [
                "json",
                "text"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Language key for the rendered document, for example `en`. Defaults to the case's.",
            "in": "query",
            "name": "language",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The signed booklet as a PDF."
          }
        },
        "summary": "Download the signed booklet",
        "tags": [
          "Documents and booklets"
        ]
      }
    },
    "/api/1/cases/{id}/transition": {
      "post": {
        "description": "Moves the case along one workflow transition. Pass either `transition_id` or `transition_key`.\nThe transition's condition is validated first, so a case that is not ready stays where it is.",
        "operationId": "cases_transition_create",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "enum": [
                "json",
                "text"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "Request": {
                  "value": {
                    "transition_key": "submit_for_review"
                  }
                }
              },
              "schema": {
                "anyOf": [
                  {
                    "required": [
                      "transition_id"
                    ]
                  },
                  {
                    "required": [
                      "transition_key"
                    ]
                  }
                ],
                "properties": {
                  "transition_id": {
                    "type": "integer"
                  },
                  "transition_key": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "text/plain": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "calculated_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    },
                    "created": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "given_name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "is_created": {
                      "type": "boolean"
                    },
                    "is_dirty": {
                      "type": "boolean"
                    },
                    "is_editable": {
                      "type": "boolean"
                    },
                    "last_modified": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "last_transition_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "outcome_instance_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "preferred_language": {
                      "nullable": true,
                      "type": "string"
                    },
                    "state_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "state_key": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "use_given_name": {
                      "type": "boolean"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The case. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Transition a case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/api/1/cases/{id}/unsigned_booklet": {
      "get": {
        "description": "The process's default booklet, without signatures. Use the case booklet endpoint to pick a\nspecific booklet.",
        "operationId": "cases_unsigned_booklet_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Language key for the rendered document, for example `en`. Defaults to the case's.",
            "in": "query",
            "name": "language",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The unsigned booklet as a PDF."
          }
        },
        "summary": "Download the default unsigned booklet",
        "tags": [
          "Documents and booklets"
        ]
      }
    },
    "/api/1/documents_upload/upload": {
      "post": {
        "description": "Send a PDF that was generated by Atfinity and printed out. The QR codes on its pages say\nwhich case and which needed document each page belongs to, so one upload can carry pages of\nseveral cases. Pages whose case version is outdated are reported instead of stored.",
        "operationId": "documents_upload_upload_create",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected_cases": {
                      "items": {
                        "additionalProperties": true,
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "analysed_documents": {
                      "items": {
                        "additionalProperties": true,
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Which cases the pages belonged to, and what was recognised per document."
          }
        },
        "summary": "Upload a filled out document",
        "tags": [
          "Documents and booklets"
        ]
      }
    },
    "/api/1/instances-for-ontology-{ontology_id}": {
      "get": {
        "operationId": "instances_for_ontology__retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "ontology_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": true,
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "name": {
                            "type": "string"
                          },
                          "ontology_id": {
                            "type": "integer"
                          },
                          "owner_id": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "status": {
                            "type": "string"
                          },
                          "user_readable_id": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "pagination": {
                          "properties": {
                            "count": {
                              "type": "integer"
                            },
                            "page": {
                              "type": "integer"
                            },
                            "pages": {
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "One page of instances of the ontology, with the instance page columns."
          }
        },
        "summary": "List instances of an ontology",
        "tags": [
          "Instances"
        ]
      }
    },
    "/api/1/instances/force_create": {
      "post": {
        "description": "Creates a valid instance directly, without going through a case. Identify the ontology by\n`ontology_id` or `ontology_key`; `fields` sets values keyed by information key. Refused for\nontologies whose instances are managed.",
        "operationId": "instances_force_create_create",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "Request": {
                  "value": {
                    "fields": {
                      "first_name": "Jane",
                      "last_name": "Doe"
                    },
                    "name": "Jane Doe",
                    "ontology_key": "Person"
                  }
                }
              },
              "schema": {
                "properties": {
                  "fields": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "name": {
                    "type": "string"
                  },
                  "ontology_id": {
                    "type": "integer"
                  },
                  "ontology_key": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "name": {
                      "type": "string"
                    },
                    "ontology_id": {
                      "type": "integer"
                    },
                    "owner_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "status": {
                      "type": "string"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The instance. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Create an instance outside a case",
        "tags": [
          "Instances"
        ]
      }
    },
    "/api/1/instances/{id}": {
      "delete": {
        "description": "Deletes the instance itself, wherever it is used. Every lifecycle case whose outcome this\ninstance is goes with it, and it is removed from the cases that merely link it. To take an\ninstance out of a single case without deleting it, use the case's own instance endpoint.",
        "operationId": "instances_destroy",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The instance and the cases it is the outcome of are deleted."
          }
        },
        "summary": "Delete an instance",
        "tags": [
          "Instances"
        ]
      },
      "get": {
        "operationId": "instances_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "name": {
                      "type": "string"
                    },
                    "ontology_id": {
                      "type": "integer"
                    },
                    "owner_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "status": {
                      "type": "string"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The instance. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Get an instance",
        "tags": [
          "Instances"
        ]
      },
      "patch": {
        "operationId": "instances_partial_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "locked": {
                    "type": "boolean"
                  },
                  "owner_email": {
                    "format": "email",
                    "type": "string"
                  },
                  "owner_id": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "name": {
                      "type": "string"
                    },
                    "ontology_id": {
                      "type": "integer"
                    },
                    "owner_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "status": {
                      "type": "string"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The instance. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Update an instance",
        "tags": [
          "Instances"
        ]
      }
    },
    "/api/1/instances/{id}/case_count": {
      "get": {
        "operationId": "instances_case_count_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "linked_finished_case_count": {
                          "type": "integer"
                        },
                        "linked_ongoing_case_count": {
                          "type": "integer"
                        },
                        "outcome_case_count": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "How many cases use the instance, split by how they use it."
          }
        },
        "summary": "Count the cases an instance is used in",
        "tags": [
          "Instances"
        ]
      }
    },
    "/api/1/instances/{id}/force_update": {
      "patch": {
        "description": "Writes information values on the instance itself, keyed by information key, without going\nthrough a case. Ongoing cases that use the instance are warned about the change. Pass\n`reindex=false` while importing many instances, then reindex once at the end.",
        "operationId": "instances_force_update_partial_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Set to false to skip reindexing this instance, then reindex once after a bulk import.",
            "in": "query",
            "name": "reindex",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "Request": {
                  "value": {
                    "fields": {
                      "first_name": "Jane",
                      "risk_score": 42
                    }
                  }
                }
              },
              "schema": {
                "properties": {
                  "fields": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "name": {
                      "type": "string"
                    },
                    "ontology_id": {
                      "type": "integer"
                    },
                    "owner_id": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "status": {
                      "type": "string"
                    },
                    "user_readable_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The instance. The listed properties are the stable ones. The payload also carries the fields the Atfinity frontend needs, which are not part of this contract and can change."
          }
        },
        "summary": "Update the values of an instance",
        "tags": [
          "Instances"
        ]
      }
    },
    "/api/1/instances/{instance_pk}/history": {
      "get": {
        "operationId": "instances_history_list",
        "parameters": [
          {
            "in": "query",
            "name": "_created",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "_created_by_includes",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "_created_by_starts",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "_updated",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "_updated_by_includes",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "_updated_by_starts",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "changed_by",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "instance_pk",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "manual_instance_action_key",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Which field to use when ordering the results.",
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A page number within the paginated result set.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to return per page.",
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "* `API` - API\n* `CASE` - CASE\n* `CONFIGURATION_CHANGE` - CONFIGURATION_CHANGE\n* `EXCEL_IMPORT` - EXCEL_IMPORT\n* `INTERACTION_LOG_ADDED` - INTERACTION_LOG_ADDED\n* `INTERACTION_LOG_DELETED` - INTERACTION_LOG_DELETED\n* `INTERACTION_LOG_EDITED` - INTERACTION_LOG_EDITED\n* `MANUAL_INSTANCE_ACTION` - MANUAL_INSTANCE_ACTION\n* `SCHEDULED_RULE` - SCHEDULED_RULE",
            "in": "query",
            "name": "reason",
            "schema": {
              "enum": [
                "API",
                "CASE",
                "CONFIGURATION_CHANGE",
                "EXCEL_IMPORT",
                "INTERACTION_LOG_ADDED",
                "INTERACTION_LOG_DELETED",
                "INTERACTION_LOG_EDITED",
                "MANUAL_INSTANCE_ACTION",
                "SCHEDULED_RULE"
              ],
              "type": "string"
            }
          },
          {
            "description": "A search term.",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "source_key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedInstanceValueChangeHistoryList"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List the value change history of an instance",
        "tags": [
          "Instances"
        ]
      }
    },
    "/api/1/instances/{instance_pk}/values": {
      "get": {
        "operationId": "instances_values_list",
        "parameters": [
          {
            "in": "path",
            "name": "instance_pk",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Which field to use when ordering the results.",
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A page number within the paginated result set.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to return per page.",
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "A search term.",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedValuesList"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List all values of an instance",
        "tags": [
          "Values"
        ]
      }
    },
    "/api/1/version": {
      "get": {
        "description": "Also the cheapest way to check that an API key works.",
        "operationId": "version_retrieve",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Response": {
                    "value": {
                      "conf_version": 137,
                      "software_version": "15.4.1"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "conf_version": {
                      "type": "integer"
                    },
                    "software_version": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The live configuration version of the tenant and the version of the application."
          }
        },
        "summary": "Get the application version",
        "tags": [
          "Meta"
        ]
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "servers": [
    {
      "url": "https://{tenant}.atfinity.app",
      "variables": {
        "tenant": {
          "default": "your-tenant"
        }
      }
    }
  ],
  "tags": [
    {
      "description": "Create cases, read their data, move them through their workflow and delete them.",
      "name": "Cases"
    },
    {
      "description": "Information values are the answers stored in a case. Each value belongs to an instance and to an information field identified by its key.",
      "name": "Values"
    },
    {
      "description": "Instances are the people, companies and objects a case is about. They live outside the case and can be shared between cases.",
      "name": "Instances"
    },
    {
      "description": "Proofs are the files a case collects, for example an ID scan or a utility bill.",
      "name": "Proofs"
    },
    {
      "description": "Documents are generated from the case data. A booklet bundles several documents into one PDF.",
      "name": "Documents and booklets"
    },
    {
      "description": "",
      "name": "Meta"
    }
  ]
}
