curl --request POST \
--url https://www.closient.com/scanner/api/v1/captures/upload-image \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--form 'session_short_id=<string>' \
--form image=@example-file \
--form capture_type=IMAGE \
--form raw_value= \
--form gtin=import requests
url = "https://www.closient.com/scanner/api/v1/captures/upload-image"
files = { "image": ("example-file", open("example-file", "rb")) }
payload = {
"session_short_id": "<string>",
"capture_type": "IMAGE",
"raw_value": "",
"gtin": ""
}
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('session_short_id', '<string>');
form.append('image', '<string>');
form.append('capture_type', 'IMAGE');
form.append('raw_value', '');
form.append('gtin', '');
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
options.body = form;
fetch('https://www.closient.com/scanner/api/v1/captures/upload-image', 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/upload-image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session_short_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"capture_type\"\r\n\r\nIMAGE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"raw_value\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gtin\"\r\n\r\n\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"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/upload-image"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session_short_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"capture_type\"\r\n\r\nIMAGE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"raw_value\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gtin\"\r\n\r\n\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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/upload-image")
.header("X-API-Key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session_short_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"capture_type\"\r\n\r\nIMAGE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"raw_value\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gtin\"\r\n\r\n\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/scanner/api/v1/captures/upload-image")
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.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session_short_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"capture_type\"\r\n\r\nIMAGE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"raw_value\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gtin\"\r\n\r\n\r\n-----011000010111000001101001--"
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"
}Upload a product image
Upload a product image and create a scan capture with optional barcode metadata.
curl --request POST \
--url https://www.closient.com/scanner/api/v1/captures/upload-image \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--form 'session_short_id=<string>' \
--form image=@example-file \
--form capture_type=IMAGE \
--form raw_value= \
--form gtin=import requests
url = "https://www.closient.com/scanner/api/v1/captures/upload-image"
files = { "image": ("example-file", open("example-file", "rb")) }
payload = {
"session_short_id": "<string>",
"capture_type": "IMAGE",
"raw_value": "",
"gtin": ""
}
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('session_short_id', '<string>');
form.append('image', '<string>');
form.append('capture_type', 'IMAGE');
form.append('raw_value', '');
form.append('gtin', '');
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
options.body = form;
fetch('https://www.closient.com/scanner/api/v1/captures/upload-image', 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/upload-image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session_short_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"capture_type\"\r\n\r\nIMAGE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"raw_value\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gtin\"\r\n\r\n\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"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/upload-image"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session_short_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"capture_type\"\r\n\r\nIMAGE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"raw_value\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gtin\"\r\n\r\n\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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/upload-image")
.header("X-API-Key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session_short_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"capture_type\"\r\n\r\nIMAGE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"raw_value\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gtin\"\r\n\r\n\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/scanner/api/v1/captures/upload-image")
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.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session_short_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"capture_type\"\r\n\r\nIMAGE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"raw_value\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gtin\"\r\n\r\n\r\n-----011000010111000001101001--"
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
How the upload was produced. BARCODE if the client detected a barcode and is uploading the image as supporting evidence; IMAGE if no barcode was detected and the server must run vision extraction. MANUAL is not accepted on this endpoint.
BARCODE, IMAGE 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.