curl --request POST \
--url https://www.closient.com/products/api/v1/digital-link/parse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"url": "https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231"
}
'import requests
url = "https://www.closient.com/products/api/v1/digital-link/parse"
payload = { "url": "https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231'})
};
fetch('https://www.closient.com/products/api/v1/digital-link/parse', 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://www.closient.com/products/api/v1/digital-link/parse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.closient.com/products/api/v1/digital-link/parse"
payload := strings.NewReader("{\n \"url\": \"https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.closient.com/products/api/v1/digital-link/parse")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/products/api/v1/digital-link/parse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231\"\n}"
response = http.request(request)
puts response.read_body{
"gtin": "00614141123452",
"is_valid": true,
"lot": "LOT1",
"raw_ais": {
"10": "LOT1",
"21": "SN1",
"01": "00614141123452"
},
"serial": "SN1",
"url": "https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Parse a GS1 Digital Link URL into structured AIs
Accept a URL string; return the structured GS1 Digital Link components (GTIN, lot, expiry, serial, plus any other AIs found in the path). Returns is_valid: false when the URL is not a recognisable Digital Link rather than 4xx-erroring — callers can use a single endpoint to triage arbitrary scanned URLs.
curl --request POST \
--url https://www.closient.com/products/api/v1/digital-link/parse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"url": "https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231"
}
'import requests
url = "https://www.closient.com/products/api/v1/digital-link/parse"
payload = { "url": "https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231'})
};
fetch('https://www.closient.com/products/api/v1/digital-link/parse', 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://www.closient.com/products/api/v1/digital-link/parse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.closient.com/products/api/v1/digital-link/parse"
payload := strings.NewReader("{\n \"url\": \"https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.closient.com/products/api/v1/digital-link/parse")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/products/api/v1/digital-link/parse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231\"\n}"
response = http.request(request)
puts response.read_body{
"gtin": "00614141123452",
"is_valid": true,
"lot": "LOT1",
"raw_ais": {
"10": "LOT1",
"21": "SN1",
"01": "00614141123452"
},
"serial": "SN1",
"url": "https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Authorizations
Body
Request body for the parse endpoint.
The candidate URL to parse. Should be a GS1 Digital Link URI of the form https://{host}/01/{gtin}[/10/{lot}][/21/{serial}][?17={expiry}].
1 - 4096"https://gtin.one/01/00614141123452/10/LOT1/21/SN1?17=261231"
Response
OK
Response body for the parse endpoint.
is_valid is True when the input is a recognisable GS1 Digital Link
(carries a /01/{gtin} segment with a valid Mod-10 GTIN) and False
otherwise. When False, all the structured fields are null and raw_ais
is empty — the caller should fall back to treating the URL as an
arbitrary link rather than a GS1-aware payload.
True when the URL parses as a conformant GS1 Digital Link with a valid GTIN.
The input URL, echoed back unchanged.
The normalized GTIN-14 if a /01/ segment is present and Mod-10-valid; otherwise null.
"00614141123452"
GS1 AI 10 (lot/batch) if present in the path.
GS1 AI 17 (expiry, YYMMDD) if present in the path. Note: GS1 spec allows AI 17 on the query string too — this v1 endpoint reads path-only per the underlying parser.
"261231"
GS1 AI 21 (serial) if present in the path.
Every AI/value pair found in the path, including any non-first-class AIs not surfaced as named fields above.
Show child attributes
Show child attributes