Events (Admin)
Preview a label without creating a print job (Admin)
POST
/manage/events/:eventId/label-print/previewRequires authentication and event management permissions, plus eventWrite when entryId is omitted. Does not create a job, history entry or expiry. Pass the returned previewHash when creating a job on print.
| Auth | Login required |
|---|---|
| Available to | Official 4S apps only (other apps' access tokens get 403) |
Path parameters
eventIdstringrequiredEvent ID.
Request body
printerIdstringrequiredRegistered printer ID.
entryIdstringoptionalEntry ID; omitted for a test label.
locale"ja" | "en"optionalDisplay language; defaults to ja.
Response
| Field | Type | Description |
|---|---|---|
pngBase64 | string | Label image. Do not log. |
previewHash | string | Hash used to verify that printed content matches the preview. |
media | string | Media type. |
lengthMm | number | Label length in mm. |
widthPx | number | Image width in pixels. |
heightPx | number | Image height in pixels. |
Request
curl https://api.4s.link/manage/events/EVENT_ID/label-print/preview \-X POST \-H "Authorization: Bearer 4s_at_..." \-H "Content-Type: application/json" \-d '{"printerId": "printer-1","entryId": "entry-1","locale": "ja"}'
Example response
{"media": "CONTINUOUS_62","lengthMm": 60,"widthPx": 696,"heightPx": 639,"pngBase64": "iVBORw0KGgo...","previewHash": "3f9a1c2e5b7d..."}