Skip to main content

Consumer setup: Relayter event payload (JSON)

When you configure a consumer in Relayter, Relayter delivers events to your endpoint as JSON. This page explains the structure of that payload, what fields to rely on, and what commonly changes between events.

Simon Windt avatar
Written by Simon Windt
Updated over a week ago

What you receive

Relayter sends a CloudEvents-style envelope with an event type and a data object containing the business payload.

{
"id": "8f8f69fa-5ac6-4be8-92d5-b2d5786ee210",
"source": "localhost",
"specversion": "1.0",
"type": "PRODUCT_UPDATED",
"data": { "...": "..." }
}

Top-level fields

Field

What it means

Notes

id

Unique event id

Use for de-duplication / idempotency.

source

Producer identifier

Helpful for debugging environments.

specversion

Envelope version

Currently 1.0.

type

Event name

Example: PRODUCT_UPDATED. Route by this.

data

Event payload

Product data + related objects.

data: product payload

In PRODUCT_UPDATED, data is the updated product.

Common fields inside data

Field

What it means

_id

Product id in Relayter

team

Team id owning the product

assets

Array of assets linked to the product

assetExports

Export definitions + generated export items/files

tags

Product tags (array)

dataFields

Custom fields (key/value map)

Assets (data.assets[])

Each item represents a file-backed asset (image, etc.).

Key fields:

  • _id: Asset id

  • name: Asset name

  • type: File extension (e.g. .tiff)

  • processing: Whether Relayter is still processing it

  • width / height: Pixel dimensions

  • files.source: Original file (URL, size, extension, timestamps)

  • files.thumbnail: Thumbnail file (URL, size, extension, timestamps)

  • dataFields: Asset-level custom fields (e.g. "MB-imagetype": "PRODUCT")

  • rin: Asset reference identifier

  • groups: Access control references

File URLs:

  • files.*.url is a time-limited signed URL.

  • files.*.urlValidUntil tells you when it expires. If you need the file later, store the Relayter ids and re-fetch/regenerate a URL via Relayter rather than persisting the signed URL.

Product asset exports (data.assetExports[])

A product asset exports allows the user to select and label specific assets for products and specify a export size and file type.

Fields:

  • name, format (e.g. JPG)

  • scaleType, width, height

  • items[]: each export output (per label / per asset)

Export items (assetExports[].items[])

  • label: Your label/name for the export item

  • asset: Reference to the source asset (_id, name may be present)

  • exportFile: The generated file (signed URL, size, timestamps, validity)

Just like asset files, exportFile.url is time-limited; use urlValidUntil.

Best practices

Process events asynchronously

Relayter event delivery happens through an HTTP request to your consumer endpoint. Your endpoint should respond quickly and avoid doing expensive work inside the request itself.

File handling

  • Do not persist signed URLs long-term.

  • Use *_id fields as stable identifiers; fetch fresh URLs when needed.

Schema evolution

  • Expect new fields to appear.

  • Expect dataFields keys and value types to vary.

Full JSON example

{
"id": "8f8f69fa-5ac6-4be8-92d5-b2d5786ee210",
"source": "relayter",
"specversion": "1.0",
"type": "PRODUCT_UPDATED",
"data": {
"_id": "689c581cfc5ed748a9a6798b",
"team": "5afd3e27ac14d5926d785c7e",
"dataFields": {
"Names": "SPECBOWL!",
"Boolean": true,
"multiselect new": ["1", "2"],
"Test string field": "Test"
},
"assets": [
{
"_id": "665129886be935cd3f9c30dd",
"name": "00000080024071_C1N1",
"type": ".tiff",
"processing": false,
"width": 2401,
"height": 2401,
"rin": "PKZWCTVZWN",
"files": {
"source": {
"url": "https://files.relayter.com/.../original.tiff",
"urlValidUntil": "2026-02-03T10:12:18Z",
"extension": ".tiff",
"size": 4930660,
"createdAt": "2026-02-03T10:02:17.951Z",
"updatedAt": "2026-02-03T10:02:17.951Z"
},
"thumbnail": {
"url": "https://files.relayter.com/.../thumbnail.png",
"urlValidUntil": "2026-02-03T10:12:18Z",
"extension": ".png",
"size": 85697,
"createdAt": "2026-02-03T10:02:17.951Z",
"updatedAt": "2026-02-03T10:02:17.951Z"
}
},
"dataFields": {
"MB-imagetype": "PRODUCT"
}
}
],
"assetExports": [
{
"name": "test",
"format": "JPG",
"scaleType": "BOX_SIZE",
"width": 1400,
"height": 1400,

"items": [
{
"label": "123",
"asset": {
"_id": "665129896be935cd3f9c30eb",
"name": "00000080024873_C1N1"
},
"exportFile": {
"url": "https://files.relayter.com/.../export.jpg",
"urlValidUntil": "2026-02-03T10:12:18Z",
"extension": ".jpg",
"size": 348380,
"createdAt": "2026-02-03T10:02:17.951Z",
"updatedAt": "2026-02-03T10:02:17.951Z"
}
}
]
}
],
"createdAt": "2025-08-13T09:17:16.243Z",
"updatedAt": "2026-02-03T10:02:18.050Z",
"groups": [],
"tags": []
}
}

Did this answer your question?