Locations
List all pincodes
GET
/
store
/
countries
/
{country_iso_code}
/
pincodes
List all pincodes
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodesimport requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodes")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"message": "<string>",
"success": true,
"content": {
"pincodes": [
{
"pincode": "<string>",
"city": "<string>",
"state_name": "<string>",
"country_name": "<string>",
"country_iso_code": "<string>"
}
],
"pagination": {
"total_records": 123,
"total_pages": 123,
"previous_page": 123,
"limit": 25,
"next_page": 123
}
}
}{
"message": "<string>",
"success": true,
"code": "<string>",
"errors": {},
"content": {},
"details": "<string>"
}{
"message": "<string>",
"success": true,
"code": "<string>",
"details": "<string>",
"error_id": "<string>"
}Query Parameters
Was this page helpful?
⌘I
List all pincodes
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodesimport requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodes")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/countries/{country_iso_code}/pincodes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"message": "<string>",
"success": true,
"content": {
"pincodes": [
{
"pincode": "<string>",
"city": "<string>",
"state_name": "<string>",
"country_name": "<string>",
"country_iso_code": "<string>"
}
],
"pagination": {
"total_records": 123,
"total_pages": 123,
"previous_page": 123,
"limit": 25,
"next_page": 123
}
}
}{
"message": "<string>",
"success": true,
"code": "<string>",
"errors": {},
"content": {},
"details": "<string>"
}{
"message": "<string>",
"success": true,
"code": "<string>",
"details": "<string>",
"error_id": "<string>"
}