KM Api
Base URI
http://api.km.com
GET
/device/
{deviceId}
GET
/device/active/
{deviceId}
POST
/device/active
POST
/device/active
Kích hoạt thiết bị
Request headers
Content-Type
string
optional
Default:
application/json
Request body
Responses
201
Created
Body
string
Examples
"DEVICE_ACTIVED_KEY"
400
Bad Request
GET
/song/
{name}
/{style}
/{singer}
/{listmvonbox}
/{number}
/{page}
GET
/song/
{name}
/{style}
/{singer}
/{listmvonbox}
/{number}
/{page}
Get Danh sách bài hát từ server
Path variables
name
string
optional
style
string
optional
singer
string
required
listmvonbox
string
optional
number
string
optional
page
string
optional
Request parameters
name
string
required
Tên bài hát
style
string
required
Thể loại bài hát
singer
string
optional
Tên ca sỹ
listmvonbox
string
optional
number
integer
optional
page
integer
optional
Request headers
Content-Type
string
required
application/json
token
string
optional
deviceId
string
required
Responses
200
OK
Body
404
Not Found
GET
/payment/checkMoney
POST
/payment/buySong
POST
/payment/payCoin
GET
/payment/getPayments/
{pageIndex}
/{pageNumber}
POST
/payment/buySong
Thanh toán tiền cho bài hát
Request headers
Content-Type
string
optional
Default:
application/json
deviceId
string
required
token
string
required
Request body
Object
songid
number
Example:
1
price
number
Example:
12000
Responses
201
Created
Body
number
Examples
800000
400
Bad Request
404
Not Found
POST
/payment/payCoin
Request headers
Content-Type
string
required
Default:
application/json
token
string
required
Request body
Object
songid
string
Example:
1
price
string
Example:
12000
Responses
200
OK
Body
string
Examples
"mp3.km.com/bai-hat/nothing-s-gonna-my-love-for-you.../zw67cfez.htm"
404
Not Found
GET
/payment/getPayments/
{pageIndex}
/{pageNumber}
Lấy về danh sách các lần thanh toán tiền qua payment provider
Path variables
pageIndex
string
required
pageNumber
string
required
Request headers
Content-Type
string
optional
application/json
deviceId
string
required
token
string
required
Responses
POST
/account
POST
/account
Add new Account
Request headers
Content-Type
string
required
application/json
Request body
Responses
201
Created
Body
400
Bad Request
Examples
POST http://api.km.com/account HTTP/1.1
Content-Type: application/json
{
"id": "",
"username": "nguyengiap1467@gmail.com",
"email": "nguyengiap1467@gmail.com",
"password": "admin@123",
"createdAt": "2015-01-01",
"isValidate": true,
"validateKey": "",
"validateExpired": "2015-01-01",
"coins": 1
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "",
"username": "nguyengiap1467@gmail.com",
"email": "nguyengiap1467@gmail.com",
"password": "admin@123",
"createdAt": "2015-01-01",
"isValidate": true,
"validateKey": "",
"validateExpired": "2015-01-01",
"coins": 1
}
HTTP/1.1 400 Bad Request
Object
id
string
activeAt
string
date
isActive
boolean
activePhone
string
createBy
string
createAt
string
date
updateBy
string
updateAt
string
date
Methods:
deviceActive
Object
id
number
Example:
1
name
string
Example:
Nothing's Gonna Change My Love For You
urlMovie
string
Example:
mp3.km.com/bai-hat/nothing-s-gonna-my-love-for-you.../zw67cfez.htm
style
number
price
number
Example:
12000
isActive
boolean
Example:
true
activePhone
string
createBy
string
createAt
string
Example:
2015-01-01T13:00:00
updateBy
string
updateAt
string
Example:
2015-01-01T13:00:00
Methods:
getSongList
Object
id
number
Example:
1
transactionId
number
Example:
1
price
string
Example:
12000
accountId
string
isActive
string
Example:
true
createBy
string
createAt
string
Example:
2015-01-01T13:00:00
updateBy
string
updateAt
string
Example:
2015-01-01T13:00:00
Methods:
getPayments
Object
id
string
username
string
Example:
nguyengiap1467@gmail.com
email
string
Example:
nguyengiap1467@gmail.com
password
string
Example:
admin@123
createdAt
string
Example:
2015-01-01
isValidate
boolean
validateKey
string
validateExpired
string
Example:
2015-01-01
coins
number
Methods:
createAccount