Files
MinglarBackendNestJS/swagger.json

1054 lines
40 KiB
JSON

{
"openapi": "3.0.0",
"info": {
"title": "Minglar API",
"description": "Serverless Backend API for Minglar - Host Management, Admin, and Prepopulate Services",
"version": "1.0.0",
"contact": {
"name": "Minglar Team"
}
},
"servers": [
{
"url": "/",
"description": "Current Environment (auto-detects local or AWS)"
}
],
"tags": [
{
"name": "Host - Onboarding",
"description": "Host registration, login, and onboarding endpoints"
},
{
"name": "Host - Activity Hub",
"description": "Host activity and PQQ management"
},
{
"name": "Minglar Admin - Auth",
"description": "Minglar admin authentication endpoints"
},
{
"name": "Minglar Admin - Host Hub",
"description": "Admin host management endpoints"
},
{
"name": "Minglar Admin - Settings",
"description": "Admin settings and teammate management"
},
{
"name": "Prepopulate",
"description": "Reference data and lookup endpoints"
},
{
"name": "PQQ",
"description": "Pre-Qualification Questionnaire endpoints"
}
],
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "apiKey",
"in": "header",
"name": "x-auth-token",
"description": "JWT token for authentication"
}
},
"schemas": {
"SignUpRequest": {
"type": "object",
"required": ["email"],
"properties": {
"email": { "type": "string", "format": "email", "example": "john@example.com" }
}
},
"HostLoginRequest": {
"type": "object",
"required": ["emailAddress", "userPassword"],
"properties": {
"emailAddress": { "type": "string", "format": "email", "example": "john@example.com" },
"userPassword": { "type": "string", "example": "password123" }
}
},
"VerifyOTPRequest": {
"type": "object",
"required": ["email", "otp"],
"properties": {
"email": { "type": "string", "format": "email", "example": "john@example.com" },
"otp": { "type": "string", "example": "123456" }
}
},
"CreatePasswordRequest": {
"type": "object",
"required": ["password", "confirmPassword"],
"properties": {
"password": { "type": "string", "minLength": 8, "example": "password123" },
"confirmPassword": { "type": "string", "minLength": 8, "example": "password123" }
}
},
"BankDetailsRequest": {
"type": "object",
"required": ["bankXid", "bankBranchXid", "accountNumber", "confirmAccountNumber", "accountHolderName", "currencyXid"],
"properties": {
"bankXid": { "type": "integer", "example": 1 },
"bankBranchXid": { "type": "integer", "example": 1 },
"accountNumber": { "type": "string", "example": "1234567890" },
"confirmAccountNumber": { "type": "string", "example": "1234567890" },
"accountHolderName": { "type": "string", "example": "John Doe" },
"currencyXid": { "type": "integer", "example": 1 }
}
},
"CompanyDetailsRequest": {
"type": "object",
"required": ["companyDetails", "documents"],
"properties": {
"companyDetails": {
"type": "string",
"description": "JSON string containing company details (companyName, companyAddress, companyCity, companyState, companyCountry, companyPincode, companyPhone, companyEmail, companyWebsite, registrationNumber, taxId, etc.)"
},
"documents": {
"type": "string",
"description": "JSON array of document metadata (fieldName, documentTypeXid, documentName, owner)"
},
"isDraft": { "type": "boolean", "description": "Whether this is a draft submission" },
"userProfile": { "type": "string", "description": "JSON object with firstName, lastName, mobileNumber (optional)" },
"deletedFiles": { "type": "string", "description": "JSON array of file URLs to delete (optional)" },
"parentDeletedFiles": { "type": "string", "description": "JSON array of parent company file URLs to delete (optional)" }
}
},
"SaveActivityRequest": {
"type": "object",
"required": ["activityTypeXid"],
"properties": {
"activityTypeXid": { "type": "integer", "example": 1 },
"frequenciesXid": { "type": "integer", "example": 1 }
}
},
"CreateActivityRequest": {
"type": "object",
"required": ["activityTypeXid", "frequenciesXid"],
"properties": {
"activityTypeXid": { "type": "integer", "example": 1 },
"frequenciesXid": { "type": "integer", "example": 1 }
}
},
"InviteTeammateRequest": {
"type": "object",
"required": ["emailAddress", "roleXid"],
"properties": {
"emailAddress": { "type": "string", "format": "email", "example": "teammate@example.com" },
"roleXid": { "type": "integer", "example": 3, "description": "2 for Co_Admin, 3 for Account_Manager" },
"isFixedSalary": { "type": "boolean", "example": false },
"perValue": { "type": "number", "example": 10 }
}
},
"AddSuggestionRequest": {
"type": "object",
"required": ["hostXid", "title", "comments"],
"properties": {
"hostXid": { "type": "integer", "example": 1 },
"title": { "type": "string", "example": "Setup Profile" },
"comments": { "type": "string", "example": "Please complete your profile" },
"isParent": { "type": "boolean", "example": false }
}
},
"AssignAMRequest": {
"type": "object",
"required": ["host_xid", "account_manager_xid"],
"properties": {
"host_xid": { "type": "integer", "example": 1 },
"account_manager_xid": { "type": "integer", "example": 2 }
}
},
"LoginResponse": {
"type": "object",
"properties": {
"success": { "type": "boolean", "example": true },
"message": { "type": "string", "example": "Login successful" },
"data": {
"type": "object",
"properties": {
"id": { "type": "integer" },
"firstName": { "type": "string" },
"lastName": { "type": "string" },
"emailAddress": { "type": "string" },
"mobileNumber": { "type": "string" },
"isActive": { "type": "boolean" },
"roleXid": { "type": "integer" },
"accessToken": { "type": "string" },
"refreshToken": { "type": "string" }
}
}
}
},
"SuccessResponse": {
"type": "object",
"properties": {
"success": { "type": "boolean", "example": true },
"message": { "type": "string" },
"statusCode": { "type": "integer", "example": 200 },
"data": { "type": "object" }
}
},
"ErrorResponse": {
"type": "object",
"properties": {
"success": { "type": "boolean", "example": false },
"message": { "type": "string" },
"statusCode": { "type": "integer" },
"data": { "type": "null" },
"error": {
"type": "object",
"properties": {
"code": { "type": "integer" },
"description": { "type": "string" },
"statusCode": { "type": "integer" }
}
}
}
},
"PaginatedResponse": {
"type": "object",
"properties": {
"success": { "type": "boolean" },
"data": { "type": "array", "items": { "type": "object" } },
"pagination": {
"type": "object",
"properties": {
"page": { "type": "integer" },
"limit": { "type": "integer" },
"total": { "type": "integer" },
"totalPages": { "type": "integer" }
}
}
}
}
}
},
"paths": {
"/host": {
"get": {
"tags": ["Host - Onboarding"],
"summary": "Get all hosts",
"description": "Retrieve a list of all hosts with pagination",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "page", "in": "query", "schema": { "type": "integer", "default": 1 } },
{ "name": "limit", "in": "query", "schema": { "type": "integer", "default": 10 } }
],
"responses": {
"200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse" } } } },
"401": { "description": "Unauthorized" }
}
}
},
"/host/Host_Admin/onboarding/registration": {
"post": {
"tags": ["Host - Onboarding"],
"summary": "Host Sign Up",
"description": "Register a new host account. Sends OTP to email for verification.",
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignUpRequest" } } }
},
"responses": {
"200": { "description": "OTP sent successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } },
"400": { "description": "Bad Request - Email is required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } },
"409": { "description": "User is already registered" }
}
}
},
"/host/Host_Admin/onboarding/verify-otp": {
"post": {
"tags": ["Host - Onboarding"],
"summary": "Verify OTP",
"description": "Verify OTP sent to host email. Returns access and refresh tokens on success.",
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyOTPRequest" } } }
},
"responses": {
"200": {
"description": "OTP verified successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": { "type": "boolean", "example": true },
"message": { "type": "string", "example": "OTP verified successfully" },
"accessToken": { "type": "string" },
"refreshToken": { "type": "string" },
"data": { "type": "null" }
}
}
}
}
},
"400": { "description": "Email and OTP are required" }
}
}
},
"/host/Host_Admin/onboarding/login": {
"post": {
"tags": ["Host - Onboarding"],
"summary": "Host Login",
"description": "Authenticate host and get access tokens",
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/HostLoginRequest" } } }
},
"responses": {
"200": { "description": "Login successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponse" } } } },
"400": { "description": "Email and password are required" },
"401": { "description": "Invalid credentials" }
}
}
},
"/host/Host_Admin/onboarding/create-password": {
"post": {
"tags": ["Host - Onboarding"],
"summary": "Create Password",
"description": "Create password after OTP verification",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePasswordRequest" } } }
},
"responses": {
"200": { "description": "Password created successfully" },
"400": { "description": "Password mismatch" }
}
}
},
"/host/Host_Admin/onboarding/add-payment-details": {
"post": {
"tags": ["Host - Onboarding"],
"summary": "Add Bank/Payment Details",
"description": "Add bank account details for host",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/BankDetailsRequest" } } }
},
"responses": {
"200": { "description": "Payment details added successfully" },
"400": { "description": "Invalid details" }
}
}
},
"/host/Host_Admin/onboarding/add-company-details": {
"patch": {
"tags": ["Host - Onboarding"],
"summary": "Submit Company Details",
"description": "Submit company information with documents",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/CompanyDetailsRequest" } } }
},
"responses": {
"200": { "description": "Company details submitted successfully" }
}
}
},
"/host/Host_Admin/onboarding/accept-agreement": {
"patch": {
"tags": ["Host - Onboarding"],
"summary": "Accept Agreement",
"description": "Host accepts the terms and agreement",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Agreement accepted" }
}
}
},
"/host/getById": {
"get": {
"tags": ["Host - Onboarding"],
"summary": "Get Host By ID",
"description": "Get host details by ID",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "hostXid", "in": "query", "required": true, "schema": { "type": "integer" } }
],
"responses": {
"200": { "description": "Host details retrieved" },
"404": { "description": "Host not found" }
}
}
},
"/host/get-suggestion": {
"get": {
"tags": ["Host - Onboarding"],
"summary": "Show Suggestions",
"description": "Get suggestions for host",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Suggestions retrieved" }
}
}
},
"/stepper": {
"get": {
"tags": ["Host - Onboarding"],
"summary": "Get Stepper Info",
"description": "Get onboarding stepper progress",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Stepper info retrieved" }
}
}
},
"/resend-otp": {
"post": {
"tags": ["Host - Onboarding"],
"summary": "Resend OTP",
"description": "Resend OTP to email for Register, Login, or ForgotPassword purposes",
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "type": "object", "required": ["email", "purpose"], "properties": { "email": { "type": "string", "format": "email", "example": "john@example.com" }, "purpose": { "type": "string", "enum": ["Register", "Login", "ForgotPassword"], "example": "Register" } } } } }
},
"responses": {
"200": { "description": "OTP sent successfully" },
"400": { "description": "Email and purpose are required / Invalid purpose" },
"404": { "description": "User not found" }
}
}
},
"/host/Activity_Hub/OnBoarding/add-activity": {
"post": {
"tags": ["Host - Activity Hub"],
"summary": "Save Activity for PQQ",
"description": "Save new activity for pre-qualification questionnaire",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveActivityRequest" } } }
},
"responses": {
"201": { "description": "Activity created successfully" },
"400": { "description": "activityTypeXid is required" }
}
}
},
"/host/Activity_Hub/OnBoarding/create-activity": {
"post": {
"tags": ["Host - Activity Hub"],
"summary": "Create Activity and Questions",
"description": "Create activity entry with all questions",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateActivityRequest" } } }
},
"responses": {
"200": { "description": "Activity created successfully" },
"400": { "description": "activityType and frequency ID is required" }
}
}
},
"/host/Activity_Hub/OnBoarding/get-pqq-question-details": {
"get": {
"tags": ["Host - Activity Hub"],
"summary": "Get PQQ By Question ID",
"description": "Get PQQ question details by question_xid and activity_xid",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "question_xid", "in": "query", "required": true, "schema": { "type": "integer" } },
{ "name": "activity_xid", "in": "query", "required": true, "schema": { "type": "integer" } }
],
"responses": {
"200": { "description": "Question details retrieved" },
"400": { "description": "Question and activity xid are required" }
}
}
},
"/host/Activity_Hub/OnBoarding/get-latest-pqq-question-details": {
"get": {
"tags": ["Host - Activity Hub"],
"summary": "Get Latest PQQ Question",
"description": "Get the last updated PQQ question",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Latest question retrieved" }
}
}
},
"/host/Activity_Hub/OnBoarding/prepopulate-new-activity": {
"get": {
"tags": ["Host - Activity Hub"],
"summary": "Prepopulate New Activity",
"description": "Get all activity types for prepopulation",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Activity types retrieved" }
}
}
},
"/host/Activity_Hub/OnBoarding/get-all-host-activity": {
"get": {
"tags": ["Host - Activity Hub"],
"summary": "Get All Host Activities",
"description": "Get all activities for a host",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Activities retrieved" }
}
}
},
"/host/Activity_Hub/OnBoarding/submit-pqq-answer": {
"patch": {
"tags": ["Host - Activity Hub"],
"summary": "Submit PQQ Answer",
"description": "Submit answer for PQQ question (multipart/form-data with file upload support)",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"required": ["activityXid", "pqqQuestionXid", "pqqAnswerXid"],
"properties": {
"activityXid": { "type": "integer", "description": "Activity ID" },
"pqqQuestionXid": { "type": "integer", "description": "PQQ Question ID" },
"pqqAnswerXid": { "type": "integer", "description": "PQQ Answer ID" },
"comments": { "type": "string", "description": "Optional comments" },
"file": { "type": "string", "format": "binary", "description": "Supporting file upload" }
}
}
}
}
},
"responses": {
"200": { "description": "Answer submitted" }
}
}
},
"/host/Activity_Hub/OnBoarding/submit-pq-answer": {
"patch": {
"tags": ["Host - Activity Hub"],
"summary": "Submit PQ Answer",
"description": "Submit pre-qualification answer (multipart/form-data with file upload support)",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"required": ["activityXid", "pqqQuestionXid", "pqqAnswerXid"],
"properties": {
"activityXid": { "type": "integer", "description": "Activity ID" },
"pqqQuestionXid": { "type": "integer", "description": "PQQ Question ID" },
"pqqAnswerXid": { "type": "integer", "description": "PQQ Answer ID" },
"comments": { "type": "string", "description": "Optional comments" },
"file": { "type": "string", "format": "binary", "description": "Supporting file upload" }
}
}
}
}
},
"responses": {
"200": { "description": "Answer submitted" }
}
}
},
"/host/Activity_Hub/OnBoarding/submit-final-pqq-answer": {
"post": {
"tags": ["Host - Activity Hub"],
"summary": "Submit Final PQQ Answer",
"description": "Submit final PQQ answer and get score",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Final answer submitted" }
}
}
},
"/host/Activity_Hub/OnBoarding/submit-pqq-for-review": {
"patch": {
"tags": ["Host - Activity Hub"],
"summary": "Submit PQQ for Review",
"description": "Submit PQQ for admin review",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "activity_xid", "in": "query", "required": true, "schema": { "type": "integer" } }
],
"responses": {
"200": { "description": "Your PQQ has been submitted for review" }
}
}
},
"/host/Activity_Hub/OnBoarding/get-all-pqq-ques-submited-ans": {
"get": {
"tags": ["Host - Activity Hub"],
"summary": "Get All PQQ with Submitted Answers",
"description": "Get all PQQ questions with submitted answers for an activity",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "activity_xid", "in": "query", "required": true, "schema": { "type": "integer" } }
],
"responses": {
"200": { "description": "Data retrieved successfully" },
"409": { "description": "Activity ID is required" }
}
}
},
"/host/Activity_Hub/OnBoarding/update-suggestion-reviewed": {
"patch": {
"tags": ["Host - Activity Hub"],
"summary": "Update Suggestion as Reviewed",
"description": "Mark PQQ suggestion as reviewed by host",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "type": "object", "required": ["activityPqqHeaderXid"], "properties": { "activityPqqHeaderXid": { "type": "integer", "example": 1 }, "activityPQQSuggestionId": { "type": "integer", "example": 1 } } } } }
},
"responses": {
"201": { "description": "Suggestion reviewed successfully" },
"400": { "description": "activityPqqHeaderXid is required" }
}
}
},
"/minglaradmin/registration": {
"post": {
"tags": ["Minglar Admin - Auth"],
"summary": "Admin Registration",
"description": "Register a new Minglar admin",
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignUpRequest" } } }
},
"responses": {
"201": { "description": "Admin registered successfully" }
}
}
},
"/minglaradmin/login": {
"post": {
"tags": ["Minglar Admin - Auth"],
"summary": "Admin Login",
"description": "Authenticate Minglar admin and get access tokens",
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/HostLoginRequest" } } }
},
"responses": {
"200": { "description": "Login successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponse" } } } },
"400": { "description": "Email is required / Failed to login" }
}
}
},
"/minglaradmin/create-password": {
"post": {
"tags": ["Minglar Admin - Auth"],
"summary": "Create Admin Password",
"description": "Create password for Minglar admin",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePasswordRequest" } } }
},
"responses": {
"200": { "description": "Password created" }
}
}
},
"/minglaradmin/update-profile": {
"patch": {
"tags": ["Minglar Admin - Auth"],
"summary": "Update Admin Profile",
"description": "Update Minglar admin profile with image",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "profileImage": { "type": "string", "format": "binary" } } } } }
},
"responses": {
"200": { "description": "Profile updated" }
}
}
},
"/minglaradmin/prepopulate-Roles": {
"get": {
"tags": ["Minglar Admin - Auth"],
"summary": "Prepopulate Roles",
"description": "Get all available roles",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Roles retrieved" }
}
}
},
"/minglaradmin/hosthub/hosts/get-host-details/{host_xid}": {
"get": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Get Host Details By ID",
"description": "Get detailed host information for admin",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "host_xid", "in": "path", "required": true, "schema": { "type": "integer" } }
],
"responses": {
"200": { "description": "Host details retrieved" }
}
}
},
"/minglaradmin/hosthub/hosts/get-all-host-applications-am": {
"get": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Get All Host Applications for AM",
"description": "Get all host applications for Account Manager",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "page", "in": "query", "schema": { "type": "integer" } },
{ "name": "limit", "in": "query", "schema": { "type": "integer" } },
{ "name": "status", "in": "query", "schema": { "type": "string" } }
],
"responses": {
"200": { "description": "Applications retrieved" }
}
}
},
"/minglaradmin/get-all-activity-of-host/{id}": {
"get": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Get All Host Activities for Admin",
"description": "Get all activities of a specific host",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } }
],
"responses": {
"200": { "description": "Activities retrieved" }
}
}
},
"/minglaradmin/hosthub/onboarding/get-all-host-applications-admin": {
"get": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Get All Onboarding Host Applications",
"description": "Get all onboarding host applications for admin",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "page", "in": "query", "schema": { "type": "integer" } },
{ "name": "limit", "in": "query", "schema": { "type": "integer" } }
],
"responses": {
"200": { "description": "Applications retrieved" }
}
}
},
"/minglaradmin/hosthub/onboarding/get-all-host-applications-admin-new": {
"get": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Get New Onboarding Applications",
"description": "Get new onboarding host applications",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "New applications retrieved" }
}
}
},
"/minglaradmin/hosthub/hosts/add-suggestion": {
"post": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Add Suggestion",
"description": "Add suggestion for host (Minglar Admin, Co_Admin, and Account Manager)",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddSuggestionRequest" } } }
},
"responses": {
"200": { "description": "Suggestion added successfully" },
"400": { "description": "Host ID / Title / Comments are required" },
"404": { "description": "User not found" }
}
}
},
"/minglaradmin/hosthub/onboarding/assign-am": {
"patch": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Assign AM to Host",
"description": "Assign Account Manager to host (only Minglar Admin)",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssignAMRequest" } } }
},
"responses": {
"200": { "description": "AM assigned to host successfully" },
"404": { "description": "User not found" }
}
}
},
"/minglaradmin/hosthub/onboarding/edit-agreement-accept-host": {
"patch": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Edit Agreement and Accept Host",
"description": "Edit agreement details and accept host application (only Minglar Admin)",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "type": "object", "required": ["host_xid", "agreementStartDate", "duration", "durationFrequency", "payoutDurationNum", "payoutDurationFrequency"], "properties": { "host_xid": { "type": "integer", "example": 1 }, "agreementStartDate": { "type": "string", "format": "date", "example": "2024-01-01" }, "duration": { "type": "integer", "example": 12 }, "isCommisionBase": { "type": "boolean", "example": true }, "commisionPer": { "type": "number", "example": 10 }, "amountPerBooking": { "type": "number", "example": 100 }, "durationFrequency": { "type": "string", "example": "months" }, "payoutDurationNum": { "type": "integer", "example": 1 }, "payoutDurationFrequency": { "type": "string", "example": "months" } } } } }
},
"responses": {
"200": { "description": "Details edited successfully" },
"404": { "description": "User not found" }
}
}
},
"/minglaradmin/hosthub/onboarding/get-all-pqq-ques-ans-for-am": {
"get": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Get All PQQ for AM",
"description": "Get all PQQ questions and answers for Account Manager",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "activity_xid", "in": "query", "required": true, "schema": { "type": "integer" } },
{ "name": "hostXid", "in": "query", "schema": { "type": "integer" } }
],
"responses": {
"200": { "description": "PQQ retrieved" }
}
}
},
"/minglaradmin/hosthub/hosts/accept-host-application": {
"patch": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Accept Host Application",
"description": "Accept a host application",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "type": "object", "required": ["hostXid"], "properties": { "hostXid": { "type": "integer" } } } } }
},
"responses": {
"200": { "description": "Application accepted" }
}
}
},
"/minglaradmin/hosthub/hosts/reject-pq-by-am": {
"patch": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Reject PQQ by AM",
"description": "Reject PQQ by Account Manager",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "type": "object", "required": ["activityId"], "properties": { "activityId": { "type": "integer" } } } } }
},
"responses": {
"200": { "description": "PQQ rejected" }
}
}
},
"/minglaradmin/hosthub/hosts/accept-pq-by-am": {
"patch": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Accept PQ by AM",
"description": "Accept pre-qualification by Account Manager",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "type": "object", "required": ["activityId"], "properties": { "activityId": { "type": "integer" } } } } }
},
"responses": {
"200": { "description": "PQ accepted" }
}
}
},
"/minglaradmin/hosthub/onboarding/reject-host-application": {
"patch": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Reject Host Application",
"description": "Reject a host application by admin (only Minglar Admin)",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "type": "object", "required": ["hostXid"], "properties": { "hostXid": { "type": "integer" } } } } }
},
"responses": {
"200": { "description": "Application rejected" }
}
}
},
"/minglaradmin/hosthub/hosts/reject-host-application-am": {
"patch": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Reject Host Application by AM",
"description": "Reject host application by Account Manager",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "type": "object", "required": ["hostXid"], "properties": { "hostXid": { "type": "integer" }, "title": { "type": "string" }, "comments": { "type": "string" } } } } }
},
"responses": {
"200": { "description": "Application rejected" }
}
}
},
"/minglaradmin/hosthub/hosts/add-Pqq-suggestion": {
"post": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Add PQQ Suggestion",
"description": "Add suggestion for PQQ",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "type": "object", "required": ["title", "comments", "activity_pqq_header_xid"], "properties": { "title": { "type": "string" }, "comments": { "type": "string" }, "activity_pqq_header_xid": { "type": "integer" } } } } }
},
"responses": {
"200": { "description": "Suggestion added" }
}
}
},
"/minglaradmin/hosthub/pqp/pqp-details-for-am/{activityXid}": {
"get": {
"tags": ["Minglar Admin - Host Hub"],
"summary": "Get PQP Details for AM",
"description": "Get pre-qualification profile details for Account Manager",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "activityXid", "in": "path", "required": true, "schema": { "type": "integer" } }
],
"responses": {
"200": { "description": "PQP details retrieved" }
}
}
},
"/minglaradmin/settings/teammates/invite-teammate": {
"post": {
"tags": ["Minglar Admin - Settings"],
"summary": "Invite Teammate",
"description": "Invite a new teammate (co-admin or AM)",
"security": [{ "bearerAuth": [] }],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/InviteTeammateRequest" } } }
},
"responses": {
"200": { "description": "Invitation sent" }
}
}
},
"/minglaradmin/settings/teammates/get-all-invitation-details": {
"get": {
"tags": ["Minglar Admin - Settings"],
"summary": "Get All Invitation Details",
"description": "Get all pending invitations",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Invitations retrieved" }
}
}
},
"/minglaradmin/settings/teammates/get-all-coadmin-am": {
"get": {
"tags": ["Minglar Admin - Settings"],
"summary": "Get All Co-admin and AM",
"description": "Get all co-admins and account managers",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Teammates retrieved" }
}
}
},
"/minglaradmin/settings/teammates/get-all-invited-coadmin-am": {
"get": {
"tags": ["Minglar Admin - Settings"],
"summary": "Get All Invited Co-admin and AM",
"description": "Get all invited co-admins and account managers",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Invited teammates retrieved" }
}
}
},
"/minglaradmin/settings/teammates/get-am-details-by-id/{amXid}": {
"get": {
"tags": ["Minglar Admin - Settings"],
"summary": "Get AM Details by ID",
"description": "Get Account Manager details by ID",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "amXid", "in": "path", "required": true, "schema": { "type": "integer" } }
],
"responses": {
"200": { "description": "AM details retrieved" }
}
}
},
"/prepopulate/get-all-bank-currency-details": {
"get": {
"tags": ["Prepopulate"],
"summary": "Get All Bank and Currency Details",
"description": "Get all bank and currency reference data",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Bank and currency details retrieved" }
}
}
},
"/prepopulate/get-city-by-state": {
"get": {
"tags": ["Prepopulate"],
"summary": "Get Cities by State",
"description": "Get all cities for a given state",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "stateXid", "in": "query", "required": true, "schema": { "type": "integer" } }
],
"responses": {
"200": { "description": "Cities retrieved" }
}
}
},
"/prepopulate/get-branch-by-bank": {
"get": {
"tags": ["Prepopulate"],
"summary": "Get Branches by Bank",
"description": "Get all branches for a given bank",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "name": "bankXid", "in": "query", "required": true, "schema": { "type": "integer" } }
],
"responses": {
"200": { "description": "Branches retrieved" }
}
}
},
"/prepopulate/get-all-doc-country": {
"get": {
"tags": ["Prepopulate"],
"summary": "Get All Document Country State City Details",
"description": "Get all document types with country, state, city data",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Document details retrieved" }
}
}
},
"/prepopulate/get-all-pqq-ques-ans": {
"get": {
"tags": ["Prepopulate"],
"summary": "Get All PQQ Questions and Answers",
"description": "Get all PQQ questions with possible answers",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "PQQ questions retrieved" }
}
}
},
"/prepopulate/get-all-Frequencies": {
"get": {
"tags": ["Prepopulate"],
"summary": "Get All Frequencies",
"description": "Get all activity frequencies",
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "Frequencies retrieved" }
}
}
}
}
}