Rajaongkir API using Next.js API route
Provinsi
Mengambil semua provinsi.
https://rajaongkir-api.vercel.app/api/provinsi
Contoh :
https://rajaongkir-api.vercel.app/api/provinsi
Mengambil data provinsi berdasarkan ID.
https://rajaongkir-api.vercel.app/api/provinsi?provinsiId=province_id
Contoh :
https://rajaongkir-api.vercel.app/api/provinsi?provinsiId=21
Kota/kabupaten
Mengambil semua kota/kabupaten.
https://rajaongkir-api.vercel.app/api/kota
Contoh :
https://rajaongkir-api.vercel.app/api/kota
Mengambil data kota/kabupaten berdasarkan ID provinsi.
https://rajaongkir-api.vercel.app/api/kota?provinsiId=province_id
Contoh :
https://rajaongkir-api.vercel.app/api/kota?provinsiId=21
Mengambil data kota/kabupaten berdasarkan ID kota/kabupaten.
https://rajaongkir-api.vercel.app/api/kota?kotaId=city_id
Contoh :
https://rajaongkir-api.vercel.app/api/kota?kotaId=429
Mengambil data kota/kabupaten berdasarkan ID provinsi dan ID kota/kabupaten.
https://rajaongkir-api.vercel.app/api/kota?provinsiId=province_id&kotaId=city_id
Contoh :
https://rajaongkir-api.vercel.app/api/kota?provinsiId=21&kotaId=429