{
    "openapi": "3.0.0",
    "info": {
        "title": "Contractor for Industry Backend API",
        "version": "1.0.0",
        "description": "Comprehensive API documentation for Contractor for Industry Backend - A platform connecting contractors and manufacturers in the industry",
        "contact": {
            "name": "API Support",
            "email": "support@contractor4industry.com"
        }
    },
    "servers": [
        {
            "url": "http://localhost:6969/api",
            "description": "Development server"
        },
        {
            "url": "https://api.contractor4industry.com/api",
            "description": "Production server"
        }
    ],
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "JWT"
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": false
                    },
                    "message": {
                        "type": "string",
                        "example": "Error message"
                    },
                    "error": {
                        "type": "string",
                        "example": "Detailed error information"
                    }
                }
            },
            "Success": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": true
                    },
                    "message": {
                        "type": "string",
                        "example": "Success message"
                    },
                    "data": {
                        "type": "object"
                    }
                }
            },
            "RegisterRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "example": "user@example.com"
                    },
                    "password": {
                        "type": "string",
                        "minLength": 6,
                        "example": "password123"
                    },
                    "userType": {
                        "type": "string",
                        "enum": [
                            "manufacturer",
                            "contractor"
                        ],
                        "example": "contractor"
                    }
                },
                "required": [
                    "email",
                    "password",
                    "userType"
                ]
            },
            "LoginRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "example": "user@example.com"
                    },
                    "password": {
                        "type": "string",
                        "example": "password123"
                    }
                },
                "required": [
                    "email",
                    "password"
                ]
            },
            "VerifyOtpRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "example": "user@example.com"
                    },
                    "otp": {
                        "type": "string",
                        "example": "123456"
                    }
                },
                "required": [
                    "email",
                    "otp"
                ]
            },
            "ChangePasswordRequest": {
                "type": "object",
                "properties": {
                    "currentPassword": {
                        "type": "string",
                        "example": "oldpassword123"
                    },
                    "newPassword": {
                        "type": "string",
                        "minLength": 6,
                        "example": "newpassword123"
                    }
                },
                "required": [
                    "currentPassword",
                    "newPassword"
                ]
            },
            "ForgetPasswordRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "example": "user@example.com"
                    }
                },
                "required": [
                    "email"
                ]
            },
            "BoostProjectRequest": {
                "type": "object",
                "properties": {
                    "BoostTitle": {
                        "type": "string",
                        "example": "My Boost Project"
                    },
                    "BoostDescription": {
                        "type": "string",
                        "example": "Description of the boost project"
                    },
                    "projectType": {
                        "type": "string",
                        "enum": [
                            "admin",
                            "contractor"
                        ],
                        "example": "contractor"
                    },
                    "couponCode": {
                        "type": "string",
                        "example": "DISCOUNT10"
                    }
                },
                "required": [
                    "BoostTitle",
                    "BoostDescription",
                    "projectType"
                ]
            },
            "ReferralCodeRequest": {
                "type": "object",
                "properties": {
                    "referralCode": {
                        "type": "string",
                        "example": "REF123"
                    }
                },
                "required": [
                    "referralCode"
                ]
            },
            "CampaignRequest": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "example": "SUMMER2024"
                    },
                    "discountConfig": {
                        "type": "object",
                        "properties": {
                            "amount": {
                                "type": "number",
                                "example": 10,
                                "description": "Percentage discount amount (1-100)"
                            },
                            "currency": {
                                "type": "string",
                                "example": "gbp",
                                "description": "Currency code (always gbp for now)"
                            },
                            "minimumPoints": {
                                "type": "number",
                                "example": 0,
                                "description": "Minimum points required (always 0)"
                            }
                        },
                        "description": "Discount configuration - type is always 'percentage' and duration is always 'forever'"
                    },
                    "campaign": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string",
                                "example": "Summer Referral Campaign"
                            },
                            "description": {
                                "type": "string",
                                "example": "Get 10% discount when you sign up with this referral code"
                            },
                            "campaignType": {
                                "type": "string",
                                "enum": [
                                    "subscription"
                                ],
                                "example": "subscription"
                            },
                            "startDate": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-06-01T00:00:00Z"
                            },
                            "endDate": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-08-31T23:59:59Z"
                            }
                        }
                    },
                    "status": {
                        "type": "object",
                        "properties": {
                            "isActive": {
                                "type": "boolean",
                                "example": true
                            },
                            "discountActive": {
                                "type": "boolean",
                                "example": true
                            },
                            "inviteLinkActive": {
                                "type": "boolean",
                                "example": true
                            }
                        }
                    }
                },
                "required": [
                    "code"
                ]
            },
            "CampaignStatusToggleRequest": {
                "type": "object",
                "properties": {
                    "statusType": {
                        "type": "string",
                        "enum": [
                            "isActive",
                            "discountActive",
                            "inviteLinkActive"
                        ],
                        "example": "isActive"
                    },
                    "isActive": {
                        "type": "boolean",
                        "example": true
                    }
                },
                "required": [
                    "statusType",
                    "isActive"
                ]
            },
            "BulkCampaignToggleRequest": {
                "type": "object",
                "properties": {
                    "campaignIds": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "example": [
                            "60f7b3b3b3b3b3b3b3b3b3b3",
                            "60f7b3b3b3b3b3b3b3b3b3b4"
                        ]
                    },
                    "statusType": {
                        "type": "string",
                        "enum": [
                            "isActive",
                            "discountActive",
                            "inviteLinkActive"
                        ],
                        "example": "isActive"
                    },
                    "isActive": {
                        "type": "boolean",
                        "example": true
                    }
                },
                "required": [
                    "campaignIds",
                    "statusType",
                    "isActive"
                ]
            },
            "AssignReferralCodeRequest": {
                "type": "object",
                "properties": {
                    "contractorId": {
                        "type": "string",
                        "example": "60f7b3b3b3b3b3b3b3b3b3b3"
                    },
                    "code": {
                        "type": "string",
                        "example": "CONTRACTOR123"
                    },
                    "discountConfig": {
                        "type": "object",
                        "properties": {
                            "amount": {
                                "type": "number",
                                "example": 15,
                                "description": "Percentage discount amount (1-100)"
                            },
                            "currency": {
                                "type": "string",
                                "example": "gbp",
                                "description": "Currency code (always gbp for now)"
                            }
                        },
                        "description": "Discount configuration - type is always 'percentage' and duration is always 'forever'"
                    },
                    "campaign": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string",
                                "example": "Contractor Referral Program"
                            },
                            "description": {
                                "type": "string",
                                "example": "Special referral program for contractors"
                            },
                            "campaignType": {
                                "type": "string",
                                "enum": [
                                    "subscription"
                                ],
                                "example": "subscription"
                            }
                        }
                    }
                },
                "required": [
                    "contractorId",
                    "code"
                ]
            },
            "GenerateCodeRequest": {
                "type": "object",
                "properties": {
                    "prefix": {
                        "type": "string",
                        "example": "REF"
                    },
                    "length": {
                        "type": "number",
                        "example": 8
                    }
                }
            },
            "QuoteRequest": {
                "type": "object",
                "properties": {
                    "projectTitle": {
                        "type": "string",
                        "example": "Office Renovation"
                    },
                    "projectDescription": {
                        "type": "string",
                        "example": "Complete office renovation project"
                    },
                    "budget": {
                        "type": "number",
                        "example": 50000
                    },
                    "timeline": {
                        "type": "string",
                        "example": "3 months"
                    },
                    "contractorId": {
                        "type": "string",
                        "example": "60f7b3b3b3b3b3b3b3b3b3b3"
                    }
                },
                "required": [
                    "projectTitle",
                    "projectDescription",
                    "budget",
                    "timeline",
                    "contractorId"
                ]
            },
            "CategoryRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "example": "Construction"
                    },
                    "description": {
                        "type": "string",
                        "example": "Construction services"
                    }
                },
                "required": [
                    "name"
                ]
            },
            "IndustryRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "example": "Manufacturing"
                    },
                    "description": {
                        "type": "string",
                        "example": "Manufacturing industry"
                    }
                },
                "required": [
                    "name"
                ]
            },
            "AdRequest": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "example": "Premium Construction Services"
                    },
                    "description": {
                        "type": "string",
                        "example": "High-quality construction services"
                    },
                    "link": {
                        "type": "string",
                        "format": "uri",
                        "example": "https://example.com"
                    }
                },
                "required": [
                    "title",
                    "description"
                ]
            }
        }
    },
    "paths": {
        "/auth/register": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Register a new user",
                "description": "Register a new contractor or manufacturer account (Raw JSON)",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RegisterRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "User registered successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/login": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Login user",
                "description": "Authenticate user and return JWT token (Raw JSON)",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/LoginRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Login successful",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/verify-otp": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Verify OTP",
                "description": "Verify OTP code sent to user's email (Raw JSON)",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/VerifyOtpRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OTP verified successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid OTP",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/resend-otp": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Resend OTP",
                "description": "Resend OTP code to user's email (Raw JSON)",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "user@example.com"
                                    }
                                },
                                "required": [
                                    "email"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OTP resent successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/change-passowrd": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Change password",
                "description": "Change user password (Raw JSON)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ChangePasswordRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Password changed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/forget-password": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Forget password",
                "description": "Send password reset email (Raw JSON)",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ForgetPasswordRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Password reset email sent",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/change-email": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Change email",
                "description": "Change user email address",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Email change request sent",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/change-notification-status": {
            "get": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Toggle notification status",
                "description": "Toggle user notification preferences",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Notification status updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/logout": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Logout user",
                "description": "Logout user and invalidate token",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Logged out successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/manufacturer/create-profile": {
            "post": {
                "tags": [
                    "Authentication",
                    "Manufacturer"
                ],
                "summary": "Create manufacturer profile",
                "description": "Create manufacturer profile with image upload (Form Data)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "companyName": {
                                        "type": "string",
                                        "example": "ABC Manufacturing"
                                    },
                                    "profilePicture": {
                                        "type": "string",
                                        "format": "binary"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Manufacturer profile created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/get-manufacturer-profile": {
            "get": {
                "tags": [
                    "Authentication",
                    "Manufacturer"
                ],
                "summary": "Get manufacturer profile",
                "description": "Get current manufacturer profile",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Manufacturer profile retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/boost/": {
            "post": {
                "tags": [
                    "Boost Projects"
                ],
                "summary": "Create boost project",
                "description": "Create a new boost project with image uploads (Form Data)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "BoostTitle": {
                                        "type": "string",
                                        "example": "My Boost Project"
                                    },
                                    "BoostDescription": {
                                        "type": "string",
                                        "example": "Description of the boost project"
                                    },
                                    "projectType": {
                                        "type": "string",
                                        "enum": [
                                            "admin",
                                            "contractor"
                                        ],
                                        "example": "contractor"
                                    },
                                    "couponCode": {
                                        "type": "string",
                                        "example": "DISCOUNT10"
                                    },
                                    "boostImages": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "binary"
                                        },
                                        "maxItems": 10
                                    }
                                },
                                "required": [
                                    "BoostTitle",
                                    "BoostDescription",
                                    "projectType"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Boost project created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Boost Projects"
                ],
                "summary": "Get all boost projects",
                "description": "Get all boost projects for the authenticated user",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Boost projects retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/boost/validate-referral": {
            "post": {
                "tags": [
                    "Boost Projects"
                ],
                "summary": "Validate referral code for boost",
                "description": "Validate referral code and calculate discount for boost project (Raw JSON)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ReferralCodeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Referral code validated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/boost/change-status/{id}": {
            "post": {
                "tags": [
                    "Boost Projects"
                ],
                "summary": "Change boost project status",
                "description": "Approve or disapprove boost project (Admin only)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Boost project ID"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Boost project status updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/boost/success": {
            "post": {
                "tags": [
                    "Boost Projects"
                ],
                "summary": "Handle boost payment success",
                "description": "Process successful boost payment and activate project (Raw JSON)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "session_id": {
                                        "type": "string",
                                        "example": "cs_test_123456789"
                                    }
                                },
                                "required": [
                                    "session_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Boost payment processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/boost/{id}": {
            "get": {
                "tags": [
                    "Boost Projects"
                ],
                "summary": "Get single boost project",
                "description": "Get details of a specific boost project",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Boost project ID"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Boost project retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "Boost Projects"
                ],
                "summary": "Update boost project",
                "description": "Update boost project details and images (Form Data)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Boost project ID"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "BoostTitle": {
                                        "type": "string",
                                        "example": "My Boost Project"
                                    },
                                    "BoostDescription": {
                                        "type": "string",
                                        "example": "Description of the boost project"
                                    },
                                    "projectType": {
                                        "type": "string",
                                        "enum": [
                                            "admin",
                                            "contractor"
                                        ],
                                        "example": "contractor"
                                    },
                                    "couponCode": {
                                        "type": "string",
                                        "example": "DISCOUNT10"
                                    },
                                    "boostImages": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "binary"
                                        },
                                        "maxItems": 10
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Boost project updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Boost Projects"
                ],
                "summary": "Delete boost project",
                "description": "Delete a boost project",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Boost project ID"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Boost project deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/boost/manufacturer": {
            "get": {
                "tags": [
                    "Boost Projects"
                ],
                "summary": "Get all boost projects for manufacturer",
                "description": "Get all boost projects visible to manufacturers",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Boost projects retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contractor/filter": {
            "get": {
                "tags": [
                    "Contractor Profile"
                ],
                "summary": "Filter contractors",
                "description": "Filter contractors based on various criteria",
                "parameters": [
                    {
                        "name": "industry",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Filter by industry"
                    },
                    {
                        "name": "trade",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Filter by trade"
                    },
                    {
                        "name": "location",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Filter by location"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Contractors filtered successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contractor/create-profile": {
            "post": {
                "tags": [
                    "Contractor Profile"
                ],
                "summary": "Create contractor profile",
                "description": "Create contractor profile with multiple image uploads (Form Data)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "companyName": {
                                        "type": "string",
                                        "example": "ABC Construction"
                                    },
                                    "profilePicture": {
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "coverPicture": {
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "portfolio": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "binary"
                                        },
                                        "maxItems": 10
                                    },
                                    "business": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "binary"
                                        },
                                        "maxItems": 10
                                    },
                                    "qualifications": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "binary"
                                        },
                                        "maxItems": 10
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Contractor profile created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/quotes/request-quote": {
            "post": {
                "tags": [
                    "Quotes"
                ],
                "summary": "Send quote request",
                "description": "Send a quote request to contractors (Raw JSON)",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/QuoteRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Quote request sent successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/quotes/request-quote/{id}": {
            "post": {
                "tags": [
                    "Quotes"
                ],
                "summary": "Update quote request",
                "description": "Update an existing quote request (Raw JSON)",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Quote request ID"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/QuoteRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Quote request updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/quotes/respond-quote/{id}": {
            "post": {
                "tags": [
                    "Quotes"
                ],
                "summary": "Respond to quote request",
                "description": "Contractor responds to a quote request",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Quote request ID"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Quote response submitted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/quotes/": {
            "post": {
                "tags": [
                    "Quotes"
                ],
                "summary": "Get all manufacturer quotes",
                "description": "Get all quotes for manufacturers",
                "responses": {
                    "200": {
                        "description": "Quotes retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Quotes"
                ],
                "summary": "Get all contractor quotes",
                "description": "Get all quotes for contractors",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Quotes retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/quotes/{id}": {
            "get": {
                "tags": [
                    "Quotes"
                ],
                "summary": "Get quote by ID",
                "description": "Get details of a specific quote",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Quote ID"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Quote retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/ads/get-all": {
            "get": {
                "tags": [
                    "Ads"
                ],
                "summary": "Get all ads",
                "description": "Get all active advertisements",
                "responses": {
                    "200": {
                        "description": "Ads retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/ads/create": {
            "post": {
                "tags": [
                    "Ads"
                ],
                "summary": "Create advertisement",
                "description": "Create a new advertisement (Form Data)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "Premium Construction Services"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "High-quality construction services"
                                    },
                                    "link": {
                                        "type": "string",
                                        "format": "uri",
                                        "example": "https://example.com"
                                    },
                                    "image": {
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "required": [
                                    "title",
                                    "description"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Advertisement created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/ads/admin": {
            "get": {
                "tags": [
                    "Ads"
                ],
                "summary": "Get all ads (Admin)",
                "description": "Get all advertisements for admin management",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Ads retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/ads/contractor": {
            "get": {
                "tags": [
                    "Ads"
                ],
                "summary": "Get contractor ads",
                "description": "Get advertisements created by contractor",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Contractor ads retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/category/create": {
            "post": {
                "tags": [
                    "Categories"
                ],
                "summary": "Create category",
                "description": "Create a new service category (Form Data)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Construction"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "Construction services"
                                    },
                                    "image": {
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Category created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/category/": {
            "get": {
                "tags": [
                    "Categories"
                ],
                "summary": "Get all categories",
                "description": "Get all categories and subcategories",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Categories retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/industry/": {
            "post": {
                "tags": [
                    "Industries"
                ],
                "summary": "Create industry",
                "description": "Create a new industry (Form Data)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Manufacturing"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "Manufacturing industry"
                                    },
                                    "image": {
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Industry created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Industries"
                ],
                "summary": "Get all industries",
                "description": "Get all industries",
                "responses": {
                    "200": {
                        "description": "Industries retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/subscription/checkout": {
            "post": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Create subscription checkout",
                "description": "Create Stripe checkout session for subscription",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Checkout session created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/subscription/status": {
            "get": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Check subscription status",
                "description": "Check current subscription status",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Subscription status retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/subscription/packages": {
            "get": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Get subscription packages",
                "description": "Get all available subscription packages",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Packages retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/referel/generate": {
            "post": {
                "tags": [
                    "Referrals"
                ],
                "summary": "Generate referral code",
                "description": "Generate a new referral code for contractor",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Referral code generated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/referel/join": {
            "post": {
                "tags": [
                    "Referrals"
                ],
                "summary": "Join with referral code",
                "description": "Join using a referral code (Raw JSON)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "referralCode": {
                                        "type": "string",
                                        "example": "REF123"
                                    }
                                },
                                "required": [
                                    "referralCode"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successfully joined with referral code",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/referral-settings/toggle": {
            "post": {
                "tags": [
                    "Referral Settings"
                ],
                "summary": "Toggle referral system",
                "description": "Toggle referral system on/off and send email notifications to all contractors (Admin only) (Raw JSON)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "isActive": {
                                        "type": "boolean",
                                        "example": true,
                                        "description": "Whether to activate or deactivate the referral system"
                                    }
                                },
                                "required": [
                                    "isActive"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Referral system status updated successfully and email notifications sent",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/referral-settings/": {
            "get": {
                "tags": [
                    "Referral Settings"
                ],
                "summary": "Get referral settings",
                "description": "Get current referral system settings",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Referral settings retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/referel/user-campaigns": {
            "get": {
                "tags": [
                    "Campaigns"
                ],
                "summary": "Get user campaigns",
                "description": "Get referral campaigns for the authenticated user",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "User campaigns retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/admin/referral/campaigns": {
            "post": {
                "tags": [
                    "Campaigns",
                    "Admin"
                ],
                "summary": "Create referral campaign",
                "description": "Create a new referral campaign with Stripe coupon integration (Admin only) (Raw JSON). Requires Stripe to be configured. All campaigns are percentage-based with forever duration.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CampaignRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Campaign created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request or Stripe not configured",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Campaign code already exists",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Stripe coupon creation failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Campaigns",
                    "Admin"
                ],
                "summary": "Get all campaigns",
                "description": "Get all referral campaigns with pagination and filtering (Admin only)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 1
                        },
                        "description": "Page number"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 10
                        },
                        "description": "Items per page"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "active",
                                "inactive"
                            ]
                        },
                        "description": "Filter by campaign status"
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Search by campaign code or name"
                    },
                    {
                        "name": "sortBy",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "default": "createdAt"
                        },
                        "description": "Sort field"
                    },
                    {
                        "name": "sortOrder",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "default": "desc"
                        },
                        "description": "Sort order"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Campaigns retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/admin/referral/campaigns/{id}": {
            "get": {
                "tags": [
                    "Campaigns",
                    "Admin"
                ],
                "summary": "Get campaign by ID",
                "description": "Get details of a specific referral campaign (Admin only)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Campaign ID"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Campaign retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Campaign not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "Campaigns",
                    "Admin"
                ],
                "summary": "Update campaign",
                "description": "Update an existing referral campaign with Stripe coupon synchronization (Admin only) (Raw JSON). Updates corresponding Stripe coupon automatically. All campaigns remain percentage-based with forever duration.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Campaign ID"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CampaignRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Campaign updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Campaign not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Campaigns",
                    "Admin"
                ],
                "summary": "Delete campaign",
                "description": "Delete a referral campaign (Admin only)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Campaign ID"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Campaign deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Campaign not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/admin/referral/campaigns/{id}/toggle-status": {
            "patch": {
                "tags": [
                    "Campaigns",
                    "Admin"
                ],
                "summary": "Toggle campaign status",
                "description": "Toggle specific status of a campaign (Admin only) (Raw JSON)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Campaign ID"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CampaignStatusToggleRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Campaign status updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid status type",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Campaign not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/admin/referral/campaigns/bulk-toggle": {
            "patch": {
                "tags": [
                    "Campaigns",
                    "Admin"
                ],
                "summary": "Bulk toggle campaigns",
                "description": "Toggle status for multiple campaigns at once (Admin only) (Raw JSON)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BulkCampaignToggleRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Bulk campaign status updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request data",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/admin/referral/campaigns/{id}/analytics": {
            "get": {
                "tags": [
                    "Campaigns",
                    "Admin",
                    "Analytics"
                ],
                "summary": "Get campaign analytics",
                "description": "Get detailed analytics for a specific campaign (Admin only)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Campaign ID"
                    },
                    {
                        "name": "startDate",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        },
                        "description": "Start date for analytics filter"
                    },
                    {
                        "name": "endDate",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        },
                        "description": "End date for analytics filter"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Campaign analytics retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Campaign not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/admin/referral/generate-code": {
            "post": {
                "tags": [
                    "Campaigns",
                    "Admin"
                ],
                "summary": "Generate unique referral code",
                "description": "Generate a unique referral code (Admin only) (Raw JSON)",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/GenerateCodeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Unique code generated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/admin/referral/assign-to-contractor": {
            "post": {
                "tags": [
                    "Campaigns",
                    "Admin"
                ],
                "summary": "Assign referral code to contractor",
                "description": "Assign a referral code directly to a contractor with Stripe coupon integration (Admin only) (Raw JSON). Requires Stripe to be configured. All codes are percentage-based with forever duration and unlimited uses.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AssignReferralCodeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Referral code assigned successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request or Stripe not configured",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Contractor not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Code already exists or contractor already has a code",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Stripe coupon creation failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "tags": [
        {
            "name": "Authentication",
            "description": "User authentication and account management"
        },
        {
            "name": "Boost Projects",
            "description": "Boost project management and promotion"
        },
        {
            "name": "Contractor Profile",
            "description": "Contractor profile management"
        },
        {
            "name": "Manufacturer",
            "description": "Manufacturer specific operations"
        },
        {
            "name": "Quotes",
            "description": "Quote request and response management"
        },
        {
            "name": "Ads",
            "description": "Advertisement management"
        },
        {
            "name": "Categories",
            "description": "Service category management"
        },
        {
            "name": "Industries",
            "description": "Industry management"
        },
        {
            "name": "Subscriptions",
            "description": "Subscription and payment management"
        },
        {
            "name": "Referrals",
            "description": "Referral system management"
        },
        {
            "name": "Referral Settings",
            "description": "Referral system configuration"
        },
        {
            "name": "Campaigns",
            "description": "Referral campaign management and analytics"
        },
        {
            "name": "Admin",
            "description": "Administrative operations"
        },
        {
            "name": "Analytics",
            "description": "Analytics and reporting"
        }
    ]
}