Documentation

Shipping API Documentation

Documentation for origin, destination hierarchy, and shipping cost endpoints for external integration.

Base URL
https://core.keepbelanja.com
Authentication

Header `Key`

All endpoints on this page require the `Key` header, an `application/x-www-form-urlencoded` body, and HTTPS.
HeaderKey: your_api_key_here
Bodyapplication/x-www-form-urlencoded
ConnectionHTTPS required.
Missing key`401 Key header is required.`
Wrong body type`415 Use application/x-www-form-urlencoded for API request body.`
Invalid key`403 Invalid API key.`
Quota limit`429 Monthly quota exceeded.`
Response format

Meta + Data

{
  "meta": {
    "message": "Success Get Province",
    "code": 200,
    "status": "success"
  },
  "data": [
    { "id": 1, "name": "DKI JAKARTA" }
  ]
}
Shipping API

Endpoints with API key

6 endpoints
GET
/api/destination/provinces
Get all provinces.
POST
/api/destination/cities
Body: province_id
POST
/api/destination/districts
Body: city_id
POST
/api/destination/subdistricts
Body: district_id
GET
/api/origin
Optional query: keyword
POST
/api/tariff
Body: courier, origin, destination, weight
Examples

Request and response examples

Get provinces
Get all provinces.
curl --location 'https://core.keepbelanja.com/api/destination/provinces' \
--header 'Key: YOUR_API_KEY'
Get cities by province ID
Get cities from one province.
curl --location 'https://core.keepbelanja.com/api/destination/cities' \
--header 'Key: YOUR_API_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'province_id=1'
Get districts by city ID
Get districts from one city.
curl --location 'https://core.keepbelanja.com/api/destination/districts' \
--header 'Key: YOUR_API_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'city_id=149'
Get subdistricts by district ID
Get subdistricts with ZIP code.
curl --location 'https://core.keepbelanja.com/api/destination/subdistricts' \
--header 'Key: YOUR_API_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'district_id=1544'
Get origin list
Get origin list.
curl --location 'https://core.keepbelanja.com/api/origin?keyword=jakarta' \
--header 'Key: YOUR_API_KEY'
Check tariff
Calculate shipping cost using origin, destination, and weight in grams.
curl --location 'https://core.keepbelanja.com/api/tariff' \
--header 'Key: YOUR_API_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'courier=JNE' \
--data-urlencode 'origin=1' \
--data-urlencode 'destination=15148' \
--data-urlencode 'weight=1000'
Reference

Request body reference

Endpoint Method Body / Query Notes
https://core.keepbelanja.com/api/originGETkeyword query optionalGet origin list.
https://core.keepbelanja.com/api/destination/districtsPOSTcity_idGet districts from one city.
https://core.keepbelanja.com/api/destination/subdistrictsPOSTdistrict_idGet subdistricts with ZIP code.
https://core.keepbelanja.com/api/tariffPOSTcourier, origin, destination, weightCalculate shipping cost using origin, destination, and weight in grams.