Рекламодатель:



curl --location --request PUT 'https://ui-dev.getintent.com/api/v2/advertisers/new?token=<token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "url": "https://getintent.com/",
  "name": "Test_create_api_new_adver3",
  "credit": 0,
  "currency": "RUB",
  "max_budget": 0,
  "hide_billing": false,
  "margin_optimisation": false,
  "compliant_media_cost": {
    "enabled": false
  },
  "cpa_prediction_enabled": false,
  "default_dsp_commission": "1",
  "cpc_predict_transparent": false,
  "creative_tmt_validation": false,
  "default_agency_commission": "1",
  "omit_expected_discrepancy": false,
  "manage_campaigns_commissions": true,
  "shared_pixel_data_with": [],
  "payment_type": "prepaid",
  "current_balance": 0
}'


Группа кампаний.



curl --location --request PUT 'https://ui-dev.getintent.com/api/v2/advertisers/9706/campaign_groups/new?token=<token>' \
--header 'Content-Type: application/json' \
--data-raw '{
	"targeting": {
		"frequency_capping": {
			"day": "200",
			"hour": "20",
			"strict": "true"
		}
	},
	"impression_limit": "10000",
	"daily_budget_limit": "100",
	"name": "test_group",
	"budget_limit": 1000,
	"advertiser_id": 9706
}'


Кампании:



curl --location --request PUT 'https://ui.getintent.com/api/v2/advertisers/9706/campaigns/new?token=<token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Test campaign!",
    "advertiser_id": 9706,
    "starts": "2022-11-11 00:00:00",
    "ends": "2022-11-12 00:00:00",
    "group_id": 22629,
    "type_ad_campaign": "CPM",
    "distribution_form": "баннер",        
    "for_mobile_device": false,
    "for_native_ads": false,
    "for_video_ads": false,
    "for_dooh": false,
    "landing_page": "http://getintent.com",
    "disabled": true,
    "budget": 1000,
    "financing": {
        "type": "max_cpm",
        "price": 3.5
    },
    "targeting": {
        "geo": {
            "countries": [
                "US"
            ],
            "regions": [
                "US/FL",
                "US/PA",
                "US/NJ"
            ],
            "cities": [
                "Jersey City",
                "Houston"
            ],
            "dma_code": [
                "500",
                "502"
            ],
            "zip_code": [
                "10010"
            ]
        },
        "segments": [
            1009,
            1048,
            1050,
            1071
        ],
        "categories": [
            "iab2",
            "iab2-1",
            "iab2-2",
            "iab2-3",
            "iab2-12"
        ],
        "frequency_capping": {
            "hour": 4,
            "day": 10,
            "week": 30
        },
        "weekdays": [
            "1",
            "2",
            "3",
            "4",
            "5",
            "6",
            "7"
        ],
        "time": [
            "1",
            "2",
            "3",
            "4",
            "5",
            "6",
            "7",
            "8",
            "9",
            "10",
            "11",
            "12",
            "13",
            "14",
            "15",
            "16",
            "17",
            "18",
            "19",
            "20",
            "21",
            "22",
            "23",
            "0"
        ],
        "ssps": [
            "yandex"
        ],
        "page_language": [
            "en"
        ],
        "devices": [
            "DESKTOP",
            "SMARTPHONE",
            "TABLET"
        ],
        "positions": [
            "above",
            "below",
            "unknown"
        ],
        "operating_systems": [
            "IOS",
            "ANDROID",
            "WINDOWS",
            "LINUX",
            "MACOS",
            "OTHER",
            "WINDOWS_PHONE"
        ],
        "browsers": [
            "FIREFOX",
            "IE",
            "EDGE",
            "OPERA",
            "YANDEX",
            "CHROME",
            "SAFARI",
            "ANDROID_BROWSER",
            "OTHER"
        ]
    },
    "negative_targeting": {
        "domains_lists": [
            "6"
        ]
    },
    "daily_budget": 12,
    "site_id": 42,
    "creatives": [
        210,
        3013,
        3014,
        3015,
        3016,
        3017,
        3018,
        3019,
        3020,
        3021,
        3022,
        3023,
        3024
    ]
}'




curl --location --request PUT 'https://ui-dev.getintent.com/api/v2/advertisers/9706/campaigns/new?token=<token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ends": "2023-09-28 23:59:59",
    "budget": 1,
    "starts": "2023-09-28 00:00:00",
    "disabled": true,
    "financing": {
        "type": "max_cpm",
        "price": 1
    },
    "fp_switch": "inherit",
    "targeting": {
        "https": true,
        "exclude_anonymous_domains": true
    },
    "landing_page": "https://www.google.com/",
    "budget_pacing": "CAMPAIGN",
    "type_ad_campaign": "CPM",
    "distribution_form": "видеооролик",
    "block_anomaly_click_redirect": "INHERIT",
    "name": "TEST_web_video",
    "for_mobile_device": false,
    "for_native_ads": false,
    "for_video_ads": true,
    "for_dooh": false,
    "advertiser_id": "9706",
    "group_id": 22624
}'




curl --location --request PUT 'https://ui-dev.getintent.com/api/v2/advertisers/9706/campaigns/new?token=<token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ends": "2024-09-28 23:59:59",
    "budget": 1,
    "starts": "2024-09-28 00:00:00",
    "disabled": true,
    "financing": {
        "type": "max_cpm",
        "price": 1
    },
    "fp_switch": "inherit",
    "targeting": {
        "https": true,
        "exclude_anonymous_domains": true
    },
    "landing_page": "https://www.test.com/",
    "budget_pacing": "CAMPAIGN",
    "landing_domain": "https://getintent.com",
    "type_ad_campaign": "CPC",
    "distribution_form": "текст + графика",
    "block_anomaly_click_redirect": "INHERIT",
    "id": 245770,
    "updated_at": "2022-09-28T10:59:44+0000",
    "name": "TEST_web_native",
    "for_mobile_device": false,
    "for_native_ads": true,
    "for_video_ads": false,
    "for_dooh": false,
    "advertiser_id": 9699,
    "group_id": 22624
}'




curl --location --request PUT 'https://ui-dev.getintent.com/api/v2/advertisers/9706/campaigns/new?token=<token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ends": "2023-09-28 23:59:59",
    "budget": 1,
    "starts": "2023-09-28 00:00:00",
    "disabled": true,
    "financing": {
        "type": "max_cpm",
        "price": 1
    },
    "fp_switch": "inherit",
    "targeting": {
        "https": true,
        "exclude_anonymous_domains": true
    },
    "landing_page": "https://getintent.com/",
    "budget_pacing": "CAMPAIGN",
    "type_ad_campaign": "CPC",
    "distribution_form": "баннер",
    "block_anomaly_click_redirect": "INHERIT",
    "name": "Test_InApp_Banner",
    "for_mobile_device": true,
    "for_native_ads": false,
    "for_video_ads": false,
    "for_dooh": false,
    "advertiser_id": 9699,
    "group_id": 22624
}'




curl --location --request PUT 'https://ui-dev.getintent.com/api/v2/advertisers/9706/campaigns/new?token=<token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ends": "2024-09-28 23:59:59",
    "budget": 1,
    "starts": "2024-09-28 00:00:00",
    "disabled": true,
    "financing": {
        "type": "max_cpm",
        "price": 1
    },
    "fp_switch": "inherit",
    "targeting": {
        "https": true,
        "exclude_anonymous_domains": true
    },
    "landing_page": "https://www.google.com/",
    "budget_pacing": "CAMPAIGN",
    "type_ad_campaign": "CPM",
    "distribution_form": "видеооролик",
    "block_anomaly_click_redirect": "INHERIT",
    "name": "Test_InApp_Video",
    "for_mobile_device": true,
    "for_native_ads": false,
    "for_video_ads": true,
    "for_dooh": false,
    "advertiser_id": 9699,
    "group_id": 22624
}'




curl --location --request PUT 'https://ui-dev.getintent.com/api/v2/advertisers/9706/campaigns/new?token=<token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ends": "2022-09-28 23:59:59",
    "budget": 1,
    "starts": "2022-09-28 00:00:00",
    "disabled": true,
    "financing": {
        "type": "max_cpm",
        "price": 1
    },
    "fp_switch": "inherit",
    "targeting": {
        "https": true,
        "exclude_anonymous_domains": true
    },
    "landing_page": "https://getintent.com/",
    "budget_pacing": "CAMPAIGN",
    "type_ad_campaign": "CPM",
    "distribution_form": "текст + графика",
    "block_anomaly_click_redirect": "INHERIT",
    "id": 245776,
    "name": "Test_InApp_Native",
    "for_mobile_device": true,
    "for_native_ads": true,
    "for_video_ads": false,
    "for_dooh": false,
    "advertiser_id": 9699,
    "group_id": 22624
}'


Креативы:

Запросы которые не относятся к креативам, но все же будет полезны при работе с креативами.


Запрос всех кампаний, в рекламодателе.

curl --location 'https://ui.getintent.com/api/v2/advertisers/3936/campaigns/list?token=value_token \
--header 'Cookie: session=value_session'


Запрос всех кампаний, с кастомными нодами.

curl --location 'https://ui.getintent.com/api/v2/advertisers/3936/campaigns/list?token=value_token&custom_fields=starts%2Cends%2Ccreatives&token=value_token' \
--header 'Cookie: session=value_session'


Запрос всех креативов, в рекламодателе.

curl --location 'https://ui.getintent.com/api/v2/advertisers/3936/creatives/list?token=value_token' \
--header 'Cookie: session=value_session'


Запрос по конкретной кампании, для получения в том числе и списка прикрепленных креативов.

curl --location 'https://ui.getintent.com/api/v2/campaigns/get/292497?token=value_token' \
--header 'Cookie: session=value_session'



Запрос по конкретному креативу.

curl --location 'https://ui.getintent.com/api/v2/creatives/get/543050?token=value_token \

--header 'Cookie: session=value_session'



Заливаем видео-файл, файл к нам cdn.

curl --location 'https://ui.getintent.com/api/v2/advertisers/3936/creatives/upload?token=value_token&video=1675847157-testovoe_video_GI_-_5_sec.mp4' \
--header 'x-file-name: 1675847157-testovoe_video_GI_-_5_sec.mp4' \
--header 'Cookie: session=value_session\
--form 'creative=@"/Users/mmelekhin/Downloads/11/1675847157-testovoe_video_GI_-_5_sec.mp4"'



{
"url": "cdn.adhigh.net/media/1690211262-1675847157-testovoe_video_GI_-_5_sec.mp4",
"size": "1152x720",
"length": 5
}




curl --location --request PUT 'https://ui.getintent.com/api/v2/advertisers/3936/creatives/new?token=value_token&lang=en' \
--header 'accept: application/json' \
--header 'X-Auth-Token: value_token' \
--header 'Content-Type: application/json' \
--header 'Cookie: session=value_session;' \
--data '{"name":"Example of AdData simple object","creative_type":"video","distribution_form":"Video","type_ad_campaign":"CPM","length":"5","files":[{"url":"cdn.adhigh.net/media/1675847157-testovoe_video_GI_-_5_sek.mp4","size":"1152x720","length":"5","file_size":"2177100"}]}'






curl --location 'https://ui.getintent.com/api/v2/advertisers/3936/creatives/new?token=value_token' \
--header 'accept: application/json' \
--header 'X-Auth-Token: value_token' \
--header 'Content-Type: application/json' \
--header 'Cookie: session=value_session;' \
--data '{
"name":"Example of AdData simple object",
"creative_type":"video",
"distribution_form":"Video",
"type_ad_campaign":"CPM",
"length":"5",
"files":[{
"url":"cdn.adhigh.net/media/1675847157-testovoe_video_GI_-_5_sec.mp4",
"size":"1152x720",
"length":"5",
"file_size":"2177100"}]
}'




curl --location --request PATCH 'https://ui.getintent.com/api/v2/advertisers/3936/creatives/edit/589357?token=value_token' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Cookie: session=value_session;' \
--data '{"landing_page":"https://getintent.com","landing_domain":"https://getintent.com"}'





curl --location --request PATCH 'https://ui.getintent.com/api/v2/advertisers/3936/creatives/edit/589357?token=value_token' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Cookie: session=value_session;' \
--data '{"is_ord_url_autofilled": true}'




curl --location --request POST 'https://ui.getintent.com/api/v2/advertisers/3936/creatives/creative/register/589357?token=value_token' \
--header 'Cookie: session=value_session;'



{"files":[{"url":"cdn.adhigh.net/media/1675847157-testovoe_video_GI_-_5_sek.mp4","size":"1152x720","length":"5","file_size":"2177100"}],"length":"5","ord_url":"https://getintent.com","landing_page":"https://getintent.com","ord_token_map":[{"url":"https://getintent.com","mode":"auto","token":"Kra23gjH6","deleted":false,"ord_registration_method":"MTS"}],"landing_domain":"https://getintent.com","ord_creative_id":"CR9KQx5lRk1UWXGIld4r2bXg","type_ad_campaign":"CPM","distribution_form":"Video","is_ord_url_autofilled":true,"register_creative_ord":true,"landing_page_after_redirects":"https://getintent.com/","id":589357,"updated_at":"2023-07-25T13:37:46+0000","name":"Example of AdData simple object","created_at":"2023-07-21T10:49:13+0000","creative_type":"video","moderation_status":"APPROVED","advertiser_id":3936}







curl --location --request PUT 'https://ui.getintent.com/api/v2/advertisers/3936/creatives/edit/589357?token=value_token' \
--header 'accept: application/json' \
--header 'X-Auth-Token: value_token' \
--header 'Content-Type: application/json' \
--header 'Cookie: session=value_session;' \
--data '{"name":"Example of AdData simple object","creative_type":"video","distribution_form":"Video","type_ad_campaign":"CPM","length":"5","files":[{"url":"cdn.adhigh.net/media/1675847157-testovoe_video_GI_-_5_sek.mp4","size":"1152x720","length":"5","file_size":"2177100"}],"landing_page":"https://getintent.com","landing_domain":"https://getintent.com"}'



Получение нод по кампаниям.

curl --location 'https://ui.getintent.com/api/v2/campaigns/get/292497?token=value_token' \
--header 'Cookie: session=value_session;'



curl --location --request PATCH 'https://ui.getintent.com/api/v2/campaigns/edit/292497?token=value_token' \
--header 'Content-Type: application/json' \
--header 'Cookie: session=value_session' \
--data ' {
"creatives": [
71177,
524404,
543050,
589357
]
}'




curl --location --request POST 'https://ui.getintent.com/api/v2/campaigns/creatives/register/292497?token=value_token' \
--header 'Cookie: session=value_session'



[
{
"creative_id": "543050",
"result": "registration_skipped",
"token": "Pb3XmBtztBgmuSDUGtU1NmQDeBeCZiEh4FjLqBe",
"url": "https://getintent.com"
},
{
"creative_id": "524404",
"result": "registration_skipped",
"token": "Kra23XP8k",
"url": "https://getintent.com"
},
{
"creative_id": "71177",
"result": "registration_skipped",
"token": "Pb3XmBtzt88xWjpHWVvRz9ikc6kDwu2LdVBdrmv",
"url": "https://linuxrussia.com"
},
{
"creative_id": "589357",
"result": "token_registered",
"token": "Kra23h6xx",
"url": "https://getintent.com"
}
]