Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

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.

...

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:

Блок кода
languagejs
titleResponse structurejsonjson
{
  "ok": true,
  "result": {},
  "error": "error description"
}

...

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

Content-Type: application/json

Verb: POST


Блок кода
collapse
languagejs
titleRequest and response exampletrue
{
  "id": 1000,
  "name": "Mens 18-24",
  "cost_type": "RATE",
  "cost_value": 20,
  "currency": "USD",
  // You may also specify the empty array of advertisers and set the "available_to_all" node below to "true" or "false" 
  // depending on the current needs 
  "advertisers": [
    1000,
    2000,
    3000
  ],
  "advertisers_prices_map" : {
		"5495": 0.2,
		"5501": 0.011
  },
  //The default value of the field is false. 
  "available_to_all": false
}


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

...

Users batch endpoint

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

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

Content-Type: application/gzip

Verb: POST

Users batch file must be sent as a request body.

...

Блок кода
languagejs
titleResponse example
collapsetrue
{
  "ok": true,
  "result": {
    "status": "PROCESSED",
    "users_added": 0,
    "segments_expired": 0,
    "segments_removed": 0
  }
}

...

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

Endpoint for getting information about segments

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

Verb: GET

Блок кода
languagejs
titleresponse example
{
	"ok": true,
	"result": [{
		"id": "12345",
		"name": "12345",
		"cost_type": "NONE",
		"cost_value": 0.0,
		"currency": null,
		"advertisers": [123],
		"status": "CREATED",
		"advertisers_prices_map": {
			"5495":0.2,
			"5501":0.011
		},
        "available_to_all": false
	}]
}

Endpoint for getting information about a particular segment

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

Verb: GET

Блок кода
languagejs
titleresponse example
{
	"ok": true,
	"result": {
		"id": "12345",
		"name": "12345",
		"cost_type": "NONE",
		"cost_value": 0.0,
		"currency": null,
		"advertisers": [123],
		"status": "CREATED",
        "available_to_all": true
	}
}