Skip to main content
POST
/
scanner
/
api
/
v1
/
captures
/
upload-image
Upload a product image
curl --request POST \
  --url https://www.closient.com/scanner/api/v1/captures/upload-image \
  --header 'Content-Type: multipart/form-data' \
  --cookie sessionid= \
  --form 'session_public_id=<string>' \
  --form image='@example-file' \
  --form capture_type=IMAGE \
  --form raw_value= \
  --form gtin=
{
  "public_id": "<string>",
  "status": "<string>",
  "capture_type": "<string>",
  "raw_value": "<string>",
  "gtin": "<string>",
  "error_message": "<string>",
  "created": "2023-11-07T05:31:56Z",
  "gs1_dl_data": {},
  "product_public_id": "<string>",
  "product_name": "<string>",
  "processed_at": "2023-11-07T05:31:56Z",
  "uploaded_image_key": "<string>"
}

Authorizations

sessionid
string
cookie
required

Body

multipart/form-data
session_public_id
string
required

Slug of the active scan session.

image
file
required

Product image file (JPEG, PNG, WebP).

capture_type
string
default:IMAGE

Capture type: BARCODE or IMAGE.

raw_value
string
default:""

Raw barcode value detected client-side, if any.

gtin
string
default:""

Normalized GTIN-14 extracted from client-side detection.

Response

Created

Scan capture with processing status and matched product data.

public_id
string
required

Unique capture identifier.

status
string
required

Processing status.

capture_type
string
required

Type of capture.

raw_value
string
required

Raw value as detected.

gtin
string
required

Normalized GTIN-14.

error_message
string
required

Error message if processing failed.

created
string<date-time>
required

Timestamp when the capture was created.

gs1_dl_data
Gs1 Dl Data · object

Application Identifiers from GS1 DL.

product_public_id
string | null

Slug of the matched product.

product_name
string | null

Name of the matched product.

processed_at
string<date-time> | null

Timestamp when processing completed.

uploaded_image_key
string | null

Storage key of the uploaded image file.