Skip to main content
POST
/
scanner
/
api
/
v1
/
sessions
/
{session_public_id}
/
photos
Register a product photo
curl --request POST \
  --url https://www.closient.com/scanner/api/v1/sessions/{session_public_id}/photos \
  --header 'Content-Type: application/json' \
  --cookie sessionid= \
  --data '
{
  "s3_key": "<string>",
  "photo_type": "other",
  "capture_public_id": "<string>",
  "original_filename": "",
  "file_size": 123
}
'
{
  "public_id": "<string>",
  "photo_type": "<string>",
  "s3_key": "<string>",
  "original_filename": "<string>",
  "sort_order": 123,
  "created": "2023-11-07T05:31:56Z",
  "file_size": 123,
  "capture_public_id": "<string>"
}

Authorizations

sessionid
string
cookie
required

Path Parameters

session_public_id
string
required

Unique session public_id identifier.

Body

application/json

Request body for registering a product photo.

s3_key
string
required

S3 object key returned by the presigned upload.

photo_type
string
default:other

Classification label: front, back, nutrition, etc.

capture_public_id
string | null

Slug of the barcode capture to link this photo to.

original_filename
string
default:""

Original filename as provided by the client.

file_size
integer | null

File size in bytes.

Response

Created

A single product photo in a scan session gallery.

public_id
string
required

Unique photo identifier.

photo_type
string
required

Classification label.

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.

file_size
integer | null

File size in bytes.

capture_public_id
string | null

Slug of the linked barcode capture.