Upsert targetings
const url = 'https://portal.staging.arago-tech.com/targetings';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"targetings":[{"id":"63e2d42a27ad5f2b345ca123","geo_area_id":"63e2d42a27ad5f2b345ca123","distribution_channel_whitelist_urls":"https://cdn.example.com/bucket/owner_user_id/<hash>/whitelist.txt","distribution_channel_blacklist_urls":"https://cdn.example.com/bucket/owner_user_id/<hash>/blacklist.txt","frequency_cap":{"max_impressions":10,"duration_days":7},"ifa_whitelists":[{"format":"IFA_FORMAT_TYPE_MD5","url":"https://cdn.example.com/bucket/owner_user_id/<hash>/whitelist.txt"}],"ifa_blacklists":[{"format":"IFA_FORMAT_TYPE_MD5","url":"https://cdn.example.com/bucket/owner_user_id/<hash>/blacklist.txt"}],"deal_ids":["[PHONE]","ABCDEFGHIJ"],"device_types":["DEVICE_TYPE_PERSONAL_COMPUTER","DEVICE_TYPE_PHONE","DEVICE_TYPE_TABLET"],"distribution_channel_types":["DISTRIBUTION_CHANNEL_TYPE_WEBSITE","DISTRIBUTION_CHANNEL_TYPE_MOBILE_APP","DISTRIBUTION_CHANNEL_TYPE_DOOH"],"device_languages":["LANGUAGE_EN"],"brand_safety_enabled":true,"retargeting":{"line_item_ids":["63e2d42a27ad5f2b345ca123","63e2d42a27ad5f2b345ca124"],"event_types":["EVENT_TYPE_IMPRESSION","EVENT_TYPE_CLICK"]}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://portal.staging.arago-tech.com/targetings \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "targetings": [ { "id": "63e2d42a27ad5f2b345ca123", "geo_area_id": "63e2d42a27ad5f2b345ca123", "distribution_channel_whitelist_urls": "https://cdn.example.com/bucket/owner_user_id/<hash>/whitelist.txt", "distribution_channel_blacklist_urls": "https://cdn.example.com/bucket/owner_user_id/<hash>/blacklist.txt", "frequency_cap": { "max_impressions": 10, "duration_days": 7 }, "ifa_whitelists": [ { "format": "IFA_FORMAT_TYPE_MD5", "url": "https://cdn.example.com/bucket/owner_user_id/<hash>/whitelist.txt" } ], "ifa_blacklists": [ { "format": "IFA_FORMAT_TYPE_MD5", "url": "https://cdn.example.com/bucket/owner_user_id/<hash>/blacklist.txt" } ], "deal_ids": [ "[PHONE]", "ABCDEFGHIJ" ], "device_types": [ "DEVICE_TYPE_PERSONAL_COMPUTER", "DEVICE_TYPE_PHONE", "DEVICE_TYPE_TABLET" ], "distribution_channel_types": [ "DISTRIBUTION_CHANNEL_TYPE_WEBSITE", "DISTRIBUTION_CHANNEL_TYPE_MOBILE_APP", "DISTRIBUTION_CHANNEL_TYPE_DOOH" ], "device_languages": [ "LANGUAGE_EN" ], "brand_safety_enabled": true, "retargeting": { "line_item_ids": [ "63e2d42a27ad5f2b345ca123", "63e2d42a27ad5f2b345ca124" ], "event_types": [ "EVENT_TYPE_IMPRESSION", "EVENT_TYPE_CLICK" ] } } ] }'Creates or updates multiple targetings. Portal does not accept list file uploads; partners host .txt files in their own S3-compatible object storage and provide URLs. The platform downloads them server-to-server via S3. For generic HTTP(S) URLs fetched browser-side, a CORS rule on the partner server is required.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Request to upsert targetings
Request to upsert targetings
object
List of targetings to upsert
Targeting details for upsert
object
The targeting unique identifier. If not provided, a new targeting will be created.
Example
63e2d42a27ad5f2b345ca123The geographical area unique identifier in hexadecimal format
Example
63e2d42a27ad5f2b345ca123Publicly readable S3-compatible object storage URL(s) of the partner-hosted .txt distribution channel whitelist file(s). Portal does not provide list file uploads; the platform downloads the file server-to-server via S3. For generic HTTP(S) URLs fetched browser-side, a CORS rule on the partner server is required.
Example
https://cdn.example.com/bucket/owner_user_id/<hash>/whitelist.txtPublicly readable S3-compatible object storage URL(s) of the partner-hosted .txt distribution channel blacklist file(s). Portal does not provide list file uploads; the platform downloads the file server-to-server via S3. For generic HTTP(S) URLs fetched browser-side, a CORS rule on the partner server is required.
Example
https://cdn.example.com/bucket/owner_user_id/<hash>/blacklist.txtFrequency cap targeting settings limiting the number of impressions per user within a number of days
object
Maximum number of impressions per user within the duration
Example
10Number of days over which the impression limit applies
Example
7Publicly readable S3-compatible object storage URL(s) of the partner-hosted .txt IFA whitelist file(s), paired with the hash format used by their entries. Portal does not provide list file uploads; the platform downloads the file server-to-server via S3. For generic HTTP(S) URLs fetched browser-side, a CORS rule on the partner server is required.
IFAList pairs an uploaded IFA list URL with the hash format used by its entries.
object
Example
[ { "format": "IFA_FORMAT_TYPE_MD5", "url": "https://cdn.example.com/bucket/owner_user_id/<hash>/whitelist.txt" }]Publicly readable S3-compatible object storage URL(s) of the partner-hosted .txt IFA blacklist file(s), paired with the hash format used by their entries. Portal does not provide list file uploads; the platform downloads the file server-to-server via S3. For generic HTTP(S) URLs fetched browser-side, a CORS rule on the partner server is required.
IFAList pairs an uploaded IFA list URL with the hash format used by its entries.
object
Example
[ { "format": "IFA_FORMAT_TYPE_MD5", "url": "https://cdn.example.com/bucket/owner_user_id/<hash>/blacklist.txt" }]The deal IDs for the targeting
Example
[ "[PHONE]", "ABCDEFGHIJ"]The device types for the targeting
Example
[ "DEVICE_TYPE_PERSONAL_COMPUTER", "DEVICE_TYPE_PHONE", "DEVICE_TYPE_TABLET"]Allowed distribution channel types (website, mobile app, DOOH)
Example
[ "DISTRIBUTION_CHANNEL_TYPE_WEBSITE", "DISTRIBUTION_CHANNEL_TYPE_MOBILE_APP", "DISTRIBUTION_CHANNEL_TYPE_DOOH"]The device languages for the targeting
Example
[ "LANGUAGE_EN"]Enables brand safety targeting
Example
trueRetargeting settings allowing a bid only when the user was already reached by one of the source line items
object
The unique identifiers of the line items owned by the account whose previous delivery is retargeted
Example
[ "63e2d42a27ad5f2b345ca123", "63e2d42a27ad5f2b345ca124"]The events a user must have triggered on the source line items to be retargeted, among EVENT_TYPE_IMPRESSION, EVENT_TYPE_VIEWABLE_MRC_50 and EVENT_TYPE_CLICK; any event when empty
Example
[ "EVENT_TYPE_IMPRESSION", "EVENT_TYPE_CLICK"]Responses
Section titled “ Responses ”A successful response.
Response containing the upserted targetings
object
List of targetings
The targeting information
object
The targeting unique identifier in hexadecimal format
The geographical area unique identifier in hexadecimal format
Publicly readable S3-compatible object storage URL(s) of the partner-hosted .txt distribution channel whitelist file(s). Portal does not provide list file uploads; the platform downloads the file server-to-server via S3. For generic HTTP(S) URLs fetched browser-side, a CORS rule on the partner server is required.
Publicly readable S3-compatible object storage URL(s) of the partner-hosted .txt distribution channel blacklist file(s). Portal does not provide list file uploads; the platform downloads the file server-to-server via S3. For generic HTTP(S) URLs fetched browser-side, a CORS rule on the partner server is required.
Frequency cap targeting settings limiting the number of impressions per user within a number of days
object
Maximum number of impressions per user within the duration
Number of days over which the impression limit applies
The creation date and time of the targeting
The last update date and time of the targeting
Publicly readable S3-compatible object storage URL(s) of the partner-hosted .txt IFA whitelist file(s), paired with the hash format used by their entries. Portal does not provide list file uploads; the platform downloads the file server-to-server via S3. For generic HTTP(S) URLs fetched browser-side, a CORS rule on the partner server is required.
object
Publicly readable S3-compatible object storage URL(s) of the partner-hosted .txt IFA blacklist file(s), paired with the hash format used by their entries. Portal does not provide list file uploads; the platform downloads the file server-to-server via S3. For generic HTTP(S) URLs fetched browser-side, a CORS rule on the partner server is required.
object
The deal IDs for the targeting
The device types for the targeting
Allowed distribution channel types (website, mobile app, DOOH)
The device languages for the targeting
Enables brand safety targeting
Retargeting settings allowing a bid only when the user was already reached by one of the source line items
object
The unique identifiers of the line items whose previous delivery is retargeted
The events a user must have triggered on the source line items to be retargeted, among EVENT_TYPE_IMPRESSION, EVENT_TYPE_VIEWABLE_MRC_50 and EVENT_TYPE_CLICK; any event when empty
Example
{ "targetings": [ { "id": "63e2d42a27ad5f2b345ca123", "geo_area_id": "63e2d42a27ad5f2b345ca123", "distribution_channel_whitelist_urls": "https://cdn.example.com/bucket/owner_user_id/<hash>/whitelist.txt", "distribution_channel_blacklist_urls": "https://cdn.example.com/bucket/owner_user_id/<hash>/blacklist.txt", "frequency_cap": { "max_impressions": 10, "duration_days": 7 }, "created_at": "2021-01-01T00:00:00Z", "updated_at": "2021-01-01T00:00:00Z", "ifa_whitelists": [ { "format": "IFA_FORMAT_TYPE_MD5", "url": "https://cdn.example.com/bucket/owner_user_id/<hash>/whitelist.txt" } ], "ifa_blacklists": [ { "format": "IFA_FORMAT_TYPE_MD5", "url": "https://cdn.example.com/bucket/owner_user_id/<hash>/blacklist.txt" } ], "deal_ids": [ "0123456789", "ABCDEFGHIJ" ], "device_types": [ "DEVICE_TYPE_PERSONAL_COMPUTER", "DEVICE_TYPE_PHONE", "DEVICE_TYPE_TABLET" ], "distribution_channel_types": [ "DISTRIBUTION_CHANNEL_TYPE_WEBSITE", "DISTRIBUTION_CHANNEL_TYPE_MOBILE_APP", "DISTRIBUTION_CHANNEL_TYPE_DOOH" ], "device_languages": [ "LANGUAGE_EN" ], "brand_safety_enabled": true, "retargeting": { "line_item_ids": [ "63e2d42a27ad5f2b345ca123", "63e2d42a27ad5f2b345ca124" ], "event_types": [ "EVENT_TYPE_IMPRESSION", "EVENT_TYPE_CLICK" ] } } ]}Bad request
object
Example
{ "error": { "code": "BAD_REQUEST", "details": [ { "code": "MAX_ITEMS", "field": "line_items", "message": "value must contain no more than 3000 item(s)", "params": { "max": "3000" } } ], "message": "Bad request" }}Unauthorized
object
Example
{ "error": { "code": "UNAUTHORIZED", "message": "Unauthorized" }}Internal server error
object
Example
{ "error": { "code": "INTERNAL_ERROR", "message": "Internal server error" }}default
Section titled “default”An unexpected error response.
object
object
Examplegenerated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}