Hamkorlik API
API v2API orqali barcha xizmatlarga buyurtma berishingiz, holatini tekshirishingiz va balansni ko'rishingiz mumkin. So'rovlar POST usulida yuboriladi, javoblar JSON formatida.
HTTP POST / GETJavob formati: JSONUZSCheklov: bitta kalit uchun daqiqasiga 120 so'rov.
Eslatmalar
Barcha narxlar UZS da, 1000 ta uchun. Chegirmangiz API narxlariga ham qo'llanadi.
Faqat «API orqali qabul qilish» yoqilgan xizmatlar ro'yxatda ko'rinadi.
Buyurtma qabul qilingach balansdan darhol yechiladi; qisman bajarilganda qolgan summa qaytariladi.
Xizmatlar ro'yxati
Parametrlar
| key | API kalitingiz majburiy |
| action | services |
Javob
[
{
"service": 1,
"name": "Instagram Followers",
"type": "Default",
"category": "Instagram",
"rate": "12500.0000",
"min": 100,
"max": 100000,
"refill": true,
"cancel": false
},
{
"service": 2,
"name": "Instagram Comments",
"type": "Custom Comments",
"category": "Instagram",
"rate": "90000.0000",
"min": 10,
"max": 1000,
"refill": false,
"cancel": false
}
]
Buyurtma qo'shish
Umumiy parametrlar
| key | API kalitingiz majburiy |
| action | add |
| service | Xizmat ID majburiy |
Ushbu tur uchun parametrlar
So'rov
Javob
{"order": 23501}
Buyurtma holati
Parametrlar
| key | API kalitingiz majburiy |
| action | status |
| order | Buyurtma ID majburiy |
Javob
{
"charge": "12500.00",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "UZS"
}Bir nechta buyurtma holati
Parametrlar
| key | API kalitingiz majburiy |
| action | status |
| orders | ID,ID,ID (max 100) majburiy |
Javob
{
"1": {
"charge": "12500.00",
"start_count": "3572",
"status": "In progress",
"remains": "157",
"currency": "UZS"
},
"10": {
"error": "Incorrect order ID"
}
}Qayta tiklash
Parametrlar
| key | API kalitingiz majburiy |
| action | refill |
| order | Buyurtma ID |
| orders | ID,ID,ID (max 100) |
Javob
{"refill": "1"}
[
{"order": 1, "refill": 1},
{"order": 2, "refill": {"error": "Refill is not available for this order"}}
]Qayta tiklash holati
Parametrlar
| key | API kalitingiz majburiy |
| action | refill_status |
| refill | Refill ID |
| refills | ID,ID,ID (max 100) |
Javob
{"status": "Completed"}
[
{"refill": 1, "status": "Completed"},
{"refill": 2, "status": {"error": "Incorrect refill ID"}}
]Bekor qilish
Parametrlar
| key | API kalitingiz majburiy |
| action | cancel |
| orders | ID,ID,ID (max 100) majburiy |
Javob
[
{"order": 9, "cancel": {"error": "Cancel is not available for this order"}},
{"order": 2, "cancel": 1}
]Balans
Parametrlar
| key | API kalitingiz majburiy |
| action | balance |
Javob
{
"balance": "1250000.00",
"currency": "UZS"
}Xatolar
{"error": "Incorrect API key"}{"error": "Incorrect service ID"}{"error": "Not enough funds on balance"}{"error": "Quantity less than minimal 100"}{"error": "Quantity more than maximal 100000"}{"error": "Incorrect order ID"}{"error": "Too many requests"}Kod namunalari
$ch = curl_init("https://bargainsmm.com/api/v2");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
"key" => "API_KEY",
"action" => "add",
"service" => 1,
"link" => "https://instagram.com/username",
"quantity" => 1000,
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = json_decode(curl_exec($ch), true);
print_r($result); // ["order" => 23501]
import requests
r = requests.post("https://bargainsmm.com/api/v2", data={
"key": "API_KEY",
"action": "add",
"service": 1,
"link": "https://instagram.com/username",
"quantity": 1000,
})
print(r.json()) # {"order": 23501}
const res = await fetch("https://bargainsmm.com/api/v2", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
key: "API_KEY",
action: "add",
service: "1",
link: "https://instagram.com/username",
quantity: "1000",
}),
});
console.log(await res.json()); // { order: 23501 }
curl -X POST "https://bargainsmm.com/api/v2" \ -d "key=API_KEY" \ -d "action=add" \ -d "service=1" \ -d "link=https://instagram.com/username" \ -d "quantity=1000"
