Product Classification
Glopal offers product HS code classification via its AI driven API service, applying a sophisticated system of trained machine learning models, blended with latest external LLM services.

Client username (set by Glopal)
username
Pattern: ^[a-z0-9\-]{3,255}$
Optional system username to enable separation of authentication credentials by integrated client system. (set by Glopal)
alias-username
Pattern: ^[a-z0-9\-]{3,50}$
The authentication signature is created by using the concatenation of the login, the ‘@’ sign and the timestamp, transformed into a HMAC_256 signature using your secret access key.
40b976b35a08bb951439ea7bbfa0a7bd73dab7c813399a31d9d1a157bc08929b
Pattern: ^[0-9a-f]{64}$
The authentication timestamp must be a decimal numeric representing the current POSIX time, extended to microsecond accuracy. If the requesting system does not provide high-resolution time, it is advised to use a 6-digit random number. It is important to have the requesting system synchronised with a reliable time source (f.i. a stratum 2 NTP server) to avoid request rejection.
1680010295.775523
Pattern: ^[12]\d{9}\.\d{6}$
0.68
Pattern: (^0\.\d{2}$|^[1-9]\d*\.\d{2}$)
const timestamp = String(Date.now() / 1000).padEnd(17, '0');
const username = "username";
const signature = CryptoJS.HmacSHA256(
`${username}@${timestamp}`, "sharedsecret"
).toString(CryptoJS.digest)
const response = await fetch('https://ws.xport.glopalservice.com/tcc/classify', {
method: 'POST',
headers: {
"Content-Type": "application/json",
"x-login": username,
"x-timestamp": timestamp,
"x-signature": signature
},
body: JSON.stringify({
"args": {
"products": [
{
"title": "Signature Handbag",
"description": "Mini Handbag in Quilted Leather in Black",
"category": [
"Accessories",
"Handbags"
],
"materials": [
"90% Calf (Leather) 10% Cotton"
],
"gender": "F"
}
]
}
}),
});
const data = await response.json();
{
"error": 0,
"products": [
{
"error": 0,
"description": "Mini Handbag in Quilted Leather in Black",
"title": "Signature Handbag",
"accuracy": 0.9826,
"hs_code": "420221",
"hs_code_description": "Handbags, Whether Or Not With Shoulder Strap Or Handles, With Outer Surface Of Leather Or Of Composition Leather",
"category": [
"Apparel & Accessories",
"Handbags, Wallets & Cases",
"Handbags"
],
"source": "model.base"
}
]
}
Last updated