Skip to main content
PATCH
/
scanner
/
api
/
v1
/
sessions
/
{session_id}
/
photos
/
{photo_id}
Update photo classification
curl --request PATCH \
  --url https://www.closient.com/scanner/api/v1/sessions/{session_id}/photos/{photo_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "photo_type": "front",
  "metadata": {}
}
'
{
  "photo_type": "front",
  "s3_key": "<string>",
  "original_filename": "<string>",
  "sort_order": 123,
  "created": "2023-11-07T05:31:56Z",
  "metadata": {},
  "file_size": 123,
  "capture_short_id": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.closient.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-Key
string
header
required

Path Parameters

session_id
string
required

Unique session short_id identifier.

photo_id
string
required

Unique photo short_id identifier.

Body

application/json

Request body for updating photo classification.

photo_type
enum<string>
required

New classification label for the photo. Same value set as on registration — see PhotoTypeEnum.

Available options:
front,
back,
left,
right,
top,
bottom,
nutrition,
ingredients,
barcode,
recycling,
certification,
other
metadata
Metadata · object

Developer-attached key/value data. Send {} or null to clear. Empty-string values delete that key. Omitted keys are preserved.

Response

200 - application/json

OK

A single product photo in a scan session gallery.

photo_type
enum<string>
required

Classification label — which side or aspect of the product this photo shows. Drives routing through the vision pipeline (e.g. nutrition photos go to the nutrition-facts extractor).

Available options:
front,
back,
left,
right,
top,
bottom,
nutrition,
ingredients,
barcode,
recycling,
certification,
other
s3_key
string
required

S3 object key for the photo file.

original_filename
string
required

Original filename.

sort_order
integer
required

Display position.

created
string<date-time>
required

Timestamp when the photo was registered.

metadata
Metadata · object

Developer-attached key/value data attached to this object. Up to 50 keys; key max 40 chars, value max 500 chars.

file_size
integer | null

File size in bytes.

capture_short_id
string | null

Slug of the linked barcode capture.