Spaces:
Paused
Paused
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>MG Bot API Documentation</title> | |
| <style> | |
| body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; max-width: 800px; margin: 0 auto; padding: 20px; color: #333; } | |
| h1 { color: #2c3e50; border-bottom: 2px solid #eee; padding-bottom: 10px; } | |
| .endpoint { background: #f8f9fa; border: 1px solid #e9ecef; padding: 15px; border-radius: 8px; margin-bottom: 20px; } | |
| .method { display: inline-block; padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 0.9em; color: white; margin-right: 10px; } | |
| .get { background-color: #61affe; } | |
| .post { background-color: #49cc90; } | |
| code { background: #eee; padding: 2px 4px; border-radius: 4px; } | |
| .auth-warning { background: #fff3cd; color: #856404; padding: 10px; border-radius: 4px; margin-bottom: 20px; border: 1px solid #ffeeba; } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>🤖 MG Bot API Documentation v1.0</h1> | |
| <div class="auth-warning"> | |
| <strong>🔒 Authentication Required:</strong> All endpoints (except /status) require the <code>x-api-key</code> header. Get your key from the Bot Admin Panel. | |
| </div> | |
| <div class="endpoint"> | |
| <span class="method get">GET</span> <code>/api/status</code> | |
| <p>Check API health and get APK download URL.</p> | |
| <pre>Response: { "status": "ok", "apk_url": "..." }</pre> | |
| </div> | |
| <div class="endpoint"> | |
| <span class="method get">GET</span> <code>/api/products</code> | |
| <p>Get list of all products.</p> | |
| <p><strong>Query Params:</strong> <code>?category=Nom</code> (Optional filter)</p> | |
| </div> | |
| <div class="endpoint"> | |
| <span class="method get">GET</span> <code>/api/orders/:userId</code> | |
| <p>Get order history for a specific user.</p> | |
| </div> | |
| <div class="endpoint"> | |
| <span class="method post">POST</span> <code>/api/orders</code> | |
| <p>Create a new order from external app.</p> | |
| <pre>Body: { "userId": 123, "items": [...], "total": 50000, "location": {...} }</pre> | |
| </div> | |
| <div class="endpoint"> | |
| <span class="method get">GET</span> <code>/api/image/:fileId</code> | |
| <p>Proxy endpoint to view Telegram images.</p> | |
| </div> | |
| </body> | |
| </html> | |