Customer API Documentation
API Endpoint & Authentication
All customer API calls use a <strong>single HTTP POST</strong> endpoint. Authenticate with <code>key</code> or <code>apikey</code> (from your profile API key page) plus <code>action</code> to select the operation. Path is at the <strong>site root</strong> as <code>/api/v2</code> — no language prefix (e.g. no <code>/en/</code> before <code>/api</code>).
Send parameters as <code>application/x-www-form-urlencoded</code> (e.g. <code>curl -d</code>) or as JSON with <code>Content-Type: application/json</code>.
{
"key": "YOUR_API_KEY",
"action": "categories"
}
<strong>Note:</strong> Replace <code>YOUR_API_KEY</code> with your own key. Never put API keys in URLs, client-side code, or public repositories. Supported <code>action</code> values: <code>categories</code>, <code>services</code>, <code>inventory</code>, <code>add</code>, <code>status</code>, <code>balance</code>.
Test API
Choose an action, enter any required parameters, then click <strong>Send Request</strong> to call the live API. If you are signed in with an API key, it is filled in below (masked).
Response
Customer API v2
Get Categories
All parent categories and their subcategory names (for filtering <strong>Services List</strong>).
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
key / apikey | String | Your API key | Yes |
action | String | categories | Yes |
Example Request
curl -X POST https://accplanet.com/api/v2 \
-d "key=YOUR_API_KEY" \
-d "action=categories"
Response Example
{
"categories": [
{
"category": "Social",
"subcategories": ["Premium", "Standard"]
},
{
"category": "Digital goods",
"subcategories": []
}
]
}
Services List
Available products (services) with stock. Optional filters use <strong>category / subcategory names</strong> as returned by Get Categories, or pass <code>service</code> to fetch one product by id (<code>business_id</code> or MongoDB id). Parameter <code>language</code> controls localization of <code>name</code>, <code>description</code>, <code>category</code>, and <code>subcategory</code> (see table below). <code>limit=0</code> returns all items in one response.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
key / apikey | String | Your API key | Yes |
action | String | services | Yes |
page | Number | Page number (default <code>1</code>) when <code>limit</code> > 0 | No |
limit | Number | Items per page; <code>0</code> = return all (default <code>0</code>) | No |
category | String | Parent category name (from Get Categories) | No |
subcategory | String | Subcategory name (from Get Categories) | No |
service | String | Return only this service / product id (same id as in list items) | No |
language | String | Response language — use a code from Supported language codes below (default <code>en</code>) | No |
Supported language codes (language)
Pass one of these values (case-insensitive for matching). If omitted or <code>en</code>, fields stay in <strong>English</strong> (stored source text). Any other code below resolves translations via Aitranslator when <code>AITRANSLATOR_BASE_URL</code> is configured; missing translations fall back to English until queued translations complete.
| Code | Language | Native name |
|---|---|---|
en |
English | English |
zh |
Chinese | 中文 |
es |
Spanish | Español |
fr |
French | Français |
de |
German | Deutsch |
ja |
Japanese | 日本語 |
ko |
Korean | 한국어 |
pt |
Portuguese | Português |
pt-BR |
Portuguese (Brazil) | Português (Brasil) |
ru |
Russian | Русский |
ar |
Arabic | العربية |
hi |
Hindi | हिन्दी |
vi |
Vietnamese | Tiếng Việt |
ur |
Urdu | اردو |
th |
Thai | ไทย |
tr |
Turkish | Türkçe |
bn-BD |
Bengali (Bangladesh) | বাংলা |
Also accepted (aliases)
These strings are normalized to a primary code above (same translation bucket):
| You may send | Resolves to |
|---|---|
zh-hans |
zh |
zh-cn |
zh |
zh-sg |
zh |
zh-hant |
zh |
zh-tw |
zh |
zh-hk |
zh |
zh-mo |
zh |
pt-br |
pt-BR |
pt_br |
pt-BR |
ptbr |
pt-BR |
bn-bd |
bn-BD |
bd |
bn-BD |
en-us |
en |
en-gb |
en |
<strong>Not supported:</strong> any other <code>language</code> value is treated like English (no translation). Use the exact primary codes or aliases listed here.
Example Request
curl -X POST https://accplanet.com/api/v2 \
-d "key=YOUR_API_KEY" \
-d "action=services"
curl -X POST https://accplanet.com/api/v2 \
-d "key=YOUR_API_KEY" \
-d "action=services" \
-d "page=1" \
-d "limit=50"
curl -X POST https://accplanet.com/api/v2 \
-d "key=YOUR_API_KEY" \
-d "action=services" \
-d "category=Instagram"
curl -X POST https://accplanet.com/api/v2 \
-d "key=YOUR_API_KEY" \
-d "action=services" \
-d "service=10042" \
-d "language=zh"
Response Example
<strong>Default</strong> (<code>limit</code> omitted or <code>0</code>): all services in one response.
{
"services": [
{
"service": 10042,
"name": "Example product A",
"description": "Product description (may be HTML)",
"type": "Default",
"category": "Social",
"subcategory": "Instagram",
"rate": "9.99",
"min": 1,
"max": 100,
"refill": false,
"cancel": false,
"stock": 100,
"entityType": "product",
"autoDelivery": true
}
],
"total": 2,
"page": 1,
"limit": 0,
"total_pages": 1
}
<strong>service</strong> is the product's numeric <code>business_id</code> when set; otherwise the MongoDB id as a string. Use the same value for <strong>Check Inventory</strong> and <strong>Add Order</strong>. <strong>category</strong> / <strong>subcategory</strong> match the names from <strong>Get Categories</strong> (empty <code>subcategory</code> when the product is attached to a top-level category only). <strong>description</strong> is the full product description (may contain HTML from the supplier editor).
Check Inventory
Stock for one service (same <code>service</code> id as in Services List).
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
key / apikey | String | Your API key | Yes |
action | String | inventory | Yes |
service | String | Service / product id from services list | Yes |
Example Request
curl -X POST https://accplanet.com/api/v2 \
-d "key=YOUR_API_KEY" \
-d "action=inventory" \
-d "service=10042"
Response Example
{
"service": 10042,
"stock": 42,
"available": true,
"entityType": "product",
"autoDelivery": true
}
Add Order
Creates an order and pays from <strong>account balance</strong>. Optional <code>link</code> is accepted for compatibility but is not stored on the order.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
key / apikey | String | Your API key | Yes |
action | String | add | Yes |
service | String | Service / product id from services list | Yes |
quantity | Number | Quantity (default <code>1</code>) | No |
link | String | Optional (reserved / future use) | No |
Example Request
curl -X POST https://accplanet.com/api/v2 \
-d "key=YOUR_API_KEY" \
-d "action=add" \
-d "service=10042" \
-d "quantity=1"
Response Example
HTTP status <code>201 Created</code>.
{
"order": "000000000000000000000001"
}
The <code>order</code> value is the MongoDB <code>ObjectId</code> (string). Use it with <strong>Order Status</strong> (<code>action=status</code>).
Order Status
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
key / apikey | String | Your API key | Yes |
action | String | status | Yes |
order | String | Order id returned by <code>add</code> | Yes |
Example Request
curl -X POST https://accplanet.com/api/v2 \
-d "key=YOUR_API_KEY" \
-d "action=status" \
-d "order=000000000000000000000001"
Response Example
{
"status": "In progress",
"charge": "75.00",
"start_count": 3,
"remains": 1,
"delivered_units": 2,
"currency": "USD",
"autoDelivery": true,
"entityType": "product"
}
{
"status": "Completed",
"charge": "50.00",
"start_count": 2,
"remains": 0,
"delivered_units": 2,
"currency": "USD",
"autoDelivery": true,
"entityType": "product",
"accounts": ["example_user:redacted", "example_user_2:redacted"]
}
Balance
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
key / apikey | String | Your API key | Yes |
action | String | balance | Yes |
Example Request
curl -X POST https://accplanet.com/api/v2 \
-d "key=YOUR_API_KEY" \
-d "action=balance"
Response Example
{
"balance": "100.00",
"currency": "USD"
}
Balance is your <strong>user</strong> wallet (used for purchases).
Error Responses
Errors use a single <code>error</code> string. Wrong or missing API credentials typically return HTTP <code>401</code> with <code>{"error": "Invalid API key"}</code>; validation issues usually return <code>400</code>.
{"error": "Invalid API key"}
{"error": "Invalid action"}
{"error": "Service ID is required"}
{"error": "Service not found"}
{"error": "Product not found."}
{"error": "This product is not available for purchase."}
{"error": "Invalid quantity."}
{"error": "Minimum quantity is 2."}
{"error": "Insufficient stock. Available: 10."}
{"error": "Insufficient balance. Please recharge your account."}
{"error": "Order not found"}
{"error": "Category not found"}
{"error": "Subcategory not found"}
{"error": "Subcategory not found in category"}