{
  "openapi": "3.0.3",
  "info": {
    "title": "Athena API",
    "version": "v3",
    "x-logo": {
      "url": "https://cynopsis.co/wp-content/uploads/2021/03/logo-2.png",
      "altText": "Cynopsis Solutions"
    },
    "description": "ATHENA is an advanced real-time transaction monitoring solution designed to detect and prevent money laundering, fraud, and terrorism financing. Powered by proprietary AML rules, ATHENA analyzes transactions in real time, providing clear, intuitive visual insights to streamline compliance processes.\n    \n    \u2705 Real-Time Monitoring \u2013 Instantly analyzes transaction data to detect anomalies and potential compliance risks.\n    \u2705 Visualized Insights \u2013 Converts complex data into easy-to-understand charts, aiding faster decision-making.\n    \u2705 Seamless Integration \u2013 Easily integrates with existing financial and compliance systems.\n    \n    Ideal for financial institutions, fintech companies, and regulated businesses, ATHENA enhances risk management and ensures regulatory compliance with ease.",
    "contact": {
      "email": "tech@cynopsis.co"
    }
  },
  "paths": {
    "/api/ageing": {
      "get": {
        "operationId": "caseageing_list",
        "description": "Retrieve case ageing distribution across all cases.",
        "summary": "List case ageing distribution",
        "tags": [
          "Ageing"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CaseAgeing"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/ageing/{id}": {
      "get": {
        "operationId": "caseageing_retrieve",
        "description": "Fetch ageing distribution of cases assigned to a specific user.",
        "summary": "Retrieve case ageing data for a specific user",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "User ID",
            "required": true
          }
        ],
        "tags": [
          "Ageing"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseAgeing"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/appconfig/{key}": {
      "get": {
        "operationId": "appconfig_retrieve",
        "description": "This endpoint returns the value of the app config key.",
        "summary": "Get App Config",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "App Config"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppConfig"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/appconfig/analytics": {
      "get": {
        "operationId": "appconfig_analytics",
        "description": "This endpoint returns the Metabase analytics URL for the dashboard ID configured in the database. The URL is valid for 1 hour.",
        "summary": "Get Metabase analytics URL",
        "tags": [
          "App Config"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetabaseUrl"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/appconfig/artemis_countries": {
      "get": {
        "operationId": "appconfig_artemis_countries",
        "description": "This endpoint returns Artemis Countries from Artemis API.",
        "summary": "Get Artemis Countries",
        "tags": [
          "App Config"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            },
            "description": "Artemis Countries data"
          }
        }
      }
    },
    "/api/appconfig/artemis_general_settings": {
      "get": {
        "operationId": "appconfig_artemis_general_settings",
        "description": "This endpoint returns Artemis general settings from Artemis API.",
        "summary": "Get Artemis General Settings",
        "tags": [
          "App Config"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            },
            "description": "Artemis general settings"
          }
        }
      }
    },
    "/api/appconfig/artemis_source_of_funds": {
      "get": {
        "operationId": "appconfig_artemis_source_of_funds",
        "description": "This endpoint returns Artemis Source of Funds from Artemis API.",
        "summary": "Get Artemis Source of Funds",
        "tags": [
          "App Config"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            },
            "description": "Artemis Source of Funds data"
          }
        }
      }
    },
    "/api/appconfig/artemis_ssic": {
      "get": {
        "operationId": "appconfig_artemis_ssic",
        "description": "This endpoint returns Artemis SSIC from Artemis API.",
        "summary": "Get Artemis SSIC",
        "tags": [
          "App Config"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            },
            "description": "Artemis SSIC data"
          }
        }
      }
    },
    "/api/appconfig/artemis_ssic_international": {
      "get": {
        "operationId": "appconfig_artemis_ssic_international",
        "description": "This endpoint returns Artemis SSIC International from Artemis API.",
        "summary": "Get Artemis SSIC International",
        "tags": [
          "App Config"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            },
            "description": "Artemis SSIC International data"
          }
        }
      }
    },
    "/api/appconfig/artemis_ssoc": {
      "get": {
        "operationId": "appconfig_artemis_ssoc",
        "description": "This endpoint returns Artemis SSOC from Artemis API.",
        "summary": "Get Artemis SSOC",
        "tags": [
          "App Config"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            },
            "description": "Artemis SSOC data"
          }
        }
      }
    },
    "/api/appconfig/artemis_ssoc_international": {
      "get": {
        "operationId": "appconfig_artemis_ssoc_international",
        "description": "This endpoint returns Artemis SSOC International from Artemis API.",
        "summary": "Get Artemis SSOC International",
        "tags": [
          "App Config"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            },
            "description": "Artemis SSOC International data"
          }
        }
      }
    },
    "/api/assignees": {
      "get": {
        "operationId": "userlist_list",
        "summary": "List users ordered by email",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "User"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedUserListList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/assignees/{id}": {
      "get": {
        "operationId": "userlist_retrieve",
        "summary": "Retrieve a single user by id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this user.",
            "required": true
          }
        ],
        "tags": [
          "User"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/blacklist": {
      "get": {
        "operationId": "blacklist_list",
        "summary": "List all Blacklist records",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "reference_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Blacklist"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedBlacklistList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "blacklist_create",
        "description": "A blacklist record is created with the name of the subject and the reference_id, We check for a whitelist record with the blacklist name before adding to blacklist",
        "summary": "Create a Blacklist record",
        "tags": [
          "Blacklist"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Blacklist name."
                  },
                  "reference_id": {
                    "type": "string",
                    "description": "Reference ID."
                  },
                  "list_name": {
                    "type": "string",
                    "description": "List name.",
                    "enum": [
                      "HIGH RISK",
                      "RESTRICTED"
                    ]
                  }
                },
                "required": [
                  "name",
                  "reference_id",
                  "list_name"
                ]
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Blacklist object"
                }
              }
            },
            "description": "Blacklist record created successfully"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Invalid request data or subject already in whitelist"
          }
        }
      }
    },
    "/api/blacklist/{id}": {
      "get": {
        "operationId": "blacklist_retrieve",
        "summary": "Retrieve a Blacklist record",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this blacklist.",
            "required": true
          }
        ],
        "tags": [
          "Blacklist"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blacklist"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "blacklist_partial_update",
        "summary": "Update a Blacklist record",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this blacklist.",
            "required": true
          }
        ],
        "tags": [
          "Blacklist"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Blacklist name."
                  },
                  "reference_id": {
                    "type": "string",
                    "description": "Reference ID."
                  },
                  "list_name": {
                    "type": "string",
                    "description": "List name.",
                    "enum": [
                      "HIGH RISK",
                      "RESTRICTED"
                    ]
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Blacklist object"
                }
              }
            },
            "description": "Blacklist record updated successfully"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Invalid request data"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Blacklist record not found"
          }
        }
      },
      "delete": {
        "operationId": "blacklist_destroy",
        "summary": "Deactivate a Blacklist record",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this blacklist.",
            "required": true
          }
        ],
        "tags": [
          "Blacklist"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Blacklist record successfully deactivated"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "description": "Success message indicating blacklist record was deactivated"
                }
              }
            },
            "description": "Blacklist record successfully deactivated"
          }
        }
      }
    },
    "/api/bucketcontent": {
      "get": {
        "operationId": "transactionbucket_list",
        "description": "Retrieve a list of all transaction buckets with optional filtering.",
        "summary": "List all transaction in buckets",
        "parameters": [
          {
            "in": "query",
            "name": "bucket_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by bucket ID"
          },
          {
            "in": "query",
            "name": "client_transaction_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter by client transaction ID"
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "max_date",
            "schema": {
              "type": "string"
            },
            "description": "Filter by maximum transaction timestamp"
          },
          {
            "in": "query",
            "name": "min_date",
            "schema": {
              "type": "string"
            },
            "description": "Filter by minimum transaction timestamp"
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Bucket Content"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedTransactionBucketList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "transactionbucket_create",
        "description": "Insert a transaction into specified buckets by client transaction ID.",
        "summary": "Insert a transaction into a bucket",
        "tags": [
          "Bucket Content"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_transaction_id": {
                    "type": "string",
                    "description": "Client transaction ID"
                  },
                  "populate_buckets": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "List of bucket Names to insert the transaction into"
                  }
                },
                "required": [
                  "client_transaction_id",
                  "populate_buckets"
                ]
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "client_transaction_id": {
                      "type": "string",
                      "description": "Client transaction ID"
                    },
                    "status": {
                      "type": "string",
                      "description": "Transaction loading status"
                    }
                  },
                  "required": [
                    "client_transaction_id",
                    "status"
                  ]
                }
              }
            },
            "description": "Transaction bucket created successfully"
          }
        }
      }
    },
    "/api/buckets": {
      "get": {
        "operationId": "bucket_list",
        "summary": "List all buckets",
        "parameters": [
          {
            "in": "query",
            "name": "active_indicator",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "client_transaction_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Buckets"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "example": 123
                    },
                    "next": {
                      "type": "string",
                      "nullable": true,
                      "format": "uri",
                      "example": "http://api.example.org/accounts/?offset=400&limit=100"
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true,
                      "format": "uri",
                      "example": "http://api.example.org/accounts/?offset=200&limit=100"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Paginated bucket list"
                      }
                    }
                  }
                }
              }
            },
            "description": "List of buckets retrieved successfully."
          }
        }
      },
      "post": {
        "operationId": "bucket_create",
        "description": "Create a new bucket.",
        "summary": "Create a bucket",
        "tags": [
          "Buckets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BucketRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BucketRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BucketRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bucket_rules": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Rule object"
                      },
                      "description": "List of bucket rules."
                    },
                    "rule_id": {
                      "type": "integer",
                      "description": "Rule ID."
                    },
                    "rule_setting": {
                      "type": "object",
                      "description": "Rule settings."
                    },
                    "activate_rule": {
                      "type": "boolean",
                      "description": "Activate rule."
                    },
                    "last_timestamp": {
                      "type": "string",
                      "description": "Last timestamp."
                    },
                    "modified_by": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        }
                      }
                    },
                    "created_by": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Bucket created successfully."
          }
        }
      }
    },
    "/api/buckets/{id}": {
      "get": {
        "operationId": "bucket_retrieve",
        "description": "Retrieve a specific bucket by its ID.",
        "summary": "Retrieve a specific bucket",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this bucket.",
            "required": true
          }
        ],
        "tags": [
          "Buckets"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Bucket ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Bucket name"
                    }
                  },
                  "description": "Bucket information"
                }
              }
            },
            "description": "Bucket retrieved successfully."
          }
        }
      },
      "patch": {
        "operationId": "bucket_partial_update",
        "description": "Update a bucket by its ID.",
        "summary": "Update a bucket",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this bucket.",
            "required": true
          }
        ],
        "tags": [
          "Buckets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedBucketRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedBucketRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedBucketRequest"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bucket_rules": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Rule object"
                      },
                      "description": "List of bucket rules."
                    },
                    "rule_id": {
                      "type": "integer",
                      "description": "Rule ID."
                    },
                    "rule_setting": {
                      "type": "object",
                      "description": "Rule settings."
                    },
                    "activate_rule": {
                      "type": "boolean",
                      "description": "Activate rule."
                    },
                    "last_timestamp": {
                      "type": "string",
                      "description": "Last timestamp."
                    },
                    "modified_by": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        }
                      }
                    },
                    "created_by": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Bucket updated successfully."
          }
        }
      },
      "delete": {
        "operationId": "bucket_destroy",
        "description": "Delete a bucket by its ID, The bucket will be deactivated.",
        "summary": "Delete a bucket",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this bucket.",
            "required": true
          }
        ],
        "tags": [
          "Buckets"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Bucket successfully deactivated."
          }
        }
      }
    },
    "/api/buckets/export_csv": {
      "get": {
        "operationId": "bucket_export_csv",
        "description": "Export transactions to a CSV file for a specific bucket with optional date range filtering, An email will be sent to you, including the CSV file.",
        "summary": "Export transactions to CSV for a bucket",
        "parameters": [
          {
            "in": "query",
            "name": "bucketId",
            "schema": {
              "type": "integer"
            },
            "description": "Bucket ID.",
            "required": true
          },
          {
            "in": "query",
            "name": "max_date",
            "schema": {
              "type": "string"
            },
            "description": "Maximum date in format YYYY-MM-DD.",
            "required": true
          },
          {
            "in": "query",
            "name": "min_date",
            "schema": {
              "type": "string"
            },
            "description": "Minimum date in format YYYY-MM-DD.",
            "required": true
          }
        ],
        "tags": [
          "Buckets"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Success message containing how many transactions were exported."
                    }
                  }
                }
              }
            },
            "description": "CSV export initiated successfully."
          }
        }
      }
    },
    "/api/cases": {
      "get": {
        "operationId": "case_list",
        "description": "Retrieve a list of all cases with optional filtering and ordering.",
        "summary": "List all cases",
        "parameters": [
          {
            "in": "query",
            "name": "alert_risk_rating",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "assignee",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bucket",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "case_status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "client_subject_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "client_transaction_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "max_date",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "min_date",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "rule",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "subject_1",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCaseListList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "case_create",
        "tags": [
          "cases"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CaseRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CaseRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/cases/{id}": {
      "get": {
        "operationId": "case_retrieve",
        "summary": "Retrieve a specific case",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Case ID"
                    },
                    "ageing": {
                      "type": "integer",
                      "description": "Days since case creation"
                    },
                    "priority": {
                      "type": "integer",
                      "description": "Case priority level"
                    },
                    "case_status_order": {
                      "type": "integer",
                      "description": "Internal case status order"
                    },
                    "alert_date": {
                      "type": "string",
                      "description": "Alert date timestamp"
                    },
                    "alert_risk_rating": {
                      "type": "string",
                      "enum": [
                        "HIGH",
                        "MEDIUM",
                        "LOW",
                        "Unrated"
                      ],
                      "description": "Risk rating"
                    },
                    "assignee": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "nullable": true,
                          "description": "Assignee user ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Assignee name"
                        }
                      },
                      "description": "Case assignee information"
                    },
                    "bucket": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Bucket ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Bucket name"
                        }
                      },
                      "description": "Bucket information"
                    },
                    "case_action": {
                      "type": "string",
                      "description": "Last action taken on case"
                    },
                    "case_status": {
                      "type": "string",
                      "description": "Current case status"
                    },
                    "case_subjects": {
                      "type": "object",
                      "properties": {
                        "subject_1": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Subject ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "Subject name"
                            },
                            "client_subject_id": {
                              "type": "string",
                              "description": "Client-specific subject identifier"
                            }
                          },
                          "description": "Subject information"
                        },
                        "subject_2": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Subject ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "Subject name"
                            },
                            "client_subject_id": {
                              "type": "string",
                              "description": "Client-specific subject identifier"
                            }
                          },
                          "description": "Subject information",
                          "nullable": true
                        }
                      },
                      "description": "Case subjects information"
                    },
                    "created_on": {
                      "type": "string",
                      "description": "Case creation date"
                    },
                    "rule": {
                      "type": "integer",
                      "description": "Rule number ID that triggered the case"
                    },
                    "active_timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When case became active"
                    }
                  },
                  "required": [
                    "id",
                    "case_status"
                  ],
                  "description": "Case object with all details"
                }
              }
            },
            "description": "Case retrieved successfully."
          }
        }
      },
      "patch": {
        "operationId": "case_partial_update",
        "summary": "Update a specific case",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseRequest"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "case_destroy",
        "description": "Delete a specific case by its ID. A soft delete is performed.",
        "summary": "Delete a specific case",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Case deleted successfully."
          }
        }
      }
    },
    "/api/cases/{id}/alert": {
      "patch": {
        "operationId": "case_alert",
        "description": "Update the alert risk rating for a specific case.",
        "summary": "Update alert risk rating for a case",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alert_risk_rating": {
                    "type": "string",
                    "enum": [
                      "HIGH",
                      "MEDIUM",
                      "LOW",
                      "Unrated"
                    ]
                  }
                },
                "required": [
                  "alert_risk_rating"
                ]
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Case ID"
                    },
                    "ageing": {
                      "type": "integer",
                      "description": "Days since case creation"
                    },
                    "priority": {
                      "type": "integer",
                      "description": "Case priority level"
                    },
                    "case_status_order": {
                      "type": "integer",
                      "description": "Internal case status order"
                    },
                    "alert_date": {
                      "type": "string",
                      "description": "Alert date timestamp"
                    },
                    "alert_risk_rating": {
                      "type": "string",
                      "enum": [
                        "HIGH",
                        "MEDIUM",
                        "LOW",
                        "Unrated"
                      ],
                      "description": "Risk rating"
                    },
                    "assignee": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "nullable": true,
                          "description": "Assignee user ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Assignee name"
                        }
                      },
                      "description": "Case assignee information"
                    },
                    "bucket": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Bucket ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Bucket name"
                        }
                      },
                      "description": "Bucket information"
                    },
                    "case_action": {
                      "type": "string",
                      "description": "Last action taken on case"
                    },
                    "case_status": {
                      "type": "string",
                      "description": "Current case status"
                    },
                    "case_subjects": {
                      "type": "object",
                      "properties": {
                        "subject_1": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Subject ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "Subject name"
                            },
                            "client_subject_id": {
                              "type": "string",
                              "description": "Client-specific subject identifier"
                            }
                          },
                          "description": "Subject information"
                        },
                        "subject_2": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Subject ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "Subject name"
                            },
                            "client_subject_id": {
                              "type": "string",
                              "description": "Client-specific subject identifier"
                            }
                          },
                          "description": "Subject information",
                          "nullable": true
                        }
                      },
                      "description": "Case subjects information"
                    },
                    "created_on": {
                      "type": "string",
                      "description": "Case creation date"
                    },
                    "rule": {
                      "type": "integer",
                      "description": "Rule number ID that triggered the case"
                    },
                    "active_timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When case became active"
                    }
                  },
                  "required": [
                    "id",
                    "case_status"
                  ],
                  "description": "Case object with all details"
                }
              }
            },
            "description": "Alert risk rating updated successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Invalid alert risk rating value."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Case not found."
          }
        }
      }
    },
    "/api/cases/{id}/approval": {
      "patch": {
        "operationId": "case_approval",
        "description": "Approve a case.",
        "summary": "Approve a case",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseApprovalRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseApprovalRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseApprovalRequest"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Case approved successfully."
          }
        }
      }
    },
    "/api/cases/{id}/assign_checker": {
      "patch": {
        "operationId": "case_assign_checker",
        "description": "Assign a case to a checker.",
        "summary": "Assign a case to a checker",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseAssignCheckerRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseAssignCheckerRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseAssignCheckerRequest"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Case assigned to checker successfully."
          }
        }
      }
    },
    "/api/cases/{id}/assign_maker": {
      "patch": {
        "operationId": "case_assign_maker",
        "description": "Assign a case to a maker.",
        "summary": "Assign a case to a maker",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseAssignCheckerRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseAssignCheckerRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseAssignCheckerRequest"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Case assigned to maker successfully."
          }
        }
      }
    },
    "/api/cases/{id}/delete_document": {
      "delete": {
        "operationId": "case_delete_document",
        "description": "Delete a document from a specific case by its ID.",
        "summary": "Delete document from a case",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Document ID."
                    },
                    "case": {
                      "type": "integer",
                      "description": "Case ID."
                    },
                    "name": {
                      "type": "string",
                      "description": "Document name."
                    },
                    "link": {
                      "type": "string",
                      "description": "Document link."
                    }
                  }
                }
              }
            },
            "description": "Document deleted successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Invalid request or missing document ID."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Not allowed to change this case."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Case or document not found."
          }
        }
      }
    },
    "/api/cases/{id}/delete_findings": {
      "delete": {
        "operationId": "case_delete_findings",
        "description": "Delete findings from a specific case by its ID.",
        "summary": "Delete findings from a case",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Finding ID."
                    },
                    "case": {
                      "type": "integer",
                      "description": "Case ID."
                    },
                    "content": {
                      "type": "string",
                      "description": "Finding content."
                    }
                  }
                }
              }
            },
            "description": "Finding deleted successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Invalid request or missing finding ID."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Not allowed to change this case."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Case or finding not found."
          }
        }
      }
    },
    "/api/cases/{id}/document": {
      "patch": {
        "operationId": "case_document",
        "description": "Add a document to a specific case by its ID.",
        "summary": "Add document to a case",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Document name."
                  },
                  "document": {
                    "type": "string",
                    "format": "binary",
                    "description": "Document file."
                  }
                },
                "required": [
                  "name",
                  "document"
                ]
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Case ID"
                    },
                    "ageing": {
                      "type": "integer",
                      "description": "Days since case creation"
                    },
                    "priority": {
                      "type": "integer",
                      "description": "Case priority level"
                    },
                    "case_status_order": {
                      "type": "integer",
                      "description": "Internal case status order"
                    },
                    "alert_date": {
                      "type": "string",
                      "description": "Alert date timestamp"
                    },
                    "alert_risk_rating": {
                      "type": "string",
                      "enum": [
                        "HIGH",
                        "MEDIUM",
                        "LOW",
                        "Unrated"
                      ],
                      "description": "Risk rating"
                    },
                    "assignee": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "nullable": true,
                          "description": "Assignee user ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Assignee name"
                        }
                      },
                      "description": "Case assignee information"
                    },
                    "bucket": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Bucket ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Bucket name"
                        }
                      },
                      "description": "Bucket information"
                    },
                    "case_action": {
                      "type": "string",
                      "description": "Last action taken on case"
                    },
                    "case_status": {
                      "type": "string",
                      "description": "Current case status"
                    },
                    "case_subjects": {
                      "type": "object",
                      "properties": {
                        "subject_1": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Subject ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "Subject name"
                            },
                            "client_subject_id": {
                              "type": "string",
                              "description": "Client-specific subject identifier"
                            }
                          },
                          "description": "Subject information"
                        },
                        "subject_2": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Subject ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "Subject name"
                            },
                            "client_subject_id": {
                              "type": "string",
                              "description": "Client-specific subject identifier"
                            }
                          },
                          "description": "Subject information",
                          "nullable": true
                        }
                      },
                      "description": "Case subjects information"
                    },
                    "created_on": {
                      "type": "string",
                      "description": "Case creation date"
                    },
                    "rule": {
                      "type": "integer",
                      "description": "Rule number ID that triggered the case"
                    },
                    "active_timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When case became active"
                    }
                  },
                  "required": [
                    "id",
                    "case_status"
                  ],
                  "description": "Case object with all details"
                }
              }
            },
            "description": "Document added successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Invalid request - missing name, file, invalid file extension or file size."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Case not found."
          }
        }
      }
    },
    "/api/cases/{id}/findings": {
      "patch": {
        "operationId": "case_findings",
        "description": "Add findings to a specific case by its ID.",
        "summary": "Add findings to a case",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "finding_content": {
                    "type": "string",
                    "description": "Finding content."
                  }
                },
                "required": [
                  "finding_content"
                ]
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Case ID"
                    },
                    "ageing": {
                      "type": "integer",
                      "description": "Days since case creation"
                    },
                    "priority": {
                      "type": "integer",
                      "description": "Case priority level"
                    },
                    "case_status_order": {
                      "type": "integer",
                      "description": "Internal case status order"
                    },
                    "alert_date": {
                      "type": "string",
                      "description": "Alert date timestamp"
                    },
                    "alert_risk_rating": {
                      "type": "string",
                      "enum": [
                        "HIGH",
                        "MEDIUM",
                        "LOW",
                        "Unrated"
                      ],
                      "description": "Risk rating"
                    },
                    "assignee": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "nullable": true,
                          "description": "Assignee user ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Assignee name"
                        }
                      },
                      "description": "Case assignee information"
                    },
                    "bucket": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Bucket ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Bucket name"
                        }
                      },
                      "description": "Bucket information"
                    },
                    "case_action": {
                      "type": "string",
                      "description": "Last action taken on case"
                    },
                    "case_status": {
                      "type": "string",
                      "description": "Current case status"
                    },
                    "case_subjects": {
                      "type": "object",
                      "properties": {
                        "subject_1": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Subject ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "Subject name"
                            },
                            "client_subject_id": {
                              "type": "string",
                              "description": "Client-specific subject identifier"
                            }
                          },
                          "description": "Subject information"
                        },
                        "subject_2": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Subject ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "Subject name"
                            },
                            "client_subject_id": {
                              "type": "string",
                              "description": "Client-specific subject identifier"
                            }
                          },
                          "description": "Subject information",
                          "nullable": true
                        }
                      },
                      "description": "Case subjects information"
                    },
                    "created_on": {
                      "type": "string",
                      "description": "Case creation date"
                    },
                    "rule": {
                      "type": "integer",
                      "description": "Rule number ID that triggered the case"
                    },
                    "active_timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When case became active"
                    }
                  },
                  "required": [
                    "id",
                    "case_status"
                  ],
                  "description": "Case object with all details"
                }
              }
            },
            "description": "Findings added successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Invalid request or no findings provided."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Not allowed to change this case."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Case not found."
          }
        }
      }
    },
    "/api/cases/{id}/generate_case_report": {
      "get": {
        "operationId": "case_generate_case_report",
        "description": "Generate a case report for a specific case by its ID. The report will be sent to the user's email.",
        "summary": "Generate case report",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Success message indicating report generation has been initiated"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Report generation response"
                }
              }
            },
            "description": "Case report generation initiated successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Invalid case ID."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Case not found."
          }
        }
      }
    },
    "/api/cases/{id}/reopen": {
      "patch": {
        "operationId": "case_reopen",
        "description": "Reopen a case.",
        "summary": "Reopen a case",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseReopenDataRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseReopenDataRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCaseReopenDataRequest"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Case reopened successfully."
          }
        }
      }
    },
    "/api/cases/{id}/report_code": {
      "patch": {
        "operationId": "case_report_code",
        "description": "Add a report code to a specific case by its ID.",
        "summary": "Add report code to a case",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_code": {
                    "type": "string",
                    "description": "Report code."
                  }
                },
                "required": [
                  "report_code"
                ]
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Case ID"
                    },
                    "ageing": {
                      "type": "integer",
                      "description": "Days since case creation"
                    },
                    "priority": {
                      "type": "integer",
                      "description": "Case priority level"
                    },
                    "case_status_order": {
                      "type": "integer",
                      "description": "Internal case status order"
                    },
                    "alert_date": {
                      "type": "string",
                      "description": "Alert date timestamp"
                    },
                    "alert_risk_rating": {
                      "type": "string",
                      "enum": [
                        "HIGH",
                        "MEDIUM",
                        "LOW",
                        "Unrated"
                      ],
                      "description": "Risk rating"
                    },
                    "assignee": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "nullable": true,
                          "description": "Assignee user ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Assignee name"
                        }
                      },
                      "description": "Case assignee information"
                    },
                    "bucket": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Bucket ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Bucket name"
                        }
                      },
                      "description": "Bucket information"
                    },
                    "case_action": {
                      "type": "string",
                      "description": "Last action taken on case"
                    },
                    "case_status": {
                      "type": "string",
                      "description": "Current case status"
                    },
                    "case_subjects": {
                      "type": "object",
                      "properties": {
                        "subject_1": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Subject ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "Subject name"
                            },
                            "client_subject_id": {
                              "type": "string",
                              "description": "Client-specific subject identifier"
                            }
                          },
                          "description": "Subject information"
                        },
                        "subject_2": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Subject ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "Subject name"
                            },
                            "client_subject_id": {
                              "type": "string",
                              "description": "Client-specific subject identifier"
                            }
                          },
                          "description": "Subject information",
                          "nullable": true
                        }
                      },
                      "description": "Case subjects information"
                    },
                    "created_on": {
                      "type": "string",
                      "description": "Case creation date"
                    },
                    "rule": {
                      "type": "integer",
                      "description": "Rule number ID that triggered the case"
                    },
                    "active_timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When case became active"
                    }
                  },
                  "required": [
                    "id",
                    "case_status"
                  ],
                  "description": "Case object with all details"
                }
              }
            },
            "description": "Report code added successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Invalid request or missing report code."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Not allowed to change this case."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Case not found."
          }
        }
      }
    },
    "/api/cases/{id}/report_indicator": {
      "patch": {
        "operationId": "case_report_indicator",
        "description": "Add a report indicator to a specific case by its ID.",
        "summary": "Add report indicator to a case",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this case.",
            "required": true
          }
        ],
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_indicator": {
                    "type": "string",
                    "description": "Report indicator."
                  }
                },
                "required": [
                  "report_indicator"
                ]
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Case ID"
                    },
                    "ageing": {
                      "type": "integer",
                      "description": "Days since case creation"
                    },
                    "priority": {
                      "type": "integer",
                      "description": "Case priority level"
                    },
                    "case_status_order": {
                      "type": "integer",
                      "description": "Internal case status order"
                    },
                    "alert_date": {
                      "type": "string",
                      "description": "Alert date timestamp"
                    },
                    "alert_risk_rating": {
                      "type": "string",
                      "enum": [
                        "HIGH",
                        "MEDIUM",
                        "LOW",
                        "Unrated"
                      ],
                      "description": "Risk rating"
                    },
                    "assignee": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "nullable": true,
                          "description": "Assignee user ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Assignee name"
                        }
                      },
                      "description": "Case assignee information"
                    },
                    "bucket": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Bucket ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Bucket name"
                        }
                      },
                      "description": "Bucket information"
                    },
                    "case_action": {
                      "type": "string",
                      "description": "Last action taken on case"
                    },
                    "case_status": {
                      "type": "string",
                      "description": "Current case status"
                    },
                    "case_subjects": {
                      "type": "object",
                      "properties": {
                        "subject_1": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Subject ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "Subject name"
                            },
                            "client_subject_id": {
                              "type": "string",
                              "description": "Client-specific subject identifier"
                            }
                          },
                          "description": "Subject information"
                        },
                        "subject_2": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Subject ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "Subject name"
                            },
                            "client_subject_id": {
                              "type": "string",
                              "description": "Client-specific subject identifier"
                            }
                          },
                          "description": "Subject information",
                          "nullable": true
                        }
                      },
                      "description": "Case subjects information"
                    },
                    "created_on": {
                      "type": "string",
                      "description": "Case creation date"
                    },
                    "rule": {
                      "type": "integer",
                      "description": "Rule number ID that triggered the case"
                    },
                    "active_timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When case became active"
                    }
                  },
                  "required": [
                    "id",
                    "case_status"
                  ],
                  "description": "Case object with all details"
                }
              }
            },
            "description": "Report indicator added successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Invalid request or missing report indicator."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Not allowed to change this case."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Case not found."
          }
        }
      }
    },
    "/api/cases/{id}/transactions": {
      "get": {
        "operationId": "cases_transactions_list",
        "description": "Retrieve transactions associated with a specific case, including both direct case transactions and relevant transactions based on rule parameters.",
        "summary": "List transactions for a specific case",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            },
            "description": "Cursor for pagination"
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "required": true
          },
          {
            "name": "page_limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "next": {
                      "type": "string",
                      "nullable": true,
                      "format": "uri",
                      "example": "http://api.example.org/accounts/?cursor=cD00ODY%3D\""
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true,
                      "format": "uri",
                      "example": "http://api.example.org/accounts/?cursor=cj0xJnA9NDg3"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "transactions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "Transaction ID"
                                },
                                "client_transaction_id": {
                                  "type": "string",
                                  "description": "Client-specific transaction ID"
                                },
                                "transaction_type": {
                                  "type": "string",
                                  "description": "Type of transaction"
                                },
                                "cp_a": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "description": "Subject ID"
                                    },
                                    "name": {
                                      "type": "string",
                                      "description": "Subject name"
                                    },
                                    "client_subject_id": {
                                      "type": "string",
                                      "description": "Client-specific subject identifier"
                                    }
                                  },
                                  "description": "Subject information"
                                },
                                "cp_a_country": {
                                  "type": "string",
                                  "description": "Counterparty A country"
                                },
                                "cp_a_bank": {
                                  "type": "string",
                                  "description": "Counterparty A bank"
                                },
                                "cp_b": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "description": "Subject ID"
                                    },
                                    "name": {
                                      "type": "string",
                                      "description": "Subject name"
                                    },
                                    "client_subject_id": {
                                      "type": "string",
                                      "description": "Client-specific subject identifier"
                                    }
                                  },
                                  "description": "Subject information"
                                },
                                "cp_b_country": {
                                  "type": "string",
                                  "description": "Counterparty B country"
                                },
                                "cp_b_bank": {
                                  "type": "string",
                                  "description": "Counterparty B bank"
                                },
                                "transaction_timestamp": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Transaction timestamp"
                                },
                                "transaction_currency": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "description": "Currency ID"
                                    },
                                    "code": {
                                      "type": "string",
                                      "description": "Currency code (e.g., USD, EUR)"
                                    },
                                    "name": {
                                      "type": "string",
                                      "description": "Currency name"
                                    }
                                  },
                                  "description": "Currency information"
                                },
                                "amount": {
                                  "type": "number",
                                  "format": "float",
                                  "description": "Transaction amount"
                                },
                                "alt_currency": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "description": "Currency ID"
                                    },
                                    "code": {
                                      "type": "string",
                                      "description": "Currency code (e.g., USD, EUR)"
                                    },
                                    "name": {
                                      "type": "string",
                                      "description": "Currency name"
                                    }
                                  },
                                  "description": "Currency information"
                                },
                                "amount_in_alt_currency": {
                                  "type": "number",
                                  "format": "float",
                                  "description": "Amount in alternative currency"
                                },
                                "payment_mode": {
                                  "type": "string",
                                  "description": "Payment method"
                                },
                                "purpose_of_transfer": {
                                  "type": "string",
                                  "description": "Purpose of the transaction"
                                }
                              },
                              "required": [
                                "id",
                                "client_transaction_id",
                                "transaction_type"
                              ],
                              "description": "Transaction object with all details"
                            },
                            "description": "List of transactions associated with the case"
                          },
                          "transaction_count": {
                            "type": "integer",
                            "description": "Total number of transactions for this case"
                          },
                          "next_token": {
                            "type": "string",
                            "nullable": true,
                            "description": "Cursor token for next page of results"
                          },
                          "prev_token": {
                            "type": "string",
                            "nullable": true,
                            "description": "Cursor token for previous page of results"
                          }
                        },
                        "required": [
                          "transactions",
                          "transaction_count"
                        ],
                        "description": "Case transactions response with pagination"
                      }
                    }
                  }
                }
              }
            },
            "description": "Transactions retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Invalid or missing case ID."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Case, rule, or transaction not found."
          }
        }
      }
    },
    "/api/cases/active": {
      "get": {
        "operationId": "case_active",
        "description": "Retrieve a list of active cases, A case is considered active if its status is not TRUE_HIT nor FALSE_HIT.",
        "summary": "Get active cases",
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/cases/active_cases": {
      "get": {
        "operationId": "case_active_cases",
        "summary": "Get active cases statistics",
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Active cases statistics"
                }
              }
            },
            "description": "Active cases retrieved successfully."
          }
        }
      }
    },
    "/api/cases/assignee": {
      "get": {
        "operationId": "case_assignee",
        "description": "Retrieve statistics for cases grouped by assignee.",
        "summary": "Get cases by assignee",
        "parameters": [
          {
            "in": "query",
            "name": "assignees",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by assignee ID(s)."
          },
          {
            "in": "query",
            "name": "buckets",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by bucket ID(s)."
          },
          {
            "in": "query",
            "name": "end_date",
            "schema": {
              "type": "string"
            },
            "description": "End date to filter cases."
          },
          {
            "in": "query",
            "name": "is_active",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by active status."
          },
          {
            "in": "query",
            "name": "rules",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by rule ID(s)."
          },
          {
            "in": "query",
            "name": "start_date",
            "schema": {
              "type": "string"
            },
            "description": "Start date to filter cases."
          },
          {
            "in": "query",
            "name": "statuses",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by status(es)."
          }
        ],
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "Assignee data"
                }
              }
            },
            "description": "Cases grouped by assignee retrieved successfully."
          }
        }
      }
    },
    "/api/cases/bucket": {
      "get": {
        "operationId": "case_bucket",
        "description": "Retrieve statistics for cases grouped by bucket.",
        "summary": "Get cases by bucket",
        "parameters": [
          {
            "in": "query",
            "name": "assignees",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by assignee ID(s)."
          },
          {
            "in": "query",
            "name": "buckets",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by bucket ID(s)."
          },
          {
            "in": "query",
            "name": "end_date",
            "schema": {
              "type": "string"
            },
            "description": "End date to filter cases."
          },
          {
            "in": "query",
            "name": "is_active",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by active status."
          },
          {
            "in": "query",
            "name": "rules",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by rule ID(s)."
          },
          {
            "in": "query",
            "name": "start_date",
            "schema": {
              "type": "string"
            },
            "description": "Start date to filter cases."
          },
          {
            "in": "query",
            "name": "statuses",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by status(es)."
          }
        ],
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "Case bucket data"
                }
              }
            },
            "description": "Cases grouped by bucket retrieved successfully."
          }
        }
      }
    },
    "/api/cases/bulk_approval": {
      "post": {
        "operationId": "case_bulk_approval",
        "description": "Approve multiple cases in a single atomic transaction.",
        "summary": "Bulk approve multiple cases",
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseBulkApprovalRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CaseBulkApprovalRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CaseBulkApprovalRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Cases approved successfully."
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/cases/bulk_assign": {
      "patch": {
        "operationId": "case_bulk_assign",
        "description": "Assign multiple cases to a specific assignee.",
        "summary": "Bulk assign cases",
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "case_list": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "List of case IDs."
                  },
                  "assignee": {
                    "type": "integer",
                    "description": "Assignee user ID."
                  }
                },
                "required": [
                  "case_list",
                  "assignee"
                ]
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "description": "Success message"
                }
              }
            },
            "description": "Cases assigned successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Invalid request data."
          }
        }
      }
    },
    "/api/cases/bulk_documents": {
      "post": {
        "operationId": "case_bulk_documents",
        "description": "Upload a document to multiple cases in a single atomic transaction.",
        "summary": "Bulk upload documents to multiple cases",
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseBulkDocumentRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CaseBulkDocumentRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CaseBulkDocumentRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Documents uploaded successfully."
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/cases/bulk_findings": {
      "post": {
        "operationId": "case_bulk_findings",
        "description": "Add findings to multiple cases in a single atomic transaction.",
        "summary": "Bulk add findings to multiple cases",
        "tags": [
          "Case"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseBulkFindingRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CaseBulkFindingRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CaseBulkFindingRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Findings added successfully."
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/cases/case_status": {
      "get": {
        "operationId": "case_case_status",
        "description": "Retrieve a list of all case status options, including their key and value.",
        "summary": "Get case status options",
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Case status data"
                }
              }
            },
            "description": "Case status options retrieved successfully."
          }
        }
      }
    },
    "/api/cases/closed_cases": {
      "get": {
        "operationId": "case_closed_cases",
        "description": "Retrieve statistics for closed cases, A case is considered closed if it is in either TRUE_HIT or FALSE_HIT status.",
        "summary": "Get closed cases",
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Closed cases statistics"
                }
              }
            },
            "description": "Closed cases retrieved successfully."
          }
        }
      }
    },
    "/api/cases/export_csv": {
      "get": {
        "operationId": "case_export_csv",
        "description": "Export cases to a CSV file, A CSV file will be generated and sent to the user's email.",
        "summary": "Export cases to CSV",
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "CSV export initiated successfully."
          }
        }
      }
    },
    "/api/cases/not_active": {
      "get": {
        "operationId": "case_not_active",
        "description": "Retrieve a list of inactive cases.",
        "summary": "Get inactive cases",
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/cases/priority": {
      "get": {
        "operationId": "case_priority",
        "description": "Retrieve statistics for cases grouped by priority.",
        "summary": "Get cases by priority",
        "parameters": [
          {
            "in": "query",
            "name": "assignees",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by assignee ID(s)."
          },
          {
            "in": "query",
            "name": "buckets",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by bucket ID(s)."
          },
          {
            "in": "query",
            "name": "end_date",
            "schema": {
              "type": "string"
            },
            "description": "End date to filter cases."
          },
          {
            "in": "query",
            "name": "is_active",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by active status."
          },
          {
            "in": "query",
            "name": "rules",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by rule ID(s)."
          },
          {
            "in": "query",
            "name": "start_date",
            "schema": {
              "type": "string"
            },
            "description": "Start date to filter cases."
          },
          {
            "in": "query",
            "name": "statuses",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by status(es)."
          }
        ],
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "Priority data"
                }
              }
            },
            "description": "Cases grouped by priority retrieved successfully."
          }
        }
      }
    },
    "/api/cases/rule": {
      "get": {
        "operationId": "case_rule",
        "description": "Retrieve statistics for cases grouped by rule.",
        "summary": "Get cases by rule",
        "parameters": [
          {
            "in": "query",
            "name": "assignees",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by assignee ID(s)."
          },
          {
            "in": "query",
            "name": "buckets",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by bucket ID(s)."
          },
          {
            "in": "query",
            "name": "end_date",
            "schema": {
              "type": "string"
            },
            "description": "End date to filter cases."
          },
          {
            "in": "query",
            "name": "is_active",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by active status."
          },
          {
            "in": "query",
            "name": "rules",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by rule ID(s)."
          },
          {
            "in": "query",
            "name": "start_date",
            "schema": {
              "type": "string"
            },
            "description": "Start date to filter cases."
          },
          {
            "in": "query",
            "name": "statuses",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by status(es)."
          }
        ],
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "Case rule data"
                }
              }
            },
            "description": "Cases grouped by rule retrieved successfully."
          }
        }
      }
    },
    "/api/cases/status": {
      "get": {
        "operationId": "case_status",
        "description": "Retrieve statistics for cases grouped by status.",
        "summary": "Get cases by status",
        "parameters": [
          {
            "in": "query",
            "name": "assignees",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by assignee ID(s)."
          },
          {
            "in": "query",
            "name": "buckets",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by bucket ID(s)."
          },
          {
            "in": "query",
            "name": "end_date",
            "schema": {
              "type": "string"
            },
            "description": "End date to filter cases."
          },
          {
            "in": "query",
            "name": "is_active",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by active status."
          },
          {
            "in": "query",
            "name": "rules",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by rule ID(s)."
          },
          {
            "in": "query",
            "name": "start_date",
            "schema": {
              "type": "string"
            },
            "description": "Start date to filter cases."
          },
          {
            "in": "query",
            "name": "statuses",
            "schema": {
              "type": "string"
            },
            "description": "Filter cases by status(es)."
          }
        ],
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "Status data"
                }
              }
            },
            "description": "Cases grouped by status retrieved successfully."
          }
        }
      }
    },
    "/api/cases/timeline": {
      "get": {
        "operationId": "case_timeline",
        "description": "Retrieve a timeline of cases.",
        "summary": "Get cases timeline",
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "description": "Case timeline chart data"
                  }
                }
              }
            },
            "description": "Cases timeline retrieved successfully."
          }
        }
      }
    },
    "/api/cases/violations": {
      "get": {
        "operationId": "case_violations",
        "summary": "Get violations statistics",
        "tags": [
          "Case"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "Case violations data"
                }
              }
            },
            "description": "Violations retrieved successfully."
          }
        }
      }
    },
    "/api/currency": {
      "get": {
        "operationId": "currency_list",
        "summary": "Retrieve a list of currencies",
        "parameters": [
          {
            "in": "query",
            "name": "active_indicator",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Currency"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCurrencyList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/currency/{alphabetic_code}": {
      "get": {
        "operationId": "currency_retrieve",
        "summary": "Retrieve a specific currency",
        "parameters": [
          {
            "in": "path",
            "name": "alphabetic_code",
            "schema": {
              "type": "string"
            },
            "description": "Currency alphabetic code",
            "required": true
          }
        ],
        "tags": [
          "Currency"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Currency"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "currency_partial_update",
        "summary": "Activate/Deactivate a currency",
        "parameters": [
          {
            "in": "path",
            "name": "alphabetic_code",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "Currency"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCurrencyRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCurrencyRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCurrencyRequest"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Currency"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/groups": {
      "get": {
        "operationId": "group_list",
        "summary": "List groups",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Group"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "example": 123
                    },
                    "next": {
                      "type": "string",
                      "nullable": true,
                      "format": "uri",
                      "example": "http://api.example.org/accounts/?offset=400&limit=100"
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true,
                      "format": "uri",
                      "example": "http://api.example.org/accounts/?offset=200&limit=100"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer",
                            "description": "Total number of items"
                          },
                          "next": {
                            "type": "string",
                            "nullable": true,
                            "description": "URL for next page"
                          },
                          "previous": {
                            "type": "string",
                            "nullable": true,
                            "description": "URL for previous page"
                          },
                          "results": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "Group ID"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Group name"
                                },
                                "users": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer"
                                  },
                                  "description": "List of user IDs in this group"
                                },
                                "permissions": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer"
                                  },
                                  "description": "List of permission IDs for this group"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Group creation timestamp"
                                },
                                "updated_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Group last update timestamp"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ],
                              "description": "Group object with all details"
                            },
                            "description": "List of groups"
                          }
                        },
                        "description": "Paginated group list"
                      }
                    }
                  }
                }
              }
            },
            "description": "Successful Response"
          }
        }
      },
      "post": {
        "operationId": "group_create",
        "summary": "Create group",
        "tags": [
          "Group"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Group name"
                  },
                  "users": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "List of user IDs"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "List of permission IDs"
                  }
                },
                "required": [
                  "name",
                  "users",
                  "permissions"
                ]
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Group ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Group name"
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of user IDs in this group"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of permission IDs for this group"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Group creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Group last update timestamp"
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ],
                  "description": "Group object with all details"
                }
              }
            },
            "description": "Group created successfully"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Invalid request data."
          }
        }
      }
    },
    "/api/groups/{id}": {
      "get": {
        "operationId": "group_retrieve",
        "summary": "Retrieve group",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this group.",
            "required": true
          }
        ],
        "tags": [
          "Group"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Group ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Group name"
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of user IDs in this group"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of permission IDs for this group"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Group creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Group last update timestamp"
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ],
                  "description": "Group object with all details"
                }
              }
            },
            "description": "Successful Response"
          }
        }
      },
      "patch": {
        "operationId": "group_partial_update",
        "summary": "Update group",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this group.",
            "required": true
          }
        ],
        "tags": [
          "Group"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Group name"
                  },
                  "users": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "List of user IDs"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "List of permission IDs"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Group ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Group name"
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of user IDs in this group"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of permission IDs for this group"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Group creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Group last update timestamp"
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ],
                  "description": "Group object with all details"
                }
              }
            },
            "description": "Group updated successfully"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Invalid request data."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Group not found."
          }
        }
      },
      "delete": {
        "operationId": "group_destroy",
        "summary": "Delete group",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this group.",
            "required": true
          }
        ],
        "tags": [
          "Group"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Group deleted successfully"
          }
        }
      }
    },
    "/api/login": {
      "post": {
        "operationId": "login_create",
        "description": "Login with email, We use an authentication mechanism that is based on AWS Cognito, So we do not store the password in our database, to validate the user, we will check if the email exists in our database in addition to that the user should be active",
        "summary": "Login",
        "tags": [
          "User"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "User email address"
                  }
                },
                "required": [
                  "email"
                ],
                "description": "Login request payload"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          },
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Login successful"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "User not found or not active"
          }
        }
      }
    },
    "/api/logout": {
      "post": {
        "operationId": "logout_create",
        "description": "Logout a user by revoking the token from AWS Cognito",
        "summary": "Logout",
        "tags": [
          "User"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "JWT Token"
                  }
                },
                "required": [
                  "token"
                ],
                "description": "Logout request payload"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status message"
                    }
                  }
                }
              }
            },
            "description": "Logout successful"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Invalid operation"
          }
        }
      }
    },
    "/api/permissions": {
      "get": {
        "operationId": "permission_list",
        "summary": "List all permissions",
        "tags": [
          "Permission"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "results": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "resource": {
                              "type": "string",
                              "description": "Resource name"
                            },
                            "actions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "description": "Permission ID"
                                  },
                                  "action": {
                                    "type": "string",
                                    "description": "Permission action (e.g., create, read, update, delete)"
                                  },
                                  "resource": {
                                    "type": "string",
                                    "description": "Resource type (e.g., user, case, group)"
                                  },
                                  "label": {
                                    "type": "string",
                                    "description": "Human-readable permission label"
                                  }
                                },
                                "required": [
                                  "id",
                                  "action",
                                  "resource"
                                ],
                                "description": "Permission object with details"
                              },
                              "description": "List of permissions allowed on the resource"
                            }
                          },
                          "required": [
                            "resource",
                            "actions"
                          ],
                          "description": "Grouped permissions by resource"
                        }
                      }
                    },
                    "required": [
                      "results"
                    ],
                    "description": "List of permissions grouped by resource"
                  }
                }
              }
            },
            "description": "Successful Response"
          }
        }
      }
    },
    "/api/permissions/{id}": {
      "get": {
        "operationId": "permission_retrieve",
        "summary": "Retrieve a single permission by id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this permission.",
            "required": true
          }
        ],
        "tags": [
          "Permission"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Permission"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/risk_assessment": {
      "get": {
        "operationId": "riskassessment_list",
        "summary": "Retrieve a list of risk assessments",
        "parameters": [
          {
            "in": "query",
            "name": "client_subject_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "max_date",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "min_date",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Risk Assessment"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedRiskAssessmentList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/risk_assessment/{id}": {
      "get": {
        "operationId": "riskassessment_retrieve",
        "summary": "Retrieve a specific risk assessment",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this risk assessment.",
            "required": true
          }
        ],
        "tags": [
          "Risk Assessment"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskAssessment"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/rulealert": {
      "get": {
        "operationId": "rulealert_list",
        "summary": "List all RuleAlert records",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "RuleAlert"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedRuleAlertList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/rulealert/{id}": {
      "get": {
        "operationId": "rulealert_retrieve",
        "summary": "Retrieve a RuleAlert record",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this rule details.",
            "required": true
          }
        ],
        "tags": [
          "RuleAlert"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleAlert"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "rulealert_partial_update",
        "summary": "Update a RuleAlert record",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this rule details.",
            "required": true
          }
        ],
        "tags": [
          "RuleAlert"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRuleAlertRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRuleAlertRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRuleAlertRequest"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleAlert"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/ruleinformation": {
      "get": {
        "operationId": "ruledetail_list",
        "summary": "List all rule information",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Rule Detail"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedRuleDetailList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/ruleinformation/{id}": {
      "get": {
        "operationId": "ruledetail_retrieve",
        "summary": "Retrieve a rule information",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this rule details.",
            "required": true
          }
        ],
        "tags": [
          "Rule Detail"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleDetail"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "ruledetail_partial_update",
        "summary": "Update a rule information record",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this rule details.",
            "required": true
          }
        ],
        "tags": [
          "Rule Detail"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRuleDetailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRuleDetailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRuleDetailRequest"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/shared/profile-info": {
      "get": {
        "operationId": "shared_profile_info_retrieve",
        "summary": "Get profile information",
        "tags": [
          "Profile Info"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Profile ID."
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/subjectinfo/{id}": {
      "get": {
        "operationId": "subjectinfo_retrieve",
        "summary": "Retrieve subject information by client_subject_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this subject.",
            "required": true
          }
        ],
        "tags": [
          "Subject Info"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Subject information"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/subjects": {
      "get": {
        "operationId": "subject_list",
        "summary": "List all subjects",
        "parameters": [
          {
            "in": "query",
            "name": "client_subject_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter by client subject ID."
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "subject_name",
            "schema": {
              "type": "string"
            },
            "description": "Filter by subject name."
          }
        ],
        "tags": [
          "Subjects"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSubjectList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "subject_create",
        "summary": "Create a subject",
        "tags": [
          "Subjects"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubjectRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SubjectRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SubjectRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subject"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/subjects/{client_subject_id}": {
      "get": {
        "operationId": "subject_retrieve",
        "description": "Retrieve a specific subject by its client subject ID.",
        "summary": "Retrieve a specific subject",
        "parameters": [
          {
            "in": "path",
            "name": "client_subject_id",
            "schema": {
              "type": "string"
            },
            "description": "Client subject ID.",
            "required": true
          }
        ],
        "tags": [
          "Subjects"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subject"
                }
              }
            },
            "description": "Subject retrieved successfully."
          }
        }
      },
      "patch": {
        "operationId": "subject_partial_update",
        "summary": "Update a subject",
        "parameters": [
          {
            "in": "path",
            "name": "client_subject_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "Subjects"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSubjectRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSubjectRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSubjectRequest"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subject"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/subjects/{client_subject_id}/generate-subject-report": {
      "post": {
        "operationId": "subject_generate_subject_report",
        "description": "Generate a report for a specific subject and send it via email.",
        "summary": "Generate subject report",
        "parameters": [
          {
            "in": "path",
            "name": "client_subject_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "Subjects"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "chartImage": {
                    "type": "string",
                    "description": "Base64 encoded chart image to include in the PDF report"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Success message indicating report generation has been initiated"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Report generation response"
                }
              }
            },
            "description": "Subject report generation initiated successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Invalid subject ID."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Subject not found."
          }
        }
      }
    },
    "/api/subjects/export_csv": {
      "get": {
        "operationId": "subject_export_csv",
        "description": "Export subjects to a CSV file.",
        "summary": "Export subjects to CSV",
        "tags": [
          "Subjects"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Success message."
                    }
                  }
                }
              }
            },
            "description": "CSV export initiated successfully."
          }
        }
      }
    },
    "/api/subjects/risk_assessment_report": {
      "get": {
        "operationId": "subject_risk_assessment_report",
        "description": "Retrieve a risk assessment report for all subjects.",
        "summary": "Get risk assessment report",
        "parameters": [
          {
            "in": "query",
            "name": "client_subject_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter by client subject ID."
          },
          {
            "in": "query",
            "name": "ordering",
            "schema": {
              "type": "string"
            },
            "description": "Order results by field. Available fields: daily_score, subject_lowest_score, true_hit_date, subject_name, client_subject_id. Prefix with \"-\" for descending order. Example: \"-daily_score\" for highest to lowest daily score."
          },
          {
            "in": "query",
            "name": "rules_affected",
            "schema": {
              "type": "string"
            },
            "description": "Filter by rule numbers (comma-separated). Example: \"1,3,5\" returns subjects that violate rule 1 OR 3 OR 5."
          },
          {
            "in": "query",
            "name": "subject_name",
            "schema": {
              "type": "string"
            },
            "description": "Filter by subject name."
          }
        ],
        "tags": [
          "Subjects"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Paginated risk assessment report"
                }
              }
            },
            "description": "Risk assessment report retrieved successfully."
          }
        }
      }
    },
    "/api/subjects/upload": {
      "post": {
        "operationId": "subject_upload",
        "description": "Upload a CSV file to create or update subjects, An email will be sent to you, including upload status.",
        "summary": "Upload subjects",
        "tags": [
          "Subjects"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubjectUploadRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SubjectUploadRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SubjectUploadRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": "Subjects upload initiated successfully."
          }
        }
      }
    },
    "/api/transactions": {
      "get": {
        "operationId": "transaction_list",
        "summary": "List all transactions",
        "parameters": [
          {
            "in": "query",
            "name": "client_subject_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "client_transaction_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "country",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "max_date",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "min_date",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "transaction_type",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedTransactionList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "transaction_create",
        "summary": "Create a transaction",
        "tags": [
          "Transactions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/TransactionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TransactionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/transactions/{id}": {
      "get": {
        "operationId": "transaction_retrieve",
        "description": "Override the method to optimise query used, while using only necessary Django/DRF's implementation of [get_object_or_404()]",
        "summary": "Retrieve a specific transaction",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this transaction.",
            "required": true
          }
        ],
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/transactions/countries": {
      "get": {
        "operationId": "transaction_countries",
        "description": "Retrieve a list of transactions by country.",
        "summary": "Get Transactions by Country",
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "country": {
                        "type": "string",
                        "description": "Country name."
                      },
                      "sum_inflow": {
                        "type": "number",
                        "description": "Sum of inflow transactions."
                      },
                      "total_inflow": {
                        "type": "integer",
                        "description": "Total inflow transactions."
                      },
                      "sum_outflow": {
                        "type": "number",
                        "description": "Sum of outflow transactions."
                      },
                      "total_outflow": {
                        "type": "integer",
                        "description": "Total outflow transactions."
                      }
                    }
                  }
                }
              }
            },
            "description": "Transactions by country retrieved successfully."
          }
        }
      }
    },
    "/api/transactions/summary": {
      "get": {
        "operationId": "transaction_summary",
        "description": "Retrieve a summary of transaction statistics.",
        "summary": "Get Summary Stats",
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "sum_inflow": {
                        "type": "number",
                        "description": "Sum of inflow transactions."
                      },
                      "total_inflow": {
                        "type": "integer",
                        "description": "Total inflow transactions."
                      },
                      "sum_outflow": {
                        "type": "number",
                        "description": "Sum of outflow transactions."
                      },
                      "total_outflow": {
                        "type": "integer",
                        "description": "Total outflow transactions."
                      },
                      "month": {
                        "type": "integer",
                        "description": "Month of the transaction."
                      },
                      "year": {
                        "type": "integer",
                        "description": "Year of the transaction."
                      }
                    }
                  }
                }
              }
            },
            "description": "Summary stats retrieved successfully."
          }
        }
      }
    },
    "/api/transactions/timeline": {
      "get": {
        "operationId": "transaction_timeline",
        "description": "Retrieve a timeline of transactions.",
        "summary": "Get Transactions timeline",
        "tags": [
          "Transactions"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "created_date": {
                        "type": "string",
                        "format": "date"
                      },
                      "PAY": {
                        "type": "integer",
                        "description": "Number of PAY transactions."
                      },
                      "PAY_AMOUNT": {
                        "type": "number",
                        "description": "Sum of PAY transactions."
                      },
                      "DEPOSIT": {
                        "type": "integer",
                        "description": "Number of DEPOSIT transactions."
                      },
                      "DEPOSIT_AMOUNT": {
                        "type": "number",
                        "description": "Sum of DEPOSIT transactions."
                      },
                      "WITHDRAW": {
                        "type": "integer",
                        "description": "Number of WITHDRAW transactions."
                      },
                      "WITHDRAW_AMOUNT": {
                        "type": "number",
                        "description": "Sum of WITHDRAW transactions."
                      }
                    }
                  }
                }
              }
            },
            "description": "Transactions timeline retrieved successfully."
          }
        }
      }
    },
    "/api/transactions/upload": {
      "post": {
        "operationId": "transaction_upload",
        "description": "Upload a CSV file to create or update transactions, An email will be sent to you, including the upload status.",
        "summary": "Upload transactions",
        "tags": [
          "Transactions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionUploadRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/TransactionUploadRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TransactionUploadRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": "Transactions upload initiated successfully."
          }
        }
      }
    },
    "/api/users": {
      "get": {
        "operationId": "user_list",
        "summary": "List users",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "searchString",
            "schema": {
              "type": "string"
            },
            "description": "Filter users by name"
          }
        ],
        "tags": [
          "User"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "example": 123
                    },
                    "next": {
                      "type": "string",
                      "nullable": true,
                      "format": "uri",
                      "example": "http://api.example.org/accounts/?offset=400&limit=100"
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true,
                      "format": "uri",
                      "example": "http://api.example.org/accounts/?offset=200&limit=100"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer",
                            "description": "Total number of items"
                          },
                          "next": {
                            "type": "string",
                            "nullable": true,
                            "description": "URL for next page"
                          },
                          "previous": {
                            "type": "string",
                            "nullable": true,
                            "description": "URL for previous page"
                          },
                          "results": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "User ID"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "User full name"
                                },
                                "email": {
                                  "type": "string",
                                  "format": "email",
                                  "description": "User email address"
                                },
                                "groups": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer"
                                  },
                                  "description": "List of group IDs"
                                },
                                "permissions": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer"
                                  },
                                  "description": "List of permission IDs"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "User creation timestamp"
                                },
                                "updated_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "User last update timestamp"
                                },
                                "is_active": {
                                  "type": "boolean",
                                  "description": "Whether the user is active"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "email",
                                "is_active"
                              ],
                              "description": "User object with all details"
                            },
                            "description": "List of users"
                          }
                        },
                        "description": "Paginated user list"
                      }
                    }
                  }
                }
              }
            },
            "description": "Successful Response"
          }
        }
      },
      "post": {
        "operationId": "user_create",
        "summary": "Create user",
        "tags": [
          "User"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "groups": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                },
                "required": [
                  "name",
                  "email",
                  "groups",
                  "permissions"
                ]
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "User ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "User full name"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "description": "User email address"
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of group IDs"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of permission IDs"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "User creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "User last update timestamp"
                    },
                    "is_active": {
                      "type": "boolean",
                      "description": "Whether the user is active"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email",
                    "is_active"
                  ],
                  "description": "User object with all details"
                }
              }
            },
            "description": "User created successfully"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Invalid request data."
          }
        }
      }
    },
    "/api/users/{id}": {
      "get": {
        "operationId": "user_retrieve",
        "summary": "Retrieve user",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this user.",
            "required": true
          }
        ],
        "tags": [
          "User"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "User ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "User full name"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "description": "User email address"
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of group IDs"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of permission IDs"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "User creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "User last update timestamp"
                    },
                    "is_active": {
                      "type": "boolean",
                      "description": "Whether the user is active"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email",
                    "is_active"
                  ],
                  "description": "User object with all details"
                }
              }
            },
            "description": "Successful Response"
          }
        }
      },
      "patch": {
        "operationId": "user_partial_update",
        "description": "Update user information including name, email, groups, and permissions.",
        "summary": "Update user",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this user.",
            "required": true
          }
        ],
        "tags": [
          "User"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "groups": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "User ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "User full name"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "description": "User email address"
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of group IDs"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of permission IDs"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "User creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "User last update timestamp"
                    },
                    "is_active": {
                      "type": "boolean",
                      "description": "Whether the user is active"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email",
                    "is_active"
                  ],
                  "description": "User object with all details"
                }
              }
            },
            "description": "User updated successfully"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "Invalid request data."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Response message"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard detail response"
                }
              }
            },
            "description": "User not found."
          }
        }
      },
      "delete": {
        "operationId": "user_destroy",
        "description": "Logical Deletion a user, When a user is deleted, the user will be marked as inactive, and the user will not be able to log in anymore, all of the user's permissions will be removed, a possible email will be sent to the admin to notify that a user has been deleted",
        "summary": "Delete user",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this user.",
            "required": true
          }
        ],
        "tags": [
          "User"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "pk": {
                      "type": "integer"
                    },
                    "is_active": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "name",
                    "pk",
                    "is_active"
                  ]
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/whitelist": {
      "get": {
        "operationId": "whitelist_list",
        "summary": "List all Whitelist records",
        "parameters": [
          {
            "in": "query",
            "name": "bucket",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "rules",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "subject",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Whitelist"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "results"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "example": 123
                    },
                    "next": {
                      "type": "string",
                      "nullable": true,
                      "format": "uri",
                      "example": "http://api.example.org/accounts/?offset=400&limit=100"
                    },
                    "previous": {
                      "type": "string",
                      "nullable": true,
                      "format": "uri",
                      "example": "http://api.example.org/accounts/?offset=200&limit=100"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer",
                            "description": "Total number of items"
                          },
                          "next": {
                            "type": "string",
                            "nullable": true,
                            "description": "URL for next page"
                          },
                          "previous": {
                            "type": "string",
                            "nullable": true,
                            "description": "URL for previous page"
                          },
                          "results": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "Whitelist record ID"
                                },
                                "rules": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer"
                                  },
                                  "description": "List of rule IDs"
                                },
                                "bucket": {
                                  "type": "string",
                                  "description": "Bucket identifier"
                                },
                                "subject": {
                                  "type": "string",
                                  "description": "Subject identifier"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Creation timestamp"
                                },
                                "updated_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Last update timestamp"
                                },
                                "created_by": {
                                  "type": "integer",
                                  "description": "ID of user who created the record"
                                },
                                "modified_by": {
                                  "type": "integer",
                                  "description": "ID of user who last modified the record"
                                }
                              },
                              "required": [
                                "id"
                              ],
                              "description": "Whitelist object with all details"
                            },
                            "description": "List of whitelist records"
                          }
                        },
                        "description": "Paginated whitelist list"
                      }
                    }
                  }
                }
              }
            },
            "description": "Whitelist records"
          }
        }
      },
      "post": {
        "operationId": "whitelist_create",
        "description": "Create a new whitelist record with rules, bucket, and subject.",
        "summary": "Create a Whitelist record",
        "tags": [
          "Whitelist"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rules": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "List of rule IDs"
                  },
                  "bucket": {
                    "type": "string",
                    "description": "Bucket identifier"
                  },
                  "subject": {
                    "type": "string",
                    "description": "Subject identifier"
                  }
                },
                "required": [
                  "rules",
                  "bucket",
                  "subject"
                ],
                "description": "Whitelist creation request payload"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Whitelist record ID"
                    },
                    "rules": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of rule IDs"
                    },
                    "bucket": {
                      "type": "string",
                      "description": "Bucket identifier"
                    },
                    "subject": {
                      "type": "string",
                      "description": "Subject identifier"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    },
                    "created_by": {
                      "type": "integer",
                      "description": "ID of user who created the record"
                    },
                    "modified_by": {
                      "type": "integer",
                      "description": "ID of user who last modified the record"
                    }
                  },
                  "required": [
                    "id"
                  ],
                  "description": "Whitelist object with all details"
                }
              }
            },
            "description": "Whitelist record created successfully"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Invalid request data or subject already in blacklist"
          }
        }
      }
    },
    "/api/whitelist/{id}": {
      "get": {
        "operationId": "whitelist_retrieve",
        "summary": "Retrieve a Whitelist record",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this whitelist.",
            "required": true
          }
        ],
        "tags": [
          "Whitelist"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Whitelist"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "whitelist_partial_update",
        "summary": "Update a Whitelist record",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this whitelist.",
            "required": true
          }
        ],
        "tags": [
          "Whitelist"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rules": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "List of rule IDs"
                  },
                  "bucket": {
                    "type": "string",
                    "description": "Bucket identifier"
                  },
                  "subject": {
                    "type": "string",
                    "description": "Subject identifier"
                  }
                },
                "description": "Whitelist modification request payload"
              }
            }
          }
        },
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Whitelist record ID"
                    },
                    "rules": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of rule IDs"
                    },
                    "bucket": {
                      "type": "string",
                      "description": "Bucket identifier"
                    },
                    "subject": {
                      "type": "string",
                      "description": "Subject identifier"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    },
                    "created_by": {
                      "type": "integer",
                      "description": "ID of user who created the record"
                    },
                    "modified_by": {
                      "type": "integer",
                      "description": "ID of user who last modified the record"
                    }
                  },
                  "required": [
                    "id"
                  ],
                  "description": "Whitelist object with all details"
                }
              }
            },
            "description": "Whitelist record updated successfully"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Invalid request data"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code (optional)"
                    },
                    "field_errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": "Field-specific validation errors (optional)"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Standard error response"
                }
              }
            },
            "description": "Whitelist record not found"
          }
        }
      },
      "delete": {
        "operationId": "whitelist_destroy",
        "summary": "Delete a Whitelist record",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this whitelist.",
            "required": true
          }
        ],
        "tags": [
          "Whitelist"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "Whitelist record successfully deleted"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Success message indicating whitelist record was deleted"
                }
              }
            },
            "description": "Whitelist record successfully deleted"
          }
        }
      }
    },
    "/api/whitelist/{id}/delete": {
      "delete": {
        "operationId": "whitelist_delete",
        "description": "Allows users to delete a whitelist row using either `pk` (URL) or a combination of `subject` and `bucket` in the request body.",
        "summary": "Delete a Whitelist record",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this whitelist.",
            "required": true
          }
        ],
        "tags": [
          "Whitelist"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "example": "Whitelist record successfully deleted"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "description": "Success message indicating whitelist record was deleted"
                }
              }
            },
            "description": "Whitelist entry deleted successfully"
          }
        }
      }
    },
    "/health/": {
      "get": {
        "operationId": "health_retrieve",
        "summary": "Simple health check",
        "tags": [
          "Health Check"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          },
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Athena is alive!"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/health/test-auth-request": {
      "get": {
        "operationId": "health_test_auth_request_retrieve",
        "summary": "Simple authentication check",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "CustomAuthentication": []
          },
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Request is authenticated!"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/preapprovedtransactions": {
      "get": {
        "operationId": "preapprovedtransaction_list",
        "description": "ViewSet for PreApprovedTransaction with screening workflow support",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Transaction Screening"
        ],
        "security": [
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPreApprovedTransactionList"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List all QuickScan transactions"
      }
    },
    "/api/preapprovedtransactions/{id}": {
      "get": {
        "operationId": "preapprovedtransaction_retrieve",
        "description": "ViewSet for PreApprovedTransaction with screening workflow support",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this pre approved transaction.",
            "required": true
          }
        ],
        "tags": [
          "Transaction Screening"
        ],
        "security": [
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreApprovedTransaction"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Retrieve a QuickScan transaction"
      }
    },
    "/api/preapprovedtransactions/active": {
      "get": {
        "operationId": "preapprovedtransaction_active",
        "description": "Get active pre-approved transactions.\nDefault filters: status in ('on_hold', 'not_screened')\n\nParameters:\n    - client_transaction_id: Filter by specific client transaction ID\n    - status: Filter by specific status\n    - assigned: Filter by assignee user ID\n    - cp_a: Filter by counterparty A name (subject_name)\n    - cp_b: Filter by counterparty B name (subject_name)\n    - has_related_case: Filter by whether transaction has related cases\n    - min_date: Filter by minimum transaction timestamp (ISO 8601)\n    - max_date: Filter by maximum transaction timestamp (ISO 8601)\n    - ordering: Order results by field (prefix with - for descending)",
        "tags": [
          "Transaction Screening"
        ],
        "security": [
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreApprovedTransaction"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List active QuickScan transactions"
      }
    },
    "/api/preapprovedtransactions/inactive": {
      "get": {
        "operationId": "preapprovedtransaction_inactive",
        "description": "Get inactive pre-approved transactions.\nDefault filters: status in ('approved', 'rejected', 'cleared')\n\nParameters:\n    - client_transaction_id: Filter by specific client transaction ID\n    - status: Filter by specific status (approved, rejected, or cleared)\n    - cp_a: Filter by counterparty A name (subject_name)\n    - cp_b: Filter by counterparty B name (subject_name)\n    - has_related_case: Filter by whether transaction has related cases\n    - min_date: Filter by minimum transaction timestamp (ISO 8601)\n    - max_date: Filter by maximum transaction timestamp (ISO 8601)\n    - ordering: Order results by field (prefix with - for descending)",
        "tags": [
          "Transaction Screening"
        ],
        "security": [
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreApprovedTransaction"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List inactive QuickScan transactions"
      }
    },
    "/api/preapprovedtransactions/{id}/screening-review": {
      "get": {
        "operationId": "preapprovedtransaction_screening_review",
        "description": "Get detailed screening review information for a single pre-approved transaction.\n\nIncludes:\n- Transaction details (amount, currency, parties, etc.)\n- Counterparty A & B information with subject names\n- NameScreen results for both parties\n- NameScreenHits grouped by engine with full hit details",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this pre approved transaction.",
            "required": true
          }
        ],
        "tags": [
          "Transaction Screening"
        ],
        "security": [
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreApprovedTransaction"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Get screening review for a QuickScan transaction"
      }
    },
    "/api/preapprovedtransactions/{id}/rescreen": {
      "post": {
        "operationId": "preapprovedtransaction_rescreen",
        "description": "Re-screen a single pre-approved transaction.\n\nThis endpoint allows rescreening of transactions with any status ('not_screened', 'on_hold', 'approved', 'rejected').\nIf client_subject_id is provided in the request body, only that counterparty will be rescreened.\nOtherwise, both cp_a and cp_b will be rescreened.\n\nRequest body (optional):\n    - client_subject_id: Client subject ID to rescreen (cp_a or cp_b)\n\nReturns:\n    - success: True if rescreening was triggered successfully\n    - message: Success message with transaction ID\n    - error: Error message if rescreening failed",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this pre approved transaction.",
            "required": true
          }
        ],
        "tags": [
          "Transaction Screening"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreApprovedTransactionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PreApprovedTransactionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PreApprovedTransactionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreApprovedTransaction"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Rescreen a QuickScan transaction"
      }
    },
    "/api/preapprovedtransactions/rescreen-bulk": {
      "post": {
        "operationId": "preapprovedtransaction_rescreen_bulk",
        "description": "Re-screen multiple pre-approved transactions in bulk.\n\nThis endpoint allows rescreening of transactions with status 'not_screened' or 'on_hold'.\nTransactions with status 'approved', 'rejected', or 'cleared' cannot be rescreened as they are locked.\nRescreening will reset each transaction's status to 'on_hold' and re-trigger quickscan for both counterparties.\n\nRequest body:\n    - transaction_ids: List of PreApprovedTransaction IDs to rescreen\n\nReturns:\n    - total: Total number of transactions requested for rescreening\n    - successful: Number of successfully rescreened transactions\n    - failed: Number of failed rescreening attempts\n    - results: Detailed results for each transaction",
        "tags": [
          "Transaction Screening"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreApprovedTransactionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PreApprovedTransactionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PreApprovedTransactionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreApprovedTransaction"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Bulk rescreen QuickScan transactions"
      }
    },
    "/api/preapprovedtransactions/{id}/assign": {
      "patch": {
        "operationId": "preapprovedtransaction_assign",
        "description": "Assign a pre-approved transaction to a user.\n\nRequest body:\n    - assignee: Integer user ID to assign the transaction to\n\nReturns:\n    - success: Boolean indicating if assignment was successful\n    - message: Human-readable message\n    - transaction: Updated transaction data with assignee info",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this pre approved transaction.",
            "required": true
          }
        ],
        "tags": [
          "Transaction Screening"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPreApprovedTransactionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPreApprovedTransactionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPreApprovedTransactionRequest"
              }
            }
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreApprovedTransaction"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Assign a QuickScan transaction"
      }
    },
    "/api/preapprovedtransactions/{id}/approve-reject": {
      "patch": {
        "operationId": "preapprovedtransaction_approve_reject",
        "description": "Approve or reject a pre-approved transaction.\n\nRequest body:\n    - status: \"approved\" or \"rejected\"\n    - comment: Optional review comment or decision rationale\n\nReturns:\n    - success: Boolean indicating if status update was successful\n    - message: Human-readable message\n    - transaction: Updated transaction data with status and approval info",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this pre approved transaction.",
            "required": true
          }
        ],
        "tags": [
          "Transaction Screening"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPreApprovedTransactionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPreApprovedTransactionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPreApprovedTransactionRequest"
              }
            }
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreApprovedTransaction"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Approve or reject a QuickScan transaction"
      }
    },
    "/api/namescreenhits/mark-as-cascade": {
      "post": {
        "operationId": "namescreenhitassessment_mark_as_cascade",
        "description": "Cascade assessment to all hits matching client_subject_id, external_id, and engine.\n\nThis endpoint updates all NameScreenHits that match the specified\nclient_subject_id, external_id, AND engine with the provided assessment decision.\nThis allows cascading the same assessment to a specific watchlist entity from a\nspecific screening engine across all transactions for a given subject.\n\nRequest Body:\n    - client_subject_id (str): The subject ID to cascade to\n    - external_id (str): The external ID from screening engine (DJ ID, TR ID, etc.)\n    - engine (str): The screening engine (DJ, TR, ARTEMISCAN)\n    - mark_as (str): Assessment decision (NO_ACTION, TRUE_HIT, FALSE_HIT)\n    - comment (str, optional): Comment for the assessment\n\nReturns:\n    - success (bool): Whether the operation succeeded\n    - hits_updated (int): Number of hits updated\n    - updated_hit_ids (list): List of updated hit IDs\n    - breakdown (dict): Count of hits per engine\n    - message (str): Success or error message",
        "tags": [
          "Name Screen Hits"
        ],
        "security": [
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "Cascade mark name screen hits"
      }
    },
    "/api/namescreenhits/mark-as": {
      "post": {
        "operationId": "namescreenhitassessment_mark_as",
        "description": "Selectively assess specific hits by their IDs.\n\nThis endpoint updates only the specified NameScreenHits with the provided\nassessment decision. Hits can be from different engines.\n\nRequest Body:\n    - hit_ids (list[int]): List of hit IDs to update\n    - mark_as (str): Assessment decision (NO_ACTION, TRUE_HIT, FALSE_HIT)\n    - comment (str, optional): Comment for the assessment\n\nReturns:\n    - success (bool): Whether the operation succeeded\n    - hits_updated (int): Number of hits updated\n    - updated_hit_ids (list): List of updated hit IDs\n    - breakdown (dict): Count of hits per engine\n    - message (str): Success or error message\n    - warning (str, optional): Warning if some IDs were not found",
        "tags": [
          "Name Screen Hits"
        ],
        "security": [
          {
            "cookieAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "Mark name screen hits"
      }
    }
  },
  "components": {
    "schemas": {
      "AppConfig": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "readOnly": true
          },
          "value": {
            "type": "string",
            "readOnly": true
          },
          "system_timezone": {
            "type": "string",
            "description": "Return the system timezone setting.",
            "readOnly": true
          }
        },
        "required": [
          "key",
          "system_timezone",
          "value"
        ]
      },
      "Blacklist": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "reference_id": {
            "type": "string"
          },
          "list_name": {
            "type": "string",
            "maxLength": 255
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "id",
          "list_name",
          "name"
        ]
      },
      "BriefBucket": {
        "type": "object",
        "description": "Serializer to allow view of id instead of entire Object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "BucketRequest": {
        "type": "object",
        "description": "A ModelSerializer that takes an additional `fields` argument that\ncontrols which fields should be displayed.",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "active_indicator": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "rule_id": {
            "type": "integer",
            "writeOnly": true
          },
          "rule_setting": {
            "type": "object",
            "additionalProperties": {},
            "writeOnly": true
          },
          "activate_rule": {
            "type": "boolean",
            "writeOnly": true
          }
        },
        "required": [
          "name"
        ]
      },
      "Case": {
        "type": "object",
        "properties": {
          "active_timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "ageing": {
            "type": "integer",
            "readOnly": true
          },
          "alert_date": {
            "type": "string"
          },
          "alert_risk_rating": {
            "type": "string",
            "readOnly": true
          },
          "approvals": {
            "type": "array",
            "items": {},
            "readOnly": true
          },
          "assignee": {
            "type": "object",
            "additionalProperties": {},
            "readOnly": true
          },
          "available_actions": {
            "type": "array",
            "items": {},
            "readOnly": true
          },
          "bucket": {
            "type": "object",
            "additionalProperties": {},
            "readOnly": true
          },
          "case_action": {
            "type": "string",
            "readOnly": true
          },
          "case_checkers": {
            "type": "array",
            "items": {},
            "readOnly": true
          },
          "case_maker": {
            "type": "object",
            "additionalProperties": {},
            "readOnly": true
          },
          "case_owner": {
            "type": "object",
            "additionalProperties": {},
            "readOnly": true
          },
          "case_status": {
            "type": "string",
            "readOnly": true
          },
          "case_status_order": {
            "type": "integer",
            "default": 2
          },
          "case_subjects": {
            "type": "object",
            "additionalProperties": {},
            "readOnly": true
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "created_on": {
            "type": "string"
          },
          "documents": {
            "type": "array",
            "items": {},
            "readOnly": true
          },
          "findings": {
            "type": "array",
            "items": {},
            "readOnly": true
          },
          "histories": {
            "type": "array",
            "items": {},
            "readOnly": true
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "last_updated_at": {
            "type": "string"
          },
          "last_updated_by": {
            "type": "object",
            "additionalProperties": {},
            "readOnly": true
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          },
          "priority": {
            "type": "integer",
            "readOnly": true,
            "default": 1
          },
          "reports_code": {
            "type": "array",
            "items": {},
            "readOnly": true
          },
          "reports_indicator": {
            "type": "array",
            "items": {},
            "readOnly": true
          },
          "rule": {
            "type": "object",
            "additionalProperties": {},
            "readOnly": true
          },
          "rule_parameter": {
            "type": "object",
            "additionalProperties": {},
            "readOnly": true
          }
        },
        "required": [
          "active_timestamp",
          "ageing",
          "alert_date",
          "alert_risk_rating",
          "approvals",
          "assignee",
          "available_actions",
          "bucket",
          "case_action",
          "case_checkers",
          "case_maker",
          "case_owner",
          "case_status",
          "case_subjects",
          "created_on",
          "documents",
          "findings",
          "histories",
          "id",
          "last_updated_at",
          "last_updated_by",
          "priority",
          "reports_code",
          "reports_indicator",
          "rule",
          "rule_parameter"
        ]
      },
      "CaseAgeing": {
        "type": "object",
        "description": "Serializer for case ageing data, grouping alerts by priority and ageing buckets.",
        "properties": {
          "T_0": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "T_1": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "T_2": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "T_3": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "T_4": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "T_5": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "T_plus_5": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          }
        }
      },
      "CaseBulkApprovalRequest": {
        "type": "object",
        "properties": {
          "case_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of case IDs to approve"
          },
          "case_action": {
            "type": "string",
            "minLength": 1,
            "description": "Approval action to take"
          },
          "case_assignee": {
            "type": "integer",
            "description": "Assignee user ID"
          },
          "reason_for_escalation": {
            "type": "object",
            "additionalProperties": {},
            "description": "Reason for escalation"
          }
        },
        "required": [
          "case_action",
          "case_ids"
        ]
      },
      "CaseBulkDocumentRequest": {
        "type": "object",
        "properties": {
          "case_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of case IDs (can be JSON string for multipart data)"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "Document name"
          },
          "document": {
            "type": "string",
            "format": "binary",
            "description": "Document file to upload"
          }
        },
        "required": [
          "case_ids",
          "document",
          "name"
        ]
      },
      "CaseBulkFindingRequest": {
        "type": "object",
        "properties": {
          "case_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of case IDs"
          },
          "finding_content": {
            "type": "string",
            "minLength": 1,
            "description": "Finding content to add to all cases"
          }
        },
        "required": [
          "case_ids",
          "finding_content"
        ]
      },
      "CaseList": {
        "type": "object",
        "properties": {
          "ageing": {
            "type": "integer"
          },
          "priority": {
            "type": "integer"
          },
          "case_status_order": {
            "type": "integer"
          },
          "alert_date": {
            "type": "string"
          },
          "alert_risk_rating": {
            "type": "string"
          },
          "assignee": {
            "$ref": "#/components/schemas/CaseListAssignee"
          },
          "bucket": {
            "$ref": "#/components/schemas/CaseListBucket"
          },
          "case_action": {
            "type": "string"
          },
          "case_status": {
            "type": "string"
          },
          "case_subjects": {
            "$ref": "#/components/schemas/CaseListCaseSubjects"
          },
          "created_on": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "rule": {
            "type": "integer"
          },
          "active_timestamp": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "active_timestamp",
          "ageing",
          "alert_date",
          "alert_risk_rating",
          "assignee",
          "bucket",
          "case_action",
          "case_status",
          "case_status_order",
          "case_subjects",
          "created_on",
          "id",
          "priority",
          "rule"
        ]
      },
      "CaseListAssignee": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "nullable": true
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "CaseListBucket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "CaseListCaseSubjectInfor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "client_subject_id": {
            "type": "string"
          }
        },
        "required": [
          "client_subject_id",
          "id",
          "name"
        ]
      },
      "CaseListCaseSubjects": {
        "type": "object",
        "properties": {
          "subject_1": {
            "$ref": "#/components/schemas/CaseListCaseSubjectInfor"
          },
          "subject_2": {
            "$ref": "#/components/schemas/CaseListCaseSubjectInfor"
          }
        },
        "required": [
          "subject_1"
        ]
      },
      "CaseRequest": {
        "type": "object",
        "properties": {
          "active_timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "alert_date": {
            "type": "string",
            "minLength": 1
          },
          "case_status_order": {
            "type": "integer",
            "default": 2
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "created_on": {
            "type": "string",
            "minLength": 1
          },
          "last_updated_at": {
            "type": "string",
            "minLength": 1
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "active_timestamp",
          "alert_date",
          "created_on",
          "last_updated_at"
        ]
      },
      "Currency": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "maxLength": 65
          },
          "alphabetic_code": {
            "type": "string",
            "maxLength": 3
          },
          "numeric_code": {
            "type": "string",
            "maxLength": 3
          },
          "active_indicator": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "required": [
          "active_indicator",
          "alphabetic_code",
          "currency"
        ]
      },
      "CurrencyRequest": {
        "type": "object",
        "properties": {
          "activate_currency": {
            "type": "boolean",
            "writeOnly": true
          },
          "currency": {
            "type": "string",
            "minLength": 1,
            "maxLength": 65
          },
          "alphabetic_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 3
          },
          "numeric_code": {
            "type": "string",
            "maxLength": 3
          }
        },
        "required": [
          "activate_currency",
          "alphabetic_code",
          "currency"
        ]
      },
      "MetabaseUrl": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ]
      },
      "PaginatedBlacklistList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Blacklist"
            }
          }
        }
      },
      "PaginatedCaseListList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseList"
            }
          }
        }
      },
      "PaginatedCurrencyList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            }
          }
        }
      },
      "PaginatedRiskAssessmentList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RiskAssessment"
            }
          }
        }
      },
      "PaginatedRuleAlertList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RuleAlert"
            }
          }
        }
      },
      "PaginatedRuleDetailList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RuleDetail"
            }
          }
        }
      },
      "PaginatedSubjectList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Subject"
            }
          }
        }
      },
      "PaginatedTransactionBucketList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionBucket"
            }
          }
        }
      },
      "PaginatedTransactionList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            }
          }
        }
      },
      "PaginatedUserListList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserList"
            }
          }
        }
      },
      "PatchedBucketRequest": {
        "type": "object",
        "description": "A ModelSerializer that takes an additional `fields` argument that\ncontrols which fields should be displayed.",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "active_indicator": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "rule_id": {
            "type": "integer",
            "writeOnly": true
          },
          "rule_setting": {
            "type": "object",
            "additionalProperties": {},
            "writeOnly": true
          },
          "activate_rule": {
            "type": "boolean",
            "writeOnly": true
          }
        }
      },
      "PatchedCaseApprovalRequest": {
        "type": "object",
        "properties": {
          "case_assignee": {
            "type": "integer"
          },
          "case_action": {
            "type": "string",
            "minLength": 1
          },
          "reason_for_escalation": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "PatchedCaseAssignCheckerRequest": {
        "type": "object",
        "properties": {
          "assignee_id": {
            "type": "integer"
          }
        }
      },
      "PatchedCaseReopenDataRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          }
        }
      },
      "PatchedCaseRequest": {
        "type": "object",
        "properties": {
          "active_timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "alert_date": {
            "type": "string",
            "minLength": 1
          },
          "case_status_order": {
            "type": "integer",
            "default": 2
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "created_on": {
            "type": "string",
            "minLength": 1
          },
          "last_updated_at": {
            "type": "string",
            "minLength": 1
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "PatchedCurrencyRequest": {
        "type": "object",
        "properties": {
          "activate_currency": {
            "type": "boolean",
            "writeOnly": true
          },
          "currency": {
            "type": "string",
            "minLength": 1,
            "maxLength": 65
          },
          "alphabetic_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 3
          },
          "numeric_code": {
            "type": "string",
            "maxLength": 3
          }
        }
      },
      "PatchedRuleAlertRequest": {
        "type": "object",
        "properties": {
          "alert_priority_level": {
            "type": "string",
            "maxLength": 255
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "PatchedRuleDetailRequest": {
        "type": "object",
        "description": "A ModelSerializer that takes an additional `fields` argument that\ncontrols which fields should be displayed.",
        "properties": {
          "custom_rule_title": {
            "type": "string",
            "maxLength": 512
          },
          "custom_rule_description": {
            "type": "string",
            "maxLength": 1024
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "PatchedSubjectRequest": {
        "type": "object",
        "properties": {
          "client_subject_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "subject_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "unique_identification_number": {
            "type": "string",
            "maxLength": 255
          },
          "account_holder": {
            "type": "boolean",
            "nullable": true
          },
          "address": {
            "type": "string",
            "maxLength": 255
          },
          "customer_segment": {
            "type": "string",
            "maxLength": 255
          },
          "date_and_place_of_birth": {
            "type": "string",
            "maxLength": 255
          },
          "country_of_birth_or_incorporation": {
            "type": "string",
            "maxLength": 255
          },
          "nationality": {
            "type": "string",
            "maxLength": 60
          },
          "account_type": {
            "type": "string",
            "maxLength": 255
          },
          "account_type_ii": {
            "type": "string",
            "maxLength": 255
          },
          "account_opening_date": {
            "type": "string",
            "maxLength": 255
          },
          "account_opening_date_ii": {
            "type": "string",
            "maxLength": 255
          },
          "customer_aml_risk_rating": {
            "type": "string",
            "maxLength": 255
          },
          "customer_account": {
            "type": "string",
            "maxLength": 255
          },
          "customer_account_ii": {
            "type": "string",
            "maxLength": 255
          },
          "customer_opening_date": {
            "type": "string",
            "maxLength": 255
          },
          "source_of_funds": {
            "type": "string",
            "maxLength": 255
          },
          "average_monthly_income": {
            "type": "string",
            "maxLength": 255
          },
          "cif_status": {
            "type": "string",
            "maxLength": 255
          },
          "occupation": {
            "type": "string",
            "maxLength": 255
          },
          "industry": {
            "type": "string",
            "maxLength": 255
          },
          "purpose_of_account": {
            "type": "string",
            "maxLength": 255
          },
          "contact_number": {
            "type": "string",
            "maxLength": 255
          },
          "email_address": {
            "type": "string",
            "maxLength": 255
          },
          "risk_assessment_score": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,3}(?:\\.\\d{0,2})?$"
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "Permission": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "action": {
            "type": "string",
            "maxLength": 255
          },
          "resource": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "id"
        ]
      },
      "RiskAssessment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "daily_score": {
            "type": "number",
            "format": "double",
            "maximum": 1000,
            "minimum": -1000,
            "exclusiveMaximum": true,
            "exclusiveMinimum": true
          },
          "true_hit_date": {
            "type": "string",
            "format": "date-time"
          },
          "rules_affected": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "active_timestamp": {
            "type": "string",
            "format": "date"
          },
          "demerit": {
            "type": "string"
          }
        },
        "required": [
          "active_timestamp",
          "daily_score",
          "demerit",
          "id",
          "rules_affected",
          "true_hit_date"
        ]
      },
      "RuleAlert": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "rule_title": {
            "type": "string",
            "readOnly": true
          },
          "alert_priority_level": {
            "type": "string",
            "maxLength": 255
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "id",
          "rule_title"
        ]
      },
      "RuleDetail": {
        "type": "object",
        "description": "A ModelSerializer that takes an additional `fields` argument that\ncontrols which fields should be displayed.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "rule_title": {
            "type": "string",
            "readOnly": true
          },
          "rule_description": {
            "type": "string",
            "readOnly": true
          },
          "alert_priority_level": {
            "type": "string",
            "readOnly": true
          },
          "custom_rule_title": {
            "type": "string",
            "maxLength": 512
          },
          "custom_rule_description": {
            "type": "string",
            "maxLength": 1024
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "alert_priority_level",
          "id",
          "rule_description",
          "rule_title"
        ]
      },
      "Subject": {
        "type": "object",
        "properties": {
          "client_subject_id": {
            "type": "string",
            "maxLength": 255
          },
          "subject_name": {
            "type": "string",
            "maxLength": 255
          },
          "unique_identification_number": {
            "type": "string",
            "maxLength": 255
          },
          "account_holder": {
            "type": "boolean",
            "nullable": true
          },
          "address": {
            "type": "string",
            "maxLength": 255
          },
          "customer_segment": {
            "type": "string",
            "maxLength": 255
          },
          "date_and_place_of_birth": {
            "type": "string",
            "maxLength": 255
          },
          "country_of_birth_or_incorporation": {
            "type": "string",
            "maxLength": 255
          },
          "nationality": {
            "type": "string",
            "maxLength": 60
          },
          "account_type": {
            "type": "string",
            "maxLength": 255
          },
          "account_type_ii": {
            "type": "string",
            "maxLength": 255
          },
          "account_opening_date": {
            "type": "string",
            "maxLength": 255
          },
          "account_opening_date_ii": {
            "type": "string",
            "maxLength": 255
          },
          "customer_aml_risk_rating": {
            "type": "string",
            "maxLength": 255
          },
          "customer_account": {
            "type": "string",
            "maxLength": 255
          },
          "customer_account_ii": {
            "type": "string",
            "maxLength": 255
          },
          "customer_opening_date": {
            "type": "string",
            "maxLength": 255
          },
          "source_of_funds": {
            "type": "string",
            "maxLength": 255
          },
          "average_monthly_income": {
            "type": "string",
            "maxLength": 255
          },
          "cif_status": {
            "type": "string",
            "maxLength": 255
          },
          "occupation": {
            "type": "string",
            "maxLength": 255
          },
          "industry": {
            "type": "string",
            "maxLength": 255
          },
          "purpose_of_account": {
            "type": "string",
            "maxLength": 255
          },
          "contact_number": {
            "type": "string",
            "maxLength": 255
          },
          "email_address": {
            "type": "string",
            "maxLength": 255
          },
          "risk_assessment_score": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,3}(?:\\.\\d{0,2})?$"
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "client_subject_id",
          "subject_name"
        ]
      },
      "SubjectRequest": {
        "type": "object",
        "properties": {
          "client_subject_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "subject_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "unique_identification_number": {
            "type": "string",
            "maxLength": 255
          },
          "account_holder": {
            "type": "boolean",
            "nullable": true
          },
          "address": {
            "type": "string",
            "maxLength": 255
          },
          "customer_segment": {
            "type": "string",
            "maxLength": 255
          },
          "date_and_place_of_birth": {
            "type": "string",
            "maxLength": 255
          },
          "country_of_birth_or_incorporation": {
            "type": "string",
            "maxLength": 255
          },
          "nationality": {
            "type": "string",
            "maxLength": 60
          },
          "account_type": {
            "type": "string",
            "maxLength": 255
          },
          "account_type_ii": {
            "type": "string",
            "maxLength": 255
          },
          "account_opening_date": {
            "type": "string",
            "maxLength": 255
          },
          "account_opening_date_ii": {
            "type": "string",
            "maxLength": 255
          },
          "customer_aml_risk_rating": {
            "type": "string",
            "maxLength": 255
          },
          "customer_account": {
            "type": "string",
            "maxLength": 255
          },
          "customer_account_ii": {
            "type": "string",
            "maxLength": 255
          },
          "customer_opening_date": {
            "type": "string",
            "maxLength": 255
          },
          "source_of_funds": {
            "type": "string",
            "maxLength": 255
          },
          "average_monthly_income": {
            "type": "string",
            "maxLength": 255
          },
          "cif_status": {
            "type": "string",
            "maxLength": 255
          },
          "occupation": {
            "type": "string",
            "maxLength": 255
          },
          "industry": {
            "type": "string",
            "maxLength": 255
          },
          "purpose_of_account": {
            "type": "string",
            "maxLength": 255
          },
          "contact_number": {
            "type": "string",
            "maxLength": 255
          },
          "email_address": {
            "type": "string",
            "maxLength": 255
          },
          "risk_assessment_score": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,3}(?:\\.\\d{0,2})?$"
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "client_subject_id",
          "subject_name"
        ]
      },
      "SubjectUploadRequest": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary"
          }
        },
        "required": [
          "file"
        ]
      },
      "Transaction": {
        "type": "object",
        "description": "A ModelSerializer that takes an additional `fields` argument that\ncontrols which fields should be displayed.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "bucket_loading_status": {
            "type": "string",
            "readOnly": true,
            "default": "Transaction loaded into [ORDINARY] and requested buckets"
          },
          "cp_a": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Subject"
              }
            ],
            "readOnly": true
          },
          "cp_b": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Subject"
              }
            ],
            "readOnly": true
          },
          "transaction_currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Currency"
              }
            ],
            "readOnly": true
          },
          "alt_currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Currency"
              }
            ],
            "readOnly": true
          },
          "modified_by": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UserSimpleList"
              }
            ],
            "readOnly": true
          },
          "created_by": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UserSimpleList"
              }
            ],
            "readOnly": true
          },
          "client_transaction_id": {
            "type": "string",
            "maxLength": 255
          },
          "transaction_type": {
            "type": "string",
            "maxLength": 255
          },
          "cp_a_country": {
            "type": "string",
            "maxLength": 60
          },
          "cp_b_country": {
            "type": "string",
            "maxLength": 60
          },
          "transaction_timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "cp_a_bank": {
            "type": "string",
            "maxLength": 255
          },
          "cp_b_bank": {
            "type": "string",
            "maxLength": 255
          },
          "amount_in_alt_currency": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "payment_mode": {
            "type": "string",
            "maxLength": 255
          },
          "purpose_of_transfer": {
            "type": "string",
            "maxLength": 255
          },
          "notes": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "alt_currency",
          "amount",
          "bucket_loading_status",
          "client_transaction_id",
          "cp_a",
          "cp_b",
          "created_by",
          "id",
          "modified_by",
          "transaction_currency",
          "transaction_timestamp",
          "transaction_type"
        ]
      },
      "TransactionBucket": {
        "type": "object",
        "properties": {
          "bucket": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BriefBucket"
              }
            ],
            "readOnly": true
          },
          "client_transaction_id": {
            "type": "string"
          },
          "transaction_type": {
            "type": "string",
            "readOnly": true
          },
          "cp_a": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Subject"
              }
            ],
            "readOnly": true
          },
          "cp_a_country": {
            "type": "string",
            "readOnly": true
          },
          "cp_a_bank": {
            "type": "string",
            "readOnly": true
          },
          "cp_b": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Subject"
              }
            ],
            "readOnly": true
          },
          "cp_b_country": {
            "type": "string",
            "readOnly": true
          },
          "cp_b_bank": {
            "type": "string",
            "readOnly": true
          },
          "transaction_timestamp": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "transaction_currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Currency"
              }
            ],
            "readOnly": true
          },
          "amount": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "alt_currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Currency"
              }
            ],
            "readOnly": true
          },
          "amount_in_alt_currency": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "payment_mode": {
            "type": "string",
            "readOnly": true
          },
          "purpose_of_transfer": {
            "type": "string",
            "readOnly": true
          },
          "notes": {
            "type": "string",
            "readOnly": true
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "alt_currency",
          "amount",
          "amount_in_alt_currency",
          "bucket",
          "client_transaction_id",
          "cp_a",
          "cp_a_bank",
          "cp_a_country",
          "cp_b",
          "cp_b_bank",
          "cp_b_country",
          "notes",
          "payment_mode",
          "purpose_of_transfer",
          "transaction_currency",
          "transaction_timestamp",
          "transaction_type"
        ]
      },
      "TransactionRequest": {
        "type": "object",
        "description": "A ModelSerializer that takes an additional `fields` argument that\ncontrols which fields should be displayed.",
        "properties": {
          "populate_buckets": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "writeOnly": true,
            "default": []
          },
          "cp_a_id": {
            "type": "string",
            "writeOnly": true,
            "minLength": 1
          },
          "cp_b_id": {
            "type": "string",
            "writeOnly": true,
            "minLength": 1
          },
          "transaction_currency_id": {
            "type": "string",
            "writeOnly": true,
            "minLength": 1
          },
          "alt_currency_id": {
            "type": "string",
            "writeOnly": true,
            "minLength": 1
          },
          "client_transaction_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "transaction_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "cp_a_country": {
            "type": "string",
            "maxLength": 60
          },
          "cp_b_country": {
            "type": "string",
            "maxLength": 60
          },
          "transaction_timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "cp_a_bank": {
            "type": "string",
            "maxLength": 255
          },
          "cp_b_bank": {
            "type": "string",
            "maxLength": 255
          },
          "amount_in_alt_currency": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "payment_mode": {
            "type": "string",
            "maxLength": 255
          },
          "purpose_of_transfer": {
            "type": "string",
            "maxLength": 255
          },
          "notes": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "amount",
          "client_transaction_id",
          "transaction_currency_id",
          "transaction_timestamp",
          "transaction_type"
        ]
      },
      "TransactionUploadRequest": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary"
          }
        },
        "required": [
          "file"
        ]
      },
      "UserList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "readOnly": true,
            "nullable": true
          },
          "email": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "email",
          "id",
          "name"
        ]
      },
      "UserSimpleList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          }
        },
        "required": [
          "id"
        ]
      },
      "Whitelist": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": -2147483648
            }
          },
          "created_by": {
            "type": "integer",
            "nullable": true
          },
          "modified_by": {
            "type": "integer",
            "nullable": true
          },
          "subject": {
            "type": "integer"
          },
          "bucket": {
            "type": "integer"
          }
        },
        "required": [
          "bucket",
          "id",
          "rules",
          "subject"
        ]
      },
      "PreApprovedTransaction": {
        "type": "object",
        "description": "Serializer for PreApprovedTransaction model.\n\nNOTE: name_screen_cpa and name_screen_cpb are now queried dynamically via\nclient_transaction_id (no longer FK fields). Maintains backward compatibility.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "client_transaction_id": {
            "type": "string",
            "description": "Client's transaction ID (unique identifier)",
            "maxLength": 255
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatusEnum"
              }
            ],
            "description": "Status of the pre-approval workflow\n\n* `on_hold` - on_hold\n* `approved` - approved\n* `rejected` - rejected\n* `not_screened` - not_screened\n* `cleared` - cleared"
          },
          "transaction_timestamp": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "transaction_type": {
            "type": "string",
            "maxLength": 255
          },
          "amount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "transaction_currency": {
            "type": "string",
            "nullable": true,
            "description": "Transaction currency code"
          },
          "payment_mode": {
            "type": "string",
            "maxLength": 255
          },
          "approved_on": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "approved_by": {
            "type": "integer",
            "nullable": true
          },
          "assignee": {
            "type": "integer",
            "nullable": true,
            "description": "User assigned to review this transaction"
          },
          "cp_a": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubjectMinimal"
              }
            ],
            "readOnly": true
          },
          "cp_b": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubjectMinimal"
              }
            ],
            "readOnly": true
          },
          "name_screen_cpa": {
            "type": "string",
            "readOnly": true
          },
          "name_screen_cpb": {
            "type": "string",
            "readOnly": true
          },
          "has_related_case": {
            "type": "string",
            "readOnly": true
          },
          "related_cases": {
            "type": "string",
            "readOnly": true
          },
          "has_true_hit_cpa": {
            "type": "string",
            "readOnly": true
          },
          "has_true_hit_cpb": {
            "type": "string",
            "readOnly": true
          },
          "has_unmarked_hit_cpa": {
            "type": "string",
            "readOnly": true
          },
          "has_unmarked_hit_cpb": {
            "type": "string",
            "readOnly": true
          },
          "comment": {
            "type": "string",
            "description": "Review comment or decision rationale"
          },
          "created_on": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "modified_on": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "client_transaction_id",
          "cp_a",
          "cp_b",
          "created_on",
          "has_related_case",
          "has_true_hit_cpa",
          "has_true_hit_cpb",
          "has_unmarked_hit_cpa",
          "has_unmarked_hit_cpb",
          "id",
          "modified_on",
          "name_screen_cpa",
          "name_screen_cpb",
          "related_cases"
        ]
      },
      "PreApprovedTransactionRequest": {
        "type": "object",
        "description": "Serializer for PreApprovedTransaction model.",
        "properties": {
          "client_transaction_id": {
            "type": "string",
            "minLength": 1,
            "description": "Client's transaction ID (unique identifier)",
            "maxLength": 255
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatusEnum"
              }
            ],
            "description": "Status of the pre-approval workflow\n\n* `on_hold` - on_hold\n* `approved` - approved\n* `rejected` - rejected\n* `not_screened` - not_screened\n* `cleared` - cleared"
          },
          "transaction_timestamp": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "transaction_type": {
            "type": "string",
            "maxLength": 255
          },
          "amount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "transaction_currency": {
            "type": "string",
            "minLength": 1,
            "nullable": true,
            "description": "Transaction currency code"
          },
          "payment_mode": {
            "type": "string",
            "maxLength": 255
          },
          "approved_on": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "approved_by": {
            "type": "integer",
            "nullable": true
          },
          "assignee": {
            "type": "integer",
            "nullable": true,
            "description": "User assigned to review this transaction"
          },
          "comment": {
            "type": "string",
            "description": "Review comment or decision rationale"
          }
        },
        "required": [
          "client_transaction_id"
        ]
      },
      "PatchedPreApprovedTransactionRequest": {
        "type": "object",
        "description": "Serializer for PreApprovedTransaction model.\n\nNOTE: name_screen_cpa and name_screen_cpb are now queried dynamically via\nclient_transaction_id (no longer FK fields). Maintains backward compatibility.",
        "properties": {
          "client_transaction_id": {
            "type": "string",
            "minLength": 1,
            "description": "Client's transaction ID (unique identifier)",
            "maxLength": 255
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatusEnum"
              }
            ],
            "description": "Status of the pre-approval workflow\n\n* `on_hold` - on_hold\n* `approved` - approved\n* `rejected` - rejected\n* `not_screened` - not_screened\n* `cleared` - cleared"
          },
          "transaction_timestamp": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "transaction_type": {
            "type": "string",
            "maxLength": 255
          },
          "amount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "transaction_currency": {
            "type": "string",
            "minLength": 1,
            "nullable": true,
            "description": "Transaction currency code"
          },
          "payment_mode": {
            "type": "string",
            "maxLength": 255
          },
          "approved_on": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "approved_by": {
            "type": "integer",
            "nullable": true
          },
          "assignee": {
            "type": "integer",
            "nullable": true,
            "description": "User assigned to review this transaction"
          },
          "comment": {
            "type": "string",
            "description": "Review comment or decision rationale"
          }
        }
      },
      "PaginatedPreApprovedTransactionList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreApprovedTransaction"
            }
          }
        }
      },
      "StatusEnum": {
        "enum": [
          "on_hold",
          "approved",
          "rejected",
          "not_screened",
          "cleared"
        ],
        "type": "string",
        "description": "* `on_hold` - on_hold\n* `approved` - approved\n* `rejected` - rejected\n* `not_screened` - not_screened\n* `cleared` - cleared"
      },
      "SubjectMinimal": {
        "type": "object",
        "properties": {
          "client_subject_id": {
            "type": "string",
            "readOnly": true
          },
          "subject_name": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "client_subject_id",
          "subject_name"
        ]
      }
    },
    "securitySchemes": {
      "CustomAuthentication": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT token obtained from AWS Cognito or custom authentication service"
      },
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "sessionid"
      }
    }
  },
  "servers": [
    {
      "url": "http://localhost/api",
      "description": "Local development server"
    }
  ]
}