Create Custom Targeting List API
1. Login
To log in - the general login API is used. Example - Login API
this step is for getting a Token to add to the request header for Authentication reasons.
2. Create New Custom List:
lists: https://aniviewwiki.atlassian.net/wiki/x/JYDthw
you can visit the link above for more information.
Request URL:
https://manage.aniview.com/api/adserver/customlists?format=json
Request Method:
POST
Headers:
{ Content-Type: application/json,
X-Bamboo-Token: "<your_Auth_Token>" }
Body:
{
"name": "new list",
"key": "AV_CUSTOM1",
"values": [],
"new": true,
}
Values can be added on creation.
Response:
here you will get the object of the new custom targeting list, inside _id
object you will get the id of the list and later use it to associate with a adsource
200 OK
{
"data": {
"id": null,
"_id": {
"$oid": "66c6ea369c5fecbe8205dea6"
},
"createdAt": 1724312118,
"updatedAt": 1724312118,
"iUpdatedAt": 1724312118,
"createdBy": "xxx@aniview.com",
"updatedBy": "xxx@aniview.com",
"status": 1,
"name": "New list",
"description": null,
"publisherId": "{publisherId}",
"restoreFrom": null,
"lastAuditTrailId": null,
"values": [],
"key": "AV_CUSTOM1",
"totalValues": null
}
}
3. Update Custom List:
lists: https://aniviewwiki.atlassian.net/wiki/x/JYDthw
you can visit the link above for more information.
Request URL:
https://manage.aniview.com/api/adserver/customlists/66c6ea369c5fecbe8205dea6?format=json
Request Method:
PUT
Headers:
Body:
Response:
here you will get the object of the new custom targeting list, inside _id
object you will get the id of the list and later use it to associate with a adsource
200 OK
4. Add value to Custom List:
Request URL:
https://manage.aniview.com/api/adserver/customlistsvalues/66c6ea369c5fecbe8205dea6?format=json
Request Method:
PUT
Headers:
Body:
Here just add this object to the key
and oldKey
the custom parameter you want, remember to use the original custom parameter name and not the new one.
Response:
here you will get the object of the new custom targeting list, inside _id
object you will get the id of the list and later use it to associate with a adsource
200 OK
5. Get Custom List Values:
Request URL:
http://laravel.aniview.com/api/adserver/customlistsvalues?format=json&customListId=66c6ea369c5fecbe8205dea6
Request Method:
GET
Headers:
Response:
here you will get the object of the new custom targeting list, inside _id
object you will get the id of the list and later use it to associate with a adsource
200 OK
5. Apply the custom targeting list we created on an AdSource:
- New Ad Source - Create Example
Request URL:
https://manage.aniview.com/api/adserver/adsource?format=json
Request Method:
POST
Headers:
Body:
Response:
200 OK
- Update Ad Source
Request Method:
PUT
Headers:
Body:
inside the targeting object, you will add all the
targeting.customTargeting.list
we will add the id from the response if the creation call.
Response:
200 OK
1. Custom List Object - Adserver_Type_Customlists
Attribute | Type | Required | Description |
---|---|---|---|
values | array of strings | Required | The type of the list. |
key | string | Required | The Custom List Targeting Key |
name | string | Â | The name of the custom list |
_id | Object ID | Â | The object ID |
1.1 Custom List Targeting Keys
Â