🛒

Customer API Documentation

🔌
Total Actions
6
👤
Tipo de Usuário
Cliente

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>).

POST
https://accplanet.com/api/v2

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>.

Testar 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).

Customer API v2

POST
https://accplanet.com/api/v2

Get Categories

All parent categories and their subcategory names (for filtering <strong>Services List</strong>).

Parâmetros da Requisição
ParâmetroTipoDescriçãoObrigatório
key / apikeyCadeia de caracteresYour API keySim
actionCadeia de caracterescategoriesSim
Example Request
curl -X POST https://accplanet.com/api/v2 \
  -d "key=YOUR_API_KEY" \
  -d "action=categories"
Exemplo de Resposta
{
  "categories": [
    {
      "category": "Social",
      "subcategories": ["Premium", "Standard"]
    },
    {
      "category": "Digital goods",
      "subcategories": []
    }
  ]
}
POST
https://accplanet.com/api/v2

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.

Parâmetros da Requisição
ParâmetroTipoDescriçãoObrigatório
key / apikeyCadeia de caracteresYour API keySim
actionCadeia de caracteresservicesSim
pageNúmeroPage number (default <code>1</code>) when <code>limit</code> &gt; 0No
limitNúmeroItems per page; <code>0</code> = return all (default <code>0</code>)No
categoryCadeia de caracteresParent category name (from Get Categories)No
subcategoryCadeia de caracteresSubcategory name (from Get Categories)No
serviceCadeia de caracteresReturn only this service / product id (same id as in list items)No
languageCadeia de caracteresResponse 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.

CódigoLanguageNome nativo
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 sendResolves 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"
Exemplo de Resposta

<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).

POST
https://accplanet.com/api/v2

Check Inventory

Stock for one service (same <code>service</code> id as in Services List).

Parâmetros da Requisição
ParâmetroTipoDescriçãoObrigatório
key / apikeyCadeia de caracteresYour API keySim
actionCadeia de caracteresinventorySim
serviceCadeia de caracteresService / product id from services listSim
Example Request
curl -X POST https://accplanet.com/api/v2 \
  -d "key=YOUR_API_KEY" \
  -d "action=inventory" \
  -d "service=10042"
Exemplo de Resposta
{
  "service": 10042,
  "stock": 42,
  "available": true,
  "entityType": "product",
  "autoDelivery": true
}
POST
https://accplanet.com/api/v2

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.

Parâmetros da Requisição
ParâmetroTipoDescriçãoObrigatório
key / apikeyCadeia de caracteresYour API keySim
actionCadeia de caracteresaddSim
serviceCadeia de caracteresService / product id from services listSim
quantityNúmeroQuantity (default <code>1</code>)No
linkCadeia de caracteresOptional (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"
Exemplo de Resposta

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>).

POST
https://accplanet.com/api/v2

Status do Pedido

Parâmetros da Requisição
ParâmetroTipoDescriçãoObrigatório
key / apikeyCadeia de caracteresYour API keySim
actionCadeia de caracteresstatusSim
orderCadeia de caracteresOrder id returned by <code>add</code>Sim
Example Request
curl -X POST https://accplanet.com/api/v2 \
  -d "key=YOUR_API_KEY" \
  -d "action=status" \
  -d "order=000000000000000000000001"
Exemplo de Resposta
{
  "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"]
}
POST
https://accplanet.com/api/v2

Saldo

Parâmetros da Requisição
ParâmetroTipoDescriçãoObrigatório
key / apikeyCadeia de caracteresYour API keySim
actionCadeia de caracteresbalanceSim
Example Request
curl -X POST https://accplanet.com/api/v2 \
  -d "key=YOUR_API_KEY" \
  -d "action=balance"
Exemplo de Resposta
{
  "balance": "100.00",
  "currency": "USD"
}

Balance is your <strong>user</strong> wallet (used for purchases).

POST
https://accplanet.com/api/v2

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"}
Telegram