Expand a method to see parameters and responses.
GET
Get all created invoices
/api/v1/getBills
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| token | query | string | Yes | Your API key |
Responses
200 — Completed successfully
{
"status": "success",
"data": {
"total": 160,
"per_page": 15,
"current_page": 1,
"last_page": 11,
"next_page_url": "https:\/\/app.sms.by\/api\/v1\/getBills?page=1",
"prev_page_url": null,
"from": 1,
"to": 15,
"data": [
{
"id": 1449,
"user_id": 2,
"d_create": "1526034626",
"d_payment": 0,
"amount": "120.00",
"manager_id": 0,
"comment": "Account replenishment by 120 rubles",
"info": "0",
"type": "SMS",
"rent": "0",
"number": "C11449\/20180511"
}
]
}
}
400 — Incorrect request
404 — Page not found
429 — Request limit exceeded
500 — Server is not available
POST
Creating an account
/api/v1/createBill
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| token | formData | string | Yes | Your API key |
| amount | formData | integer | Yes | Balance replenishment amount |
| amount_type | formData | string | Yes | Balance type. Can be sms or viber |
| type | formData | string | No | Balance top-up type (mandatory for Viber balance). Can be 'subscription' or 'replenishment' |
Responses
200 — Completed successfully
{
"status": "success",
"data": {
"user_id": 2,
"amount": "500",
"d_create": "1616510192",
"d_payment": 0,
"manager_id": 0,
"info": 0,
"type": "sms",
"rent": 0,
"comment": "Top up your SMS account with 500 rubles.",
"id": 3294,
"number": "C13294\/20210323"
}
}
400 — Incorrect request
421 — The data has been verified
429 — Request limit exceeded
500 — Server is not available
GET
Download invoice
/api/v1/downloadBill
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| token | query | string | Yes | Your API key |
| bill_id | query | string | Yes | Please enter your account ID |
