Вы просматриваете старую версию данной страницы. Смотрите текущую версию.

Сравнить с текущим просмотр истории страницы

« Предыдущий Версия 2 Следующий »

There is an endpoint which allows for DMPs to submit segment definitions and users and get realtime feedback.

The endpoint is located at this address: https://dmp-api.adhigh.net. It requires HTTP basic authentication (ask GetIntent Data Team for access).

Documentation can be found here: https://dmp-api.adhigh.net/docs.

Executing requests

Requires HTTP basic authentication.

All methods accept POST requests with {dmp} path variable and token query parameter:

  • {dmp} is your DMP ID in GetIntent
  • token is your user API token

The response is a JSON with the following structure:

{
  "ok": true,
  "result": {},
  "error": "error description"
}

ok is set to true if the request was successful. If that's the case, result object will contain the request result. Otherwise (in case of unsuccessful request), error will contain error description.

HTTP status codes are:

  • 200 for a successful request
  • 403 if authentication failed
  • 500 in case of an error

Segment definitions endpoint

URL: https://dmp-api.adhigh.net/api/v1/{dmp}/batch?token=token

Content-Type: application/json


Request and response example
{
  "id": 1000,
  "name": "Mens 18-24",
  "cost_type": "RATE",
  "cost_value": 20,
  "currency": "USD",
  "advertisers": [
    1000,
    2000,
    3000
  ]
}


{
  "ok": true,
  "result": {
    "id": 12345
  }
}

See request format description here: DMP Batch API#taxonomy-format.

The result contains segment GetIntent segment ID.

Users batch endpoint

URL: https://dmp-api.adhigh.net/api/v1/{dmp}/batch?token=token&with_header=true

Query parameter with_header must be set to true if the file contains header (optional, defaults to true).

Content-Type: application/gzip

Users batch file must be sent as a request body.

File format is described here: DMP Batch API#file-format

Response example
{
  "ok": true,
  "result": {
    "status": "PROCESSED",
    "users_added": 0,
    "segments_expired": 0,
    "segments_removed": 0
  }
}

status can be either PROCESSED or QUEUED. If the status is PROCESSED, the file has been processed and additional info is provided in the result object.

Note that the file will be processed in real time if the size does not exceed 5 megabytes.

  • Нет меток