{
  "openapi": "3.0.4",
  "info": {
    "title": "Cflow Public API",
    "description": "\r\n## Welcome to Cflow Public API\r\n\r\nThank you for using the **Cflow Public API**. This interface allows developers to seamlessly integrate external applications with the Cflow workflow platform.\r\n\r\n### 🔐 Authentication\r\n\r\nAll API requests must include the following mandatory headers in the request bundle: \r\n\r\n| Header | Description |\r\n|------|-------------|\r\n| `X-API-Key` | The unique API key generated by your system administrator. |\r\n| `X-User-Key` | A unique identifier assigned to each user for authentication. |\r\n\r\n**Note:** API keys are managed only by administrators. Admins can access all endpoints, while users can access only the endpoints assigned to them using their user keys.\r\n\r\n### Impersonate User\r\n\r\nOnly administrators are authorized to use the impersonation feature\r\nYou can perform actions on behalf of another user using:\r\n\r\n`X-Impersonate-User: username`\r\n\r\n\r\n### 🌍 Base URLs by Region\r\n\r\nCflow provides region-specific endpoints to ensure low latency and data compliance. Please use the base URL that corresponds to your account's region:\r\n\r\n| Region | Endpoint |\r\n|-------|---------|\r\n| **US** | `https://pubapi-us.cflowapps.com/cflowpublicapi/` |\r\n| **AP** | `https://pubapi-ap.cflowapps.com/cflowpublicapi/` |\r\n| **EU** | `https://pubapi-eu.cflowapps.com/cflowpublicapi/` |\r\n| **ME** | `https://pubapi-me.cflowapps.com/cflowpublicapi/` |\r\n\r\n### 🔐 Role Based Authentication\r\n\r\nAdmin users can access all endpoints, whereas other roles are limited to designated endpoints based on their permissions.<br>\r\n\r\n**Note:** The impersonation feature (X-Impersonate-User) is restricted to admin users. Any request made by a non-admin using this header will result in a 403 Forbidden response.<br>\r\n\r\nThe following table details the access levels assigned to each role for the endpoints.\r\n\r\n#### 📌 Public\r\n\r\n| Endpoint | Allowed Roles |\r\n|---------|--------------|\r\n| GET  - public/workflows | admin, user administrator, user |\r\n| GET  - public/pendingitems/{username} | admin, user administrator, user |\r\n| POST - public/fields | admin, user administrator, user |\r\n| POST - public/triggers | admin, user administrator, user |\r\n| POST - public/getinitiatedlist | admin, user administrator, user |\r\n| POST - public/getreviewedlist | admin, user administrator, user |\r\n| POST - public/recorddetails | admin, user administrator, user |\r\n| POST - public/submit | admin, user administrator, user |\r\n| PUT  - public/update | admin, user administrator, user |\r\n| PUT  - public/recordupdate | admin, user administrator, user |\r\n| POST - public/filefield/attachfile | admin, user administrator, user |\r\n| PUT  - public/updaterecordstatus | admin, user administrator, user |\r\n| POST - public/attachfiles | admin, user administrator, user |\r\n| POST - public/getcomments | admin, user administrator, user |\r\n| POST - public/addcomment | admin, user administrator, user |\r\n| GET  - public/workflow/stages/{workflowname} | admin, user administrator, user |\r\n| POST - public/searchrecord | admin, user administrator, user |\r\n| POST - public/currentstage | admin, user administrator, user |\r\n| POST - public/recordfile | admin, user administrator, user |\r\n\r\n#### 📊 Reports  \r\n\r\n| Endpoint | Allowed Roles |\r\n|---------|--------------|\r\n| POST - reports/approverperformance |  admin |\r\n| POST - reports/workflowperformance |  admin |\r\n| POST - reports/currentstatus |  admin |\r\n| POST - reports/completedrequest |  admin |\r\n| POST - reports/stagevisit |  admin |\r\n| POST - reports/clarification |  admin |\r\n| POST - reports/stageperformance |  admin |\r\n| POST - reports/pendingrequest |  admin |\r\n| POST - reports/audittrial |  admin |\r\n| POST - reports/activitymonitor |  admin |\r\n| POST - reports/slareport |  admin |\r\n\r\n#### 👤 Users\r\n\r\n| Endpoint | Allowed Roles |\r\n|---------|--------------|\r\n| GET  -  Users | admin, user administrator |\r\n| GET  -  Users/{username} | admin, user administrator |\r\n| PUT  -  Users/enableuser | admin, user administrator |\r\n| PUT  -  Users/disableuser | admin, user administrator |\r\n| PUT  -  Users | admin, user administrator |\r\n\r\n#### 👥 Roles\r\n\r\n| Endpoint | Allowed Roles |\r\n|---------|--------------|\r\n| GET  - Roles | admin, user administrator |\r\n| GET  - Roles/{username} | admin, user administrator |\r\n| POST - Roles/assignrole | admin, user administrator |\r\n| POST - Roles/removerole | admin, user administrator |\r\n| POST - Roles/checkuserrole | admin, user administrator |\r\n| POST - Roles | admin, user administrator |\r\n| DELETE - Roles | admin, user administrator |\r\n\r\n#### 🔑 Access Permission\r\n\r\n| Endpoint | Allowed Roles |\r\n|---------|--------------|\r\n| GET - access/{workflowname} | admin |\r\n| PUT - access | admin |\r\n\r\n\r\n#### 🧑‍🤝‍🧑 Teams\r\n\r\n| Endpoint | Allowed Roles |\r\n|---------|--------------|\r\n| GET  - teams | admin |\r\n| GET  - teams/{teamId} | admin |\r\n| POST - teams | admin |\r\n| PUT - teams | admin |\r\n| DELETE - teams | admin |\r\n\r\n#### ❓ Clarification\r\n\r\n| Endpoint | Allowed Roles |\r\n|---------|--------------|\r\n| GET - clarification |  admin, user administrator, user |\r\n| POST - clarification/requestclarification |  admin, user administrator, user |\r\n| POST - clarification/responseclarification |  admin, user administrator, user |\r\n\r\n\r\n### Documentation\r\nFor more comprehensive details regarding the management of API and user keys, please refer to our\r\n[API Keys Documentation](https://help.cflowapps.com/knowledgebase/multiple-api-keys-and-user-keys/)\r\n",
    "termsOfService": "https://www.cflowapps.com/terms-of-service/",
    "contact": {
      "name": "Cflow Support",
      "email": "support@cavintek.com"
    },
    "version": "v1"
  },
  "paths": {
    "/api/Access/{workflowName}": {
      "get": {
        "tags": [
          "Access"
        ],
        "summary": "Get access permission details for all stages within the specified workflow.",
        "description": "Retrieves the configured access permission details for each stage within the specified workflow.\r\nThe response includes the assigned role, record visibility scope and edit permission level defined for every workflow stage.\r\n            \r\n<b>Notes:</b>\r\nRecord Visibility Scope Values:\r\n- <b>My Items</b> – User can view only records created by or assigned to them\r\n- <b>My Team</b> – User can view records belonging to their team\r\n- <b>All Items</b> – User can view all records within the workflow\r\n\r\nSample request:\r\n            \r\n    Get api/access/test workflow",
        "parameters": [
          {
            "name": "workflowName",
            "in": "path",
            "description": "Name of the workflow to retrieve access permissions.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of stages with access permission details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccessPermissionResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Workflow not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Access": {
      "put": {
        "tags": [
          "Access"
        ],
        "summary": "Update access permission details of the workflow stage",
        "description": "Updates the access permission configuration for a specific stage in the workflow including role assignment, record visibility scope and edit permission level\r\n            \r\n<b>Notes:</b>\r\nRecord Visibility Scope Values:\r\n- <b>My Items</b> – Limits record visibility to items created by or assigned to the user\r\n- <b>My Team</b> – Allows visibility of records owned by users within the same team\r\n- <b>All Items</b> – Grants visibility to all records in the workflow\r\n \r\nSample request:\r\n            \r\n    PUT \r\n    {\r\n         \"WorkflowName\" : \"Test Workflow\",\r\n         \"StageName\" : \"Manager Approval\",\r\n         \"Role\" : \"Manager\",\r\n         \"ViewAccess\" : \"All Items\",\r\n         \"EditAccess\" : \"My Items\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessPermissionDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessPermissionDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AccessPermissionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return status of the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The specified workflow stage or permission details were not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Clarification": {
      "get": {
        "tags": [
          "Clarification"
        ],
        "summary": "Get all clarifications pending your response",
        "description": "Sample request:\r\n            \r\n    Get api/clarification",
        "responses": {
          "200": {
            "description": "Return status of the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PendingClarificationResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No pending clarifications found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Clarification/requestclarification": {
      "post": {
        "tags": [
          "Clarification"
        ],
        "summary": "Raise a clarification question against a record",
        "description": "Sample request:\r\n            \r\n    POST\r\n    {\r\n         \"WorkflowName\":\"Test Workflow\",\r\n         \"StageName\":\"Manager Approval\",\r\n         \"RecordId\":\"10\",\r\n         \"ClarifyToUser\":[\"john.doe\"],\r\n         \"Question\":\"Could you confirm the invoice amount?\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RaiseClarificationDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RaiseClarificationDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RaiseClarificationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return status of the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ClarificationResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Resource not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Clarification/responseclarification": {
      "post": {
        "tags": [
          "Clarification"
        ],
        "summary": "Answer (or edit the answer to) a clarification",
        "description": "Sample request:\r\n            \r\n    POST\r\n    {\r\n         \"ClarifyId\":\"1024\",\r\n         \"WorkflowName\":\"Test Workflow\",\r\n         \"Answer\":\"Yes, the invoice amount is correct.\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateClarificationDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateClarificationDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateClarificationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return status of the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ClarificationAnswerResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Resource not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/workflows": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Get all workflows",
        "description": "Sample request:\r\n            \r\n    Get api/public/workflows",
        "responses": {
          "200": {
            "description": "List of workflows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowsResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Workflows Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/pendingitems/{username}": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Get all pending items of the given user",
        "description": "Sample request:\r\n            \r\n    Get api/public/pendingitems/john",
        "parameters": [
          {
            "name": "username",
            "in": "path",
            "description": "Username of the user to retrieve pending items.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of pending items",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PendingRequests"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Pending List Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/fields": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "Get all the fields details of the given Workflow / Lookup and stage name",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {\r\n         \"WorkflowName\":\"Test Workflow\",\r\n         \"StageName\":\" Manager Approval\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FieldRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FieldRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FieldRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "return list of field details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Workflow Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/triggers": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "Get triggered workflow details of given workflow and record id.",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {\r\n         \"WorkflowName\":\"Test Workflow\",\r\n         \"RecordId\":\"10\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriggerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TriggerRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TriggerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "return triggered workflow details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Workflow Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/getinitiatedlist": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "Get the all records list that initiated by all users according to that date mentioned in the field between the given date range.",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {\r\n        \"StartDate\": \"01/01/2022\",\r\n        \"EndDate\": \"06/06/2022\",\r\n        \"WorkflowName\":\"Test Workflow\",\r\n        \"Page\":\"1\"\r\n        \"Field\":\"Updated Date\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiatedRecListReq"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiatedRecListReq"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InitiatedRecListReq"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiatedRecListResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Workflow does not exist."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/getreviewedlist": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "Get the updated/reviewed records list by all users from the given date range. ",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {\r\n        \"StartDate\": \"01/01/2022\",\r\n        \"EndDate\": \"06/06/2022\",\r\n        \"WorkflowName\":\"Test Workflow\",\r\n        \"Page\":\"1\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordsListRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordsListRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RecordsListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiatedRecListResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Workflow does not exist."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/recorddetails": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "Get record details by Workflow / Lookup id",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {\r\n         \"WorkflowName\":\"Test Workflow\",\r\n         \"StageName\":\"Approval stage\",\r\n         \"RecordId\":\"10\",\r\n         \"isworkflow\":true\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenRecordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenRecordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OpenRecordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "return record details."
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Record not exist."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/submit": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "Create and submit new record in the workflow and stage",
        "description": "Sample Request\r\n\r\n         POST\r\n         {\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"StageName\": \"Approval stage\",  \r\n           \"IsDraft\": false,        ///           \r\n           \"Values\":{\"Product Name\":\"Test Data\",\"Product code\":\"1\"}, //All section data except table sections\r\n           \"TableValues\":[{\r\n               \"TableName\":\"Employees\", //Name of the table\r\n               \"Values\":{   // All field values seperated by '|!' symbol\r\n                   \"Name\":\"xyz|!abc\",      // \"Fieldname\":\"all fieldvalues of the field\"\r\n                   \"Designation\":\"Engg|!Marketing\"\r\n               }\r\n           },\r\n           {\r\n               \"TableName\":\"Employees\", //Name of the table\r\n               \"Values\":{   // All field values seperated by '|!' symbol\r\n                   \"Name\":\"xyz|!abc\",      // \"Fieldname\":\"all fieldvalues of the field\"\r\n                   \"Designation\":\"Engg|!Marketing\"\r\n               }\r\n           }]\r\n           \"IsWorkflow\": true\r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return status of the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Unable to submit the record"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/update": {
      "put": {
        "tags": [
          "Public"
        ],
        "summary": "[DEPRECATED] Update record details and status of the record like approve and reject.",
        "description": "Sample Request\r\n\r\n         PUT\r\n         {\r\n           \"RecordId\":\"23\",\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"StageName\": \"Approval stage\",  \r\n           \"IsDraft\": false,        ///            \r\n           \"Values\":{\"Product Name\":\"Test Data\",\"Product code\":\"1\"}, //All section data except table sections\r\n           \"TableValues\":[{\r\n               \"TableName\":\"Employees\", //Name of the table\r\n               \"TableRowIds\":\"31|!32\",  //Row id of the specific table. Refer \"recorddetails\" api response\r\n               \"Values\":{   // All field values seperated by '|!' symbol\r\n                   \"Name\":\"xyz|!abc\",      // \"Fieldname\":\"all fieldvalues of the field\"\r\n                   \"Designation\":\"Engg|!Marketing\"\r\n               }\r\n           },\r\n           {\r\n               \"TableName\":\"Employees\", //Name of the table\r\n               \"TableRowIds\":\"31|!32\",  //Row id of the specific table. Refer \"recorddetails\" api response\r\n               \"Values\":{   // All field values seperated by '|!' symbol\r\n                   \"Name\":\"xyz|!abc\",      // \"Fieldname\":\"all fieldvalues of the field\"\r\n                   \"Designation\":\"Engg|!Marketing\"\r\n               }\r\n           }],\r\n           \"Status\":\"Approved\",\r\n           \"IsWorkflow\": true\r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return status of the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitResponse"
                }
              }
            }
          },
          "400": {
            "description": "The status does not exist. The record has not been updated as you have sent an invalid status."
          },
          "401": {
            "description": "The record has not been updated as the user doesn't have access to the record."
          },
          "404": {
            "description": "The record has not been updated as the record is no longer present in this group. Please check if the record still exists in this group."
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/recordupdate": {
      "put": {
        "tags": [
          "Public"
        ],
        "summary": "Update record details and status of the record like approve and reject.",
        "description": "Sample Request\r\n\r\n         PUT\r\n         {\r\n           \"RecordId\":\"23\",\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"StageName\": \"Approval stage\",  \r\n           \"IsDraft\": false,        ///            \r\n           \"Values\":{\"Product Name\":\"Test Data\",\"Product code\":\"1\"}, //All section data except table sections\r\n           \"TableValues\":[{\r\n               \"TableName\":\"Employees\", //Name of the table\r\n               \"TableRowIds\":\"31|!32\",  //Row id of the table. Refer \"recorddetails\" api response\r\n               \"TableDelRowIds\":\"33\",  //Row id of the table to be deleted. Refer \"recorddetails\" api response\r\n               \"Values\":{   // All field values seperated by '|!' symbol\r\n                   \"Name\":\"xyz|!abc\",      // \"Fieldname\":\"all fieldvalues of the field\"\r\n                   \"Designation\":\"Engg|!Marketing\"\r\n               }\r\n           },{\r\n               \"TableName\":\"Employees\", //Name of the table\r\n               \"TableRowIds\":\"31|!32\",  //Row id of the table. Refer \"recorddetails\" api response\r\n               \"TableDelRowIds\":\"33\",  //Row id of the table to be deleted. Refer \"recorddetails\" api response\r\n               \"Values\":{   // All field values seperated by '|!' symbol\r\n                   \"Name\":\"xyz|!abc\",      // \"Fieldname\":\"all fieldvalues of the field\"\r\n                   \"Designation\":\"Engg|!Marketing\"\r\n               }\r\n           }\r\n           ],\r\n           \"Status\":\"Approved\",\r\n           \"Comments\":\"Approved the request\",\r\n           \"IsWorkflow\": true\r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiUpdateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiUpdateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return status of the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitResponse"
                }
              }
            }
          },
          "400": {
            "description": "The status does not exist. The record has not been updated as you have sent an invalid status."
          },
          "401": {
            "description": "The record has not been updated as the user doesn't have access to the record."
          },
          "404": {
            "description": "The record has not been updated as the record is no longer present in this group. Please check if the record still exists in this group."
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/filefield/attachfile": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "Attach Documents to Record File Field",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {             \r\n         \"WorkflowName\":\"Test Workflow\",\r\n         \"StageName\":\"Approval stage\",\r\n         \"RecordId\":\"10\"\r\n         \"FieldName\":\"File Uploader\"\r\n         \"File\":\"File to upload\"\r\n    }",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "FieldName",
                  "File",
                  "RecordId",
                  "StageName",
                  "WorkflowName"
                ],
                "type": "object",
                "properties": {
                  "WorkflowName": {
                    "type": "string",
                    "description": "Name of the workflow / lookup"
                  },
                  "StageName": {
                    "type": "string",
                    "description": "For workflows, enter the workflow stage display name as stage name. For lookup workflows, enter the lookup name as the stage name"
                  },
                  "RecordId": {
                    "maximum": 9.223372036854776E+18,
                    "minimum": 1,
                    "type": "integer",
                    "description": "Record Id",
                    "format": "int64"
                  },
                  "FieldName": {
                    "type": "string",
                    "description": "Field Name"
                  },
                  "File": {
                    "type": "string",
                    "description": "File to upload (Maximum File Size 20MB)",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "WorkflowName": {
                  "style": "form"
                },
                "StageName": {
                  "style": "form"
                },
                "RecordId": {
                  "style": "form"
                },
                "FieldName": {
                  "style": "form"
                },
                "File": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return status of the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileAttachStatus"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Unable to attach files"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/updaterecordstatus": {
      "put": {
        "tags": [
          "Public"
        ],
        "summary": "Update status of the record like approve and reject.",
        "description": "Sample request:\r\n            \r\n    PUT \r\n    {\r\n         \"RecordId\":\"10\"\r\n         \"WorkflowName\":\"Test Workflow\",\r\n         \"StageName\":\"Approval stage\",\r\n         \"Status\":\"Approved\",\r\n         \"Comments\":\"\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusChange"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusChange"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StatusChange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return status of the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitResponse"
                }
              }
            }
          },
          "400": {
            "description": "The status does not exist. The record has not been updated as you have sent an invalid status."
          },
          "401": {
            "description": "The record has not been updated as the user doesn't have access to the record."
          },
          "404": {
            "description": "The record has not been updated as the record is no longer present in this group. Please check if the record still exists in this group."
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/attachfiles": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "To attach one or more files to the record",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {\r\n         \"Files\":\"Files to upload\"\r\n         \"WorkflowName\":\"Test Workflow\",\r\n         \"StageName\":\"Approval stage\",\r\n         \"RecordId\":\"10\",\r\n         \"Description\":\"Description of the attached file\"\r\n    }",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "Files",
                  "RecordId",
                  "StageName",
                  "WorkflowName"
                ],
                "type": "object",
                "properties": {
                  "Files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "List of files to upload (Maximum File Size 20MB) "
                  },
                  "WorkflowName": {
                    "type": "string",
                    "description": "Name of the workflow"
                  },
                  "StageName": {
                    "type": "string",
                    "description": "Name of the stage"
                  },
                  "RecordId": {
                    "maximum": 9.223372036854776E+18,
                    "minimum": 1,
                    "type": "integer",
                    "description": "Record Id",
                    "format": "int64"
                  },
                  "Description": {
                    "type": "string",
                    "description": "Description of the files"
                  }
                }
              },
              "encoding": {
                "Files": {
                  "style": "form"
                },
                "WorkflowName": {
                  "style": "form"
                },
                "StageName": {
                  "style": "form"
                },
                "RecordId": {
                  "style": "form"
                },
                "Description": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File upload status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FileAttachStatus"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Unable to attach files"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/getcomments": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "To get comments of the particular record",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {\r\n         \"RecordId\":\"10\"\r\n         \"WorkflowName\":\"Test Workflow\",\r\n         \"StageName\":\"Manager Approval\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentsDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentsDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CommentsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return status of the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommentsResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Comments not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/addcomment": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "To add a comment to the particular record",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {\r\n         \"RecordId\":\"10\"\r\n         \"WorkflowName\":\"Test Workflow\",\r\n         \"Comment\":\"\",\r\n         \"StageName\":\"Manager Approval\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddCommentDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddCommentDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddCommentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return status of the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentsResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Resource not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/workflow/stages/{workflowname}": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "To get all stages to the particular workflow",
        "description": "Sample request:\r\n            \r\n    Get api/public/workflow/stages/Test Workflow",
        "parameters": [
          {
            "name": "workflowName",
            "in": "path",
            "description": "Name of the workflow to retrieve its stages.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Return status of the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StageListResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "workflow not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/searchrecord": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "To search a record",
        "description": "Sample request:\r\n            \r\n    Post api/public/searchrecord?Name=john&Age=22",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRecordDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRecordDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRecordDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return status of the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchRecordListResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Record not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/currentstage": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "To get current stage details of the given record id",
        "description": "Sample request:\r\n   \r\n    POST \r\n    {\r\n         \"WorkflowName\":\"Test Workflow\",\r\n         \"RecordId\": \"10\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CurrentStageReqDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CurrentStageReqDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CurrentStageReqDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return current stage of the record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentStageResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Record not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Public/recordfile": {
      "post": {
        "tags": [
          "Public"
        ],
        "summary": "To get file from the specific field of the given record id",
        "description": "Sample request:\r\n   \r\n    POST \r\n    {\r\n         \"WorkflowName\":\"Test Workflow\",\r\n         \"StageName\":\"Manager Approval\",\r\n         \"RecordId\": \"10\",\r\n         \"IsFileField\" : true, // true for file field, false for signature field\r\n         \"FieldName\":\"File Uploader\"   // Name of the file or signature field\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecFileReqDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RecFileReqDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RecFileReqDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return file data"
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Record not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Reports/approverperformance": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Get all approver performance details of the given workflow.",
        "description": "Sample Request\r\n\r\n         POST\r\n         {\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"StartDate\": \"03/01/2024\",\r\n           \"EndDate\": \"03/25/2024\"\r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of approver performance data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApproverPerfDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "If you don't have access to the report, you cannot get the report data."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No approver performance data found for the specified workflow."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Reports/workflowperformance": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Get all workflow performance details of the given workflow.",
        "description": "Sample Request\r\n\r\n         POST\r\n         {\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"StartDate\": \"03/01/2024\",\r\n           \"EndDate\": \"03/25/2024\"\r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of workflow performance data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowPerfDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "If you don't have access to the report, you cannot get the report data."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No workflow performance data found for the given workflow."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Reports/currentstatus": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Get all current status of the given workflow.",
        "description": "Sample Request\r\n\r\n         POST\r\n         {\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"StartDate\": \"03/01/2024\",\r\n           \"EndDate\": \"03/25/2024\" \r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of current status data."
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "If you don't have access to the report, you cannot get the report data."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No current status data found for the given workflow."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Reports/completedrequest": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Get all completed request of the given workflow.",
        "description": "Sample Request\r\n\r\n         POST\r\n         {\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"StartDate\": \"03/01/2024\", \r\n           \"EndDate\": \"03/25/2024\" \r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of completed request data."
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "If you don't have access to the report, you cannot get the report data."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No completed request data found for the given workflow."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Reports/stagevisit": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Get all stage visit details of the given workflow.",
        "description": "Sample Request\r\n\r\n         POST\r\n         {\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"StartDate\": \"03/01/2024\",\r\n           \"EndDate\": \"03/25/2024\" \r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SystemReportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of stage visit data."
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "If you don't have access to the report, you cannot get the report data."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No stage visit data found for the given workflow."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Reports/clarification": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Get all clarification details of the given workflow.",
        "description": "Sample Request\r\n\r\n         POST\r\n         {\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"StageName\" : \"Initiator\",        // 'All' for all stage.\r\n           \"StartDate\": \"03/01/2024\",       \r\n           \"EndDate\": \"03/25/2024\",         \r\n           \"ClarifyFrom\": \"12testing.com\",   // 'All' for all users\r\n           \"ClarifyTo\": \"Echo\",              // 'All' for all users\r\n           \"ClarifyDate\": \"02/10/2024\"",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClarifyReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ClarifyReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ClarifyReportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of clarifications data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ClarifyRptDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "If you don't have access to the report, you cannot get the report data."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No clarfification details found for the given workflow"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Reports/stageperformance": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Get all stage performance details of the given workflow.",
        "description": "Sample Request\r\n\r\n         POST\r\n         {\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"StartDate\": \"03/01/2024\", \r\n           \"EndDate\": \"03/25/2024\"   \r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StagePerformanceReportDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StagePerformanceReportDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StagePerformanceReportDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of stage performance data."
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "If you don't have access to the report, you cannot get the report data."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No stage performance details found for the given workflow."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Reports/pendingrequest": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Get pending request details of the given workflow.",
        "description": "Sample Request\r\n\r\n         POST\r\n         {\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"PendingUser\": \"John\"\r\n           \"StartDate\": \"03/01/2024\",\r\n           \"EndDate\": \"03/25/2024\"            \r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PendingRequestReportDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PendingRequestReportDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PendingRequestReportDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of pending request data."
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "If you don't have access to the report, you cannot get the report data."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No pending request details found for the given workflow."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Reports/audittrial": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Get all audit trial details of the given workflow.",
        "description": "Sample Request\r\n\r\n         POST\r\n         {\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"RecordId\": \"1\"\r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AuditReportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of audit trial record data."
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No audit trial details found for the given workflow."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Reports/activitymonitor": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Get API Activity Details",
        "description": "Sample Request\r\n\r\n         POST\r\n         {\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"StageName\": \"Initiator\",\r\n           \"StartDate\": \"01/01/2025\",\r\n           \"EndDate\": \"10/25/2025\"\r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivityMonitorReqDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivityMonitorReqDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ActivityMonitorReqDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of Acitivity Monitor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ActivityMonitorResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No API details found for the given workflow."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Reports/slareport": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Get all SLA details of the given workflow.",
        "description": "Sample Request\r\n\r\n         POST\r\n         {\r\n           \"WorkflowName\": \"Test Workflow\",\r\n           \"StageName\":  [\"Stage 1\",\"Initiator\"],\r\n           \"StartDate\": \"03/01/2024\",\r\n           \"EndDate\": \"03/25/2024\"            \r\n        }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlaReportReqDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SlaReportReqDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SlaReportReqDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of SLA record data."
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "If you don't have access to the report, you cannot get the report data."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No SLA details found for the given workflow."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Roles": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Gets list of all the roles",
        "description": "Sample request:\r\n            \r\n    Get api/roles",
        "responses": {
          "200": {
            "description": "Return list of roles.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RolesListResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Roles not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Create new role",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {\r\n        \"Role\":\"Reviewer\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RolesDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RolesDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RolesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return status of the request. Success/Already exist",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StatusResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Unable to create role"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Roles"
        ],
        "summary": "Delete the role",
        "description": "Sample request:\r\n            \r\n    DELETE \r\n    {\r\n        \"Id\":\"123\",\r\n        \"Role\":\"Manager\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteRoleDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteRoleDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteRoleDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return Status of the request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StatusResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Unable to delete the role."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Roles/{username}": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Gets list of roles assigned to user by username",
        "description": "Sample request:\r\n            \r\n    Get api/roles/john",
        "parameters": [
          {
            "name": "username",
            "in": "path",
            "description": "Username of the user to retrieve assigned roles.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Return list of roles assigned to the user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserRolesResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Username is missing"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The specified user was not found."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Roles/assignrole": {
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Assign the role to the user",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {\r\n        \"Username\":\"john\",\r\n        \"Role\":\"Admin\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleDetails"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleDetails"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RoleDetails"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StatusResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Not able to process request."
          },
          "404": {
            "description": "Role/User does not exist."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Roles/removerole": {
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Remove the role from the user",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {\r\n        \"Username\":\"john\",\r\n        \"Role\":\"Admin\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleDetails"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleDetails"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RoleDetails"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StatusResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Not able to process request."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Role/User does not exist."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Roles/checkuserrole": {
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Check whether the user does have the given role",
        "description": "Sample request:\r\n            \r\n    POST \r\n    {\r\n        \"Username\":\"john\",\r\n        \"Role\":\"Admin\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleDetails"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleDetails"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RoleDetails"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Yes/No",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StatusResDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "400": {
            "description": "Not able to process request."
          },
          "404": {
            "description": "Role/User does not exist."
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Teams": {
      "get": {
        "tags": [
          "Teams"
        ],
        "summary": "Gets the list of all teams",
        "description": "Sample request:\r\n            \r\n    GET api/teams",
        "responses": {
          "200": {
            "description": "Returns the list of teams.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TeamsResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "post": {
        "tags": [
          "Teams"
        ],
        "summary": "Creates a new team",
        "description": "Sample request:\r\n            \r\n    POST api/teams\r\n    {\r\n         \"TeamName\":\"Finance Approvers\",\r\n         \"TeamUser\":[\"john\",\"jane\"]\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamsRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamsRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TeamsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request Successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "put": {
        "tags": [
          "Teams"
        ],
        "summary": "Updates an existing team",
        "description": "Sample request:\r\n            \r\n    PUT api/teams\r\n    {\r\n         \"TeamId\":12,\r\n         \"TeamName\":\"Finance Approvers\",\r\n         \"TeamUser\":[\"john\",\"jane\"]\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamsRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamsRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TeamsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request Successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Teams"
        ],
        "summary": "Delete team",
        "description": "Sample request:\r\n            \r\n    DELETE api/teams\r\n    {\r\n         \"TeamId\":12,\r\n         \"TeamName\":\"Finance Approvers\",\r\n         \"TeamUser\":[\"john\",\"jane\"]\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamsRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamsRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TeamsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request Successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Teams/{teamId}": {
      "get": {
        "tags": [
          "Teams"
        ],
        "summary": "Gets the list of users that belong to the given team",
        "description": "Sample request:\r\n            \r\n    GET api/teams/12",
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "description": "Id of the team to retrieve members for.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of team members.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TeamsUserResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Gets list of all users",
        "description": "Sample request:\r\n            \r\n    Get api/users",
        "responses": {
          "200": {
            "description": "Request Successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GetUsersResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Users not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update User Details",
        "description": "Sample request:\r\n            \r\n    PUT \r\n    {\r\n         \"LoginId\":\"john\",\r\n         \"Name\":\"John D\",\r\n         \"Email\":\"abc@xyz.com\",\r\n         \"Roles\":[\"user\",\"Admin\"],\r\n         \"EmployeeNo\":\"A1002\",\r\n         \"Department\":\"Finance\",\r\n         \"PhoneNumber\":\"9876543210\",\r\n         \"MobileAppAccess\":true\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserReqDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserReqDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserReqDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request Successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Unable to Update user"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Users/{username}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Gets user details by username",
        "description": "Sample request:\r\n            \r\n    Get api/users/john",
        "parameters": [
          {
            "name": "username",
            "in": "path",
            "description": "Username of the user to retrieve details.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GetUsersResDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "username not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Users/enableuser": {
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "To enable user by username",
        "description": "Sample request:\r\n            \r\n    PUT \r\n    {\r\n         \"Username\":\"john\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UserRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UserRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request Successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "User not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/Users/disableuser": {
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "To disable user by username",
        "description": "Sample request:\r\n            \r\n    PUT \r\n    {\r\n         \"Username\":\"john\"\r\n    }",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UserRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UserRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request Successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "User not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccessPermissionDto": {
        "required": [
          "editAccess",
          "role",
          "stageName",
          "viewAccess",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the stage"
          },
          "role": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the role to assign to the stage"
          },
          "viewAccess": {
            "minLength": 1,
            "type": "string",
            "description": "View Access value. Value should be [All Items/My Items/My Team]"
          },
          "editAccess": {
            "minLength": 1,
            "type": "string",
            "description": "Edit Access value. Value should be [All Items/My Items/My Team/None]"
          }
        },
        "additionalProperties": false
      },
      "AccessPermissionResDto": {
        "type": "object",
        "properties": {
          "stageDisplayName": {
            "type": "string",
            "description": "StageName",
            "nullable": true
          },
          "roles": {
            "type": "string",
            "description": "Roles",
            "nullable": true
          },
          "visible": {
            "type": "string",
            "description": "View access value",
            "nullable": true
          },
          "edit": {
            "type": "string",
            "description": "access value to edit the workflow",
            "nullable": true
          },
          "orderNo": {
            "type": "integer",
            "description": "order no",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "ActivityMonitorReqDto": {
        "required": [
          "endDate",
          "stageName",
          "startDate",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the Workflow (Use all for all workflows)"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the Stage (Use all for all stages)"
          },
          "startDate": {
            "minLength": 1,
            "type": "string",
            "description": "Start Date (MM/dd/yyyy)"
          },
          "endDate": {
            "minLength": 1,
            "type": "string",
            "description": "End Date (MM/dd/yyyy)"
          }
        },
        "additionalProperties": false
      },
      "ActivityMonitorResDto": {
        "type": "object",
        "properties": {
          "apiActivityId": {
            "type": "string",
            "nullable": true
          },
          "workflowId": {
            "type": "string",
            "nullable": true
          },
          "workflowDispName": {
            "type": "string",
            "nullable": true
          },
          "stageId": {
            "type": "string",
            "nullable": true
          },
          "stageDispName": {
            "type": "string",
            "nullable": true
          },
          "recordId": {
            "type": "integer",
            "format": "int64"
          },
          "apiCall": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "responseCode": {
            "type": "string",
            "nullable": true
          },
          "inputParameter": {
            "type": "string",
            "nullable": true
          },
          "outputParameter": {
            "type": "string",
            "nullable": true
          },
          "apiDate": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AddCommentDto": {
        "required": [
          "comment",
          "recordId",
          "stageName",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow"
          },
          "recordId": {
            "maximum": 9.223372036854776E+18,
            "minimum": 1,
            "type": "integer",
            "description": "Record Id",
            "format": "int64"
          },
          "comment": {
            "minLength": 1,
            "type": "string",
            "description": "Comments to be added"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the stage"
          }
        },
        "additionalProperties": false
      },
      "ApiTableValueUpdate": {
        "required": [
          "tableName"
        ],
        "type": "object",
        "properties": {
          "tableName": {
            "minLength": 1,
            "type": "string",
            "description": "Table section name"
          },
          "tableRowIds": {
            "type": "string",
            "description": "Table row id",
            "nullable": true
          },
          "tableDelRowIds": {
            "type": "string",
            "description": "Table Deleted row id",
            "nullable": true
          },
          "values": {
            "description": "Table section values",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApiUpdateRequest": {
        "required": [
          "isDraft",
          "recordId",
          "stageName",
          "status",
          "tableValues",
          "values",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "recordId": {
            "maximum": 9.223372036854776E+18,
            "minimum": 1,
            "type": "integer",
            "description": "Record Id",
            "format": "int64"
          },
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the workflow / lookup"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the stage"
          },
          "isDraft": {
            "type": "boolean",
            "description": "Save the record as draft or not. True - If this need to be saved as draft, False - If needs to be submitted."
          },
          "values": {
            "description": "All Section values except tables - JSON object"
          },
          "tableValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiTableValueUpdate"
            },
            "description": "Table section data"
          },
          "status": {
            "minLength": 1,
            "type": "string",
            "description": "Update status of the record"
          },
          "isWorkflow": {
            "type": "boolean",
            "description": "True for workflows (default) and False for Lookups"
          },
          "comments": {
            "type": "string",
            "description": "Comments to be added",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApproverPerfDto": {
        "type": "object",
        "properties": {
          "userName": {
            "type": "string",
            "description": "Username of the approver.",
            "nullable": true
          },
          "employeeName": {
            "type": "string",
            "description": "Full name of the employee.",
            "nullable": true
          },
          "fastestApprovalHrs": {
            "type": "string",
            "description": "Minimum time taken for approval in hours.",
            "nullable": true
          },
          "slowestApprovalHrs": {
            "type": "string",
            "description": "Maximum time taken for approval in hours.",
            "nullable": true
          },
          "averageApprovalHrs": {
            "type": "string",
            "description": "Average time taken for approvals in hours.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AuditReportRequest": {
        "required": [
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow"
          },
          "recordId": {
            "type": "integer",
            "description": "Record Id of the workflow",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "ClarificationAnswerResDto": {
        "type": "object",
        "properties": {
          "submitterUserFullName": {
            "type": "string",
            "description": "Full name of the user who raised the clarification",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Email address of the user who raised the clarification",
            "nullable": true
          },
          "workflowDispName": {
            "type": "string",
            "description": "Display name of the workflow",
            "nullable": true
          },
          "clarifyToUserFullName": {
            "type": "string",
            "description": "Full name of the user who answered the clarification",
            "nullable": true
          },
          "requestTime": {
            "type": "string",
            "description": "Timestamp the clarification question was raised",
            "nullable": true
          },
          "question": {
            "type": "string",
            "description": "Clarification Question Raised",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ClarificationResDto": {
        "type": "object",
        "properties": {
          "clarifyId": {
            "type": "integer",
            "description": "Id of the newly raised clarification",
            "format": "int64"
          },
          "clarifyToUserFullName": {
            "type": "string",
            "description": "Full name of the user the clarification was sent to",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Email address of the user the clarification was sent to",
            "nullable": true
          },
          "workflowDispName": {
            "type": "string",
            "description": "Display name of the workflow",
            "nullable": true
          },
          "userFullName": {
            "type": "string",
            "description": "Full name of the user who raised the clarification",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ClarifyReportRequest": {
        "required": [
          "clarifyDate",
          "clarifyFrom",
          "clarifyTo",
          "endDate",
          "stageName",
          "startDate",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the stage"
          },
          "startDate": {
            "minLength": 1,
            "type": "string",
            "description": "Date From (MM/dd/yyyy)"
          },
          "endDate": {
            "minLength": 1,
            "type": "string",
            "description": "Date To (MM/dd/yyyy)"
          },
          "clarifyFrom": {
            "minLength": 1,
            "type": "string",
            "description": "Username from whom clarification is requested"
          },
          "clarifyTo": {
            "minLength": 1,
            "type": "string",
            "description": "Username to whom clarification is requested"
          },
          "clarifyDate": {
            "minLength": 1,
            "type": "string",
            "description": "Clarification Date"
          }
        },
        "additionalProperties": false
      },
      "ClarifyRptDto": {
        "type": "object",
        "properties": {
          "stageName": {
            "type": "string",
            "description": "Name of the workflow stage where clarification was raised.",
            "nullable": true
          },
          "recordId": {
            "type": "integer",
            "description": "Unique identifier of the record.",
            "format": "int64"
          },
          "clarificationRequestedFrom": {
            "type": "string",
            "description": "User who requested the clarification.",
            "nullable": true
          },
          "clarificationRequestedTo": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "User to whom the clarification was sent.",
            "nullable": true
          },
          "clarificationRequest": {
            "type": "string",
            "description": "Clarification question or request details.",
            "nullable": true
          },
          "clarificationResponse": {
            "type": "string",
            "description": "Response provided for the clarification request.",
            "nullable": true
          },
          "sentDate": {
            "type": "string",
            "description": "Date when the clarification was requested.",
            "nullable": true
          },
          "responseDate": {
            "type": "string",
            "description": "Date when the clarification response was provided.",
            "nullable": true
          },
          "recalled": {
            "type": "string",
            "description": "Indicates whether the clarification request was recalled",
            "nullable": true
          },
          "recalledDate": {
            "type": "string",
            "description": "Date when the clarification was recalled, if applicable.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CommentsDto": {
        "required": [
          "recordId",
          "stageName",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow"
          },
          "recordId": {
            "maximum": 9.223372036854776E+18,
            "minimum": 1,
            "type": "integer",
            "description": "Record Id",
            "format": "int64"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the stage"
          }
        },
        "additionalProperties": false
      },
      "CommentsResDto": {
        "type": "object",
        "properties": {
          "commentId": {
            "type": "string",
            "description": "Comment Id",
            "nullable": true
          },
          "comments": {
            "type": "string",
            "description": "Comments that is added",
            "nullable": true
          },
          "username": {
            "type": "string",
            "description": "Name of the user",
            "nullable": true
          },
          "date": {
            "type": "string",
            "description": "Comment creation date",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CurrentStageReqDto": {
        "required": [
          "recordId",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow"
          },
          "recordId": {
            "maximum": 9.223372036854776E+18,
            "minimum": 1,
            "type": "integer",
            "description": "Record Id",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "CurrentStageResDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          },
          "currentStage": {
            "type": "string",
            "nullable": true
          },
          "currentStageStatus": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeleteRoleDto": {
        "required": [
          "id",
          "role"
        ],
        "type": "object",
        "properties": {
          "id": {
            "minLength": 1,
            "type": "string",
            "description": "Role id"
          },
          "role": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the role"
          }
        },
        "additionalProperties": false
      },
      "FieldDetails": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "description": "Field Display Name",
            "nullable": true
          },
          "fieldType": {
            "type": "string",
            "description": "Field Type",
            "nullable": true
          },
          "validValues": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Values that are valid for the field",
            "nullable": true
          },
          "defaultValues": {
            "type": "string",
            "description": "Default value in the field",
            "nullable": true
          },
          "dataType": {
            "type": "string",
            "description": "Data type of the field",
            "nullable": true
          },
          "isMandatory": {
            "type": "string",
            "description": "Indicates whether the field is mandatory",
            "nullable": true
          },
          "isEnable": {
            "type": "string",
            "description": "Indicates whether the field is enabled",
            "nullable": true
          },
          "maxLength": {
            "type": "string",
            "description": "Maximum length",
            "nullable": true
          },
          "unique": {
            "type": "string",
            "description": "Indicates whether the field value must be unique",
            "nullable": true
          },
          "isVisible": {
            "type": "string",
            "description": "Indicates whether the field is visible to the user",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FieldRequest": {
        "required": [
          "stageName",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow / lookup"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "For workflows, enter the workflow stage display name as stage name. For lookup workflows, enter the lookup name as the stage name."
          }
        },
        "additionalProperties": false
      },
      "FieldResponse": {
        "type": "object",
        "properties": {
          "sectionFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldDetails"
            },
            "description": "Section Field Details",
            "nullable": true
          },
          "tables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tables"
            },
            "description": "Table Details",
            "nullable": true
          },
          "dateFormat": {
            "type": "string",
            "description": "Date Format",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FileAttachStatus": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string",
            "description": "Attached Filename",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Returns if the file is uploaded successfully",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "Message of the file",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetUsersResDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "userName": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InitiatedRecDetails": {
        "type": "object",
        "properties": {
          "noOfPage": {
            "type": "integer",
            "format": "int64"
          },
          "totalRec": {
            "type": "integer",
            "format": "int64"
          },
          "currentPage": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "InitiatedRecListReq": {
        "required": [
          "endDate",
          "field",
          "page",
          "startDate",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "startDate": {
            "minLength": 1,
            "type": "string",
            "description": "Start date (MM/dd/yyyy) - Submission of records that takes place during this period will be displayed, "
          },
          "endDate": {
            "minLength": 1,
            "type": "string",
            "description": "End date (MM/dd/yyyy) - Submission of records that takes place during this period will be displayed, "
          },
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow"
          },
          "page": {
            "minLength": 1,
            "type": "string",
            "description": "Page no. Each page can accommodate 100 records.If your workflow has more than 100 records then it should be referred to as Page 2 and so on."
          },
          "field": {
            "minLength": 1,
            "type": "string",
            "description": "Any other form date field's display name/Submitted Date/Updated Date"
          }
        },
        "additionalProperties": false
      },
      "InitiatedRecListResDto": {
        "type": "object",
        "properties": {
          "result": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "nullable": true
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiatedRecDetails"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OpenRecordRequest": {
        "required": [
          "recordId",
          "stageName",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "isWorkflow": {
            "type": "boolean",
            "description": "True for Workflows (default) and False for Lookups"
          },
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow / lookup"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "For workflows, enter the workflow stage display name as stage name. For lookup workflows, enter the lookup name as the stage name"
          },
          "recordId": {
            "maximum": 9.223372036854776E+18,
            "minimum": 1,
            "type": "integer",
            "description": "Record Id",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "PendingClarificationResDto": {
        "type": "object",
        "properties": {
          "clarifyId": {
            "type": "integer",
            "description": "Id of the clarification",
            "format": "int64"
          },
          "workflowId": {
            "type": "integer",
            "description": "Id of the workflow",
            "format": "int64"
          },
          "workflowName": {
            "type": "string",
            "description": "Name of the workflow",
            "nullable": true
          },
          "workflowDispName": {
            "type": "string",
            "description": "Display name of the workflow",
            "nullable": true
          },
          "stageId": {
            "type": "string",
            "description": "Id of the stage",
            "nullable": true
          },
          "stageName": {
            "type": "string",
            "description": "Name of the stage",
            "nullable": true
          },
          "stageDispName": {
            "type": "string",
            "description": "Display name of the stage",
            "nullable": true
          },
          "recordId": {
            "type": "string",
            "description": "Id of the record",
            "nullable": true
          },
          "question": {
            "type": "string",
            "description": "Clarification question",
            "nullable": true
          },
          "userName": {
            "type": "string",
            "description": "Username of the person who raised the clarification",
            "nullable": true
          },
          "isEdit": {
            "type": "string",
            "description": "Whether this clarification's answer has been edited",
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "description": "Timestamp the clarification was raised",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PendingRequestReportDto": {
        "required": [
          "endDate",
          "pendingUser",
          "startDate",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow"
          },
          "pendingUser": {
            "minLength": 1,
            "type": "string",
            "description": "Username of the pending user"
          },
          "startDate": {
            "minLength": 1,
            "type": "string",
            "description": "Date From (MM/dd/yyyy)"
          },
          "endDate": {
            "minLength": 1,
            "type": "string",
            "description": "Date To (MM/dd/yyyy)"
          }
        },
        "additionalProperties": false
      },
      "PendingRequests": {
        "type": "object",
        "properties": {
          "workflowId": {
            "type": "integer",
            "description": "Workflow Id",
            "format": "int64"
          },
          "workflowName": {
            "type": "string",
            "description": "Workflow Name",
            "nullable": true
          },
          "processStage": {
            "type": "string",
            "description": "Process Stage",
            "nullable": true
          },
          "recordId": {
            "type": "integer",
            "description": "Record Id",
            "format": "int64"
          },
          "pendingSince": {
            "type": "string",
            "description": "Pending Since",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RaiseClarificationDto": {
        "required": [
          "clarifyToUser",
          "question",
          "recordId",
          "stageName",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the workflow"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the stage"
          },
          "recordId": {
            "maximum": 9.223372036854776E+18,
            "minimum": 1,
            "type": "integer",
            "description": "Record Id",
            "format": "int64"
          },
          "clarifyToUser": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Username of the person the clarification is being asked to"
          },
          "question": {
            "minLength": 1,
            "type": "string",
            "description": "Clarification question to raise"
          }
        },
        "additionalProperties": false
      },
      "RecFileReqDto": {
        "required": [
          "fieldName",
          "isFileField",
          "recordId",
          "stageName",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the workflow / lookup"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "For workflows, enter the workflow stage display name as stage name. For lookup workflows, enter the lookup name as the stage name"
          },
          "recordId": {
            "maximum": 9.223372036854776E+18,
            "minimum": 1,
            "type": "integer",
            "description": "Record Id",
            "format": "int64"
          },
          "isFileField": {
            "type": "boolean",
            "description": "File Type"
          },
          "fieldName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the file fieldname"
          }
        },
        "additionalProperties": false
      },
      "RecordsListRequest": {
        "required": [
          "endDate",
          "page",
          "startDate",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "startDate": {
            "minLength": 1,
            "type": "string",
            "description": "Start date (MM/dd/yyyy) - Submission of records that takes place during this period will be displayed, "
          },
          "endDate": {
            "minLength": 1,
            "type": "string",
            "description": "End date (MM/dd/yyyy) - Submission of records that takes place during this period will be displayed, "
          },
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow"
          },
          "page": {
            "minLength": 1,
            "type": "string",
            "description": "Page no. Each page can accommodate 100 records.If your workflow has more than 100 records then it should be referred to as Page 2 and so on."
          }
        },
        "additionalProperties": false
      },
      "RoleDetails": {
        "required": [
          "role",
          "username"
        ],
        "type": "object",
        "properties": {
          "username": {
            "minLength": 1,
            "type": "string",
            "description": "Username of the user"
          },
          "role": {
            "minLength": 1,
            "type": "string",
            "description": "Role of the user"
          }
        },
        "additionalProperties": false
      },
      "RolesDto": {
        "required": [
          "role"
        ],
        "type": "object",
        "properties": {
          "role": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the role"
          }
        },
        "additionalProperties": false
      },
      "RolesListResDto": {
        "type": "object",
        "properties": {
          "roleId": {
            "type": "integer",
            "description": "Role Id",
            "format": "int64"
          },
          "roles": {
            "type": "string",
            "description": "Name of the role",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SearchRecordDto": {
        "required": [
          "stageName",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the stage"
          }
        },
        "additionalProperties": false
      },
      "SearchRecordListResDto": {
        "type": "object",
        "properties": {
          "records": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SlaReportReqDto": {
        "required": [
          "endDate",
          "stageName",
          "startDate",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the Workflow (Use all for all workflows)"
          },
          "stageName": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Stage Names"
          },
          "startDate": {
            "minLength": 1,
            "type": "string",
            "description": "Start Date (MM/dd/yyyy)"
          },
          "endDate": {
            "minLength": 1,
            "type": "string",
            "description": "End Date (MM/dd/yyyy)"
          }
        },
        "additionalProperties": false
      },
      "StageListResDto": {
        "type": "object",
        "properties": {
          "stageId": {
            "type": "integer",
            "description": "Unique identifier of the stage.",
            "format": "int64"
          },
          "stageName": {
            "type": "string",
            "description": "Display name of the stage.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Detailed description of the stage.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Current status of the stage (e.g., Active, Inactive).",
            "nullable": true
          },
          "orderNo": {
            "type": "string",
            "description": "Defines the execution order of the stage.",
            "nullable": true
          },
          "validValues": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of valid values associated with the stage.",
            "nullable": true
          },
          "reviewByRole": {
            "type": "string",
            "description": "Role responsible for reviewing the stage.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StagePerformanceReportDto": {
        "required": [
          "endDate",
          "startDate",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow"
          },
          "startDate": {
            "minLength": 1,
            "type": "string",
            "description": "Date From (MM/dd/yyyy)"
          },
          "endDate": {
            "minLength": 1,
            "type": "string",
            "description": "Date To (MM/dd/yyyy)"
          }
        },
        "additionalProperties": false
      },
      "StatusChange": {
        "required": [
          "recordId",
          "stageName",
          "status",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "recordId": {
            "maximum": 9.223372036854776E+18,
            "minimum": 1,
            "type": "integer",
            "description": "Record Id",
            "format": "int64"
          },
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the workflow"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the stage"
          },
          "status": {
            "minLength": 1,
            "type": "string",
            "description": "One of valid status values for this stage, such as Approved, Rejected, Completed and so on."
          },
          "comments": {
            "type": "string",
            "description": "Comments to be added",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StatusResDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SubmitRequest": {
        "required": [
          "isDraft",
          "stageName",
          "tableValues",
          "values",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the workflow / lookup"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "For workflows, enter the workflow stage display name as stage name. For lookup workflows, enter the lookup name as the stage name"
          },
          "isDraft": {
            "type": "boolean",
            "description": "Save the record as draft or not. True - If this need to be saved as draft, False - If needs to be submitted."
          },
          "values": {
            "description": "All Section values except tables - JSON object"
          },
          "tableValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TableValue"
            },
            "description": "Table section data"
          },
          "isWorkflow": {
            "type": "boolean",
            "description": "True for Workflows (default) and False for Lookups"
          }
        },
        "additionalProperties": false
      },
      "SubmitResponse": {
        "type": "object",
        "properties": {
          "recordId": {
            "type": "string",
            "description": "Record Id",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status of the Submitted Record",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "Message provided when there is an invalid input",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SystemReportRequest": {
        "required": [
          "endDate",
          "startDate",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the worklfow"
          },
          "startDate": {
            "minLength": 1,
            "type": "string",
            "description": "Date From (MM/dd/yyyy)"
          },
          "endDate": {
            "minLength": 1,
            "type": "string",
            "description": "Date To (MM/dd/yyyy)"
          }
        },
        "additionalProperties": false
      },
      "TableValue": {
        "required": [
          "tableName"
        ],
        "type": "object",
        "properties": {
          "tableName": {
            "minLength": 1,
            "type": "string",
            "description": "Table section name"
          },
          "values": {
            "description": "Table section values",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TableValueUpdate": {
        "required": [
          "tableName",
          "tableRowIds"
        ],
        "type": "object",
        "properties": {
          "tableName": {
            "minLength": 1,
            "type": "string",
            "description": "Table section name"
          },
          "tableRowIds": {
            "minLength": 1,
            "type": "string",
            "description": "Table row id"
          },
          "values": {
            "description": "Table section values",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Tables": {
        "type": "object",
        "properties": {
          "tableName": {
            "type": "string",
            "description": "Name of the table",
            "nullable": true
          },
          "tableFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldDetails"
            },
            "description": "Table Fields",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TeamsRequestDto": {
        "required": [
          "teamId",
          "teamName"
        ],
        "type": "object",
        "properties": {
          "teamId": {
            "type": "integer",
            "description": "Team ID",
            "format": "int64"
          },
          "teamName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the team"
          },
          "teamUser": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Team Usernames",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TeamsResponse": {
        "type": "object",
        "properties": {
          "teamId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "teamName": {
            "type": "string",
            "nullable": true
          },
          "userName": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TeamsUserResponse": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "userName": {
            "type": "string",
            "nullable": true
          },
          "userFullName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TriggerRequest": {
        "required": [
          "recordId",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the workflow / lookup"
          },
          "recordId": {
            "maximum": 9.223372036854776E+18,
            "minimum": 1,
            "type": "integer",
            "description": "Record ID",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "TriggerResponse": {
        "type": "object",
        "properties": {
          "workflowName": {
            "type": "string",
            "description": "Name of the workflow",
            "nullable": true
          },
          "recordId": {
            "type": "string",
            "description": "Record Id",
            "nullable": true
          },
          "triggeredWorkflows": {
            "$ref": "#/components/schemas/TriggeredWorkflow"
          }
        },
        "additionalProperties": false
      },
      "TriggeredWorkflow": {
        "type": "object",
        "properties": {
          "triggeredWorkflowName": {
            "type": "string",
            "description": "Name of the triggered workflow",
            "nullable": true
          },
          "triggeredWorkflowDisplayName": {
            "type": "string",
            "description": "Triggered Workflow Display Name",
            "nullable": true
          },
          "recordId": {
            "type": "string",
            "description": "Record Id",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateClarificationDto": {
        "required": [
          "answer",
          "clarifyId",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "clarifyId": {
            "type": "integer",
            "description": "Id of the clarification being answered",
            "format": "int64"
          },
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the workflow"
          },
          "answer": {
            "minLength": 1,
            "type": "string",
            "description": "Answer to the clarification question"
          }
        },
        "additionalProperties": false
      },
      "UpdateRequest": {
        "required": [
          "isDraft",
          "recordId",
          "stageName",
          "status",
          "tableValues",
          "values",
          "workflowName"
        ],
        "type": "object",
        "properties": {
          "recordId": {
            "maximum": 9.223372036854776E+18,
            "minimum": 1,
            "type": "integer",
            "description": "Record Id",
            "format": "int64"
          },
          "workflowName": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the workflow / lookup"
          },
          "stageName": {
            "minLength": 1,
            "type": "string",
            "description": "For workflows, enter the workflow stage display name as stage name. For lookup workflows, enter the lookup name as the stage name"
          },
          "isDraft": {
            "type": "boolean",
            "description": "Save the record as draft or not. True - If this need to be saved as draft, False - If needs to be submitted."
          },
          "values": {
            "description": "All Section values except tables - JSON object"
          },
          "tableValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TableValueUpdate"
            },
            "description": "Table section data"
          },
          "status": {
            "minLength": 1,
            "type": "string",
            "description": "Status of the record"
          },
          "isWorkflow": {
            "type": "boolean",
            "description": "True for Workflows (default) and False for Lookups"
          }
        },
        "additionalProperties": false
      },
      "UpdateUserReqDto": {
        "required": [
          "email",
          "employeeNo",
          "loginId",
          "name",
          "roles"
        ],
        "type": "object",
        "properties": {
          "loginId": {
            "minLength": 1,
            "type": "string",
            "description": "Username of the user"
          },
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "User full name"
          },
          "email": {
            "minLength": 1,
            "type": "string",
            "description": "User email id",
            "format": "email"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Role of the user"
          },
          "employeeNo": {
            "minLength": 1,
            "type": "string",
            "description": "Employee number of the user. Should be unique"
          },
          "department": {
            "type": "string",
            "description": "Department of the user",
            "nullable": true
          },
          "phoneNumber": {
            "type": "string",
            "description": "Phone number of the user",
            "nullable": true
          },
          "mobileAppAccess": {
            "type": "boolean",
            "description": "The user requires access to the mobile app"
          }
        },
        "additionalProperties": false
      },
      "UserRequest": {
        "required": [
          "username"
        ],
        "type": "object",
        "properties": {
          "username": {
            "minLength": 1,
            "type": "string",
            "description": "Username of the user"
          }
        },
        "additionalProperties": false
      },
      "UserRolesResDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Returns status",
            "nullable": true
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RolesListResDto"
            },
            "description": "List of roles assigned to the user",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WorkflowPerfDto": {
        "type": "object",
        "properties": {
          "benchmarkHrs": {
            "type": "string",
            "description": "Standard benchmark time (in hours) defined for the workflow.",
            "nullable": true
          },
          "averageCycleTimeHrs": {
            "type": "string",
            "description": "Average time taken to complete the workflow cycle.",
            "nullable": true
          },
          "shortestCycleTimeHrs": {
            "type": "string",
            "description": "Minimum time taken to complete the workflow.",
            "nullable": true
          },
          "longestCycleTimeHrs": {
            "type": "string",
            "description": "Maximum time taken to complete the workflow.",
            "nullable": true
          },
          "fastestApprovalTimeHrs": {
            "type": "string",
            "description": "Shortest approval time recorded across all approvers.",
            "nullable": true
          },
          "fastestApprover": {
            "type": "string",
            "description": "User who completed approval in the shortest time.",
            "nullable": true
          },
          "slowestApprovalTimeHrs": {
            "type": "string",
            "description": "Longest approval time recorded across all approvers.",
            "nullable": true
          },
          "slowestApprover": {
            "type": "string",
            "description": "User who took the longest time for approval.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WorkflowsResponse": {
        "type": "object",
        "properties": {
          "workflowId": {
            "type": "integer",
            "description": "Workflow Id",
            "format": "int64"
          },
          "workflowName": {
            "type": "string",
            "description": "Workflow name",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the workflow",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "Enter the apikey",
        "name": "X-Api-Key",
        "in": "header"
      },
      "UserKey": {
        "type": "apiKey",
        "description": "Enter the userkey",
        "name": "X-User-Key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKey": [],
      "UserKey": []
    }
  ],
  "tags": [
    {
      "name": "Access"
    },
    {
      "name": "Clarification"
    },
    {
      "name": "Public"
    },
    {
      "name": "Reports"
    },
    {
      "name": "Roles"
    },
    {
      "name": "Teams"
    },
    {
      "name": "Users"
    }
  ]
}