openapi: "3.1.0" info: title: Api version: "1.0.0" servers: - url: /api paths: /healthz: get: operationId: healthCheck summary: Health check responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /auth/me: get: operationId: getMe summary: Get current session user responses: "200": description: Current user content: application/json: schema: $ref: "#/components/schemas/User" "401": description: Not authenticated content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /auth/login: post: operationId: login summary: Login requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LoginInput" responses: "200": description: Logged in content: application/json: schema: $ref: "#/components/schemas/AuthResult" "401": description: Invalid credentials content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /auth/register: post: operationId: register summary: Register new business account requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RegisterInput" responses: "200": description: Registered and logged in content: application/json: schema: $ref: "#/components/schemas/AuthResult" "400": description: Validation error content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /auth/logout: post: operationId: logout summary: Logout responses: "200": description: Logged out content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /auth/forgot-password: post: operationId: forgotPassword summary: Request a password reset email requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ForgotPasswordInput" responses: "200": description: Reset email sent (always succeeds to prevent enumeration) content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /auth/reset-password: post: operationId: resetPassword summary: Reset password using a token requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ResetPasswordInput" responses: "200": description: Password reset successfully content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" "400": description: Invalid or expired token content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /auth/email: put: operationId: updateEmail summary: Change the authenticated user's email address requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateEmailInput" responses: "200": description: Email updated content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" "400": description: Validation error or email already in use content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "401": description: Not authenticated or wrong current password content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /auth/password: put: operationId: updatePassword summary: Change the authenticated user's password requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdatePasswordInput" responses: "200": description: Password updated content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" "400": description: Validation error content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "401": description: Not authenticated or wrong current password content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /businesses: get: operationId: getBusinesses summary: List approved businesses (public, with filters) parameters: - name: search in: query schema: type: string - name: category in: query schema: type: string - name: brand in: query schema: type: string - name: city in: query schema: type: string - name: featured in: query schema: type: string - name: lat in: query schema: type: string - name: lng in: query schema: type: string - name: radius in: query schema: type: string - name: sort in: query schema: type: string responses: "200": description: List of businesses content: application/json: schema: type: array items: $ref: "#/components/schemas/Business" post: operationId: createBusiness summary: Create a business listing requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/BusinessInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/Business" /businesses/owned: get: operationId: getOwnedBusinesses summary: Get businesses owned by the current user responses: "200": description: Owned businesses content: application/json: schema: type: array items: $ref: "#/components/schemas/Business" /businesses/stats: get: operationId: getBusinessStats summary: Site-wide stats for dashboard responses: "200": description: Stats content: application/json: schema: $ref: "#/components/schemas/BusinessStats" /businesses/{id}: get: operationId: getBusiness summary: Get a single business with photos, coupons, and brands parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Business detail content: application/json: schema: $ref: "#/components/schemas/BusinessDetail" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" put: operationId: updateBusiness summary: Update a business (owner only) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/BusinessUpdate" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" delete: operationId: deleteBusiness summary: Delete a business (admin only) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /businesses/{id}/photos/{photoId}: delete: operationId: deletePhoto summary: Delete a photo from a business parameters: - name: id in: path required: true schema: type: integer - name: photoId in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /businesses/{id}/coupons/{couponId}: delete: operationId: deleteCoupon summary: Delete a coupon from a business parameters: - name: id in: path required: true schema: type: integer - name: couponId in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /businesses/{id}/claim: post: operationId: claimBusiness summary: Initiate a multi-step claim verification for a business listing (requires login, business role) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ClaimInitiateInput" responses: "201": description: Claim initiated content: application/json: schema: $ref: "#/components/schemas/ClaimInitiateResponse" "400": description: Validation error or duplicate active claim content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "429": description: Rate limited or IP flagged content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "404": description: Business not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /businesses/{id}/claim/verify-otp: post: operationId: verifyClaimOtp summary: Submit a 6-digit OTP to verify a business claim parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ClaimOtpInput" responses: "200": description: OTP verified content: application/json: schema: $ref: "#/components/schemas/ClaimOtpResponse" "400": description: Invalid or expired code content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "429": description: OTP locked after too many failures content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /businesses/{id}/claim/upload-document: post: operationId: uploadClaimDocument summary: Upload a supporting document to proceed with a document-path claim parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: multipart/form-data: schema: type: object required: [document] properties: document: type: string format: binary description: Verification document (PDF, JPG, or PNG, max 5 MB) responses: "200": description: Document uploaded, claim moved to manual review content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" "400": description: No active document-path claim found or missing file content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /businesses/owner-contest-claims: get: operationId: getOwnerContestClaims summary: Get PENDING_OWNER_REVIEW claims filed against the current owner's businesses responses: "200": description: List of owner-review claims content: application/json: schema: type: array items: $ref: "#/components/schemas/OwnerContestClaim" /businesses/{id}/claim/owner-decision: post: operationId: respondToClaimAsOwner summary: Current owner approve or contest a PENDING_OWNER_REVIEW claim parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/OwnerClaimDecision" responses: "200": description: Decision recorded content: application/json: schema: $ref: "#/components/schemas/OwnerClaimDecisionResponse" "400": description: Invalid decision value content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "403": description: Not the current owner content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "404": description: No active owner-review claim found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /businesses/{id}/claim/status: get: operationId: getClaimStatus summary: Get the current claim state for the authenticated user on this business parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Current claim status content: application/json: schema: $ref: "#/components/schemas/ClaimStatusResponse" "404": description: No claim found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /admin/pending: get: operationId: getPendingBusinesses summary: Get pending business listings (admin) responses: "200": description: Pending businesses content: application/json: schema: type: array items: $ref: "#/components/schemas/BusinessWithOwner" /admin/businesses: get: operationId: getAllBusinesses summary: Get all businesses (admin) responses: "200": description: All businesses content: application/json: schema: type: array items: $ref: "#/components/schemas/BusinessWithOwner" post: operationId: adminCreateBusiness summary: Admin creates an unclaimed business listing (pre-populates the map) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminBusinessInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/Business" /admin/businesses/{id}/approve: put: operationId: approveBusiness summary: Approve a business listing (admin) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Approved content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /admin/businesses/{id}/reject: put: operationId: rejectBusiness summary: Reject a business listing with reason (admin) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RejectInput" responses: "200": description: Rejected content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /admin/businesses/{id}/feature: put: operationId: toggleFeatureBusiness summary: Toggle featured status (admin) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Toggled content: application/json: schema: $ref: "#/components/schemas/FeatureResult" /admin/claims: get: operationId: getAdminClaims summary: Get all pending claim requests (admin) responses: "200": description: Pending claims content: application/json: schema: type: array items: $ref: "#/components/schemas/ClaimWithDetails" /admin/claims/{id}: patch: operationId: resolveAdminClaim summary: Approve or reject a claim request — rejection requires a reason (admin) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ClaimStatusUpdate" responses: "200": description: Claim resolved content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" "400": description: Missing reason or invalid status content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "404": description: Claim not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /admin/audit-log/business/{businessId}: get: operationId: getAdminAuditLog summary: Get claim audit log entries for a business (admin) parameters: - name: businessId in: path required: true schema: type: integer responses: "200": description: Audit log entries content: application/json: schema: type: array items: $ref: "#/components/schemas/AuditLogEntry" /admin/flagged-ips: get: operationId: getFlaggedIps summary: List all flagged IP addresses (admin) responses: "200": description: Flagged IPs content: application/json: schema: type: array items: $ref: "#/components/schemas/FlaggedIp" /admin/flagged-ips/{id}/clear: patch: operationId: clearFlaggedIp summary: Clear a flagged IP address (admin) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Cleared content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" "404": description: Record not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /admin/banner: get: operationId: getBanner summary: Get banner ad responses: "200": description: Banner ad content: application/json: schema: $ref: "#/components/schemas/BannerAd" /admin/b2b-banner: get: operationId: getB2bBanner summary: Get dashboard banner ad (public) responses: "200": description: Dashboard banner ad content: application/json: schema: $ref: "#/components/schemas/BannerAd" /admin/popup: get: operationId: getAdminPopup summary: Get popup ad (admin view) responses: "200": description: Popup ad content: application/json: schema: $ref: "#/components/schemas/PopupAd" /admin/images: get: operationId: getAdminImages summary: List all uploaded image files with live/unlisted status (admin) responses: "200": description: Image file list content: application/json: schema: type: array items: $ref: "#/components/schemas/StorageImage" /admin/images/bulk-delete: post: operationId: bulkDeleteAdminImages summary: Bulk delete image files from storage (admin) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/BulkDeleteImagesInput" responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /admin/images/{filename}: delete: operationId: deleteAdminImage summary: Delete a single image file from storage; returns 409 if the file is currently live (admin) parameters: - name: filename in: path required: true schema: type: string responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" "409": description: File is currently live — use the force-delete endpoint to override content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /admin/images/{filename}/force-delete: post: operationId: forceDeleteAdminImage summary: Force-delete an image file even if it is currently live (admin; use with caution) parameters: - name: filename in: path required: true schema: type: string responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /categories: get: operationId: getCategories summary: List all product categories (public) responses: "200": description: Categories content: application/json: schema: type: array items: $ref: "#/components/schemas/Category" /admin/categories: post: operationId: createCategory summary: Add a product category (admin) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/NameInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" "409": description: Already exists content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /admin/categories/reorder: put: operationId: reorderCategories summary: Update the display order of product categories (admin) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ReorderInput" responses: "200": description: Reordered content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /admin/categories/{id}: patch: operationId: renameCategory summary: Rename a product category (admin) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/NameInput" responses: "200": description: Renamed content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" delete: operationId: deleteCategory summary: Delete a product category (admin) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /cities: get: operationId: getCities summary: List all cities (public) responses: "200": description: Cities content: application/json: schema: type: array items: $ref: "#/components/schemas/City" /admin/cities: post: operationId: createCity summary: Add a city (admin) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/NameInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" "409": description: Already exists content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /admin/cities/{id}: patch: operationId: renameCity summary: Rename a city (admin) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/NameInput" responses: "200": description: Renamed content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" delete: operationId: deleteCity summary: Delete a city (admin) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /brands: get: operationId: getBrands summary: List approved brands (public) responses: "200": description: Brands content: application/json: schema: type: array items: $ref: "#/components/schemas/Brand" post: operationId: createBrand summary: Add a brand (admin) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/BrandInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /brands/suggest: post: operationId: suggestBrand summary: Suggest a new brand (public — creates pending brand for admin review) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/BrandSuggestInput" responses: "201": description: Suggestion submitted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" "400": description: Validation error content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /brands/{id}: patch: operationId: renameBrand summary: Rename a brand (admin) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/BrandInput" responses: "200": description: Renamed content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" delete: operationId: deleteBrand summary: Delete a brand (admin) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /brands/{id}/feature: put: operationId: toggleFeatureBrand summary: Toggle featured status for a brand (admin) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Toggled content: application/json: schema: $ref: "#/components/schemas/FeatureResult" /admin/brands: get: operationId: getAdminBrands summary: List all brands including pending (admin) responses: "200": description: All brands content: application/json: schema: type: array items: $ref: "#/components/schemas/Brand" /admin/brands/{id}/approve: put: operationId: approveBrand summary: Approve a pending brand (admin) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Approved content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /popup: get: operationId: getPopup summary: Get active popup ad (public) responses: "200": description: Popup ad content: application/json: schema: $ref: "#/components/schemas/PopupAd" components: schemas: HealthStatus: type: object required: [status] properties: status: type: string ErrorResponse: type: object required: [error] properties: error: type: string SuccessResponse: type: object required: [success] properties: success: type: boolean FeatureResult: type: object required: [is_featured] properties: is_featured: type: integer User: type: object required: [id, email, role] properties: id: type: integer email: type: string role: type: string AuthResult: type: object required: [success, userId, role] properties: success: type: boolean userId: type: integer role: type: string LoginInput: type: object required: [email, password] properties: email: type: string password: type: string ForgotPasswordInput: type: object required: [email] properties: email: type: string ResetPasswordInput: type: object required: [token, newPassword] properties: token: type: string newPassword: type: string UpdateEmailInput: type: object required: [currentPassword, newEmail] properties: currentPassword: type: string newEmail: type: string UpdatePasswordInput: type: object required: [currentPassword, newPassword] properties: currentPassword: type: string newPassword: type: string RegisterInput: type: object required: [email, password] properties: email: type: string password: type: string Category: type: object required: [id, name] properties: id: type: integer name: type: string City: type: object required: [id, name] properties: id: type: integer name: type: string NameInput: type: object required: [name] properties: name: type: string ReorderInput: type: object required: [ids] properties: ids: type: array items: type: integer Brand: type: object required: [id, name, is_featured, status] properties: id: type: integer name: type: string is_featured: type: integer status: type: string BrandInput: type: object required: [name] properties: name: type: string BrandSuggestInput: type: object required: [name] properties: name: type: string Photo: type: object required: [id, business_id, photo_path, display_order] properties: id: type: integer business_id: type: integer photo_path: type: string display_order: type: integer Coupon: type: object required: [id, business_id, image_path] properties: id: type: integer business_id: type: integer image_path: type: string title: type: ["string", "null"] Business: type: object required: [id, name, address, status, is_featured, created_at] properties: id: type: integer owner_id: type: ["integer", "null"] name: type: string address: type: string lat: type: ["number", "null"] lng: type: ["number", "null"] phone: type: ["string", "null"] website: type: ["string", "null"] hours: type: ["string", "null"] description: type: ["string", "null"] logo_path: type: ["string", "null"] status: type: string rejection_reason: type: ["string", "null"] is_featured: type: integer created_at: type: string instagram: type: ["string", "null"] facebook: type: ["string", "null"] google_reviews_url: type: ["string", "null"] categories: type: array items: type: string brands: type: array items: $ref: "#/components/schemas/Brand" BusinessDetail: type: object required: [id, name, address, status, is_featured, created_at, photos, coupons, brands, categories] properties: id: type: integer owner_id: type: ["integer", "null"] name: type: string address: type: string street: type: ["string", "null"] city: type: ["string", "null"] state: type: ["string", "null"] zip: type: ["string", "null"] lat: type: ["number", "null"] lng: type: ["number", "null"] phone: type: ["string", "null"] email: type: ["string", "null"] website: type: ["string", "null"] hours: type: ["string", "null"] hours_json: type: ["string", "null"] description: type: ["string", "null"] logo_path: type: ["string", "null"] status: type: string rejection_reason: type: ["string", "null"] is_featured: type: integer created_at: type: string instagram: type: ["string", "null"] facebook: type: ["string", "null"] google_reviews_url: type: ["string", "null"] categories: type: array items: type: string photos: type: array items: $ref: "#/components/schemas/Photo" coupons: type: array items: $ref: "#/components/schemas/Coupon" brands: type: array items: $ref: "#/components/schemas/Brand" BusinessWithOwner: type: object required: [id, name, address, status, is_featured, created_at, owner_email] properties: id: type: integer owner_id: type: ["integer", "null"] name: type: string address: type: string lat: type: ["number", "null"] lng: type: ["number", "null"] phone: type: ["string", "null"] website: type: ["string", "null"] hours: type: ["string", "null"] description: type: ["string", "null"] logo_path: type: ["string", "null"] status: type: string rejection_reason: type: ["string", "null"] is_featured: type: integer created_at: type: string owner_email: type: ["string", "null"] BusinessInput: type: object required: [name] properties: name: type: string address: type: string street: type: string city: type: string state: type: string zip: type: string phone: type: string email: type: string website: type: string hours: type: string hours_json: type: string description: type: string instagram: type: string facebook: type: string google_reviews_url: type: string categories: type: array items: type: string brand_ids: type: array items: type: integer owner_authorized: type: boolean description: Must be true — confirms the submitter is the owner or authorized representative AdminBusinessInput: type: object required: [name] properties: name: type: string address: type: string street: type: string city: type: string state: type: string zip: type: string phone: type: string email: type: string website: type: string hours_json: type: string description: type: string instagram: type: string facebook: type: string google_reviews_url: type: string categories: type: array items: type: string brand_ids: type: array items: type: integer on_site_smoking_area: type: boolean BusinessUpdate: type: object properties: name: type: string address: type: string street: type: string city: type: string state: type: string zip: type: string phone: type: string email: type: string website: type: string hours: type: string hours_json: type: string description: type: string instagram: type: string facebook: type: string google_reviews_url: type: string categories: type: array items: type: string brand_ids: type: array items: type: integer RejectInput: type: object properties: reason: type: string OwnerContestClaim: type: object properties: id: type: integer businessId: type: integer businessName: type: string nullable: true claimantEmail: type: string nullable: true contestDeadline: type: string format: date-time nullable: true createdAt: type: string format: date-time OwnerClaimDecision: type: object required: [decision] properties: decision: type: string enum: [approve, contest] OwnerClaimDecisionResponse: type: object properties: success: type: boolean status: type: string ClaimInitiateInput: type: object required: [email] properties: email: type: string phone: type: string ClaimInitiateResponse: type: object required: [success, claimId, method] properties: success: type: boolean claimId: type: integer method: type: string enum: [otp, document] ClaimOtpInput: type: object required: [code] properties: code: type: string ClaimOtpResponse: type: object required: [success, status] properties: success: type: boolean status: type: string message: type: string ClaimStatusResponse: type: object required: [id, status] properties: id: type: integer status: type: string method: type: ["string", "null"] otp_locked: type: boolean otp_locked_until: type: ["string", "null"] otp_expires_at: type: ["string", "null"] contest_deadline: type: ["string", "null"] claimant_email: type: ["string", "null"] AuditLogEntry: type: object required: [id, action_type, timestamp] properties: id: type: integer claim_id: type: ["integer", "null"] actor_user_id: type: ["integer", "null"] client_ip: type: ["string", "null"] timestamp: type: string action_type: type: string metadata: type: ["string", "null"] FlaggedIp: type: object required: [id, ip, flagged_reason, flagged_at] properties: id: type: integer ip: type: string flagged_reason: type: string flagged_at: type: string cleared_at: type: ["string", "null"] cleared_by_user_id: type: ["integer", "null"] ClaimWithDetails: type: object required: [id, business_id, business_name, user_id, user_email, status, created_at] properties: id: type: integer business_id: type: integer business_name: type: string user_id: type: integer user_email: type: string status: type: string created_at: type: string claimant_email: type: ["string", "null"] verification_method: type: ["string", "null"] document_path: type: ["string", "null"] contest_deadline: type: ["string", "null"] otp_attempts: type: integer otp_locked_until: type: ["string", "null"] rejection_reason: type: ["string", "null"] ClaimStatusUpdate: type: object required: [status] properties: status: type: string reason: type: string BannerAd: type: object required: [id] properties: id: type: integer image_path: type: ["string", "null"] mobile_image_path: type: ["string", "null"] link_url: type: ["string", "null"] mobile_link_url: type: ["string", "null"] link_opens_new_tab: type: integer brand_filter: type: ["string", "null"] PopupAd: type: object required: [id, is_active] properties: id: type: integer image_path: type: ["string", "null"] mobile_image_path: type: ["string", "null"] link_url: type: ["string", "null"] mobile_link_url: type: ["string", "null"] is_active: type: integer link_opens_new_tab: type: integer brand_filter: type: ["string", "null"] StorageImage: type: object required: [filename, size, last_modified, live, contexts] properties: filename: type: string size: type: integer last_modified: type: string live: type: boolean contexts: type: array items: type: string BulkDeleteImagesInput: type: object required: [filenames] properties: filenames: type: array items: type: string BusinessStats: type: object required: [total, featured, pending, categories, brandCount] properties: total: type: integer featured: type: integer pending: type: integer brandCount: type: integer categories: type: array items: type: object required: [name, count] properties: name: type: string count: type: integer