Video dari Solusi BCA
API merupakan singkatan dari Application Programming Interface. Sistem API inilah yang nanti akan memungkinkan dua atau lebih aplikasi berbeda untuk dapat bekomunikasi antara satu dengan yang lainnya.
API Key adalah sebuah password rahasia untuk menghubungkan platform yang satu dengan lainnya jadi pastikan untuk tidak menyebar API Key sembarangan.
Fungsi dari API Key bisa digunakan
I. Fungsi API Key yang jagel tawarkan (akan ditambah seiring perkembangan)
II. Fungsi API Key lebih advance yang Jagel tawarkan
- Berikut dokumentasi API yang disediakan oleh Jagel saat ini.
I. Konfirmasi Pembayaran
1. URL
Method | URL |
POST | https://api.jagel.id/v1/confirmPayment |
2. Parameter
Key | Required | Description | Tipe |
amount |
yes
|
data total transaksi yang akan dikonfirmasi
|
Body
|
apikey |
yes
|
data apikey dari aplikasi yang akan dikonfirmasi
|
Body
|
Accept |
no
|
application/json
|
Header
|
Contoh response jika berhasil
{
"success":true,
"message":"[API] Melakukan konfirmasi pembayaran IDR 24635 untuk nomor pesanan CBI2123123123",
"data":{
"user_id":"105507268195d8c6eded050e0.29770905",
"balance":"1285170"
}
}
|
II. Cek Saldo Akun
1. URL
Method | URL |
GET | https://api.jagel.id/v1/balance/check |
2. Parameter
Key | Required | Description | Tipe |
type |
yes
|
Pilihan tipe yang tersedia:
|
Body
|
value |
yes
|
nilai pencarian berdasarkan parameter type yang dipilih
|
Body
|
apikey |
yes
|
data apikey dari aplikasi yang akan dikonfirmasi
|
Body
|
Accept |
no
|
application/json
|
Header
|
Contoh response jika berhasil
{
"success": true,
"data": {
"balance": "263000",
"balance_active": "253000"
}
}
|
Catatan: balance_active merupakan total saldo pengguna dikurangi pesanan yang sedang berlangsung. balance merupakan saldo pengguna saat ini. Sedangkan untuk balance_active merupakan saldo aktif pengguna yang bisa digunakan untuk transaksi.
1. URL
Method | URL |
POST | https://api.jagel.id/v1/balance/adjust |
2. Parameter
Key | Required | Description | Tipe |
type |
yes
|
Pilihan tipe yang tersedia:
|
Body
|
value |
yes
|
nilai pencarian berdasarkan parameter type yang dipilih
|
Body
|
apikey |
yes
|
data apikey dari aplikasi yang akan dikonfirmasi
|
Body
|
amount |
yes
|
jumlah nilai nominal rupiah,
nilai negatif untuk pengurangan saldo |
Body
|
adjust_balance_admin |
no
|
Nilai default 0.
Nilai 1 agar perubahan saldo pengguna akan berdampak pada saldo Admin
|
Body
|
note |
no
|
catatan pengaturan (opsional)
|
Body
|
Accept |
no
|
application/json
|
Header
|
Contoh response jika berhasil
{
"success": true,
"data": "15000"
}
|
IV. Kirim Pesan
1. URL
Method | URL |
POST | https://api.jagel.id/v1/message/send |
2. Parameter
Key | Required | Description | Tipe |
type |
yes
|
Pilihan tipe yang tersedia:
|
Body
|
value |
yes
|
nilai pencarian berdasarkan parameter type yang dipilih
|
Body
|
apikey |
yes
|
data apikey dari aplikasi yang akan dikonfirmasi
|
Body
|
content |
yes
|
isi pesan yang akan dikirim
|
Body
|
Accept |
no
|
application/json
|
Header
|
Contoh response jika berhasil
{
"success": true,
"message": "halo juga"
}
|
V. Daftar Pengguna Aplikasi
1. URL
Method | URL |
GET | https://api.jagel.id/v1/user |
2. Parameter
Key | Required | Description | Tipe |
type |
yes
|
Pilihan tipe yang tersedia:
|
Body
|
value |
yes
|
nilai pencarian berdasarkan parameter type yang dipilih
|
Body
|
apikey |
yes
|
data apikey dari aplikasi yang akan dikonfirmasi
|
Body
|
Accept |
no
|
application/json
|
Header
|
Contoh response jika berhasil
{
"success": true,
"data": {
"user_id": "5dedfae6362b9",
"username": "somebody",
"name": "some body",
"phone": "0812345678",
"email": "jagelbot@jagel.id",
"status_partner": "",
"status_driver":"Diterima",
"photo": "empty.png",
"verified_email": 1,
"verified_phone": 0,
"photo_url": "https://www.jagel.id/api/userphoto/empty.png",
"address": {
"address":"jalan sumbe 6",
"city_name":"Kabupaten Gorontalo Utara",
"province_name":"Gorontalo",
"district_name":"Monano"
},
"driver_info":{
"driver_license_plate":"L 2354 UPS",
"driver_model":"honda",
"driver_types":"motor1,Truk,motor2,motor3",
"driver_active_types":"motor1"
}
}
}
|
VI. Daftar Order yang belum selesai
1. URL
Method | URL |
GET | https://api.jagel.id/v1/pendingOrder |
2. Parameter
Key | Required | Description | Tipe |
apikey |
yes
|
data apikey dari aplikasi yang akan dikonfirmasi
|
Body
|
Accept |
no
|
application/json
|
Header
|
Contoh response jika berhasil
{
"success": true,
"data": [
{
"order_no": "JJ19101537397",
"total": 150000
},
{
"order_no": "JJ19101752498",
"total": 254460
},
{
"order_no": "JJ19101720737",
"total": 25201
},
{
"order_no": "JJ19101759084",
"total": 10000
},
{
"order_no": "JJ19102896705",
"total": 25736
}
]
}
|
VII. Tampilkan spesifikasi aplikasi
1. URL
Method | URL |
GET | https://api.jagel.id/v1/app/detail |
2. Parameter
Key | Required | Description | Tipe |
apikey |
yes
|
data apikey dari aplikasi yang akan dikonfirmasi
|
Body
|
Accept |
no
|
application/json
|
Header
|
Contoh response jika berhasil
{
"success": true,
"data": {
"codename": "firstapp",
"icon": "https://www.jagel.id/api/appicon/empty.png",
"name": "first_app"
}
}
|
VIII. Top Up
1. URL
Method | URL |
POST | https://api.jagel.id/v1/order/topup |
2. Parameter
Key | Required | Description | Tipe |
apikey |
yes
|
data apikey dari aplikasi yang akan dikonfirmasi
|
Body
|
amount |
yes
|
jumlah rupiah topup
|
Body
|
type |
yes
|
Pilihan tipe yang tersedia:
|
Body
|
value |
yes
|
nilai pencarian berdasarkan parameter type yang dipilih
|
Body
|
Accept |
no
|
application/json
|
Header
|
Contoh response jika berhasil
{
"success": true,
"data": {
"order_no": "JJ21022228866",
"total": 44483,
"confirmation_code": 483
}
}
|