In order to personalize ads, data must be transferred from DMP servers to ADventori servers. Two methods can be used to do this: push or pull.
Data can be pushed to ADventori either by FTP
or by HTTP POST
.
The scheduling of this transfer depends on the method. If HTTP POST
is used, transfer can occur in real time or
scheduled (hourly, daily, …). If FTP
is used, only fixed scheduling (daily, hourly, …) is possible.
Using HTTP POST
, you can replace, upsert (ie. insert ou update if it exists) or delete data for a user. Data is sent
in JSON
format as the body of the POST
query (the HTTP content type must be set to application/json
). If
the JSON
message is not a valid JSON
object, a 400
(bad request) error will be issued.
Three operations are available to push data for a single user:
replace
upsert
delete
For more details on these operations, please refer to this page
Instead of calling several times the same operation (upsert
, replace
or delete
), it is possible to use methods (
respectively upsertAll
, replaceAll
and deleteAll
) that call the method for several users with the same data. It is
possible to mix operations by using the batch
method.
For more details on these operations, please refer to this page
By default, all data sent to ADventori expires after 365 days. It is possible to use a different TTL
for all write
operations by adding an optional ttl parameter. Its value is the number of day after which the data expires.
The URLs with TTL are
https://eu-usersync.adventori.com/ADVERTISER_CODE/data/replace?provider=PROVIDER_CODE&key=PROVIDER_AUTH_KEY&uid=UID_PROVIDER&ttl=TIME_TO_LIVE
https://eu-usersync.adventori.com/ADVERTISER_CODE/data/upsert?provider=PROVIDER_CODE&key=PROVIDER_AUTH_KEY&uid=UID_PROVIDER&ttl=TIME_TO_LIVE
https://eu-usersync.adventori.com/ADVERTISER_CODE/data/replaceAll?provider=PROVIDER_CODE&key=PROVIDER_AUTH_KEY&ttl=TIME_TO_LIVE
https://eu-usersync.adventori.com/ADVERTISER_CODE/data/upsertAll?provider=PROVIDER_CODE&key=PROVIDER_AUTH_KEY&ttl=TIME_TO_LIVE
The TIME_TO_LIVE
parameter represents the number of days after which the data expires. For the batch operation, it is
possible to set a TTL for all the operations in the batch and override this TTL by specifying a TTL for a specific
atomic operation.
For example, for a global TTL to 90 days and 30 days for the second opertion, the URL will be:
https://eu-usersync.adventori.com/ADVERTISER_CODE/data/batch?provider=PROVIDER_CODE&key=PROVIDER_AUTH_KEY&ttl=90
and the JSON will be
[
{
"uid": "UID_PROVIDER_1",
"operation": "upsert",
"data": {
"key1": "value1.1",
"key2": "value2.1"
}
},
{
"uid": "UID_PROVIDER_2",
"operation": "replace",
"ttl": 30,
"data": {
"key1": null,
"key2": "value2.2"
}
},
{
"uid": "UID_PROVIDER_3",
"operation": "delete"
}
]
HTTP status codes are used to indicate the success or otherwise of requests. The following status are common:
200
Successful request.
Body will contain a JSON summary of the operation207
For batch operation only.
Some atomic operations succeeded, some failed.
Body will contain a JSON summary of the operation (atomic operation per atomic operation)400
Error in request.
Either the user id is not given, the TTL is not a number or no data is given for operation that need data401
Authentication error404
Non existent resource.500
Internal Server Error.
Body will contain a JSON summary of the operationLimiting of the HTTP API is considered on atomic operation basis per advertiser. An atomic operation is a call to upsert, replace or delete, an operation in a batch. For replaceAll, upsertAll or deleteAll calls correspond to n atomci operations, where n is the number of distinct user ids.
HTTP API is limited at 5 millions (5,000,000) atomic operations per advertiser per day.
Batch operations are also limited in term of number of contained atomic operation. A batch can contains at most 100,000 atomic operations.
There is also a limit on concurrent calls to the API: there can be at most 5 concurrent calls at a time.
Bulk insert is possible by sending us files by FTP. Please contact us for more details about file format and FTP credentials.
Contact us to set up pull synchronization