🚀 API Integration Guide

Customer Integration for monthlyprovider.com

📋 Overview

This API allows customers to send Facebook live viewer orders to monthlyprovider.com. Once an order is received, our system will automatically detect when the Facebook page goes live and send the order to the customer for delivery.

Customer
POST /api/order
Order Stored


Live Detected
Send to Customer
Viewers Delivered

🔗 API Endpoint

POST https://monthlyprovider.com/api/order

Authentication

All API requests require an API key in the header:

X-API-Key: your_api_key_here
⚠️ API Key Required
Contact admin to obtain your API key. API key is NOT shown on this page for security reasons.

📝 Request Parameters

Required Parameters

Parameter Type Required Description Example
order_id string ⚪ Optional Your order reference (optional). If not provided, system auto-generates ID like MP-000001 321421321
url string ✅ Yes Facebook page URL to monitor https://facebook.com/username
services array ✅ Yes List of services to deliver See below
📌 Note (v3.4.0): order_id is now optional! If you don't provide it, the system will auto-generate an internal order ID (format: MP-000001, MP-000002, etc.). If you provide your own order_id, it will be stored as a reference and the system will still generate an internal ID.

Service Parameters (in services array)

Parameter Type Required Description Example
service_id integer ✅ Yes Service ID from monthlyprovider.com 3
quantity integer ✅ Yes Number of viewers to deliver 200
min_viewers integer ⚪ Optional Minimum live viewers to trigger order (default: no minimum) 100

Optional Parameters (with defaults)

Parameter Type Default Value Description
daily_limit integer 10 Maximum detections per day
days integer 30 Order duration in days
📌 Note: quantity_min and quantity_max are configured in admin panel under service settings, not sent via API.

📤 Example Request

Without order_id (Auto-generated - Recommended)

{ "url": "https://facebook.com/username", "services": [ { "service_id": 3, "quantity": 200 } ] }
Response: System generates order_id like "MP-000001"

With your order_id (Stored as reference)

{ "order_id": "321421321", "url": "https://facebook.com/username", "services": [ { "service_id": 3, "quantity": 200 } ] }
Response: System generates internal order_id "MP-000001" and stores "321421321" as customer_order_id

With Optional Parameters

{ "url": "https://facebook.com/username", "daily_limit": 5, "days": 15, "services": [ { "service_id": 3, "quantity": 200, "min_viewers": 100 } ] }

cURL Example (Without order_id)

curl -X POST https://monthlyprovider.com/api/order -H "Content-Type: application/json" -H "X-API-Key: your_api_key_here" -d '{ "url": "https://facebook.com/username", "services": [ { "service_id": 3, "quantity": 200 } ] }'

📥 API Response

Success Response (HTTP 200)

Without order_id provided: { "success": true, "message": "Order created with 1 service", "data": { "order_id": "MP-000001", "url": "https://facebook.com/username", "expires_at": "2025-11-08T10:00:00+08:00", "daily_limit": 10, "services": [...] } }
With order_id provided (e.g., "321421321"): { "success": true, "message": "Order created with 1 service", "data": { "order_id": "MP-000001", "customer_order_id": "321421321", "url": "https://facebook.com/username", "expires_at": "2025-11-08T10:00:00+08:00", "daily_limit": 10, "services": [...] } }

Error Responses

Missing API Key (HTTP 403)
{ "detail": "Invalid or missing API key" }
Invalid Service ID (HTTP 400)
{ "success": false, "error": "Service 999 not found or inactive" }
Duplicate Customer Order ID (HTTP 400)
{ "success": false, "error": "Customer order 321421321 already exists as MP-000001" }
📌 Duplicate Prevention: The system checks if your customer_order_id has already been used, preventing duplicate submissions.
Rate Limit Exceeded (HTTP 429)
{ "error": "Rate limit exceeded: 1000 per hour" }

📋 Available Services

Service IDs and details are available on monthlyprovider.com website. Contact admin for the complete service list.

Example Services:
• Service ID 1: 60 Minutes Live Viewers
• Service ID 2: 120 Minutes Live Viewers
• Service ID 3: 180 Minutes Live Viewers
(Contact admin for full list)

🔒 Security

🔑 Get Your API Key

To obtain your API key and start integration:

Contact monthlyprovider.com Admin

Login to Admin Panel →