เอกสาร API
ตัวอย่างโค้ด PHPการเชื่อมต่อ
- เมธอด HTTP
POST- URL ของ API
https://onesmm.com/api/v2- รูปแบบการตอบกลับ
JSON
servicesรายการบริการ
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key |
คีย์ API ของคุณ |
action |
services |
ตัวอย่างการตอบกลับ
[
{
"service": 1,
"name": "Followers",
"type": "Default",
"category": "First Category",
"rate": "0.90",
"min": "50",
"max": "10000",
"refill": true,
"cancel": true
},
{
"service": 2,
"name": "Comments",
"type": "Custom Comments",
"category": "Second Category",
"rate": "8",
"min": "10",
"max": "1500",
"refill": false,
"cancel": true
}
]
addเพิ่มคำสั่งซื้อ
ตัวอย่างการตอบกลับ
{
"order": 23501
}
statusสถานะคำสั่งซื้อ
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key |
คีย์ API ของคุณ |
action |
status |
order |
รหัสคำสั่งซื้อ |
ตัวอย่างการตอบกลับ
{
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
}
multi_statusสถานะหลายคำสั่งซื้อ
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key |
คีย์ API ของคุณ |
action |
status |
orders |
รหัสคำสั่งซื้อ (คั่นด้วยจุลภาค ไม่เกิน 100 รหัส) |
ตัวอย่างการตอบกลับ
{
"1": {
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
},
"10": {
"error": "Incorrect order ID"
},
"100": {
"charge": "1.44219",
"start_count": "234",
"status": "In progress",
"remains": "10",
"currency": "USD"
}
}
refillสร้างคำขอเติมทดแทน
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key |
คีย์ API ของคุณ |
action |
refill |
order |
รหัสคำสั่งซื้อ |
ตัวอย่างการตอบกลับ
{
"refill": "1"
}
multi_refillสร้างคำขอเติมทดแทนหลายรายการ
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key |
คีย์ API ของคุณ |
action |
refill |
orders |
รหัสคำสั่งซื้อ (คั่นด้วยจุลภาค ไม่เกิน 100 รหัส) |
ตัวอย่างการตอบกลับ
[
{
"order": 1,
"refill": 1
},
{
"order": 2,
"refill": 2
},
{
"order": 3,
"refill": {
"error": "Incorrect order ID"
}
}
]
refill_statusดูสถานะการเติมทดแทน
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key |
คีย์ API ของคุณ |
action |
refill_status |
refill |
รหัสการเติมทดแทน |
ตัวอย่างการตอบกลับ
{
"status": "Completed"
}
multi_refill_statusดูสถานะการเติมทดแทนหลายรายการ
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key |
คีย์ API ของคุณ |
action |
refill_status |
refills |
รหัสการเติมทดแทน (คั่นด้วยจุลภาค ไม่เกิน 100 รหัส) |
ตัวอย่างการตอบกลับ
[
{
"refill": 1,
"status": "Completed"
},
{
"refill": 2,
"status": "Rejected"
},
{
"refill": 3,
"status": {
"error": "Refill not found"
}
}
]
cancelสร้างคำขอยกเลิก
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key |
คีย์ API ของคุณ |
action |
cancel |
orders |
รหัสคำสั่งซื้อ (คั่นด้วยจุลภาค ไม่เกิน 100 รหัส) |
ตัวอย่างการตอบกลับ
[
{
"order": 9,
"cancel": {
"error": "Incorrect order ID"
}
},
{
"order": 2,
"cancel": 1
}
]
balanceยอดคงเหลือผู้ใช้
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key |
คีย์ API ของคุณ |
action |
balance |
ตัวอย่างการตอบกลับ
{
"balance": "100.84292",
"currency": "USD"
}