curl --request GET \
--url https://api-pacb-uat.eximpe.com/partners/merchants/hs-codes/ \
--header 'X-API-Version: <api-key>' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>'import requests
url = "https://api-pacb-uat.eximpe.com/partners/merchants/hs-codes/"
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"X-API-Version": "<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>',
'X-API-Version': '<api-key>'
}
};
fetch('https://api-pacb-uat.eximpe.com/partners/merchants/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/partners/merchants/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-API-Version: <api-key>",
"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/partners/merchants/hs-codes/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
req.Header.Add("X-API-Version", "<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/partners/merchants/hs-codes/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("X-API-Version", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.eximpe.com/partners/merchants/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>'
request["X-API-Version"] = '<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_MERCHANT_017",
"message": "Sub-Merchant endpoints are only available to IMPORT PSP accounts",
"details": {}
}
}Search HS Codes
Find the HS codes a goods sub-merchant can declare, by code or description.
curl --request GET \
--url https://api-pacb-uat.eximpe.com/partners/merchants/hs-codes/ \
--header 'X-API-Version: <api-key>' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>'import requests
url = "https://api-pacb-uat.eximpe.com/partners/merchants/hs-codes/"
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"X-API-Version": "<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>',
'X-API-Version': '<api-key>'
}
};
fetch('https://api-pacb-uat.eximpe.com/partners/merchants/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/partners/merchants/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-API-Version: <api-key>",
"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/partners/merchants/hs-codes/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
req.Header.Add("X-API-Version", "<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/partners/merchants/hs-codes/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("X-API-Version", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.eximpe.com/partners/merchants/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>'
request["X-API-Version"] = '<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_MERCHANT_017",
"message": "Sub-Merchant endpoints are only available to IMPORT PSP accounts",
"details": {}
}
}Overview
A sub-merchant with a goods category must declare at least one HS code inglobal_company.hs_codes, and each code must be one EximPe recognises. This endpoint searches that list by code or by description.
Send the value of each code you pick in hs_codes on Create Merchant or Update Merchant.
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 a page, with the same paging fields as List Merchants. Each result is one HS code:
| Name | Type | Description |
|---|---|---|
| id | integer | EximPe’s ID for the code. |
| value | string | The HS code. Send this in hs_codes. |
| 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_AUTH_003 | Your account is not a PSP | {}. Only PSPs can manage sub-merchants |
403 | ERR_MERCHANT_017 | Your account is a PSP, but not set up for import collections | {}. Contact EximPe |
Authorizations
Client Application ID - Your unique application identifier used to authenticate API requests. You can find your Client ID in the Developer Settings section of the merchant dashboard.
Client Secret Key - Your secret key used alongside the Client ID for secure authentication. Keep this confidential and never expose it in client-side code. Available in the Developer Settings section of the merchant dashboard.
API Version - Specifies which version of the API to use (e.g., '1.X.X', '2.X.X', or '3.X.X'). This header allows you to control which API version your integration uses. Default version information is available in the Developer Settings.
Query Parameters
Text to match against the code and its description.
Page number. Default 1.
Results per page. Default 250, maximum 1000.
x <= 1000