API Documentation

Integrate your applications with EarnFlow using our simple and powerful REST API.

https://earnflow.com.ng/api All endpoints require HTTPS

Introduction

The EarnFlow API allows you to integrate your applications with our platform programmatically. You can check balances, manage orders, create new tasks, and more.

API Details

  • Base URL: https://earnflow.com.ng/api
  • Allowed Methods: GET, POST
  • Response Format: JSON
  • Authentication: Token-based

Quick Overview

Endpoint Method Description
/balance GET Current balance and total withdrawal
/service/list GET List of services and IDs
/order/list GET All orders you have placed
/get/order GET Order details for the given ID/Link
/update/order GET Update order status (pause, resume, cancel, stopandrefund)
/create/post POST Create a new order/post
/increase/audience POST Increase audience for an existing order
/search/order POST Search orders with filters
/download/audience_list GET Download PDF list of earners who completed tasks

Authentication

The EarnFlow API uses token-based authentication. You must include your API key in the Authorization header of every request.

Authorization Header Format

HTTP
Authorization: Token (Your Key)

Example Request

cURL
curl -X GET https://earnflow.com.ng/api/balance \
  -H 'Authorization: Token (Your Key)'

Getting Your API Key

To get your API key:

  1. Log in to your EarnFlow account
  2. Go to Dashboard → Settings → API Settings
  3. Generate a new API key
  4. Copy and store your key securely

Important: Never share your API key or commit it to version control. Keep it secret like a password.

Endpoints Reference

Detailed documentation for all available API endpoints.

GET /balance

Retrieve your current wallet balance and total withdrawal amount.

Parameters

This endpoint does not accept any parameters.

Example Request

cURL
curl -X GET https://earnflow.com.ng/api/balance \
  -H 'Authorization: Token (Your Key)'

Example Response

JSON
{
  "status": "success",
  "balance": 25000,
  "total_withdrawal": 150000,
  "currency": "NGN"
}
GET /service/list

Get a list of all available services and their IDs.

Parameters

This endpoint does not accept any parameters.

Example Request

cURL
curl -X GET https://earnflow.com.ng/api/service/list \
  -H 'Authorization: Token (Your Key)'

Example Response

JSON
{
  "status": "success",
  "services": [
    {
      "id": 1,
      "name": "Instagram Followers",
      "category": "instagram",
      "rate": 100,
      "min": 100,
      "max": 5000
    },
    {
      "id": 2,
      "name": "Instagram Likes",
      "category": "instagram",
      "rate": 50,
      "min": 50,
      "max": 10000
    },
    {
      "id": 3,
      "name": "Facebook Followers",
      "category": "facebook",
      "rate": 80,
      "min": 100,
      "max": 5000
    }
  ]
}
GET /order/list

Retrieve all orders you have placed, with optional filters.

Parameters

status string optional
id integer optional
link string optional

Example Request

cURL
curl -X GET "https://earnflow.com.ng/api/order/list?status=completed" \
  -H 'Authorization: Token (Your Key)'

Example Response

JSON
{
  "status": "success",
  "orders": [
    {
      "id": 12345,
      "service_id": 1,
      "service_name": "Instagram Followers",
      "link": "https://instagram.com/username",
      "quantity": 1000,
      "rate": 100,
      "total": 100000,
      "status": "completed",
      "created_at": "2024-02-15 10:30:00"
    }
  ],
  "total": 1
}
GET /get/order

Get details for a specific order by ID or link.

Parameters

id integer optional (required if link not provided)
link string optional (required if id not provided)

Example Request

cURL
curl -X GET "https://earnflow.com.ng/api/get/order?id=12345" \
  -H 'Authorization: Token (Your Key)'

Example Response

JSON
{
  "status": "success",
  "order": {
    "id": 12345,
    "service_id": 1,
    "service_name": "Instagram Followers",
    "link": "https://instagram.com/username",
    "quantity": 1000,
    "completed": 850,
    "rate": 100,
    "total": 100000,
    "status": "in_progress",
    "created_at": "2024-02-15 10:30:00",
    "updated_at": "2024-02-15 11:45:00"
  }
}
POST /create/post

Create a new order/post for social media engagement.

Parameters

Social_Media string required
link string required
rate_needed integer required
custom_text string optional

Example Request

cURL
curl -X POST https://earnflow.com.ng/api/create/post \
  -H 'Authorization: Token (Your Key)' \
  -H 'Content-Type: application/json' \
  -d '{
    "Social_Media": "instagram",
    "link": "https://instagram.com/p/abc123",
    "rate_needed": 1000,
    "custom_text": "Check out this amazing post!"
  }'

Example Response

JSON
{
  "status": "success",
  "message": "Order created successfully",
  "order_id": 12346,
  "estimated_cost": 100000
}
GET /update/order

Update the status of an existing order (pause, resume, cancel, stopandrefund).

Parameters

id integer required
type string required pause, resume, cancel, stopandrefund

Example Request

cURL
curl -X GET "https://earnflow.com.ng/api/update/order?id=12345&type=pause" \
  -H 'Authorization: Token (Your Key)'

Example Response

JSON
{
  "status": "success",
  "message": "Order has been paused successfully",
  "order_id": 12345,
  "new_status": "paused"
}
POST /increase/audience

Increase the audience quantity for an existing order.

Parameters

id integer required
rate_needed integer required

Example Request

cURL
curl -X POST https://earnflow.com.ng/api/increase/audience \
  -H 'Authorization: Token (Your Key)' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 12345,
    "rate_needed": 500
  }'

Example Response

JSON
{
  "status": "success",
  "message": "Audience increased successfully",
  "order_id": 12345,
  "new_quantity": 1500,
  "additional_cost": 50000
}
POST /search/order

Search for orders with filters. Returns filtered list of orders from all general orders placed on EarnFlow.

Parameters

filt_data string required
social_media string optional

Example Request

cURL
curl -X POST https://earnflow.com.ng/api/search/order \
  -H 'Authorization: Token (Your Key)' \
  -H 'Content-Type: application/json' \
  -d '{
    "filt_data": "instagram",
    "social_media": "instagram"
  }'

Example Response

JSON
{
  "status": "success",
  "orders": [
    {
      "id": 12345,
      "service_id": 1,
      "service_name": "Instagram Followers",
      "link": "https://instagram.com/username",
      "quantity": 1000,
      "status": "in_progress",
      "created_at": "2024-02-15 10:30:00"
    }
  ],
  "total": 15
}
GET /download/audience_list

Download a PDF list of earners who submitted approved tasks for an order.

Parameters

id integer required

Example Request

cURL
curl -X GET "https://earnflow.com.ng/api/download/audience_list?id=12345" \
  -H 'Authorization: Token (Your Key)' \
  --output audience_list.pdf

Response

This endpoint returns a PDF file download. The response headers will include:

HTTP Headers
Content-Type: application/pdf
Content-Disposition: attachment; filename="audience_list_12345.pdf"

Response Codes

The API uses conventional HTTP response codes to indicate success or failure of requests.

Code Description
200 OK Request was successful
400 Bad Request Invalid input – The request was malformed or missing required parameters
401 Unauthorized Invalid or missing API token
404 Not Found Resource does not exist – The requested endpoint or resource was not found
500 Internal Server Error Something went wrong on our server. Try again later

Error Response Format

When an error occurs, the API returns a JSON object with error details:

JSON
{
  "status": "error",
  "code": 400,
  "message": "Invalid parameters",
  "details": {
    "field": "rate_needed",
    "error": "must be a positive integer"
  }
}

Ready to Start Building?

Get your API keys and start integrating EarnFlow into your applications today.

Get API Keys