Search Destination

Overview

The Search Destination Endpoint is designed to provide a fast and accurate way to find locations within the shipping system. This endpoint supports searching for various administrative levels, including:

  • City
  • Districts
  • Sub-districts
  • Postal Codes

By integrating this endpoint, users can easily retrieve precise location details without manually mapping regional hierarchies. This ensures greater flexibility and accuracy in defining both origin and destination areas.

Key Features

βœ… Comprehensive Location Search – Supports multi-level search from provinces to sub-districts.
βœ… Optimized for Efficiency – Fast response times without additional processing on the user’s side.
βœ… Seamless Logistics Integration – Ensures accurate regional mapping for shipping cost calculations.
βœ… Error Minimization – Reduces inconsistencies caused by mismatched regional data structures.

How It Works

The Search Destination Endpoint streamlines the process of finding and selecting locations within a shipping workflow. Instead of requiring users to manually filter through Province β†’ City β†’ District β†’ Sub-district, the system automates the search and presents relevant location options based on input criteria.

1️⃣ Automatic Location Hierarchy Processing

  • Users can input search queries using City, District, Sub-district, or Postal Code.
  • The system automatically maps and retrieves related location data without additional configuration.

2️⃣ Precise & Reliable Data Retrieval

  • The response includes region IDs corresponding to the searched origin or destination.
  • Users receive a structured JSON response containing multiple location options to select from.

3️⃣ Seamless Transition to Cost Calculation

  • Once a user selects a location, the region ID can be used in the Calculate Endpoint for shipping cost estimation.
  • This workflow ensures smooth data transition from location selection to shipping fee calculation.

Response Format

The Search Destination Endpoint returns a JSON object containing:

  • Region ID – Unique identifier for the location.
  • Location Name – Full name of the matched region.
  • Hierarchy Details – Information on province, city, and sub-district levels.

Users must select one of the provided options to finalize their destination before proceeding to cost estimation. This step ensures that the most accurate location is used for logistics calculations.

Conclusion

By leveraging the Search Destination Endpoint, users can enhance their shipping processes with:

βœ” Faster location searches
βœ” More accurate origin & destination mapping
βœ” Effortless integration with the shipping fee calculation system

This approach eliminates manual regional data mapping, improving efficiency and reducing errors in shipping operations.

Request Body

curl --location 'https://api-sandbox.collaborator.komerce.id/tariff/api/v1/destination/search?keyword=53131' \ --header 'x-api-key: yourapikey'

Response

Success Response

{ "meta": { "message": "Sucessfully Get Destination Data", "code": 200, "status": "success" }, "data": [ { "id": 34167, "label": "PURWOKERTO, NGADILUWIH, KEDIRI, 64171", "subdistrict_name": "PURWOKERTO", "district_name": "NGADILUWIH", "city_name": "KEDIRI", "zip_code": "64171" }, { "id": 67150, "label": "PURWOKERTO, KAYEN, PATI, 59171", "subdistrict_name": "PURWOKERTO", "district_name": "KAYEN", "city_name": "PATI", "zip_code": "59171" }, { "id": 67266, "label": "PURWOKERTO, TAYU, PATI, 59155", "subdistrict_name": "PURWOKERTO", "district_name": "TAYU", "city_name": "PATI", "zip_code": "59155" }, { "id": 46940, "label": "PURWOKERTO, SRENGAT, BLITAR, 66152", "subdistrict_name": "PURWOKERTO", "district_name": "SRENGAT", "city_name": "BLITAR", "zip_code": "66152" }, { "id": 66703, "label": "PURWOKERTO, BRANGSONG, KENDAL, 51371", "subdistrict_name": "PURWOKERTO", "district_name": "BRANGSONG", "city_name": "KENDAL", "zip_code": "51371" }, { "id": 66793, "label": "PURWOKERTO, PATEBON, KENDAL, 51351", "subdistrict_name": "PURWOKERTO", "district_name": "PATEBON", "city_name": "KENDAL", "zip_code": "51351" }, { "id": 69997, "label": "PURWOKERTO, NGIMBANG, LAMONGAN, 62273", "subdistrict_name": "PURWOKERTO", "district_name": "NGIMBANG", "city_name": "LAMONGAN", "zip_code": "62273" }, { "id": 72907, "label": "-, PURWOKERTO, PURWOKERTO, 0", "subdistrict_name": "-", "district_name": "PURWOKERTO", "city_name": "PURWOKERTO", "zip_code": "0" }, { "id": 72908, "label": "BANTARSOKA, PURWOKERTO BARAT, BANYUMAS, 53133", "subdistrict_name": "BANTARSOKA", "district_name": "PURWOKERTO BARAT", "city_name": "BANYUMAS", "zip_code": "53133" }, { "id": 72909, "label": "KARANGLEWAS LOR, PURWOKERTO BARAT, BANYUMAS, 53136", "subdistrict_name": "KARANGLEWAS LOR", "district_name": "PURWOKERTO BARAT", "city_name": "BANYUMAS", "zip_code": "53136" }, { "id": 72910, "label": "KEDUNGWULUH, PURWOKERTO BARAT, BANYUMAS, 53131", "subdistrict_name": "KEDUNGWULUH", "district_name": "PURWOKERTO BARAT", "city_name": "BANYUMAS", "zip_code": "53131" }, { "id": 72911, "label": "KOBER, PURWOKERTO BARAT, BANYUMAS, 53132", "subdistrict_name": "KOBER", "district_name": "PURWOKERTO BARAT", "city_name": "BANYUMAS", "zip_code": "53132" }, { "id": 72912, "label": "PASIR KIDUL, PURWOKERTO BARAT, BANYUMAS, 53135", "subdistrict_name": "PASIR KIDUL", "district_name": "PURWOKERTO BARAT", "city_name": "BANYUMAS", "zip_code": "53135" }, { "id": 72913, "label": "PASIRMUNCANG, PURWOKERTO BARAT, BANYUMAS, 53137", "subdistrict_name": "PASIRMUNCANG", "district_name": "PURWOKERTO BARAT", "city_name": "BANYUMAS", "zip_code": "53137" }, { "id": 72914, "label": "REJASARI, PURWOKERTO BARAT, BANYUMAS, 53134", "subdistrict_name": "REJASARI", "district_name": "PURWOKERTO BARAT", "city_name": "BANYUMAS", "zip_code": "53134" }, { "id": 72915, "label": "BERKOH, PURWOKERTO SELATAN, BANYUMAS, 53146", "subdistrict_name": "BERKOH", "district_name": "PURWOKERTO SELATAN", "city_name": "BANYUMAS", "zip_code": "53146" }, { "id": 72916, "label": "KARANG KLESEM, PURWOKERTO SELATAN, BANYUMAS, 53144", "subdistrict_name": "KARANG KLESEM", "district_name": "PURWOKERTO SELATAN", "city_name": "BANYUMAS", "zip_code": "53144" }, { "id": 72917, "label": "KARANG PUCUNG, PURWOKERTO SELATAN, BANYUMAS, 53142", "subdistrict_name": "KARANG PUCUNG", "district_name": "PURWOKERTO SELATAN", "city_name": "BANYUMAS", "zip_code": "53142" } ] }