Search International Destination
Overview
The Search International Destination endpoint is used to retrieve destination data for international shipments via
the RajaOngkir integration. This feature enables merchants and systems to dynamically search and select destination
countries outside of Indonesia, which is a key requirement for international shipping calculations and logistics
workflows.
This endpoint is highly useful for e-commerce checkout systems, B2B platforms, or any application that needs to
calculate or prepare international deliveries.
Key Feature
- π Supports Global Shipping
Search for international destinations in various countries worldwide. - π Seamless Integration with Cost Calculation
Returnedcan be used directly with cost calculation endpoints.destination_code - π¦ Ready for International Logistics
Helps users accurately fill shipping forms for overseas deliveries.
How it Works
- Make a POST request to the endpoint with a:
value- Value can include country names (e.g.,).
"japan"
- The API returns a list of matched locations, including:
- Country name, and a unique Countryfor each.
id
- Use thein subsequent calls to the
conutry_idendpoint or when creating international shipment requests.calculate/international-cost
Request Body
curl --location --globoff 'https://rajaongkir.komerce.id/api/v1/destination/international-destination?search={{%20search_region%20}}&limit=99&offset=99' \ --header 'key: inputapikey'
Query Parameter
Headers
| Key | Type | Description |
|---|---|---|
key | string | this Value contain an secret APIKEY identic for Shipping Cost API |
Query Params
| Key | Type | Description |
|---|---|---|
search | string | This parameter is used to search for the intended area, only can search the nation name. |
limit | int | The maximum number of rows (or records) to be returned by the query. |
offset | int | This is often used with LIMIT to limit query results in "pages" or "sections". |
Β danger
For each header and parameter that has a sign, it is a parameter that must be Required when making a
request, otherwise there will be a system error that will warn the user regarding the request made.
*Response
Response Structure
| Key | Value (Description) |
|---|---|
meta.message | Response for searching address. |
meta.code | Any response have different code. |
meta.status | Boolean status for checking address. |
data[].country_id | A uniqe id |
data[].country_name | Name of the search nation |
Success Respons for Search Internation Destination
{ "meta": { "message": "Success Get International Destination", "code": 200, "status": "success" }, "data": [ { "country_id": "{{ country_id }}", "country_name": "{{ country_name }}" } ] }
Error Respons for Search International Destination
{ "meta": { "message": "International Destinations Data not found", "code": 404, "status": "error" }, "data": null }
Error Code
| Code | Status | Description | How to Fix |
|---|---|---|---|
200 | Success | ||
404 | Error | International Destinations Data not found | Make sure the nation name you are looking for is correct. |
422 | Error | Parameter Missing | Make sure the required parameters are given when requesting data. |
500 | Error | Server Error |
Tips to Avoid Error
- β Provide a meaningful search
Avoid empty strings or irrelevant characters; use proper nation names. - π Include valid authorization
Always add yourin the header.key - β¨οΈ Implement frontend input validation
For best results, guide users to enter country names. - β οΈ Use debounce for live search
Prevent too many API calls by throttling or debouncing input. - π Gracefully handle βno resultsβ
Show friendly messages if the API returns an empty list due to unrecognized keywords.