curl --request POST \
--url https://www.closient.com/scanner/api/v1/captures \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"capture_type": "BARCODE",
"gtin": "00012345600012",
"metadata": {
"order_id": "6735"
},
"raw_value": "00012345600012",
"session_short_id": "keATfB8VP2gSjcnTbsMNQL"
}
'import requests
url = "https://www.closient.com/scanner/api/v1/captures"
payload = {
"capture_type": "BARCODE",
"gtin": "00012345600012",
"metadata": { "order_id": "6735" },
"raw_value": "00012345600012",
"session_short_id": "keATfB8VP2gSjcnTbsMNQL"
}
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({
capture_type: 'BARCODE',
gtin: '00012345600012',
metadata: {order_id: '6735'},
raw_value: '00012345600012',
session_short_id: 'keATfB8VP2gSjcnTbsMNQL'
})
};
fetch('https://www.closient.com/scanner/api/v1/captures', 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/scanner/api/v1/captures",
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([
'capture_type' => 'BARCODE',
'gtin' => '00012345600012',
'metadata' => [
'order_id' => '6735'
],
'raw_value' => '00012345600012',
'session_short_id' => 'keATfB8VP2gSjcnTbsMNQL'
]),
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/scanner/api/v1/captures"
payload := strings.NewReader("{\n \"capture_type\": \"BARCODE\",\n \"gtin\": \"00012345600012\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"raw_value\": \"00012345600012\",\n \"session_short_id\": \"keATfB8VP2gSjcnTbsMNQL\"\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/scanner/api/v1/captures")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"capture_type\": \"BARCODE\",\n \"gtin\": \"00012345600012\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"raw_value\": \"00012345600012\",\n \"session_short_id\": \"keATfB8VP2gSjcnTbsMNQL\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/scanner/api/v1/captures")
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 \"capture_type\": \"BARCODE\",\n \"gtin\": \"00012345600012\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"raw_value\": \"00012345600012\",\n \"session_short_id\": \"keATfB8VP2gSjcnTbsMNQL\"\n}"
response = http.request(request)
puts response.read_body{
"capture_type": "BARCODE",
"created": "2025-08-15T14:05:00Z",
"error_message": "",
"gtin": "00012345600012",
"id": "keATfB8VP2gSjcnTbsMNQL",
"metadata": {
"order_id": "6735"
},
"processed_at": "2025-08-15T14:05:02Z",
"product_name": "Trail Mix 12oz",
"product_short_id": "trail-mix-12oz",
"raw_value": "00012345600012",
"status": "matched"
}{
"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"
}Submit a barcode or QR scan
Submit a barcode or QR code scan and queue the processing pipeline.
curl --request POST \
--url https://www.closient.com/scanner/api/v1/captures \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"capture_type": "BARCODE",
"gtin": "00012345600012",
"metadata": {
"order_id": "6735"
},
"raw_value": "00012345600012",
"session_short_id": "keATfB8VP2gSjcnTbsMNQL"
}
'import requests
url = "https://www.closient.com/scanner/api/v1/captures"
payload = {
"capture_type": "BARCODE",
"gtin": "00012345600012",
"metadata": { "order_id": "6735" },
"raw_value": "00012345600012",
"session_short_id": "keATfB8VP2gSjcnTbsMNQL"
}
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({
capture_type: 'BARCODE',
gtin: '00012345600012',
metadata: {order_id: '6735'},
raw_value: '00012345600012',
session_short_id: 'keATfB8VP2gSjcnTbsMNQL'
})
};
fetch('https://www.closient.com/scanner/api/v1/captures', 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/scanner/api/v1/captures",
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([
'capture_type' => 'BARCODE',
'gtin' => '00012345600012',
'metadata' => [
'order_id' => '6735'
],
'raw_value' => '00012345600012',
'session_short_id' => 'keATfB8VP2gSjcnTbsMNQL'
]),
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/scanner/api/v1/captures"
payload := strings.NewReader("{\n \"capture_type\": \"BARCODE\",\n \"gtin\": \"00012345600012\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"raw_value\": \"00012345600012\",\n \"session_short_id\": \"keATfB8VP2gSjcnTbsMNQL\"\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/scanner/api/v1/captures")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"capture_type\": \"BARCODE\",\n \"gtin\": \"00012345600012\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"raw_value\": \"00012345600012\",\n \"session_short_id\": \"keATfB8VP2gSjcnTbsMNQL\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/scanner/api/v1/captures")
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 \"capture_type\": \"BARCODE\",\n \"gtin\": \"00012345600012\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"raw_value\": \"00012345600012\",\n \"session_short_id\": \"keATfB8VP2gSjcnTbsMNQL\"\n}"
response = http.request(request)
puts response.read_body{
"capture_type": "BARCODE",
"created": "2025-08-15T14:05:00Z",
"error_message": "",
"gtin": "00012345600012",
"id": "keATfB8VP2gSjcnTbsMNQL",
"metadata": {
"order_id": "6735"
},
"processed_at": "2025-08-15T14:05:02Z",
"product_name": "Trail Mix 12oz",
"product_short_id": "trail-mix-12oz",
"raw_value": "00012345600012",
"status": "matched"
}{
"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"
}Body
Request body for submitting a barcode or QR code scan.
Response
Created
Scan capture with processing status and matched product data.
Processing status of this capture. Captures progress PENDING → LOOKING_UP → ENRICHING → RESOLVING → COMPLETED; FAILED is set on any unrecoverable error (see error_message) and NOT_FOUND is set when the GTIN does not match a known product after lookup.
PENDING, LOOKING_UP, ENRICHING, RESOLVING, COMPLETED, FAILED, NOT_FOUND QR-redirect-chain analysis result populated by the background pipeline when raw_value is an HTTP(S) URL. Keys: initial_url, final_url, hops (list of {url, status_code, headers}), hop_count, resolver_domain, resolver_type (CLOSIENT / GS1_DL / URL_SHORTENER / DIRECT / UNKNOWN), is_closient_resolver, extracted_gtin, error_message. None until the analyzer task has run or when the capture has no URL to analyze.