Skip to content

Send an event with flat parameters

POST
/v1/external_data/add_simple_event
curl --request POST \
--url https://restapi.affattr.com/v1/external_data/add_simple_event \
--header 'API-KEY: <API-KEY>' \
--header 'Content-Type: application/json' \
--data '{}'

Add_event for callers that can only send flat key-value pairs (a postback URL of a network): query parameters and/or a flat JSON object. Field names and aliases are listed in the Events tag. The time of the event is always the time of the request. Client API key only.

affise_device_id
string

Device id (alias device_id)

random_user_id
string

Install id

click_id
string

Click id

pub_click_id
string

Click id of the partner

app_id
integer

Application id

first_open_time
integer

First launch, unix seconds or milliseconds

event_name
string

Event name (aliases affise_event_name, event)

The same fields as a flat JSON object

Media type application/json
object
Example generated
{}

Accepted

Media type application/json
object
error

Set when the request was rejected.

object
text
string
request_id
string
Example
{
"error": {
"text": "event from future"
},
"request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"
}

Rejected: error.text tells why

Media type application/json
object
error

Set when the request was rejected.

object
text
string
request_id
string
Example
{
"error": {
"text": "event from future"
},
"request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"
}

No credentials (answered with 403 until default-deny is enabled)

Media type application/json
object
error

What went wrong. 403 always says “Access denied”.

string
request_id

Id of the request, to quote to support.

string
Example
{
"error": "Access denied",
"request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"
}

Invalid credentials or application of another client

Media type application/json
object
error

What went wrong. 403 always says “Access denied”.

string
request_id

Id of the request, to quote to support.

string
Example
{
"error": "Access denied",
"request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"
}

Internal server error

Media type application/json
object
error

What went wrong. 403 always says “Access denied”.

string
request_id

Id of the request, to quote to support.

string
Example
{
"error": "Access denied",
"request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"
}