##Dokumentasi API
5027201049 - Muhammad Hilmi Aziz
5207201050 - Muhammad Rifqi Fernanda
5027201062 - Gilang Bayu Gumantara
{{E-gil wallet}} = https://egilwallet.herokuapp.com/
Endpoint : GET {{E-gil wallet}}
Body Request : -
Authorization : -
Server Response :
BERHASIL :
Documentation : https://github.com/MuhammadHilmiAzis/FP-Pemograman-Intgeratif
Endpoint : POST {{E-gill wallet}}api/profile
Body Request : username, email, password
Authorization : -
Contoh:
{
"username" : "balabala",
"email" : "bala@gmail.com",
"password" : "123"
}
Server Response :
BERHASIL :
{
"message": "Register successfully !!",
"status": 200
}
Endpoint : POST {{E-gil wallet}}api/register
Body Request : username, email, password
Authorization : -
Contoh:
{
"username" : "balabala",
"email" : "bala@gmail.com",
"password" : "123"
}
Server Response :
BERHASIL :
{
"message": "Register successfully !!",
"status": 200
}
Endpoint : POST {{E-gil wallet}}api/login
Body Request : email, password
Authorization : -
Contoh:
{
"email" : "bala@gmail.com",
"password" : "123"
}
Server Response :
BERHASIL :
{
"accesToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyRW1haWwiOiJiYWxhQGdtYWlsLmNvbSIsImlhdCI6MTY1NTEyNzAxNCwiZXhwIjoxNjU1MTI3MDc0fQ.QbB3sqL0rI0g4JRMWXLFkWszJndujsq35F-_9F_dBU8",
"status": 200
}
Endpoint : PUT {{E-gil wallet}}api/topup
Body Request : jumlah
Authorization : Bearer Token
Contoh:
{
"jumlah" : "10000"
}
Server Response :
BERHASIL :
{
"topup": 1028000
}
Endpoint : GET {{E-gil wallet}}api/profile
Body Request : -
Authorization : Bearer Token
Server Response :
BERHASIL :
{
"username": "balabala",
"email": "bala@gmail.com",
"balance": "1028000"
}
Endpoint : POST {{E-gil wallet}}api/pembelian
Body Request : email, harga
Authorization : Bearer Token
Contoh:
{
"email" : "bala@gmail.com",
"harga" : "10000"
}
Server Response :
BERHASIL :
{
"message": "Payment success !",
"status": 200
}