Advertiser domain lists can be created, edited and viewed using the advertiser domain list api. When you have created an advertiser domain list, you can attach that advertiser domain list to a demand or supply tag for competitive exclusions targeting.
...
Body (example)
Code Block |
---|
{ "advertiser_domainsnames": ["cnn.com", "abc.com"] } |
...
Code Block |
---|
In [1]: adomain_list = springserve.advertiser_domain_lists.get(<id>) In [2]: add = adomain_list.bulk_create(file_path='/<filepath>/adomain_list.csv') In [3]: add.ok Out [3]: True In [4]: print add.created True |
REST API
POST /api/v0/advertiser_domain_lists/<id>/advertiser_domains/file_bulk_create
|
...
Code Block |
---|
[ {"id": 29070603, "advertiser_domainname": "cnn.com"}, {"id": 29070604, "advertiser_domainname": "abc.com"} ] |
...
Replace Advertiser Domains
...
Code Block |
---|
In [13]: adomain_list = springserve.advertiser_domain_lists.get(<id>) In [14]: resp = adomain_list.bulk_replace(file_path='/<filepath>/replacement_adomain_list.csv') In [15]: resp.ok Out [15]: True |
REST API
POST /api/v0/advertiser_domain_lists/<id>/advertiser_domains/file_bulk_replace
|
...
Body (example)
Code Block |
---|
{ "advertiser_domainsnames": ["cnn.com"] } |
Response (note you need to paginate)
...
Code Block |
---|
In [13]: adomain_list = springserve.advertiser_domain_lists.get(<id>) In [14]: resp = adomain_list.bulk_delete(file_url='/<filepath>/deletion_adomain_list.csv') In [15]: resp.ok Out [15]: True In [16]: resp.deleted Out [16]: True |
REST API
DELETE /api/v0/advertiser_domain_lists/<id>/advertiser_domains/file_bulk_delete
|
...