{"openapi":"3.0.0","info":{"title":"BOM.ASIA API Documentation","version":"2.0.0","description":"Complete API documentation for BOM.ASIA services including ZNS and Mobile Topup","contact":{"name":"API Support","email":"api@bom.asia","url":"https:\/\/bom.asia"},"license":{"name":"Proprietary"}},"servers":[{"url":"https:\/\/bom.asia","description":"Production server"},{"url":"https:\/\/staging.bom.asia","description":"Staging server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT Bearer token obtained from \/api\/v2\/auth\/login endpoint"},"SecretKeyAuth":{"type":"apiKey","in":"header","name":"X-Secret-Key","description":"API Secret Key for initial authentication (format: sk_live_...)"}},"schemas":{"Error":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"code":{"type":"string","example":"INVALID_REQUEST"},"message":{"type":"string","example":"Invalid request parameters"}}}}},"AuthResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"access_token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"refresh_token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"token_type":{"type":"string","example":"Bearer"},"expires_in":{"type":"integer","example":3600},"guard":{"type":"string","example":"customer-api"}}}}},"ZNSTemplate":{"type":"object","properties":{"id":{"type":"integer","example":5},"template_id":{"type":"string","example":"495802"},"template_name":{"type":"string","example":"OPT AZMARINE"},"template_content":{"type":"string","example":"M\u00e3 x\u00e1c th\u1ef1c c\u1ee7a b\u1ea1n l\u00e0 {{otp}}"},"list_params":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"otp"},"type":{"type":"string","example":"text"},"required":{"type":"boolean","example":true},"max_length":{"type":"integer","example":10}}}},"price":{"type":"string","example":"350.01"},"status":{"type":"string","example":"active"}}},"ZNSSendResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"msg_id":{"type":"string","example":"0d6a10ada6f933a16aee"},"phone":{"type":"string","example":"0938474356"},"status":{"type":"string","example":"sent"},"price":{"type":"number","example":350.01},"balance":{"type":"number","example":1835989.92,"nullable":true}}}}},"ZNSHistoryItem":{"type":"object","properties":{"id":{"type":"integer","example":9},"source":{"type":"string","enum":["api","web","admin","campaign","system"],"example":"api","description":"Source of message: api (from API), web (from customer portal), admin (from admin panel), campaign (from campaign system), system (automated)"},"phone":{"type":"string","example":"0938474356"},"template_id":{"type":"string","example":"495802"},"status":{"type":"string","enum":["pending","sent","delivered","failed"],"example":"sent"},"msg_id":{"type":"string","example":"0d6a10ada6f933a16aee","nullable":true},"error_message":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time","example":"2025-10-18T09:06:22.000000Z"}}},"ZNSHistoryResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ZNSHistoryItem"}},"pagination":{"type":"object","properties":{"total":{"type":"integer","example":8},"per_page":{"type":"integer","example":50},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":1}}}}},"ZNSAnalyticsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"stats":{"type":"object","properties":{"total_sent":{"type":"integer","example":150},"success":{"type":"integer","example":145},"failed":{"type":"integer","example":5},"pending":{"type":"integer","example":0},"by_source":{"type":"object","properties":{"api":{"type":"integer","example":80,"description":"Messages sent via API"},"web":{"type":"integer","example":50,"description":"Messages sent from customer portal"},"admin":{"type":"integer","example":15,"description":"Messages sent from admin panel"},"campaign":{"type":"integer","example":5,"description":"Messages sent from campaigns"}},"description":"Breakdown of messages by source"}}},"messages_per_day":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2025-10-18"},"count":{"type":"integer","example":25}}}}}}}},"TopupMobileResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"tracking_id":{"type":"string","example":"BOM_SINGLE_11_1762165525_6440","description":"Transaction tracking ID for customer support"},"phone":{"type":"string","example":"0938474356","description":"Phone number that was topped up"},"amount":{"type":"integer","example":10000,"description":"Topup amount in VND"},"carrier":{"type":"string","example":"mobifone","description":"Mobile carrier"},"status":{"type":"string","example":"success","enum":["success","failed"],"description":"Transaction status"},"balance_remaining":{"type":"string","example":"80000.00","description":"Customer wallet balance after transaction"},"invoice_number":{"type":"string","example":"INV-202511-0008","description":"Invoice number for this transaction"},"created_at":{"type":"string","format":"date-time","example":"2025-11-03 17:25:25","description":"Transaction timestamp"}}}}},"TopupBalanceResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"balance":{"type":"string","example":"80000.00","description":"Current wallet balance"},"formatted_balance":{"type":"string","example":"80.000 VND","description":"Formatted balance for display"},"currency":{"type":"string","example":"VND","description":"Currency code"}}}}},"TopupHistoryItem":{"type":"object","properties":{"id":{"type":"integer","example":117},"tracking_id":{"type":"string","example":"BOM_SINGLE_11_1762165525_6440"},"phone":{"type":"string","example":"0938474356"},"phone_network":{"type":"string","example":"mobifone"},"amount":{"type":"integer","example":10000},"status":{"type":"integer","example":2,"enum":[1,2,3],"description":"1=pending, 2=success, 3=failed"},"error_message":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time","example":"2025-11-03T17:25:25.000000Z"},"completed_at":{"type":"string","format":"date-time","nullable":true}}},"TopupHistoryResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TopupHistoryItem"}},"pagination":{"type":"object","properties":{"total":{"type":"integer","example":25},"per_page":{"type":"integer","example":50},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":1}}}}},"TopupAnalyticsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"stats":{"type":"object","properties":{"total_transactions":{"type":"integer","example":25,"description":"Total number of topup transactions"},"success":{"type":"integer","example":23,"description":"Successful transactions"},"failed":{"type":"integer","example":2,"description":"Failed transactions"},"pending":{"type":"integer","example":0,"description":"Pending transactions"},"total_amount":{"type":"integer","example":230000,"description":"Total amount topped up (VND)"}}},"transactions_per_day":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2025-11-03"},"count":{"type":"integer","example":5},"total_amount":{"type":"integer","example":50000}}}}}}}},"TopupCampaignResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"campaign_id":{"type":"integer","example":1},"name":{"type":"string","example":"Tet Holiday Topup 2025"},"total_recipients":{"type":"integer","example":100},"total_amount":{"type":"integer","example":1000000},"status":{"type":"string","example":"pending","enum":["pending","processing","completed","failed"]},"scheduled_at":{"type":"string","format":"date-time","nullable":true}}}}}},"responses":{"BadRequest":{"description":"Bad Request - Invalid parameters","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"Unauthorized":{"description":"Unauthorized - Invalid or missing API key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"Forbidden":{"description":"Forbidden - No permission to access this endpoint","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"NotFound":{"description":"Not Found - Resource does not exist","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"TooManyRequests":{"description":"Too Many Requests - Rate limit exceeded","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"InternalError":{"description":"Internal Server Error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"paths":{"api\/miniapp\/phone\/verify":{"post":{"tags":["miniapp"],"summary":"Mini App: Phone Verify","description":"Execute Mini App: Phone Verify operation","operationId":"api_miniapp_phone_verify_post","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"api\/miniapp\/sample\/{appId}\/campaign\/active":{"get":{"tags":["miniapp-sample"],"summary":"Mini App: Active Campaign","description":"Execute Mini App: Active Campaign operation","operationId":"api_miniapp_sample_appId_campaign_active_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string"},"description":"AppId"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"api\/miniapp\/sample\/{appId}\/roles":{"get":{"tags":["miniapp-sample"],"summary":"Mini App: Roles","description":"Execute Mini App: Roles operation","operationId":"api_miniapp_sample_appId_roles_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string"},"description":"AppId"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"api\/miniapp\/sample\/{appId}\/check-registered":{"get":{"tags":["miniapp-sample"],"summary":"Mini App: Check Registered","description":"Execute Mini App: Check Registered operation","operationId":"api_miniapp_sample_appId_check-registered_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string"},"description":"AppId"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"api\/miniapp\/sample\/{appId}\/register":{"post":{"tags":["miniapp-sample"],"summary":"Mini App: Register","description":"Execute Mini App: Register operation","operationId":"api_miniapp_sample_appId_register_post","security":[{"BearerAuth":[]}],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string"},"description":"AppId"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"api\/miniapp\/sample\/{appId}\/registrations":{"get":{"tags":["miniapp-sample"],"summary":"Mini App: Registration History","description":"Execute Mini App: Registration History operation","operationId":"api_miniapp_sample_appId_registrations_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string"},"description":"AppId"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"api\/miniapp\/sample\/{appId}\/registrations\/{id}":{"get":{"tags":["miniapp-sample"],"summary":"Mini App: Registration Detail","description":"Execute Mini App: Registration Detail operation","operationId":"api_miniapp_sample_appId_registrations_id_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string"},"description":"AppId"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/topup\/mobile":{"post":{"tags":["topup"],"summary":"Mobile Topup","description":"Top up mobile phone credit for a single number","operationId":"_api_v2_topup_mobile_post","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","description":"Phone number to topup (Vietnamese mobile number: 10 digits starting with 0)","example":"0938474356","pattern":"^0[0-9]{9}$"},"amount":{"type":"integer","description":"Topup amount in VND","example":10000,"enum":[10000,20000,30000,50000,100000,200000,300000,500000]},"carrier":{"type":"string","description":"Mobile carrier (optional, auto-detected if not provided)","example":"mobifone","enum":["viettel","mobifone","vinaphone","vietnamobile","gmobile"],"required":false}}}}}},"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/topup\/campaigns":{"post":{"tags":["topup"],"summary":"Create Topup Campaign","description":"Create a new topup campaign for bulk sending","operationId":"_api_v2_topup_campaigns_post","security":[{"BearerAuth":[]}],"parameters":[{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":20},"description":"Number of results per page"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Campaign name","example":"Tet Holiday Topup 2025","maxLength":255},"recipients":{"type":"array","description":"List of recipients (minimum 1)","minItems":1,"items":{"type":"object","properties":{"phone":{"type":"string","description":"Phone number","example":"0938474356","pattern":"^0[0-9]{9}$"},"amount":{"type":"integer","description":"Topup amount","example":10000,"enum":[10000,20000,30000,50000,100000,200000,300000,500000]}},"required":["phone","amount"]},"example":[{"phone":"0938474356","amount":10000},{"phone":"0987654321","amount":20000}]},"scheduled_at":{"type":"string","format":"date-time","description":"Schedule campaign for future execution (optional, ISO 8601 format)","example":"2025-12-25T10:00:00+07:00","required":false}}}}}},"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}},"get":{"tags":["topup"],"summary":"List Campaigns","description":"List all topup campaigns","operationId":"_api_v2_topup_campaigns_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":20},"description":"Number of results per page"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/topup\/campaigns\/{id}\/send":{"post":{"tags":["topup"],"summary":"Send Topup Campaign","description":"Execute a topup campaign to send credits to all recipients","operationId":"_api_v2_topup_campaigns_id_send_post","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/topup\/history":{"get":{"tags":["topup"],"summary":"Get Topup History","description":"Get topup transaction history with filters","operationId":"_api_v2_topup_history_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"phone","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by phone number (partial match)"},{"name":"carrier","in":"query","required":false,"schema":{"type":"string","enum":["viettel","mobifone","vinaphone","vietnamobile","gmobile"]},"description":"Filter by carrier"},{"name":"status","in":"query","required":false,"schema":{"type":"integer","enum":[1,2,3]},"description":"Filter by status (1=pending, 2=success, 3=failed)"},{"name":"date_from","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Filter from this date (YYYY-MM-DD)"},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Filter to this date (YYYY-MM-DD)"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":50},"description":"Number of results per page"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/topup\/balance":{"get":{"tags":["topup"],"summary":"Get Topup Balance","description":"Get remaining topup credits balance","operationId":"_api_v2_topup_balance_get","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/topup\/campaigns\/{id}":{"get":{"tags":["topup"],"summary":"Get Campaign Details","description":"Get detailed information about a specific campaign","operationId":"_api_v2_topup_campaigns_id_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/topup\/analytics":{"get":{"tags":["topup"],"summary":"Get Topup Analytics","description":"Get topup usage analytics and statistics","operationId":"_api_v2_topup_analytics_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7},"description":"Number of days to include in analytics (default: 7)"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/wallet\/balance":{"get":{"tags":["wallet"],"summary":"Get Wallet Balance","description":"Get current wallet balance directly from ZNSWallet","operationId":"_api_v2_wallet_balance_get","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zalo-oa\/accounts":{"get":{"tags":["zalo_oa"],"summary":"List Zalo OA Accounts","description":"List all Zalo Official Account accounts linked to authenticated customer. Returns full account metadata including oa_id (Zalo OA ID), oa_name, avatar_url, followers_count, status, is_verified, is_linked_to_zns, token_valid, promotion quota info.","operationId":"_api_v2_zalo-oa_accounts_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","inactive"]},"description":"Filter by account status"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zalo-oa\/accounts\/{id}":{"get":{"tags":["zalo_oa"],"summary":"Get Zalo OA Account Details","description":"Get detailed information about a specific Zalo OA account. Accepts either the internal id (integer) or the Zalo oa_id (string). Includes today limit info, promotion quota remaining, webhook settings.","operationId":"_api_v2_zalo-oa_accounts_id_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zalo-oa\/contacts":{"get":{"tags":["zalo_oa"],"summary":"List Zalo OA Contacts","description":"List all followers (contacts) of Zalo OAs owned by the authenticated customer. Supports filters: oa_account_id, is_follower, search (by name\/user_id\/alias), pagination (page, limit).","operationId":"_api_v2_zalo-oa_contacts_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"oa_account_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Filter contacts for a specific OA account (internal id)"},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Search by display name, user_id, or user_alias"},{"name":"is_follower","in":"query","required":false,"schema":{"type":"boolean"},"description":"Filter by follower status"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"maximum":200},"description":"Number of contacts per page (max 200)"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zalo-oa\/contacts\/{id}":{"get":{"tags":["zalo_oa"],"summary":"Get Zalo OA Contact Details","description":"Get detailed information about a specific Zalo OA contact (follower). Accepts either the internal id (integer) or the Zalo user_id (string). Includes shared_info, tags, notes.","operationId":"_api_v2_zalo-oa_contacts_id_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zalo-oa\/calculate-pricing":{"post":{"tags":["zalo_oa"],"summary":"Calculate Zalo OA Message Pricing","description":"Calculate the price of sending a message BEFORE actually sending. Returns price, price_with_vat (10%), is_free flag, wallet_balance, wallet_sufficient flag. Message category (cs\/transaction\/promotion) is auto-derived from template.type.","operationId":"_api_v2_zalo-oa_calculate-pricing_post","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"oa_account_id":{"type":"integer","description":"Internal ID of the Zalo OA (from GET \/zalo-oa\/accounts response `id` field)","example":3},"user_id":{"type":"string","description":"Zalo User ID (UID) of the message recipient","example":"5678901234567890"},"template_id":{"type":"integer","description":"Template ID (from GET \/zalo-oa\/templates). Message category (cs\/transaction\/promotion) is derived from template.type","example":15}}}}}},"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zalo-oa\/send":{"post":{"tags":["zalo_oa"],"summary":"Send Zalo OA Message","description":"Send messages via Zalo OA (CS, Transaction, or Promotion)","operationId":"_api_v2_zalo-oa_send_post","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"template_id":{"type":"integer","description":"Template ID from GET \/api\/v2\/zalo-oa\/templates","example":15},"oa_account_id":{"type":"integer","description":"Internal ID of the Zalo OA to send from","example":3},"user_id":{"type":"string","description":"Zalo User ID (UID) of the recipient","example":"5678901234567890"},"template_data":{"type":"object","description":"Template variables (check template.variables schema)","example":{"customer_name":"Nguy\u1ec5n V\u0103n A","order_code":"ORD-2026-0001"},"additionalProperties":true}}}}}},"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zalo-oa\/messages":{"get":{"tags":["zalo_oa"],"summary":"Get Zalo OA Message History","description":"Get message sending history for Zalo OA","operationId":"_api_v2_zalo-oa_messages_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string"},"description":"Zalo User ID (UID) to fetch chat with"},{"name":"oa_account_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Scope to a specific OA account (internal id)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"maximum":200},"description":"Number of messages (max 200)"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zalo-oa\/analytics":{"get":{"tags":["zalo_oa"],"summary":"Get Zalo OA Analytics","description":"Get analytics and statistics for Zalo OA messages","operationId":"_api_v2_zalo-oa_analytics_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7},"description":"Number of days to include (default: 7)"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zalo-oa\/templates":{"get":{"tags":["zalo_oa"],"summary":"List Zalo OA Templates","description":"Get all available Zalo OA message templates","operationId":"_api_v2_zalo-oa_templates_get","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zalo-oa\/balance":{"get":{"tags":["zalo_oa"],"summary":"Get Zalo OA Balance","description":"Get wallet balance for Zalo OA messaging","operationId":"_api_v2_zalo-oa_balance_get","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zalo-oa\/send-text":{"post":{"tags":["zalo_oa"],"summary":"Send Free-text CS Message","description":"Send a free-text CS (customer service) message within the 48h reply window. No template required. Free of charge per Zalo policy.","operationId":"_api_v2_zalo-oa_send-text_post","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"template_id":{"type":"integer","description":"Template ID from GET \/api\/v2\/zalo-oa\/templates","example":15},"oa_account_id":{"type":"integer","description":"Internal ID of the Zalo OA to send from","example":3},"user_id":{"type":"string","description":"Zalo User ID (UID) of the recipient","example":"5678901234567890"},"template_data":{"type":"object","description":"Template variables (check template.variables schema)","example":{"customer_name":"Nguy\u1ec5n V\u0103n A","order_code":"ORD-2026-0001"},"additionalProperties":true}}}}}},"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zns\/templates":{"get":{"tags":["zns"],"summary":"List ZNS Templates","description":"Get all available ZNS templates for authenticated user","operationId":"_api_v2_zns_templates_get","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zns\/templates\/{id}":{"get":{"tags":["zns"],"summary":"Get ZNS Template Details","description":"Get detailed information about a specific ZNS template including parameters","operationId":"_api_v2_zns_templates_id_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zns\/send":{"post":{"tags":["zns"],"summary":"Send ZNS Message","description":"Send a ZNS message to a single phone number","operationId":"_api_v2_zns_send_post","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","description":"Phone number to send ZNS (Vietnamese format: 0xxx or 84xxx)","example":"0938474356"},"template_id":{"type":"string","description":"Zalo template ID from GET \/api\/v2\/zns\/templates","example":"495802"},"template_data":{"type":"object","description":"Template parameters (check list_params from template details)","example":{"otp":"123456"},"additionalProperties":true}}}}}},"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zns\/send-otp":{"post":{"tags":["zns"],"summary":"Send ZNS OTP","description":"Send OTP via ZNS (optimized for OTP template)","operationId":"_api_v2_zns_send-otp_post","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","description":"Phone number to send OTP (Vietnamese format: 0xxx or 84xxx)","example":"0938474356"},"otp":{"type":"string","description":"OTP code to send (max 10 characters)","example":"123456"},"template_id":{"type":"string","description":"Optional: Zalo template ID. If not provided, uses default OTP template.","example":"495802","required":false}}}}}},"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zns\/send-bulk":{"post":{"tags":["zns"],"summary":"Send Bulk ZNS","description":"Send ZNS messages to multiple phone numbers in one request","operationId":"_api_v2_zns_send-bulk_post","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","description":"Zalo template ID from \/api\/v2\/zns\/templates","example":"495802"},"recipients":{"type":"array","description":"List of recipients (max 1000)","items":{"type":"object","properties":{"phone":{"type":"string","example":"0938474356"},"template_data":{"type":"object","example":{"otp":"123456"}}}},"example":[{"phone":"0938474356","template_data":{"otp":"123456"}},{"phone":"0987654321","template_data":{"otp":"654321"}}]}}}}}},"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zns\/history":{"get":{"tags":["zns"],"summary":"Get ZNS Send History","description":"Get ZNS send history with filters (date, status, etc.)","operationId":"_api_v2_zns_history_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["api","web","admin","campaign","system"]},"description":"Filter by message source (api, web, admin, campaign, system)"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","sent","delivered","failed"]},"description":"Filter by message status"},{"name":"date_from","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Filter messages from this date (YYYY-MM-DD)"},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Filter messages to this date (YYYY-MM-DD)"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":50},"description":"Number of results per page"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zns\/balance":{"get":{"tags":["zns"],"summary":"Get ZNS Balance","description":"Get remaining ZNS credits balance","operationId":"_api_v2_zns_balance_get","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}},"\/api\/v2\/zns\/analytics":{"get":{"tags":["zns"],"summary":"Get ZNS Analytics","description":"Get ZNS usage analytics and statistics","operationId":"_api_v2_zns_analytics_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7},"description":"Number of days to include in analytics (default: 7)"}],"requestBody":null,"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Operation completed successfully"}}}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"500":{"$ref":"#\/components\/responses\/InternalError"}}}}},"tags":[{"name":"miniapp","description":"Miniapp API operations"},{"name":"miniapp-sample","description":"Miniapp-sample API operations"},{"name":"topup","description":"Mobile Topup \u2014 Recharge for Viettel\/Mobifone\/Vinaphone\/Vietnamobile\/Gmobile"},{"name":"wallet","description":"Wallet API operations"},{"name":"zalo_oa","description":"Zalo Official Account (OA) \u2014 Manage OAs, followers (contacts), send CS\/transaction\/promotion messages, chat history"},{"name":"zns","description":"Zalo Notification Service (ZNS) \u2014 OTP, transaction & promotion messages via ZNS templates"}]}