Skip to content

Area: Developers

POST

Report that blocks were seen (access token in the header)

Path
/impressions
Auth
Access token · browser or app
POST
/impressions
curl --request POST \
--url https://releva.ai/api/v0/impressions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "banners": [ { "token": "7e5c8e4b-1f2d-4c3a-9b8e-2a1d3f4e5c6b", "bannerId": "1", "segmentId": "3" } ], "deviceId": "demo-device-pb-1", "sessionId": "demo-session-pb-1", "url": "https://demo-store.example.com/" }'

The same call as POST /impressions/{accessToken}, with the access token sent as authorization: Bearer <accessToken> instead of in the path. When both are sent, the header wins. Records one recommenderImpression (or bannerImpression) event per item; the request body, the answers and the errors are the same as on the path form.

Media typeapplication/json

At least one of recommenders or banners, and at least one of profileId or deviceId.

object
recommenders
Array<object>
object
token
required
string format: uuid
productFeedId
required
string
segmentId
required
string
banners
Array<object>
object
token
required
string format: uuid
bannerId
required
string
segmentId
required
string
profileId
string | null
deviceId
string
sessionId
string
email
string format: email
phoneNumber
string
url
string

Example

{
"banners": [
{
"token": "7e5c8e4b-1f2d-4c3a-9b8e-2a1d3f4e5c6b",
"bannerId": "1",
"segmentId": "3"
}
],
"deviceId": "demo-device-pb-1",
"sessionId": "demo-session-pb-1",
"url": "https://demo-store.example.com/"
}

Impressions recorded.

Media typeapplication/json
object

Example

{}

Authentication or validation error. The handler’s own checks answer with an error property; validation and authentication answer with message.

Media typeapplication/json
One of:
object
message
required

Human-readable error. Several validation errors are joined with a space.

string

Examples

{
"error": "One of profileId or deviceId is required"
}

The domain is disabled.

Media typeapplication/json
object
message
required

Human-readable error. Several validation errors are joined with a space.

string

Example

{
"message": "Domain is disabled. Please reach out to support@releva.ai to enable it."
}

Unexpected server error.

Media typeapplication/json
object
message
required

Human-readable error. Several validation errors are joined with a space.

string

Example

{
"message": "An internal error occurred."
}