Search HS Codes
curl --request GET \
--url https://api-pacb-uat.eximpe.com/pg/hs-codes/ \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>'import requests
url = "https://api-pacb-uat.eximpe.com/pg/hs-codes/"
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Client-ID': '<api-key>', 'X-Client-Secret': '<api-key>'}
};
fetch('https://api-pacb-uat.eximpe.com/pg/hs-codes/', 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://api-pacb-uat.eximpe.com/pg/hs-codes/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Client-ID: <api-key>",
"X-Client-Secret: <api-key>"
],
]);
$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://api-pacb-uat.eximpe.com/pg/hs-codes/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-pacb-uat.eximpe.com/pg/hs-codes/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.eximpe.com/pg/hs-codes/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "HS codes retrieved successfully",
"data": {
"count": 1,
"page": 1,
"page_size": 250,
"next": null,
"previous": null,
"results": [
{
"id": 10421,
"value": "84713010",
"description": "Personal computer, portable, laptop",
"policy": "Free"
}
]
}
}{
"success": false,
"error": {
"code": "ERR_AUTH_000",
"message": "Missing credentials",
"details": {
"authentication": "Missing credentials."
}
}
}{
"success": false,
"error": {
"code": "ERR_TRAVEL_003",
"message": "This call is not allowed for this key.",
"details": {
"authentication": "This call is not allowed for this key."
}
}
}Reference Data
Search HS Codes
Find the HS codes EximPe recognises, by code or description.
GET
/
pg
/
hs-codes
/
Search HS Codes
curl --request GET \
--url https://api-pacb-uat.eximpe.com/pg/hs-codes/ \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>'import requests
url = "https://api-pacb-uat.eximpe.com/pg/hs-codes/"
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Client-ID': '<api-key>', 'X-Client-Secret': '<api-key>'}
};
fetch('https://api-pacb-uat.eximpe.com/pg/hs-codes/', 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://api-pacb-uat.eximpe.com/pg/hs-codes/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Client-ID: <api-key>",
"X-Client-Secret: <api-key>"
],
]);
$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://api-pacb-uat.eximpe.com/pg/hs-codes/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-pacb-uat.eximpe.com/pg/hs-codes/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.eximpe.com/pg/hs-codes/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "HS codes retrieved successfully",
"data": {
"count": 1,
"page": 1,
"page_size": 250,
"next": null,
"previous": null,
"results": [
{
"id": 10421,
"value": "84713010",
"description": "Personal computer, portable, laptop",
"policy": "Free"
}
]
}
}{
"success": false,
"error": {
"code": "ERR_AUTH_000",
"message": "Missing credentials",
"details": {
"authentication": "Missing credentials."
}
}
}{
"success": false,
"error": {
"code": "ERR_TRAVEL_003",
"message": "This call is not allowed for this key.",
"details": {
"authentication": "This call is not allowed for this key."
}
}
}Overview
Search the HS codes EximPe recognises, by code or by description. Use it to find a valid code wherever a request takes one, for examplehs_code on an order, or global_company.hs_codes on Create Merchant and Update Merchant.
This endpoint is available to direct merchants and PSPs, including sub-merchants that call with their own credentials. Results are the same for every caller. PSPs do not need to send X-Merchant-ID.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| search | string | No | Text to match against the code and its description, e.g. 8471 or laptop. Leave it out to page through every code. |
| page | integer | No | Page number. Default 1. |
| page_size | integer | No | Results per page. Default 250, maximum 1000. |
Response
data is one page of results, ordered by code:
| Name | Type | Description |
|---|---|---|
| count | integer | Total number of matching codes. |
| page | integer | The page returned. |
| page_size | integer | Results per page. |
| next | string | null | URL of the next page, or null on the last page. |
| previous | string | null | URL of the previous page, or null on the first page. |
| results | array | The HS codes on this page. |
| Name | Type | Description |
|---|---|---|
| id | integer | EximPe’s ID for the code. |
| value | string | The HS code. Send this wherever a request asks for an HS code. |
| description | string | What the code covers. |
| policy | string | The import policy that applies to the code. Empty when none is recorded. |
{
"success": true,
"message": "HS codes retrieved successfully",
"data": {
"count": 2,
"page": 1,
"page_size": 250,
"next": null,
"previous": null,
"results": [
{
"id": 10421,
"value": "84713010",
"description": "Personal computer, portable, laptop",
"policy": "Free"
},
{
"id": 10422,
"value": "84713090",
"description": "Other portable automatic data processing machines",
"policy": "Free"
}
]
}
}
Errors
| Status | error.code | When | details |
|---|---|---|---|
401 | ERR_AUTH_000, ERR_AUTH_001 | X-Client-ID or X-Client-Secret is missing or wrong | {"authentication": "Missing credentials."} or {"authentication": "Invalid credentials."} |
403 | ERR_TRAVEL_003 | You called with a travel-partner key | {"authentication": "This call is not allowed for this key."} |
403 | SUB_MERCHANT_NOT_APPROVED | You are a sub-merchant calling with your own credentials, and EximPe has not approved your account yet | {"merchant_account": "Sub-merchant is not approved yet."} |
403 | ERR_MERCHANT_ACCOUNT_002 | Your account is inactive | {"authentication": "Merchant account is inactive."}. Contact EximPe |
403 | ERR_MERCHANT_ACCOUNT_003 | Your account, or the sub-merchant named in X-Merchant-ID, is suspended or closed | {"merchant_account": "Merchant account is suspended."} or {"merchant_account": "Merchant account is closed."}. Contact EximPe |