Skip to main content
POST
/
scanner
/
api
/
v1
/
captures
Submit a barcode or QR scan
curl --request POST \
  --url https://www.closient.com/scanner/api/v1/captures \
  --header 'Content-Type: application/json' \
  --cookie sessionid= \
  --data '
{
  "session_public_id": "<string>",
  "capture_type": "<string>",
  "raw_value": "<string>",
  "gtin": "",
  "gs1_dl_data": {}
}
'
{
  "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

application/json

Request body for submitting a barcode or QR code scan.

session_public_id
string
required

Slug of the active scan session.

capture_type
string
required

Type of capture: BARCODE, IMAGE, or MANUAL.

Pattern: ^(BARCODE|IMAGE|MANUAL)$
raw_value
string
required

Raw barcode or QR code value.

Required string length: 1 - 500
gtin
string
default:""

Normalized GTIN-14, if applicable.

Maximum string length: 14
gs1_dl_data
Gs1 Dl Data · object

Application Identifiers from a GS1 Digital Link QR code.

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.