1. Authorization
1.1. Login
This `POST` request will return result login and token
1.1.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
string |
User email |
+ |
|
password |
string |
User password |
+ |
1.1.2. HTTP Request
URL
POST api/users/login HTTP/1.1
HEADER
Accept: application/json Content-type: application/json
DATA
{ "email": "test@example.org", "password": "password" }
1.1.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/users/login' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-d '{
"email": "test@example.org",
"password": "password"
}'
1.1.4. Response Body
Path | Type | Description |
---|---|---|
access_token |
string |
This token is used in queries. HEADER: "Authorization: Bearer <this token>" |
token_type |
string |
Token type |
expires_in |
int |
Time token live in seconds |
1.1.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0L2FwaS91c2Vycy9sb2dpbiIsImlhdCI6MTcwMTY5MTYyMywiZXhwIjoxNzAxNjk1MjIzLCJuYmYiOjE3MDE2OTE2MjMsImp0aSI6ImxwNDRBRDhNSUZ1dHBUTGQiLCJzdWIiOiIyIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.C08ROMWyCdT-NcXIrAviJHPOfns-_cFeOiXGRmSTdlE",
"token_type": "bearer",
"expires_in": "60"
}
1.2. Log out
A `POST` request will return result logout
1.2.1. HTTP Request
URL
POST api/logout HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI0LCJleHAiOjE3MDE2OTUyMjQsIm5iZiI6MTcwMTY5MTYyNCwianRpIjoiRTZvZzlKSjRDbG96a0dJQSIsInN1YiI6IjMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.LK5i-MsEbU6IUMgeY3MPxlHW4AwfdXxkmAp5ahXORsw
DATA
{}
1.2.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/logout' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI0LCJleHAiOjE3MDE2OTUyMjQsIm5iZiI6MTcwMTY5MTYyNCwianRpIjoiRTZvZzlKSjRDbG96a0dJQSIsInN1YiI6IjMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.LK5i-MsEbU6IUMgeY3MPxlHW4AwfdXxkmAp5ahXORsw' \
-d '{}'
1.2.3. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
1.2.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Successfully logged out"
}
2. Campaigns
2.1. Campaigns list
A `GET` request will return a list of an campaigns.
2.1.1. HTTP Request
URL
GET api/campaigns HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI0LCJleHAiOjE3MDE2OTUyMjQsIm5iZiI6MTcwMTY5MTYyNCwianRpIjoiM1V6VmFFVkprOTk2d3p1bCIsInN1YiI6IjQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.yY9CIWBAffqeMnI5zhG2dgU_Ob4wg7G0yckn2n5Hi9Y
DATA
{}
2.1.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI0LCJleHAiOjE3MDE2OTUyMjQsIm5iZiI6MTcwMTY5MTYyNCwianRpIjoiM1V6VmFFVkprOTk2d3p1bCIsInN1YiI6IjQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.yY9CIWBAffqeMnI5zhG2dgU_Ob4wg7G0yckn2n5Hi9Y' \
-d '{}'
2.1.3. Response Body
Path | Type | Description |
---|---|---|
data.*.id |
integer |
Campaign Id(test) |
data.*.userId |
integer |
User Id |
data.*.isActive |
boolean |
Campaign On/Off |
data.*.isRunning |
boolean |
Campaign running status |
data.*.type |
string |
Campaign type: banner, native, video, audio |
data.*.name |
string |
Campaign name |
data.*.isRewarded |
integer |
Rewarded video (for video creatives) |
data.*.isDesktopWeb |
boolean |
Traffic Type: Desktop Websites |
data.*.isMobileApp |
boolean |
Traffic Type: Mobile Applications |
data.*.isMobileWeb |
boolean |
Traffic Type: Mobile Websites |
data.*.isSmartphone |
boolean |
Traffic Type: Smartphones |
data.*.isTablet |
boolean |
Traffic Type: Tablets |
data.*.isCTV |
boolean |
Traffic Type: CTVs |
data.*.isDOOH |
boolean |
Traffic Type: DOOH |
data.*.aDomain |
integer |
Top level domain |
data.*.dateStart |
date |
Date start |
data.*.dateEnd |
date |
Date end |
data.*.geoCountries |
array |
GEO Targeting: countries list |
data.*.geoCountriesIsInclude |
boolean |
GEO Targeting: countries list type (true: whitelist, false: blacklist) |
data.*.geoRegions |
array |
GEO Targeting: regions list |
data.*.geoRegionsIsInclude |
boolean |
GEO Targeting: regions list type (true: whitelist, false: blacklist) |
data.*.geoCities |
array |
GEO Targeting: cities list |
data.*.geoCitiesIsInclude |
boolean |
GEO Targeting: cities list type (true: whitelist, false: blacklist) |
data.*.contentCategories |
array |
Targeting: IAB Categories list |
data.*.contentCategoriesIsInclude |
boolean |
Targeting: IAB Categories list type (true: whitelist, false: blacklist) |
data.*.userAgeMin |
integer |
Targeting: Age range from |
data.*.userAgeMax |
integer |
Targeting: Age range to |
data.*.connectionTypes |
array |
Targeting: Connection types list |
data.*.clickedInventoryCategories |
array |
Сlicked Inventory Categories |
data.*.deviceCarrier |
array |
Targeting: List of network operators. |
data.*.deviceCarrierIsInclude |
boolean |
Targeting: List of network operators type (true: whitelist, false: blacklist) |
data.*.OS |
array |
Targeting: The operating system of user's device |
data.*.OSIsInclude |
boolean |
Targeting: The operating system of user's device list type (true: whitelist, false: blacklist) |
data.*.browser |
array |
Targeting: The user's browsers list |
data.*.browserIsInclude |
boolean |
Targeting: The user's browsers list type (true: whitelist, false: blacklist) |
data.*.deviceLanguage |
array |
Targeting: The languages of user's browser |
data.*.deviceLanguageIsInclude |
boolean |
Targeting: The languages of user's browser list type (true: whitelist, false: blacklist) |
data.*.spentDailyLimit |
integer |
Daily spent limit |
data.*.spentTotalLimit |
integer |
Total spent limit |
data.*.impressionsDailyLimit |
integer |
Daily impressions limit |
data.*.impressionsTotalLimit |
integer |
Total impressions limit |
data.*.clicksDailyLimit |
integer |
Daily clicks limit |
data.*.clicksTotalLimit |
integer |
Total clicks limit |
data.*.budgetUse |
integer |
Distribution: pacer, fast pacer - Evenly distribution fast - ASAP distribution |
data.*.allSources |
boolean |
Inventory: Use all SSP endpoints |
data.*.cpm |
float |
cpm |
data.*.adaptiveCpm |
boolean |
adaptiveCpm |
data.*.useCpm |
boolean |
use cpm |
data.*.extendedStatus |
string |
Campaign extended status |
data.*.createdAt |
datetime |
Date of creation |
data.*.updatedAt |
datetime |
Date of last modification |
data.*.deletedAt |
datetime |
Date of deletion |
meta.pagination.total |
integer |
Pagination: total items count |
meta.pagination.count |
integer |
Pagination: page items count |
meta.pagination.per_page |
integer |
Pagination: items per page |
meta.pagination.current_page |
integer |
Pagination: current page number |
meta.pagination.total_pages |
integer |
Pagination: total pages count |
meta.pagination.links |
array |
Pagination: urls to next,prev page |
2.1.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": [
{
"id": 1,
"userId": 4,
"isActive": true,
"isRunning": false,
"type": "native",
"name": "Et.",
"isRewarded": false,
"isDesktopWeb": true,
"isMobileApp": false,
"isMobileWeb": false,
"isSmartphone": false,
"isTablet": false,
"isCTV": false,
"isDOOH": false,
"aDomain": "murray.org",
"dateStart": "2023-07-26",
"dateEnd": "2024-05-22",
"geoCountries": [],
"geoCountriesIsInclude": true,
"geoRegions": [],
"geoRegionsIsInclude": true,
"geoCities": [],
"geoCitiesIsInclude": true,
"contentCategories": [],
"contentCategoriesIsInclude": true,
"userAgeMin": 0,
"userAgeMax": 0,
"connectionTypes": [
"wifi"
],
"clickedInventoryCategories": [],
"deviceCarrier": [],
"deviceCarrierIsInclude": true,
"OS": [],
"OSIsInclude": true,
"browser": [],
"browserIsInclude": true,
"deviceLanguage": [],
"deviceLanguageIsInclude": true,
"spentDailyLimit": 222,
"spentTotalLimit": 3557,
"impressionsDailyLimit": 242380,
"impressionsTotalLimit": 400000,
"clicksDailyLimit": 0,
"clicksTotalLimit": 0,
"budgetUse": "fast",
"allSources": true,
"cpm": 0,
"adaptiveCpm": false,
"useCpm": false,
"extendedStatus": "Low Balance",
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04",
"deletedAt": null
},
{
"id": 2,
"userId": 4,
"isActive": false,
"isRunning": false,
"type": "native",
"name": "Aut.",
"isRewarded": false,
"isDesktopWeb": true,
"isMobileApp": false,
"isMobileWeb": false,
"isSmartphone": false,
"isTablet": false,
"isCTV": false,
"isDOOH": false,
"aDomain": "bernier.net",
"dateStart": "2023-07-04",
"dateEnd": "2024-07-15",
"geoCountries": [],
"geoCountriesIsInclude": true,
"geoRegions": [],
"geoRegionsIsInclude": true,
"geoCities": [],
"geoCitiesIsInclude": true,
"contentCategories": [],
"contentCategoriesIsInclude": true,
"userAgeMin": 0,
"userAgeMax": 0,
"connectionTypes": [
"wifi"
],
"clickedInventoryCategories": [],
"deviceCarrier": [],
"deviceCarrierIsInclude": true,
"OS": [],
"OSIsInclude": true,
"browser": [],
"browserIsInclude": true,
"deviceLanguage": [],
"deviceLanguageIsInclude": true,
"spentDailyLimit": 379,
"spentTotalLimit": 3046,
"impressionsDailyLimit": 279566,
"impressionsTotalLimit": 400000,
"clicksDailyLimit": 0,
"clicksTotalLimit": 0,
"budgetUse": "fast",
"allSources": true,
"cpm": 0,
"adaptiveCpm": false,
"useCpm": false,
"extendedStatus": "Campaign is not active",
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04",
"deletedAt": null
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 15,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
2.2. Get by ID
A `GET` request with a path parameter of the id will return the campaign with that id.
2.2.1. HTTP Request
URL
GET api/campaigns/3 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI0LCJleHAiOjE3MDE2OTUyMjQsIm5iZiI6MTcwMTY5MTYyNCwianRpIjoiS2xUQmRzT1JiNTk1YzFIbCIsInN1YiI6IjUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.NElfB7uLPnKQC3AJs7mKju3QDsuIw2cTA6Og64ihm6U
DATA
{}
2.2.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns/3' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI0LCJleHAiOjE3MDE2OTUyMjQsIm5iZiI6MTcwMTY5MTYyNCwianRpIjoiS2xUQmRzT1JiNTk1YzFIbCIsInN1YiI6IjUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.NElfB7uLPnKQC3AJs7mKju3QDsuIw2cTA6Og64ihm6U' \
-d '{}'
2.2.3. Response Body
Path | Type | Description |
---|---|---|
data.id |
integer |
Campaign Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Campaign On/Off |
data.isRunning |
boolean |
Campaign running status |
data.type |
string |
Campaign type: banner, native, video, audio |
data.name |
string |
Campaign name |
data.isRewarded |
integer |
Rewarded video (for video creatives) |
data.isDesktopWeb |
boolean |
Traffic Type: Desktop Websites |
data.isMobileApp |
boolean |
Traffic Type: Mobile Applications |
data.isMobileWeb |
boolean |
Traffic Type: Mobile Websites |
data.isSmartphone |
boolean |
Traffic Type: Smartphones |
data.isTablet |
boolean |
Traffic Type: Tablets |
data.isCTV |
boolean |
Traffic Type: CTV |
data.isDOOH |
boolean |
Traffic Type: DOOH |
data.aDomain |
integer |
Top level domain |
data.dateStart |
date |
Date start |
data.dateEnd |
date |
Date end |
data.geoCountries |
array |
GEO Targeting: countries list |
data.geoCountriesIsInclude |
boolean |
GEO Targeting: countries list type (true: whitelist, false: blacklist) |
data.geoRegions |
array |
GEO Targeting: regions list |
data.geoRegionsIsInclude |
boolean |
GEO Targeting: regions list type (true: whitelist, false: blacklist) |
data.geoCities |
array |
GEO Targeting: cities list |
data.geoCitiesIsInclude |
boolean |
GEO Targeting: cities list type (true: whitelist, false: blacklist) |
data.contentCategories |
array |
Targeting: IAB Categories list |
data.contentCategoriesIsInclude |
boolean |
Targeting: IAB Categories list type (true: whitelist, false: blacklist) |
data.userAgeMin |
integer |
Targeting: Age range from |
data.userAgeMax |
integer |
Targeting: Age range to |
data.connectionTypes |
array |
Targeting: Connection types list |
data.clickedInventoryCategories |
array |
Сlicked Inventory Categories |
data.deviceCarrier |
array |
Targeting: List of network operators. |
data.deviceCarrierIsInclude |
boolean |
Targeting: List of network operators type (true: whitelist, false: blacklist) |
data.OS |
array |
Targeting: The operating system of user's device |
data.OSIsInclude |
boolean |
Targeting: The operating system of user's device list type (true: whitelist, false: blacklist) |
data.browser |
array |
Targeting: The user's browsers list |
data.browserIsInclude |
boolean |
Targeting: The user's browsers list type (true: whitelist, false: blacklist) |
data.deviceLanguage |
array |
Targeting: The languages of user's browser |
data.deviceLanguageIsInclude |
boolean |
Targeting: The languages of user's browser list type (true: whitelist, false: blacklist) |
data.spentDailyLimit |
integer |
Daily spent limit |
data.spentTotalLimit |
integer |
Total spent limit |
data.impressionsDailyLimit |
integer |
Daily impressions limit |
data.impressionsTotalLimit |
integer |
Total impressions limit |
data.clicksDailyLimit |
integer |
Daily clicks limit |
data.clicksTotalLimit |
integer |
Total clicks limit |
data.budgetUse |
integer |
Distribution: pacer, fast pacer - Evenly distribution fast - ASAP distribution |
data.allSources |
boolean |
Inventory: Use all SSP endpoints |
data.classicPush |
boolean |
Push - PUSH Campaigns |
data.inPagePush |
string |
In-Page Push - PUSH Campaigns |
data.pricingModel |
string |
Pricing model: CPM - PUSH Campaigns |
data.cpm |
float |
cpm |
data.adaptiveCpm |
boolean |
adaptiveCpm |
data.useCpm |
boolean |
use cpm |
data.landingPageUrl |
string |
Landing page URL - PUSH Campaigns |
data.googleAnalyticsTrackingCode |
string |
Google Analytics tracking code - PUSH Campaigns |
data.dynamicTargeting |
array |
SmartCPC: Dynamic targeting - only for CPC Pricing model |
data.subscriptionAge |
array |
Subscription Age - only for CPC Pricing model |
data.frequencyType |
string |
Frequency Type (user, ip) - PUSH Campaigns |
data.frequencyCap |
integer |
Show ads no more than "Frequency Cap" times in "Frequency Period" "Frequency Period Type" - PUSH Campaigns |
data.frequencyPeriod |
integer |
Frequency Period - PUSH Campaigns |
data.frequencyPeriodType |
string |
Frequency Period Type (min, hour, day) - PUSH Campaigns |
data.extendedStatus |
string |
Campaign extended status |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.deletedAt |
datetime |
Date of deletion |
data.pretarget |
int |
pretarget |
2.2.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": {
"id": 3,
"userId": 5,
"isActive": true,
"isRunning": false,
"type": "video",
"name": "Test Campaign #1",
"isRewarded": false,
"isDesktopWeb": false,
"isMobileApp": true,
"isMobileWeb": false,
"isSmartphone": true,
"isTablet": false,
"isCTV": false,
"isDOOH": false,
"aDomain": "pfannerstill.com",
"dateStart": "2022-01-09",
"dateEnd": "2024-07-27",
"geoCountries": [],
"geoCountriesIsInclude": true,
"geoRegions": [],
"geoRegionsIsInclude": true,
"geoCities": [],
"geoCitiesIsInclude": true,
"contentCategories": [],
"contentCategoriesIsInclude": true,
"userAgeMin": 0,
"userAgeMax": 0,
"connectionTypes": [
"wifi"
],
"clickedInventoryCategories": [],
"deviceCarrier": [],
"deviceCarrierIsInclude": true,
"OS": [],
"OSIsInclude": true,
"browser": [],
"browserIsInclude": true,
"deviceLanguage": [],
"deviceLanguageIsInclude": true,
"spentDailyLimit": 348,
"spentTotalLimit": 9309,
"impressionsDailyLimit": 233347,
"impressionsTotalLimit": 400000,
"clicksDailyLimit": 0,
"clicksTotalLimit": 0,
"budgetUse": "fast",
"allSources": true,
"classicPush": true,
"inPagePush": true,
"pricingModel": null,
"cpm": 0,
"adaptiveCpm": false,
"useCpm": false,
"landingPageUrl": "",
"googleAnalyticsTrackingCode": null,
"dynamicTargeting": [],
"subscriptionAge": [],
"frequencyType": "user",
"frequencyCap": 0,
"frequencyPeriod": 24,
"frequencyPeriodType": "day",
"extendedStatus": "Low Balance",
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04",
"deletedAt": null,
"pretarget": null
}
}
2.3. Create a Custom Banner/Native/Video/Audio Campaigns
A `POST` request will create new campaign.
2.3.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
type |
string |
Campaign type: banner, native, video, audio |
+ |
name |
string |
Campaign name |
+ |
aDomain |
integer |
Top level domain |
+ |
isRewarded |
integer |
Rewarded video (for video creatives) |
|
isDesktopWeb |
boolean |
Traffic Type: Desktop Websites |
|
isMobileApp |
boolean |
Traffic Type: Mobile Applications |
|
isMobileWeb |
boolean |
Traffic Type: Mobile Websites |
|
isSmartphone |
boolean |
Traffic Type: Smartphones |
|
isTablet |
boolean |
Traffic Type: Tablets |
|
contentCategories |
array |
Targeting: IAB Categories list |
|
contentCategoriesIsInclude |
boolean |
Targeting: IAB Categories list type (true: whitelist, false: blacklist) |
|
userAgeMin |
integer |
Targeting: Age range from |
|
userAgeMax |
integer |
Targeting: Age range to |
|
connectionTypes |
array |
Targeting: Connection types list |
|
deviceCarrier |
array |
Targeting: List of network operators. |
|
deviceCarrierIsInclude |
boolean |
Targeting: List of network operators type (true: whitelist, false: blacklist) |
|
OS |
array |
Targeting: The operating system of user's device |
|
OSIsInclude |
boolean |
Targeting: The operating system of user's device list type (true: whitelist, false: blacklist) |
|
browser |
array |
Targeting: The user's browsers list |
|
browserIsInclude |
boolean |
Targeting: The user's browsers list type (true: whitelist, false: blacklist) |
|
deviceLanguage |
array |
Targeting: The languages of user's browser |
|
deviceLanguageIsInclude |
boolean |
Targeting: The languages of user's browser list type (true: whitelist, false: blacklist) |
|
spentDailyLimit |
integer |
Daily spent limit |
|
spentTotalLimit |
integer |
Total spent limit |
|
impressionsDailyLimit |
integer |
Daily impressions limit |
|
impressionsTotalLimit |
integer |
Total impressions limit |
|
clicksDailyLimit |
integer |
Daily clicks limit |
|
clicksTotalLimit |
integer |
Total clicks limit |
|
budgetUse |
integer |
Distribution: pacer, fast pacer - Evenly distribution fast - ASAP distribution |
|
dateStart |
date |
Date start |
|
dateEnd |
date |
Date end |
2.3.2. HTTP Request
URL
POST api/campaigns HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI0LCJleHAiOjE3MDE2OTUyMjQsIm5iZiI6MTcwMTY5MTYyNCwianRpIjoiYUtCekRiSTh1bzIyWk42WCIsInN1YiI6IjYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.b-JSeHMl3QXUX2MPV2K3mPvhG6oji39voNpRoqQ6u50
DATA
{ "type": "banner", "name": "New Campaign #2", "aDomain": "friesen.com", "isRewarded": true, "isDesktopWeb": true, "isMobileApp": true, "isMobileWeb": true, "isSmartphone": true, "isTablet": true, "contentCategories": [ "IAB1", "IAB3" ], "contentCategoriesIsInclude": false, "userAgeMin": 18, "userAgeMax": 50, "connectionTypes": [ "ethernet", "cellular_all", "cellular_3g", "cellular_4g", "wifi" ], "deviceCarrier": [ "ISP Green-Stiedemann", "ISP Simonis Inc" ], "deviceCarrierIsInclude": false, "OS": [ "Android 8.0", "Android 8.1", "Android 9.0", "Android 10.0", "Android 11.0", "Android 12.0", "Android 13.0", "iOS" ], "OSIsInclude": true, "browser": [ "Chrome", "IE", "Edge" ], "browserIsInclude": true, "deviceLanguage": [ "ab", "aa" ], "deviceLanguageIsInclude": true, "spentDailyLimit": 200, "spentTotalLimit": 1000, "impressionsDailyLimit": 100000, "impressionsTotalLimit": 1000000, "clicksDailyLimit": 500, "clicksTotalLimit": 1000, "budgetUse": "fast", "dateStart": "2021-12-26", "dateEnd": "2024-09-25" }
2.3.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI0LCJleHAiOjE3MDE2OTUyMjQsIm5iZiI6MTcwMTY5MTYyNCwianRpIjoiYUtCekRiSTh1bzIyWk42WCIsInN1YiI6IjYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.b-JSeHMl3QXUX2MPV2K3mPvhG6oji39voNpRoqQ6u50' \
-d '{
"type": "banner",
"name": "New Campaign #2",
"aDomain": "friesen.com",
"isRewarded": true,
"isDesktopWeb": true,
"isMobileApp": true,
"isMobileWeb": true,
"isSmartphone": true,
"isTablet": true,
"contentCategories": [
"IAB1",
"IAB3"
],
"contentCategoriesIsInclude": false,
"userAgeMin": 18,
"userAgeMax": 50,
"connectionTypes": [
"ethernet",
"cellular_all",
"cellular_3g",
"cellular_4g",
"wifi"
],
"deviceCarrier": [
"ISP Green-Stiedemann",
"ISP Simonis Inc"
],
"deviceCarrierIsInclude": false,
"OS": [
"Android 8.0",
"Android 8.1",
"Android 9.0",
"Android 10.0",
"Android 11.0",
"Android 12.0",
"Android 13.0",
"iOS"
],
"OSIsInclude": true,
"browser": [
"Chrome",
"IE",
"Edge"
],
"browserIsInclude": true,
"deviceLanguage": [
"ab",
"aa"
],
"deviceLanguageIsInclude": true,
"spentDailyLimit": 200,
"spentTotalLimit": 1000,
"impressionsDailyLimit": 100000,
"impressionsTotalLimit": 1000000,
"clicksDailyLimit": 500,
"clicksTotalLimit": 1000,
"budgetUse": "fast",
"dateStart": "2021-12-26",
"dateEnd": "2024-09-25"
}'
2.3.4. Response Body
Path | Type | Description |
---|---|---|
data.id |
integer |
Campaign Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Campaign On/Off |
data.isRunning |
boolean |
Campaign running status |
data.type |
string |
Campaign type: banner, native, video, audio |
data.name |
string |
Campaign name |
data.isRewarded |
integer |
Rewarded video (for video creatives) |
data.isDesktopWeb |
boolean |
Traffic Type: Desktop Websites |
data.isMobileApp |
boolean |
Traffic Type: Mobile Applications |
data.isMobileWeb |
boolean |
Traffic Type: Mobile Websites |
data.isSmartphone |
boolean |
Traffic Type: Smartphones |
data.isTablet |
boolean |
Traffic Type: Tablets |
data.isCTV |
boolean |
Traffic Type: CTV |
data.isDOOH |
boolean |
Traffic Type: DOOH |
data.aDomain |
integer |
Top level domain |
data.dateStart |
date |
Date start |
data.dateEnd |
date |
Date end |
data.geoCountries |
array |
GEO Targeting: countries list |
data.geoCountriesIsInclude |
boolean |
GEO Targeting: countries list type (true: whitelist, false: blacklist) |
data.geoRegions |
array |
GEO Targeting: regions list |
data.geoRegionsIsInclude |
boolean |
GEO Targeting: regions list type (true: whitelist, false: blacklist) |
data.geoCities |
array |
GEO Targeting: cities list |
data.geoCitiesIsInclude |
boolean |
GEO Targeting: cities list type (true: whitelist, false: blacklist) |
data.contentCategories |
array |
Targeting: IAB Categories list |
data.contentCategoriesIsInclude |
boolean |
Targeting: IAB Categories list type (true: whitelist, false: blacklist) |
data.userAgeMin |
integer |
Targeting: Age range from |
data.userAgeMax |
integer |
Targeting: Age range to |
data.connectionTypes |
array |
Targeting: Connection types list |
data.clickedInventoryCategories |
array |
Сlicked Inventory Categories |
data.deviceCarrier |
array |
Targeting: List of network operators. |
data.deviceCarrierIsInclude |
boolean |
Targeting: List of network operators type (true: whitelist, false: blacklist) |
data.OS |
array |
Targeting: The operating system of user's device |
data.OSIsInclude |
boolean |
Targeting: The operating system of user's device list type (true: whitelist, false: blacklist) |
data.browser |
array |
Targeting: The user's browsers list |
data.browserIsInclude |
boolean |
Targeting: The user's browsers list type (true: whitelist, false: blacklist) |
data.deviceLanguage |
array |
Targeting: The languages of user's browser |
data.deviceLanguageIsInclude |
boolean |
Targeting: The languages of user's browser list type (true: whitelist, false: blacklist) |
data.spentDailyLimit |
integer |
Daily spent limit |
data.spentTotalLimit |
integer |
Total spent limit |
data.impressionsDailyLimit |
integer |
Daily impressions limit |
data.impressionsTotalLimit |
integer |
Total impressions limit |
data.clicksDailyLimit |
integer |
Daily clicks limit |
data.clicksTotalLimit |
integer |
Total clicks limit |
data.budgetUse |
integer |
Distribution: pacer, fast pacer - Evenly distribution fast - ASAP distribution |
data.allSources |
boolean |
Inventory: Use all SSP endpoints |
data.classicPush |
boolean |
Push - PUSH Campaigns |
data.inPagePush |
string |
In-Page Push - PUSH Campaigns |
data.pricingModel |
string |
Pricing model: CPM - PUSH Campaigns |
data.cpm |
float |
cpm |
data.adaptiveCpm |
boolean |
adaptiveCpm |
data.useCpm |
boolean |
use cpm |
data.landingPageUrl |
string |
Landing page URL - PUSH Campaigns |
data.googleAnalyticsTrackingCode |
string |
Google Analytics tracking code - PUSH Campaigns |
data.dynamicTargeting |
array |
SmartCPC: Dynamic targeting - only for CPC Pricing model |
data.subscriptionAge |
array |
Subscription Age - only for CPC Pricing model |
data.frequencyType |
string |
Frequency Type (user, ip) - PUSH Campaigns |
data.frequencyCap |
integer |
Show ads no more than "Frequency Cap" times in "Frequency Period" "Frequency Period Type" - PUSH Campaigns |
data.frequencyPeriod |
integer |
Frequency Period - PUSH Campaigns |
data.frequencyPeriodType |
string |
Frequency Period Type (min, hour, day) - PUSH Campaigns |
data.extendedStatus |
string |
Campaign extended status |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.deletedAt |
datetime |
Date of deletion |
data.pretarget |
int |
pretarget |
2.3.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": {
"id": 4,
"userId": 6,
"isActive": null,
"isRunning": false,
"type": "banner",
"name": "New Campaign #2",
"isRewarded": true,
"isDesktopWeb": true,
"isMobileApp": true,
"isMobileWeb": true,
"isSmartphone": true,
"isTablet": true,
"isCTV": true,
"isDOOH": true,
"aDomain": "friesen.com",
"dateStart": "2021-12-26",
"dateEnd": "2024-09-25",
"geoCountries": [],
"geoCountriesIsInclude": false,
"geoRegions": [],
"geoRegionsIsInclude": null,
"geoCities": [],
"geoCitiesIsInclude": false,
"contentCategories": [
"IAB1",
"IAB3"
],
"contentCategoriesIsInclude": false,
"userAgeMin": 18,
"userAgeMax": 50,
"connectionTypes": [
"ethernet",
"cellular_all",
"cellular_3g",
"cellular_4g",
"wifi"
],
"clickedInventoryCategories": [],
"deviceCarrier": [
"ISP Green-Stiedemann",
"ISP Simonis Inc"
],
"deviceCarrierIsInclude": false,
"OS": [
"Android 8.0",
"Android 8.1",
"Android 9.0",
"Android 10.0",
"Android 11.0",
"Android 12.0",
"Android 13.0",
"iOS"
],
"OSIsInclude": true,
"browser": [
"Chrome",
"IE",
"Edge"
],
"browserIsInclude": true,
"deviceLanguage": [
"ab",
"aa"
],
"deviceLanguageIsInclude": true,
"spentDailyLimit": 200,
"spentTotalLimit": 1000,
"impressionsDailyLimit": 100000,
"impressionsTotalLimit": 1000000,
"clicksDailyLimit": 500,
"clicksTotalLimit": 1000,
"budgetUse": "fast",
"allSources": false,
"classicPush": false,
"inPagePush": false,
"pricingModel": null,
"cpm": null,
"adaptiveCpm": null,
"useCpm": null,
"landingPageUrl": null,
"googleAnalyticsTrackingCode": null,
"dynamicTargeting": [],
"subscriptionAge": [],
"frequencyType": null,
"frequencyCap": 0,
"frequencyPeriod": 0,
"frequencyPeriodType": "day",
"extendedStatus": "Campaign is not active",
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04",
"deletedAt": null,
"pretarget": null
}
}
2.4. Update a Custom Campaign
A `PATCH` request will update campaign.
2.4.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
name |
string |
Campaign name |
2.4.2. HTTP Request
URL
PATCH api/campaigns/5 HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI1LCJleHAiOjE3MDE2OTUyMjUsIm5iZiI6MTcwMTY5MTYyNSwianRpIjoiUzlpaTJxSEhKWldObUZENiIsInN1YiI6IjciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.cIVTvLkhoDp3PYzyTe1Ns-YFn3cUMGGNqLJyCM8oJqQ
DATA
{ "name": "Updated Campaign #3" }
2.4.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns/5' -i -X PATCH \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI1LCJleHAiOjE3MDE2OTUyMjUsIm5iZiI6MTcwMTY5MTYyNSwianRpIjoiUzlpaTJxSEhKWldObUZENiIsInN1YiI6IjciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.cIVTvLkhoDp3PYzyTe1Ns-YFn3cUMGGNqLJyCM8oJqQ' \
-d '{
"name": "Updated Campaign #3"
}'
2.4.4. Response Body
Path | Type | Description |
---|---|---|
data.id |
integer |
Campaign Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Campaign On/Off |
data.isRunning |
boolean |
Campaign running status |
data.type |
string |
Campaign type: banner, native, video, audio |
data.name |
string |
Campaign name |
data.isRewarded |
integer |
Rewarded video (for video creatives) |
data.isDesktopWeb |
boolean |
Traffic Type: Desktop Websites |
data.isMobileApp |
boolean |
Traffic Type: Mobile Applications |
data.isMobileWeb |
boolean |
Traffic Type: Mobile Websites |
data.isSmartphone |
boolean |
Traffic Type: Smartphones |
data.isTablet |
boolean |
Traffic Type: Tablets |
data.isCTV |
boolean |
Traffic Type: CTV |
data.isDOOH |
boolean |
Traffic Type: DOOH |
data.aDomain |
integer |
Top level domain |
data.dateStart |
date |
Date start |
data.dateEnd |
date |
Date end |
data.geoCountries |
array |
GEO Targeting: countries list |
data.geoCountriesIsInclude |
boolean |
GEO Targeting: countries list type (true: whitelist, false: blacklist) |
data.geoRegions |
array |
GEO Targeting: regions list |
data.geoRegionsIsInclude |
boolean |
GEO Targeting: regions list type (true: whitelist, false: blacklist) |
data.geoCities |
array |
GEO Targeting: cities list |
data.geoCitiesIsInclude |
boolean |
GEO Targeting: cities list type (true: whitelist, false: blacklist) |
data.contentCategories |
array |
Targeting: IAB Categories list |
data.contentCategoriesIsInclude |
boolean |
Targeting: IAB Categories list type (true: whitelist, false: blacklist) |
data.userAgeMin |
integer |
Targeting: Age range from |
data.userAgeMax |
integer |
Targeting: Age range to |
data.connectionTypes |
array |
Targeting: Connection types list |
data.clickedInventoryCategories |
array |
Сlicked Inventory Categories |
data.deviceCarrier |
array |
Targeting: List of network operators. |
data.deviceCarrierIsInclude |
boolean |
Targeting: List of network operators type (true: whitelist, false: blacklist) |
data.OS |
array |
Targeting: The operating system of user's device |
data.OSIsInclude |
boolean |
Targeting: The operating system of user's device list type (true: whitelist, false: blacklist) |
data.browser |
array |
Targeting: The user's browsers list |
data.browserIsInclude |
boolean |
Targeting: The user's browsers list type (true: whitelist, false: blacklist) |
data.deviceLanguage |
array |
Targeting: The languages of user's browser |
data.deviceLanguageIsInclude |
boolean |
Targeting: The languages of user's browser list type (true: whitelist, false: blacklist) |
data.spentDailyLimit |
integer |
Daily spent limit |
data.spentTotalLimit |
integer |
Total spent limit |
data.impressionsDailyLimit |
integer |
Daily impressions limit |
data.impressionsTotalLimit |
integer |
Total impressions limit |
data.clicksDailyLimit |
integer |
Daily clicks limit |
data.clicksTotalLimit |
integer |
Total clicks limit |
data.budgetUse |
integer |
Distribution: pacer, fast pacer - Evenly distribution fast - ASAP distribution |
data.allSources |
boolean |
Inventory: Use all SSP endpoints |
data.classicPush |
boolean |
Push - PUSH Campaigns |
data.inPagePush |
string |
In-Page Push - PUSH Campaigns |
data.pricingModel |
string |
Pricing model: CPM - PUSH Campaigns |
data.cpm |
float |
cpm |
data.adaptiveCpm |
boolean |
adaptiveCpm |
data.useCpm |
boolean |
use cpm |
data.landingPageUrl |
string |
Landing page URL - PUSH Campaigns |
data.googleAnalyticsTrackingCode |
string |
Google Analytics tracking code - PUSH Campaigns |
data.dynamicTargeting |
array |
SmartCPC: Dynamic targeting - only for CPC Pricing model |
data.subscriptionAge |
array |
Subscription Age - only for CPC Pricing model |
data.frequencyType |
string |
Frequency Type (user, ip) - PUSH Campaigns |
data.frequencyCap |
integer |
Show ads no more than "Frequency Cap" times in "Frequency Period" "Frequency Period Type" - PUSH Campaigns |
data.frequencyPeriod |
integer |
Frequency Period - PUSH Campaigns |
data.frequencyPeriodType |
string |
Frequency Period Type (min, hour, day) - PUSH Campaigns |
data.extendedStatus |
string |
Campaign extended status |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.deletedAt |
datetime |
Date of deletion |
data.pretarget |
int |
pretarget |
2.4.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": {
"id": 5,
"userId": 7,
"isActive": false,
"isRunning": false,
"type": "audio",
"name": "Updated Campaign #3",
"isRewarded": false,
"isDesktopWeb": false,
"isMobileApp": false,
"isMobileWeb": true,
"isSmartphone": true,
"isTablet": false,
"isCTV": false,
"isDOOH": true,
"aDomain": "jaskolski.com",
"dateStart": "2023-04-27",
"dateEnd": "2024-10-07",
"geoCountries": [],
"geoCountriesIsInclude": true,
"geoRegions": [],
"geoRegionsIsInclude": true,
"geoCities": [],
"geoCitiesIsInclude": true,
"contentCategories": [],
"contentCategoriesIsInclude": true,
"userAgeMin": 0,
"userAgeMax": 0,
"connectionTypes": [
"wifi"
],
"clickedInventoryCategories": [],
"deviceCarrier": [],
"deviceCarrierIsInclude": true,
"OS": [],
"OSIsInclude": true,
"browser": [],
"browserIsInclude": true,
"deviceLanguage": [],
"deviceLanguageIsInclude": true,
"spentDailyLimit": 330,
"spentTotalLimit": 3418,
"impressionsDailyLimit": 214575,
"impressionsTotalLimit": 400000,
"clicksDailyLimit": 0,
"clicksTotalLimit": 0,
"budgetUse": "fast",
"allSources": true,
"classicPush": true,
"inPagePush": true,
"pricingModel": null,
"cpm": 0,
"adaptiveCpm": false,
"useCpm": false,
"landingPageUrl": "",
"googleAnalyticsTrackingCode": null,
"dynamicTargeting": [],
"subscriptionAge": [],
"frequencyType": "user",
"frequencyCap": 0,
"frequencyPeriod": 24,
"frequencyPeriodType": "day",
"extendedStatus": "Campaign is not active",
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04",
"deletedAt": null,
"pretarget": null
}
}
2.5. Delete a Custom Campaign
A `DELETE` request will delete campaign.
2.5.1. HTTP Request
URL
DELETE api/campaigns/6 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI1LCJleHAiOjE3MDE2OTUyMjUsIm5iZiI6MTcwMTY5MTYyNSwianRpIjoiZjhoN2c0dTBXNDhxVVBzbyIsInN1YiI6IjgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.YxtVvotV9G5GTlIncpK7g1tJV67ZYDPCvQNwolaVkuk Content-type: application/x-www-form-urlencoded
DATA
{}
2.5.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns/6' -i -X DELETE \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI1LCJleHAiOjE3MDE2OTUyMjUsIm5iZiI6MTcwMTY5MTYyNSwianRpIjoiZjhoN2c0dTBXNDhxVVBzbyIsInN1YiI6IjgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.YxtVvotV9G5GTlIncpK7g1tJV67ZYDPCvQNwolaVkuk' \
-H 'Content-type: application/x-www-form-urlencoded' \
-d '{}'
2.5.3. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{}
3. Upload media
3.1. Store Image
A `POST` request will upload image
3.1.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
media_assets |
file |
Array of files to upload |
+ |
3.1.2. HTTP Request
URL
POST api/media-asset/upload/image HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYwLCJleHAiOjE3MDE2OTUyNjAsIm5iZiI6MTcwMTY5MTY2MCwianRpIjoieFQwNG95WE5GbmtLdktOZyIsInN1YiI6IjM0IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.xqlbmdg0X5u-uVJW5nJfvefR-CQQ6fV6PWSusRXuhaY
DATA
{ "media_assets": [ <Binary file> ] }
3.1.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/media-asset/upload/image' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYwLCJleHAiOjE3MDE2OTUyNjAsIm5iZiI6MTcwMTY5MTY2MCwianRpIjoieFQwNG95WE5GbmtLdktOZyIsInN1YiI6IjM0IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.xqlbmdg0X5u-uVJW5nJfvefR-CQQ6fV6PWSusRXuhaY' \
-d '{
"media_assets": [
<Binary file>
]
}'
3.1.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
data.*.id |
integer |
Media id |
data.*.userId |
integer |
User Id |
data.*.mediaType |
string |
Media type (html, image, video) |
data.*.originName |
string |
Original file name |
data.*.name |
string |
Uploaded file name |
data.*.extension |
string |
Uploaded file extension |
data.*.url |
string |
Uploaded file url |
data.*.width |
integer |
Uploaded file image width |
data.*.height |
integer |
Uploaded file image height |
data.*.weight |
integer |
Uploaded file size kB |
data.*.createdAt |
datetime |
Date of creation |
data.*.updatedAt |
datetime |
Date of last modification |
3.1.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "MediaAsset created.",
"data": [
{
"id": 20,
"userId": 34,
"mediaType": "image",
"originName": "test-image.png",
"name": "test-image.png",
"extension": "png",
"url": "\/storage\/test-image.png",
"width": 10,
"height": 10,
"weight": 91,
"createdAt": "2023-12-04 12:07:40",
"updatedAt": "2023-12-04 12:07:40"
}
]
}
3.2. Store video
A `POST` request will upload video
3.2.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
media_assets |
file |
Array of files to upload |
+ |
3.2.2. HTTP Request
URL
POST api/media-asset/upload/video HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYwLCJleHAiOjE3MDE2OTUyNjAsIm5iZiI6MTcwMTY5MTY2MCwianRpIjoick51QXpmdXVmTEFjWTZsdCIsInN1YiI6IjM1IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.NRj0P03K2NvOm-79l5brvqP2O7x7kJ-k2e2j0vi9B3o
DATA
{ "media_assets": [ <Binary file> ] }
3.2.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/media-asset/upload/video' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYwLCJleHAiOjE3MDE2OTUyNjAsIm5iZiI6MTcwMTY5MTY2MCwianRpIjoick51QXpmdXVmTEFjWTZsdCIsInN1YiI6IjM1IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.NRj0P03K2NvOm-79l5brvqP2O7x7kJ-k2e2j0vi9B3o' \
-d '{
"media_assets": [
<Binary file>
]
}'
3.2.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
data.*.id |
integer |
Media id |
data.*.userId |
integer |
User Id |
data.*.mediaType |
string |
Media type (html, image, video) |
data.*.originName |
string |
Original file name |
data.*.name |
string |
Uploaded file name |
data.*.extension |
string |
Uploaded file extension |
data.*.url |
string |
Uploaded file url |
data.*.width |
integer |
Uploaded file image width |
data.*.height |
integer |
Uploaded file image height |
data.*.weight |
integer |
Uploaded file size kB |
data.*.mimeType |
string |
Video mime type |
data.*.bitrate |
integer |
Video bitrate |
data.*.duration |
integer |
Video duration (in seconds) |
data.*.durationTime |
string |
Video duration (in text format) |
data.*.playtime |
integer |
Video playtime |
data.*.createdAt |
datetime |
Date of creation |
data.*.updatedAt |
datetime |
Date of last modification |
3.2.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "MediaAsset created.",
"data": [
{
"id": 21,
"userId": 35,
"mediaType": "video",
"originName": "test-video.mp4",
"name": "test-video.mp4",
"extension": "mp4",
"url": "\/storage\/test-video.mp4",
"width": 320,
"height": 240,
"weight": 5312,
"mimeType": "video\/quicktime",
"bitrate": 201493,
"duration": 0,
"durationTime": "00:00:00",
"playtime": "00:00:00",
"createdAt": "2023-12-04 12:07:40",
"updatedAt": "2023-12-04 12:07:40"
}
]
}
3.3. Store HTML
A `POST` request will upload HTML
3.3.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
media_assets |
file |
Array of files to upload |
+ |
3.3.2. HTTP Request
URL
POST api/media-asset/upload/html HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYwLCJleHAiOjE3MDE2OTUyNjAsIm5iZiI6MTcwMTY5MTY2MCwianRpIjoiMmk5aDRIOGpCbUhHT1ZhViIsInN1YiI6IjM2IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.cUPgYDXq-zSTwHxjYTV4l4VvhXOqLRxfCoe0xQ3Ezg8
DATA
{ "media_assets": [ <Binary file> ] }
3.3.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/media-asset/upload/html' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYwLCJleHAiOjE3MDE2OTUyNjAsIm5iZiI6MTcwMTY5MTY2MCwianRpIjoiMmk5aDRIOGpCbUhHT1ZhViIsInN1YiI6IjM2IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.cUPgYDXq-zSTwHxjYTV4l4VvhXOqLRxfCoe0xQ3Ezg8' \
-d '{
"media_assets": [
<Binary file>
]
}'
3.3.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
data.*.id |
integer |
Media id |
data.*.userId |
integer |
User Id |
data.*.mediaType |
string |
Media type (html, image, video) |
data.*.originName |
string |
Original file name |
data.*.name |
string |
Uploaded file name |
data.*.extension |
string |
Uploaded file extension |
data.*.url |
string |
Uploaded file url |
data.*.width |
integer |
Uploaded file image width |
data.*.height |
integer |
Uploaded file image height |
data.*.weight |
integer |
Uploaded file size kB |
data.*.createdAt |
datetime |
Date of creation |
data.*.updatedAt |
datetime |
Date of last modification |
3.3.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "MediaAsset created.",
"data": [
{
"id": 22,
"userId": 36,
"mediaType": "html",
"originName": "test-html.zip",
"name": "TEST\/index.html",
"extension": "zip",
"url": "\/storage\/TEST\/index.html",
"width": 0,
"height": 0,
"weight": 0,
"createdAt": "2023-12-04 12:07:41",
"updatedAt": "2023-12-04 12:07:41"
}
]
}
3.4. Store filter list
A `POST` request will upload video
3.4.1. HTTP Request
URL
POST api/parsefile HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYxLCJleHAiOjE3MDE2OTUyNjEsIm5iZiI6MTcwMTY5MTY2MSwianRpIjoick92Z2lPQ0pXckQxdmtGUCIsInN1YiI6IjM3IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.UYx1VOwtcvz24YrE3LJumI4fnytIJdooB3LucNBPzmk
DATA
{ "file": <Binary file> }
3.4.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/parsefile' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYxLCJleHAiOjE3MDE2OTUyNjEsIm5iZiI6MTcwMTY5MTY2MSwianRpIjoick92Z2lPQ0pXckQxdmtGUCIsInN1YiI6IjM3IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.UYx1VOwtcvz24YrE3LJumI4fnytIJdooB3LucNBPzmk' \
-d '{
"file": <Binary file>
}'
3.4.3. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
items |
array |
List array items |
fileName |
string |
File name |
countItems |
integer |
Count items |
3.4.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "success",
"items": [
"test.com"
],
"fileName": "1701691661_test-filter.csv",
"countItems": 0
}
4. Creatives
4.1. Creatives list
A `GET` request will return a list of an creatives.
4.1.1. HTTP Request
URL
GET api/creatives HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI2LCJleHAiOjE3MDE2OTUyMjYsIm5iZiI6MTcwMTY5MTYyNiwianRpIjoiZFhQNHE4SUQzQzFVRHY5bCIsInN1YiI6IjE3IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.j67PKsI_QWgZA-p5yi9TkaWCM_wADOvxf_YakR5na_g
DATA
{}
4.1.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/creatives' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI2LCJleHAiOjE3MDE2OTUyMjYsIm5iZiI6MTcwMTY5MTYyNiwianRpIjoiZFhQNHE4SUQzQzFVRHY5bCIsInN1YiI6IjE3IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.j67PKsI_QWgZA-p5yi9TkaWCM_wADOvxf_YakR5na_g' \
-d '{}'
4.1.3. Response Body
Path | Type | Description |
---|---|---|
data.*.id |
integer |
Creative Id |
data.*.userId |
integer |
User Id |
data.*.isActive |
boolean |
Creative status |
data.*.approved |
string |
Creative approval status (approved, pending, disapproved) |
data.*.creativeType |
string |
Creative type: banner, native, video, audio |
data.*.name |
string |
Creative name |
data.*.frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
data.*.frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
data.*.bidPrice |
float |
CPM |
data.*.autoresize |
boolean |
autoresize |
data.*.adaptiveCpm |
bool |
adaptiveCpm |
data.*.size |
string |
Image width and height |
data.*.weight |
string |
File size |
data.*.folderId |
string |
Folder Id |
data.*.createdAt |
datetime |
Date of creation |
data.*.updatedAt |
datetime |
Date of last modification |
data.*.pendingAt |
datetime |
Date of pending start |
data.*.deletedAt |
datetime |
Date of deletion |
data.*.media.id |
integer |
Media Id |
data.*.media.userId |
string |
User Id |
data.*.media.mediaType |
string |
Media type (html, image, video) |
data.*.media.originName |
string |
Uploaded file original name |
data.*.media.name |
string |
Uploaded file name |
data.*.media.extension |
string |
Uploaded file extention |
data.*.media.url |
string |
Uploaded file URL |
data.*.media.width |
integer |
Uploaded file image width |
data.*.media.height |
integer |
Uploaded file image height |
data.*.media.weight |
integer |
Uploaded file size |
data.*.relation.banner.apiFramework |
integer |
Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID |
data.*.relation.banner.admBody |
string |
Third-party tag |
data.*.relation.banner.bannerType |
String |
Banner type (banner,inBannerVideo) |
data.*.relation.banner.clickUrl |
string |
Click URL |
data.*.relation.banner.width |
integer |
Banner width |
data.*.relation.banner.height |
integer |
Banner height |
data.*.relation.banner.childrenCreative |
string |
childrenCreative |
data.*.relation.banner.statusChildrenCreative |
string |
statusChildrenCreative |
data.*.relation.banner.main |
boolean |
Main creative |
data.*.relation.native.smallImageId |
integer |
Logo media id |
data.*.relation.native.largeImageId |
integer |
Image media id |
data.*.relation.native.smallImage.id |
integer |
Logo media id |
data.*.relation.native.smallImage.folderId |
string |
Folder id |
data.*.relation.native.smallImage.userId |
integer |
User id |
data.*.relation.native.smallImage.width |
string |
width |
data.*.relation.native.smallImage.height |
string |
height |
data.*.relation.native.smallImage.name |
string |
name |
data.*.relation.native.smallImage.url |
string |
url |
data.*.relation.native.smallImage.href |
string |
href |
data.*.relation.native.smallImage.originName |
string |
originName |
data.*.relation.native.smallImage.path |
string |
path |
data.*.relation.native.smallImage.extension |
string |
extension |
data.*.relation.native.smallImage.mediaType |
string |
mediaType |
data.*.relation.native.smallImage.createdAt |
string |
createdAt |
data.*.relation.native.smallImage.updatedAt |
string |
updatedAt |
data.*.relation.native.smallImage.deletedAt |
string |
updatedAt |
data.*.relation.native.smallImage.weight |
string |
weight |
data.*.relation.native.largeImage.id |
integer |
Image media id |
data.*.relation.native.largeImage.folderId |
string |
Folder id |
data.*.relation.native.largeImage.userId |
integer |
User id |
data.*.relation.native.largeImage.width |
string |
width |
data.*.relation.native.largeImage.height |
string |
height |
data.*.relation.native.largeImage.name |
string |
name |
data.*.relation.native.largeImage.url |
string |
url |
data.*.relation.native.largeImage.href |
string |
href |
data.*.relation.native.largeImage.originName |
string |
originName |
data.*.relation.native.largeImage.path |
string |
path |
data.*.relation.native.largeImage.extension |
string |
extension |
data.*.relation.native.largeImage.mediaType |
string |
mediaType |
data.*.relation.native.largeImage.createdAt |
string |
createdAt |
data.*.relation.native.largeImage.updatedAt |
string |
updatedAt |
data.*.relation.native.largeImage.deletedAt |
string |
updatedAt |
data.*.relation.native.largeImage.weight |
string |
weight |
data.*.relation.native.assetDataDesc |
string |
Ad text |
data.*.relation.native.assetTitle |
string |
Ad title |
data.*.relation.native.assetDataSponsored |
string |
Brand name |
data.*.relation.native.assetCtaText |
string |
CTA button text |
data.*.relation.native.clickUrl |
string |
Click URL |
data.*.relation.native.displayUrl |
string |
Display URL |
data.*.relation.native.impTracker |
string |
Impression Tracker |
data.*.relation.video.sizes |
string |
Player size |
data.*.relation.video.admBody |
string |
Third-party tag |
data.*.relation.video.mimeType |
array |
MIME types ("[video/mpeg, video/mp4, video/quicktime, video/x-flv, application/x-shockwave-flash, application/javascript, video/x-ms-wmv, video/webm]") |
data.*.relation.video.width |
integer |
Video width |
data.*.relation.video.height |
integer |
Video height |
data.*.relation.video.duration |
integer |
Video duration |
data.*.relation.video.clickUrl |
string |
Click URL |
data.*.relation.video.partyTagFormat |
integer |
3 party tag format (0-NO VPAID, 1-VPAID 1, 2-VPAID 2, 3-ALL VPAID) |
meta.pagination.total |
integer |
Pagination: total items count |
meta.pagination.count |
integer |
Pagination: page items count |
meta.pagination.per_page |
integer |
Pagination: items per page |
meta.pagination.current_page |
integer |
Pagination: current page number |
meta.pagination.total_pages |
integer |
Pagination: total pages count |
meta.pagination.links |
object |
Pagination links |
4.1.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": [
{
"id": 8,
"userId": 17,
"isActive": 0,
"approved": "pending",
"creativeType": "banner",
"name": "Banner creative #1",
"frequencyType": "user",
"frequencyCap": 2,
"bidPrice": "1.84",
"autoresize": 0,
"adaptiveCpm": false,
"size": "532 x 471",
"weight": "0.12 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:06",
"updatedAt": "2023-12-04 12:07:06",
"pendingAt": "2023-12-04 12:07:06",
"deletedAt": null,
"media": {
"id": 8,
"userId": 17,
"mediaType": "image",
"originName": "image.jpg",
"name": "17_98d8abccb1094989d85ca14e4b6dbb33.jpg",
"extension": "jpg",
"url": "https:\/\/www.kohler.com\/error-quos-ipsam-et-tempora-minima-consectetur-enim-et17_98d8abccb1094989d85ca14e4b6dbb33.jpg",
"width": 404,
"height": 456,
"weight": 120599
},
"relation": {
"banner": {
"apiFramework": 0,
"admBody": "<a target=\"_blank\" href=\"http:\/\/bogan.org\/\" ><img src=\"http:\/\/hudson.org\/\/10.jpg\"\/><\/a>",
"bannerType": "banner",
"clickUrl": "http:\/\/jenkins.com\/fuga-asperiores-officia-minus-et",
"width": 532,
"height": 471,
"childrenCreative": null,
"statusChildrenCreative": [],
"main": 1
}
}
},
{
"id": 9,
"userId": 17,
"isActive": 1,
"approved": "pending",
"creativeType": "native",
"name": "Native creative #1",
"frequencyType": "ip",
"frequencyCap": 4,
"bidPrice": "19.54",
"autoresize": 0,
"adaptiveCpm": false,
"size": "461 x 246",
"weight": "0.00 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:06",
"updatedAt": "2023-12-04 12:07:06",
"pendingAt": "2023-12-04 12:07:06",
"deletedAt": null,
"media": {
"id": 9,
"userId": 17,
"mediaType": "image",
"originName": "image.jpg",
"name": "17_98d8abccb1094989d85ca14e4b6dbb33.jpg",
"extension": "jpg",
"url": "http:\/\/www.gislason.com\/17_98d8abccb1094989d85ca14e4b6dbb33.jpg",
"width": 476,
"height": 230,
"weight": 169881
},
"relation": {
"native": {
"smallImageId": 9,
"largeImageId": 10,
"smallImage": {
"id": 9,
"folderId": null,
"userId": 17,
"width": 476,
"height": 230,
"name": "17_98d8abccb1094989d85ca14e4b6dbb33.jpg",
"url": "http:\/\/www.gislason.com\/17_98d8abccb1094989d85ca14e4b6dbb33.jpg",
"href": null,
"originName": "image.jpg",
"path": null,
"extension": "jpg",
"mediaType": "image",
"createdAt": "2023-12-04T12:07:06.000000Z",
"updatedAt": "2023-12-04T12:07:06.000000Z",
"deletedAt": null,
"weight": 169881
},
"largeImage": {
"id": 10,
"folderId": null,
"userId": 17,
"width": 461,
"height": 246,
"name": "17_98d8abccb1094989d85ca14e4b6dbb33.jpg",
"url": "http:\/\/www.kshlerin.com\/quo-alias-blanditiis-quos17_98d8abccb1094989d85ca14e4b6dbb33.jpg",
"href": null,
"originName": "image.jpg",
"path": null,
"extension": "jpg",
"mediaType": "image",
"createdAt": "2023-12-04T12:07:06.000000Z",
"updatedAt": "2023-12-04T12:07:06.000000Z",
"deletedAt": null,
"weight": 134078
},
"assetDataDesc": "Quis aut earum et.",
"assetTitle": "Est quae ex nobis et.",
"assetDataSponsored": "Autem possimus voluptates distinctio rerum.",
"assetCtaText": "Illo soluta eum aut ea.",
"clickUrl": "https:\/\/grimes.net\/maxime-quam-reprehenderit-magni-pariatur-optio-sapiente-quibusdam-accusantium.html",
"displayUrl": "http:\/\/mckenzie.com\/",
"impTracker": null
}
}
},
{
"id": 10,
"userId": 17,
"isActive": 0,
"approved": "pending",
"creativeType": "video",
"name": "Video creative #1",
"frequencyType": "user",
"frequencyCap": 0,
"bidPrice": "18.88",
"autoresize": 0,
"adaptiveCpm": false,
"size": "362 x 387",
"weight": "0.45 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:06",
"updatedAt": "2023-12-04 12:07:06",
"pendingAt": "2023-12-04 12:07:06",
"deletedAt": null,
"media": {
"id": 11,
"userId": 17,
"mediaType": "video",
"originName": "video.mp4",
"name": "17_98d8abccb1094989d85ca14e4b6dbb33.mp4",
"extension": "mp4",
"url": "http:\/\/hermiston.com\/minus-unde-non-aliquam-sapiente17_98d8abccb1094989d85ca14e4b6dbb33.mp4",
"width": 308,
"height": 242,
"weight": 471264
},
"relation": {
"video": {
"sizes": "x-large",
"admBody": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<VAST version=\"2.0\">\n<Ad id=\"[HASH]\">\n <InLine>\n <AdSystem>DSP<\/AdSystem>\n <AdTitle>Smartyads<\/AdTitle>\n <Description>RTB<\/Description>\n <Creatives>\n <Creative AdID=\"572\">\n <Linear>\n <Duration>00:00:09<\/Duration>\n <VideoClicks>\n <ClickThrough><![CDATA[https:\/\/picsum.photos\/]]><\/ClickThrough>\n <\/VideoClicks>\n <MediaFiles>\n <MediaFile delivery=\"streaming\" type=\"video\/quicktime\" width=\"640\" height=\"360\"><![CDATA[http:\/\/72.mp4]]><\/MediaFile>\n <\/MediaFiles>\n <\/Linear>\n <\/Creative>\n <\/Creatives>\n <\/InLine>\n<\/Ad>\n<\/VAST>",
"mimeType": [
"video\/x-ms-wmv"
],
"width": 362,
"height": 387,
"duration": 7,
"clickUrl": "http:\/\/kreiger.com\/dolores-optio-asperiores-non-sequi-repellat-repudiandae",
"partyTagFormat": 0
}
}
}
],
"meta": {
"pagination": {
"total": 3,
"count": 3,
"per_page": 15,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
4.2. Get by ID (Banner creative)
A `GET` request with a path parameter of the id will return the creative with that id.
4.2.1. HTTP Request
URL
GET api/creatives/11 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI2LCJleHAiOjE3MDE2OTUyMjYsIm5iZiI6MTcwMTY5MTYyNiwianRpIjoiano2TmpZSVhXdEpwTjhQMiIsInN1YiI6IjE4IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.3D60tqT90VdnZmk1Y0HUJo5VLxzHIBmokq-08QXVJVE
DATA
{}
4.2.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/creatives/11' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI2LCJleHAiOjE3MDE2OTUyMjYsIm5iZiI6MTcwMTY5MTYyNiwianRpIjoiano2TmpZSVhXdEpwTjhQMiIsInN1YiI6IjE4IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.3D60tqT90VdnZmk1Y0HUJo5VLxzHIBmokq-08QXVJVE' \
-d '{}'
4.2.3. Response Body
Path | Type | Description |
---|---|---|
data.id |
integer |
Creative Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Creative status |
data.approved |
string |
Creative approval status (approved, pending, disapproved) |
data.creativeType |
string |
Creative type: banner, native, video, audio |
data.name |
string |
Creative name |
data.frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
data.frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
data.bidPrice |
float |
CPM |
data.autoresize |
boolean |
autoresize |
data.adaptiveCpm |
bool |
adaptiveCpm |
data.size |
string |
Image width and height |
data.weight |
string |
File size |
data.folderId |
string |
Folder Id |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.pendingAt |
datetime |
Date of pending start |
data.deletedAt |
datetime |
Date of deletion |
data.media.id |
integer |
Media Id |
data.media.userId |
string |
User Id |
data.media.mediaType |
string |
Media type (html, image, video) |
data.media.originName |
string |
Uploaded file original name |
data.media.name |
string |
Uploaded file name |
data.media.extension |
string |
Uploaded file extention |
data.media.url |
string |
Uploaded file URL |
data.media.width |
integer |
Uploaded file image width |
data.media.height |
integer |
Uploaded file image height |
data.media.weight |
integer |
Uploaded file size |
data.media.modifiedUrl |
any |
|
data.relation.banner.apiFramework |
integer |
Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID |
data.relation.banner.admBody |
string |
Third-party tag |
data.relation.banner.bannerType |
String |
Banner type (banner,inBannerVideo) |
data.relation.banner.clickUrl |
string |
Click URL |
data.relation.banner.width |
integer |
Banner width |
data.relation.banner.height |
integer |
Banner height |
4.2.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": {
"id": 11,
"userId": 18,
"isActive": 0,
"approved": "pending",
"creativeType": "banner",
"name": "Banner creative #2",
"frequencyType": "ip",
"frequencyCap": 6,
"bidPrice": "2.07",
"autoresize": 0,
"adaptiveCpm": false,
"size": "334 x 131",
"weight": "0.30 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:06",
"updatedAt": "2023-12-04 12:07:06",
"pendingAt": "2023-12-04 12:07:06",
"deletedAt": null,
"relation": {
"banner": {
"apiFramework": 0,
"admBody": "<a target=\"_blank\" href=\"http:\/\/wehner.com\/et-eius-aut-voluptas-non-possimus-reiciendis\" ><img src=\"http:\/\/braun.com\/dolorem-consequuntur-quam-molestiae-repudiandae-blanditiis\/10.jpg\"\/><\/a>",
"bannerType": "banner",
"clickUrl": "http:\/\/mayer.biz\/doloribus-dolor-eos-beatae-ducimus-qui-enim.html",
"width": 334,
"height": 131
}
}
}
}
4.3. Get by ID (Native creative)
A `GET` request with a path parameter of the id will return the creative with that id.
4.3.1. HTTP Request
URL
GET api/creatives/12 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI3LCJleHAiOjE3MDE2OTUyMjcsIm5iZiI6MTcwMTY5MTYyNywianRpIjoiVzQ1dzBBOFAzSDh5VlNRYiIsInN1YiI6IjE5IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.b332_2-JsHMyZeFebg27j4YF_zy4be0uTa7HpRrLQqY
DATA
{}
4.3.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/creatives/12' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI3LCJleHAiOjE3MDE2OTUyMjcsIm5iZiI6MTcwMTY5MTYyNywianRpIjoiVzQ1dzBBOFAzSDh5VlNRYiIsInN1YiI6IjE5IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.b332_2-JsHMyZeFebg27j4YF_zy4be0uTa7HpRrLQqY' \
-d '{}'
4.3.3. Response Body
Path | Type | Description |
---|---|---|
data.id |
integer |
Creative Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Creative status |
data.approved |
string |
Creative approval status (approved, pending, disapproved) |
data.creativeType |
string |
Creative type: banner, native, video, audio |
data.name |
string |
Creative name |
data.frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
data.frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
data.bidPrice |
float |
CPM |
data.autoresize |
boolean |
autoresize |
data.adaptiveCpm |
bool |
adaptiveCpm |
data.size |
string |
Image width and height |
data.weight |
string |
File size |
data.folderId |
string |
Folder Id |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.pendingAt |
datetime |
Date of pending start |
data.deletedAt |
datetime |
Date of deletion |
data.media.id |
integer |
Media Id |
data.media.userId |
string |
User Id |
data.media.mediaType |
string |
Media type (html, image, video) |
data.media.originName |
string |
Uploaded file original name |
data.media.name |
string |
Uploaded file name |
data.media.extension |
string |
Uploaded file extention |
data.media.url |
string |
Uploaded file URL |
data.media.width |
integer |
Uploaded file image width |
data.media.height |
integer |
Uploaded file image height |
data.media.weight |
integer |
Uploaded file size |
data.media.modifiedUrl |
any |
|
data.relation.native.smallImageId |
integer |
Logo media id |
data.relation.native.largeImageId |
integer |
Image media id |
data.relation.native.smallImage.id |
integer |
Logo media id |
data.relation.native.smallImage.folderId |
string |
Folder id |
data.relation.native.smallImage.userId |
integer |
User id |
data.relation.native.smallImage.width |
string |
width |
data.relation.native.smallImage.height |
string |
height |
data.relation.native.smallImage.name |
string |
name |
data.relation.native.smallImage.url |
string |
url |
data.relation.native.smallImage.href |
string |
href |
data.relation.native.smallImage.originName |
string |
originName |
data.relation.native.smallImage.path |
string |
path |
data.relation.native.smallImage.extension |
string |
extension |
data.relation.native.smallImage.mediaType |
string |
mediaType |
data.relation.native.smallImage.createdAt |
string |
createdAt |
data.relation.native.smallImage.updatedAt |
string |
updatedAt |
data.relation.native.smallImage.deletedAt |
string |
updatedAt |
data.relation.native.smallImage.weight |
string |
weight |
data.relation.native.largeImage.id |
integer |
Image media id |
data.relation.native.largeImage.folderId |
string |
Folder id |
data.relation.native.largeImage.userId |
integer |
User id |
data.relation.native.largeImage.width |
string |
width |
data.relation.native.largeImage.height |
string |
height |
data.relation.native.largeImage.name |
string |
name |
data.relation.native.largeImage.url |
string |
url |
data.relation.native.largeImage.href |
string |
href |
data.relation.native.largeImage.originName |
string |
originName |
data.relation.native.largeImage.path |
string |
path |
data.relation.native.largeImage.extension |
string |
extension |
data.relation.native.largeImage.mediaType |
string |
mediaType |
data.relation.native.largeImage.createdAt |
string |
createdAt |
data.relation.native.largeImage.updatedAt |
string |
updatedAt |
data.relation.native.largeImage.deletedAt |
string |
updatedAt |
data.relation.native.largeImage.weight |
string |
weight |
data.relation.native.assetDataDesc |
string |
Ad text |
data.relation.native.assetTitle |
string |
Ad title |
data.relation.native.assetDataSponsored |
string |
Brand name |
data.relation.native.assetCtaText |
string |
CTA button text |
data.relation.native.clickUrl |
string |
Click URL |
data.relation.native.displayUrl |
string |
Display URL |
data.relation.native.impTracker |
string |
Impression tracker |
4.3.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": {
"id": 12,
"userId": 19,
"isActive": 1,
"approved": "pending",
"creativeType": "native",
"name": "Native creative #2",
"frequencyType": "ip",
"frequencyCap": 1,
"bidPrice": "1.71",
"autoresize": 0,
"adaptiveCpm": false,
"size": "444 x 127",
"weight": "0.00 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:07",
"updatedAt": "2023-12-04 12:07:07",
"pendingAt": "2023-12-04 12:07:07",
"deletedAt": null,
"relation": {
"native": {
"smallImageId": 13,
"largeImageId": 14,
"smallImage": {
"id": 13,
"folderId": null,
"userId": 19,
"width": 233,
"height": 239,
"name": "19_0ed2b1d66af77f35218341f2f62aa994.jpg",
"url": "http:\/\/padberg.org\/iusto-aut-dolores-nam-nesciunt-voluptate-officiis-enim19_0ed2b1d66af77f35218341f2f62aa994.jpg",
"href": null,
"originName": "image.jpg",
"path": null,
"extension": "jpg",
"mediaType": "image",
"createdAt": "2023-12-04T12:07:07.000000Z",
"updatedAt": "2023-12-04T12:07:07.000000Z",
"deletedAt": null,
"weight": 261127
},
"largeImage": {
"id": 14,
"folderId": null,
"userId": 19,
"width": 444,
"height": 127,
"name": "19_0ed2b1d66af77f35218341f2f62aa994.jpg",
"url": "http:\/\/schmeler.com\/19_0ed2b1d66af77f35218341f2f62aa994.jpg",
"href": null,
"originName": "image.jpg",
"path": null,
"extension": "jpg",
"mediaType": "image",
"createdAt": "2023-12-04T12:07:07.000000Z",
"updatedAt": "2023-12-04T12:07:07.000000Z",
"deletedAt": null,
"weight": 161142
},
"assetDataDesc": "Ipsa est accusamus ab.",
"assetTitle": "Iusto rerum qui vel aut.",
"assetDataSponsored": "Et commodi ducimus ducimus aut ut.",
"assetCtaText": "Inventore omnis id vel.",
"clickUrl": "http:\/\/johns.com\/doloribus-occaecati-corrupti-est-laudantium-ullam",
"displayUrl": "http:\/\/www.harvey.com\/quo-cupiditate-vero-molestiae-dolorem-at",
"impTracker": null
}
}
}
}
4.4. Get by ID (Video creative)
A `GET` request with a path parameter of the id will return the creative with that id.
4.4.1. HTTP Request
URL
GET api/creatives/13 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI3LCJleHAiOjE3MDE2OTUyMjcsIm5iZiI6MTcwMTY5MTYyNywianRpIjoiRzhZaThFalNHRnpwNmVBMCIsInN1YiI6IjIwIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.PDL1m4vi5zdU5uCk1unZaYEfaPvNGizLXK5iGeFBnOc
DATA
{}
4.4.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/creatives/13' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI3LCJleHAiOjE3MDE2OTUyMjcsIm5iZiI6MTcwMTY5MTYyNywianRpIjoiRzhZaThFalNHRnpwNmVBMCIsInN1YiI6IjIwIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.PDL1m4vi5zdU5uCk1unZaYEfaPvNGizLXK5iGeFBnOc' \
-d '{}'
4.4.3. Response Body
Path | Type | Description |
---|---|---|
data.id |
integer |
Creative Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Creative status |
data.approved |
string |
Creative approval status (approved, pending, disapproved) |
data.creativeType |
string |
Creative type: banner, native, video, audio |
data.name |
string |
Creative name |
data.frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
data.frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
data.bidPrice |
float |
CPM |
data.autoresize |
boolean |
autoresize |
data.adaptiveCpm |
bool |
adaptiveCpm |
data.size |
string |
Image width and height |
data.weight |
string |
File size |
data.folderId |
string |
Folder Id |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.pendingAt |
datetime |
Date of pending start |
data.deletedAt |
datetime |
Date of deletion |
data.media.id |
integer |
Media Id |
data.media.userId |
string |
User Id |
data.media.mediaType |
string |
Media type (html, image, video) |
data.media.originName |
string |
Uploaded file original name |
data.media.name |
string |
Uploaded file name |
data.media.extension |
string |
Uploaded file extention |
data.media.url |
string |
Uploaded file URL |
data.media.width |
integer |
Uploaded file image width |
data.media.height |
integer |
Uploaded file image height |
data.media.weight |
integer |
Uploaded file size |
data.media.modifiedUrl |
any |
|
data.relation.video.sizes |
string |
Player size |
data.relation.video.admBody |
string |
Third-party tag |
data.relation.video.mimeType |
array |
MIME types |
data.relation.video.width |
integer |
Video width |
data.relation.video.height |
integer |
Video height |
data.relation.video.duration |
integer |
Video duration |
data.relation.video.clickUrl |
string |
Click URL |
data.relation.video.partyTagFormat |
integer |
3 party tag format (0-NO VPAID, 1-VPAID 1, 2-VPAID 2, 3-ALL VPAID) |
4.4.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": {
"id": 13,
"userId": 20,
"isActive": 0,
"approved": "pending",
"creativeType": "video",
"name": "Video creative #2",
"frequencyType": "user",
"frequencyCap": 5,
"bidPrice": "8.55",
"autoresize": 0,
"adaptiveCpm": false,
"size": "402 x 385",
"weight": "0.13 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:07",
"updatedAt": "2023-12-04 12:07:07",
"pendingAt": "2023-12-04 12:07:07",
"deletedAt": null,
"relation": {
"video": {
"sizes": "x-large",
"admBody": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<VAST version=\"2.0\">\n<Ad id=\"[HASH]\">\n <InLine>\n <AdSystem>DSP<\/AdSystem>\n <AdTitle>Smartyads<\/AdTitle>\n <Description>RTB<\/Description>\n <Creatives>\n <Creative AdID=\"572\">\n <Linear>\n <Duration>00:00:09<\/Duration>\n <VideoClicks>\n <ClickThrough><![CDATA[https:\/\/picsum.photos\/]]><\/ClickThrough>\n <\/VideoClicks>\n <MediaFiles>\n <MediaFile delivery=\"streaming\" type=\"video\/quicktime\" width=\"640\" height=\"360\"><![CDATA[http:\/\/72.mp4]]><\/MediaFile>\n <\/MediaFiles>\n <\/Linear>\n <\/Creative>\n <\/Creatives>\n <\/InLine>\n<\/Ad>\n<\/VAST>",
"mimeType": [
"video\/webm"
],
"width": 402,
"height": 385,
"duration": 6,
"clickUrl": "https:\/\/www.langosh.net\/ut-qui-harum-quas-est",
"partyTagFormat": 0
}
}
}
}
4.5. Create a Custom Banner Creative with Third-party tag
A `POST` request will create new creative.
4.5.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
name |
string |
Creative name |
+ |
creativeType |
string |
Creative type: banner, native, video, audio |
+ |
frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
+ |
frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
+ |
bidPrice |
float |
CPM |
+ |
banner.apiFramework |
integer |
Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID |
|
banner.width |
integer |
Banner width |
+ |
banner.height |
integer |
Banner height |
+ |
banner.admBody |
string |
Third-party tag |
+ |
categories.IAB1 |
array |
Categories (required if subCategories is empty) |
+ |
subCategories.IAB1 |
array |
SubCategories (required if categories is empty) |
+ |
4.5.2. HTTP Request
URL
POST api/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI3LCJleHAiOjE3MDE2OTUyMjcsIm5iZiI6MTcwMTY5MTYyNywianRpIjoiS0ptdXZQY2lBRnBlMnR6VSIsInN1YiI6IjIxIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.AVn9OqBIEYpu0VZUkOjvtmIKGPteJY3t_DqAMXkDBUI
DATA
{ "name": "Banner creative #3", "creativeType": "banner", "frequencyType": "user", "frequencyCap": 1, "bidPrice": 0.5, "banner": { "apiFramework": 0, "width": 320, "height": 200, "admBody": "<iframe src=\"url.to.script\"><\/iframe>" }, "categories": { "IAB1": true }, "subCategories": { "IAB1": [ "IAB1-1" ] } }
4.5.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/creatives' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI3LCJleHAiOjE3MDE2OTUyMjcsIm5iZiI6MTcwMTY5MTYyNywianRpIjoiS0ptdXZQY2lBRnBlMnR6VSIsInN1YiI6IjIxIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.AVn9OqBIEYpu0VZUkOjvtmIKGPteJY3t_DqAMXkDBUI' \
-d '{
"name": "Banner creative #3",
"creativeType": "banner",
"frequencyType": "user",
"frequencyCap": 1,
"bidPrice": 0.5,
"banner": {
"apiFramework": 0,
"width": 320,
"height": 200,
"admBody": "<iframe src=\"url.to.script\"><\/iframe>"
},
"categories": {
"IAB1": true
},
"subCategories": {
"IAB1": [
"IAB1-1"
]
}
}'
4.5.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
data.id |
integer |
Creative Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Creative status |
data.approved |
string |
Creative approval status (approved, pending, disapproved) |
data.creativeType |
string |
Creative type: banner, native, video, audio |
data.name |
string |
Creative name |
data.frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
data.frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
data.bidPrice |
float |
CPM |
data.autoresize |
boolean |
autoresize |
data.adaptiveCpm |
bool |
adaptiveCpm |
data.size |
string |
Image width and height |
data.weight |
string |
File size |
data.folderId |
string |
Folder Id |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.pendingAt |
datetime |
Date of pending start |
data.deletedAt |
datetime |
Date of deletion |
data.relation.banner.apiFramework |
integer |
Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID |
data.relation.banner.admBody |
string |
Third-party tag |
data.relation.banner.bannerType |
String |
Banner type (banner,inBannerVideo) |
data.relation.banner.clickUrl |
string |
Click URL |
data.relation.banner.width |
integer |
Banner width |
data.relation.banner.height |
integer |
Banner height |
4.5.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Creative created.",
"data": {
"id": 14,
"userId": 21,
"isActive": null,
"approved": null,
"creativeType": "banner",
"name": "Banner creative #3",
"frequencyType": "user",
"frequencyCap": 1,
"bidPrice": 0.5,
"autoresize": null,
"adaptiveCpm": null,
"size": "320 x 200",
"weight": "0.00 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:07",
"updatedAt": "2023-12-04 12:07:07",
"pendingAt": "2023-12-04 12:07:07",
"deletedAt": null,
"relation": {
"banner": {
"apiFramework": 0,
"admBody": "<iframe src=\"url.to.script\"><\/iframe>",
"bannerType": null,
"clickUrl": null,
"width": 320,
"height": 200
}
}
}
}
4.6. Create a Custom Banner Creative with Media image
A `POST` request will create new creative.
4.6.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
name |
string |
Creative name |
+ |
creativeType |
string |
Creative type: banner, native, video, audio |
+ |
mediaId |
array |
Media image Id |
+ |
frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
+ |
frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
+ |
bidPrice |
float |
CPM |
+ |
banner.apiFramework |
integer |
Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID |
|
banner.width |
integer |
Banner width |
+ |
banner.height |
integer |
Banner height |
+ |
banner.clickUrl |
string |
Click URL |
+ |
subCategories.IAB1 |
array |
SubCategories (required if categories is empty) |
+ |
categories.IAB1 |
array |
Categories (required if subCategories is empty) |
+ |
4.6.2. HTTP Request
URL
POST api/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI3LCJleHAiOjE3MDE2OTUyMjcsIm5iZiI6MTcwMTY5MTYyNywianRpIjoiR2RKam9vZGJtaXdnNkI5YiIsInN1YiI6IjIyIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.cVgWnLZJrcVmbHC2R8lkeP8MtU9dZicO-F0GuSknZf0
DATA
{ "name": "Banner creative #4", "creativeType": "banner", "mediaId": 16, "frequencyType": "user", "frequencyCap": 1, "bidPrice": 0.5, "banner": { "apiFramework": 0, "width": 320, "height": 200, "clickUrl": "http:\/\/www.gutkowski.com\/omnis-accusamus-repudiandae-qui-illo-hic-sunt-hic" }, "subCategories": { "IAB1": [ "IAB1-1" ] }, "categories": { "IAB1": true } }
4.6.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/creatives' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI3LCJleHAiOjE3MDE2OTUyMjcsIm5iZiI6MTcwMTY5MTYyNywianRpIjoiR2RKam9vZGJtaXdnNkI5YiIsInN1YiI6IjIyIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.cVgWnLZJrcVmbHC2R8lkeP8MtU9dZicO-F0GuSknZf0' \
-d '{
"name": "Banner creative #4",
"creativeType": "banner",
"mediaId": 16,
"frequencyType": "user",
"frequencyCap": 1,
"bidPrice": 0.5,
"banner": {
"apiFramework": 0,
"width": 320,
"height": 200,
"clickUrl": "http:\/\/www.gutkowski.com\/omnis-accusamus-repudiandae-qui-illo-hic-sunt-hic"
},
"subCategories": {
"IAB1": [
"IAB1-1"
]
},
"categories": {
"IAB1": true
}
}'
4.6.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
data.id |
integer |
Creative Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Creative status |
data.approved |
string |
Creative approval status (approved, pending, disapproved) |
data.creativeType |
string |
Creative type: banner, native, video, audio |
data.name |
string |
Creative name |
data.frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
data.frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
data.bidPrice |
float |
CPM |
data.autoresize |
boolean |
autoresize |
data.adaptiveCpm |
bool |
adaptiveCpm |
data.size |
string |
Image width and height |
data.weight |
string |
File size |
data.folderId |
string |
Folder Id |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.pendingAt |
datetime |
Date of pending start |
data.deletedAt |
datetime |
Date of deletion |
data.media.id |
integer |
Media Id |
data.media.userId |
string |
User Id |
data.media.mediaType |
string |
Media type (html, image, video) |
data.media.originName |
string |
Uploaded file original name |
data.media.name |
string |
Uploaded file name |
data.media.extension |
string |
Uploaded file extention |
data.media.url |
string |
Uploaded file URL |
data.media.width |
integer |
Uploaded file image width |
data.media.height |
integer |
Uploaded file image height |
data.media.weight |
integer |
Uploaded file size |
data.media.modifiedUrl |
any |
|
data.relation.banner.apiFramework |
integer |
Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID |
data.relation.banner.admBody |
string |
Third-party tag |
data.relation.banner.bannerType |
String |
Banner type (banner,inBannerVideo) |
data.relation.banner.clickUrl |
string |
Click URL |
data.relation.banner.width |
integer |
Banner width |
data.relation.banner.height |
integer |
Banner height |
4.6.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Creative created.",
"data": {
"id": 15,
"userId": 22,
"isActive": null,
"approved": null,
"creativeType": "banner",
"name": "Banner creative #4",
"frequencyType": "user",
"frequencyCap": 1,
"bidPrice": 0.5,
"autoresize": null,
"adaptiveCpm": null,
"size": "453 x 339",
"weight": "0.22 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:07",
"updatedAt": "2023-12-04 12:07:07",
"pendingAt": "2023-12-04 12:07:07",
"deletedAt": null,
"relation": {
"banner": {
"apiFramework": 0,
"admBody": "<a target=\"_blank\" href=\"https:\/\/www.gutkowski.com\/omnis-accusamus-repudiandae-qui-illo-hic-sunt-hic\" ><img src=\"http:\/\/www.maggio.com\/nisi-veritatis-et-corporis-minus-sed-recusandae.html22_0ed2b1d66af77f35218341f2f62aa994.jpg\"\/><\/a>",
"bannerType": null,
"clickUrl": "https:\/\/www.gutkowski.com\/omnis-accusamus-repudiandae-qui-illo-hic-sunt-hic",
"width": 453,
"height": 339
}
}
}
}
4.7. Create a Custom Banner Creative with Rich Media Html
A `POST` request will create new creative.
4.7.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
name |
string |
Creative name |
+ |
creativeType |
string |
Creative type: banner, native, video, audio |
+ |
mediaId |
array |
HTML Media Id |
+ |
frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
+ |
frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
+ |
bidPrice |
float |
CPM |
+ |
banner.apiFramework |
integer |
Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID |
|
banner.width |
integer |
Banner width |
+ |
banner.height |
integer |
Banner height |
+ |
subCategories.IAB1 |
array |
SubCategories (required if categories is empty) |
+ |
categories.IAB1 |
array |
Categories (required if subCategories is empty) |
+ |
4.7.2. HTTP Request
URL
POST api/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI4LCJleHAiOjE3MDE2OTUyMjgsIm5iZiI6MTcwMTY5MTYyOCwianRpIjoiVGpYakk3T1dQazFUYTFkZCIsInN1YiI6IjIzIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.tIm60x-LeY79Q5Zu8GGfl98a_e4ngQc959ndZ1bvzpI
DATA
{ "name": "Banner creative #5", "creativeType": "banner", "mediaId": 17, "frequencyType": "user", "frequencyCap": 1, "bidPrice": 0.5, "banner": { "apiFramework": 3, "width": 320, "height": 200 }, "subCategories": { "IAB1": [ "IAB1-1" ] }, "categories": { "IAB1": true } }
4.7.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/creatives' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI4LCJleHAiOjE3MDE2OTUyMjgsIm5iZiI6MTcwMTY5MTYyOCwianRpIjoiVGpYakk3T1dQazFUYTFkZCIsInN1YiI6IjIzIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.tIm60x-LeY79Q5Zu8GGfl98a_e4ngQc959ndZ1bvzpI' \
-d '{
"name": "Banner creative #5",
"creativeType": "banner",
"mediaId": 17,
"frequencyType": "user",
"frequencyCap": 1,
"bidPrice": 0.5,
"banner": {
"apiFramework": 3,
"width": 320,
"height": 200
},
"subCategories": {
"IAB1": [
"IAB1-1"
]
},
"categories": {
"IAB1": true
}
}'
4.7.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
data.id |
integer |
Creative Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Creative status |
data.approved |
string |
Creative approval status (approved, pending, disapproved) |
data.creativeType |
string |
Creative type: banner, native, video, audio |
data.name |
string |
Creative name |
data.frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
data.frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
data.bidPrice |
float |
CPM |
data.autoresize |
boolean |
autoresize |
data.adaptiveCpm |
bool |
adaptiveCpm |
data.size |
string |
Image width and height |
data.weight |
string |
File size |
data.folderId |
string |
Folder Id |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.pendingAt |
datetime |
Date of pending start |
data.deletedAt |
datetime |
Date of deletion |
data.media.id |
integer |
Media Id |
data.media.userId |
string |
User Id |
data.media.mediaType |
string |
Media type (html, image, video) |
data.media.originName |
string |
Uploaded file original name |
data.media.name |
string |
Uploaded file name |
data.media.extension |
string |
Uploaded file extention |
data.media.url |
string |
Uploaded file URL |
data.media.width |
integer |
Uploaded file image width |
data.media.height |
integer |
Uploaded file image height |
data.media.weight |
integer |
Uploaded file size |
data.media.modifiedUrl |
any |
|
data.relation.banner.apiFramework |
integer |
Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID |
data.relation.banner.admBody |
string |
Third-party tag |
data.relation.banner.bannerType |
String |
Banner type (banner,inBannerVideo) |
data.relation.banner.clickUrl |
string |
Click URL |
data.relation.banner.width |
integer |
Banner width |
data.relation.banner.height |
integer |
Banner height |
4.7.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Creative created.",
"data": {
"id": 16,
"userId": 23,
"isActive": null,
"approved": null,
"creativeType": "banner",
"name": "Banner creative #5",
"frequencyType": "user",
"frequencyCap": 1,
"bidPrice": 0.5,
"autoresize": null,
"adaptiveCpm": null,
"size": "320 x 200",
"weight": "0.19 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:08",
"updatedAt": "2023-12-04 12:07:08",
"pendingAt": "2023-12-04 12:07:08",
"deletedAt": null,
"relation": {
"banner": {
"apiFramework": 3,
"admBody": "<iframe src=\"http:\/\/stokes.com\/odio-porro-vel-aut-repellendus-molestiae-nulla-sint23_5dc745c717aa082128a06b4cfab8334c\/index.html\"><\/iframe>",
"bannerType": null,
"clickUrl": null,
"width": 320,
"height": 200
}
}
}
}
4.8. Create a Custom Native Creative
A `POST` request will create new creative.
4.8.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
name |
string |
Creative name |
+ |
creativeType |
string |
Creative type: banner, native, video, audio |
+ |
frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
+ |
frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
+ |
bidPrice |
float |
CPM |
+ |
folderId |
string |
Folder Id |
|
native.smallImageId |
integer |
Logo media id |
|
native.largeImageId |
integer |
Image media id |
+ |
native.assetDataDesc |
string |
Ad text |
|
native.assetTitle |
string |
Ad title |
|
native.assetDataSponsored |
string |
Brand name |
|
native.assetCtaText |
string |
CTA button text |
|
native.clickUrl |
string |
Click URL |
+ |
native.displayUrl |
string |
Display URL |
|
subCategories.IAB1 |
array |
SubCategories (required if categories is empty) |
+ |
categories.IAB1 |
array |
Categories (required if subCategories is empty) |
+ |
4.8.2. HTTP Request
URL
POST api/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI4LCJleHAiOjE3MDE2OTUyMjgsIm5iZiI6MTcwMTY5MTYyOCwianRpIjoiaUh5U1FHNExqeVVMc1RTRCIsInN1YiI6IjI0IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.Ien2uAFYJEEQUv0aE0uS2T-KB_fnn8vHFR2nckmiy-s
DATA
{ "name": "Native creative #3", "creativeType": "native", "frequencyType": "user", "frequencyCap": 1, "bidPrice": 0.5, "folderId": null, "native": { "smallImageId": 18, "largeImageId": 18, "assetDataDesc": "Suscipit amet.", "assetTitle": "Officiis.", "assetDataSponsored": "Eum itaque qui quis.", "assetCtaText": "Explicabo sed.", "clickUrl": "http:\/\/www.franecki.com\/quibusdam-doloremque-ut-porro-recusandae-iusto-et-quam-eum.html", "displayUrl": "http:\/\/mcdermott.info\/" }, "subCategories": { "IAB1": [ "IAB1-1" ] }, "categories": { "IAB1": true } }
4.8.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/creatives' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI4LCJleHAiOjE3MDE2OTUyMjgsIm5iZiI6MTcwMTY5MTYyOCwianRpIjoiaUh5U1FHNExqeVVMc1RTRCIsInN1YiI6IjI0IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.Ien2uAFYJEEQUv0aE0uS2T-KB_fnn8vHFR2nckmiy-s' \
-d '{
"name": "Native creative #3",
"creativeType": "native",
"frequencyType": "user",
"frequencyCap": 1,
"bidPrice": 0.5,
"folderId": null,
"native": {
"smallImageId": 18,
"largeImageId": 18,
"assetDataDesc": "Suscipit amet.",
"assetTitle": "Officiis.",
"assetDataSponsored": "Eum itaque qui quis.",
"assetCtaText": "Explicabo sed.",
"clickUrl": "http:\/\/www.franecki.com\/quibusdam-doloremque-ut-porro-recusandae-iusto-et-quam-eum.html",
"displayUrl": "http:\/\/mcdermott.info\/"
},
"subCategories": {
"IAB1": [
"IAB1-1"
]
},
"categories": {
"IAB1": true
}
}'
4.8.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
data.id |
integer |
Creative Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Creative status |
data.approved |
string |
Creative approval status (approved, pending, disapproved) |
data.creativeType |
string |
Creative type: banner, native, video, audio |
data.name |
string |
Creative name |
data.frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
data.frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
data.bidPrice |
float |
CPM |
data.autoresize |
boolean |
autoresize |
data.adaptiveCpm |
bool |
adaptiveCpm |
data.size |
string |
Image width and height |
data.weight |
string |
File size |
data.folderId |
string |
Folder Id |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.pendingAt |
datetime |
Date of pending start |
data.deletedAt |
datetime |
Date of deletion |
data.media.id |
integer |
Media Id |
data.media.userId |
string |
User Id |
data.media.mediaType |
string |
Media type (html, image, video) |
data.media.originName |
string |
Uploaded file original name |
data.media.name |
string |
Uploaded file name |
data.media.extension |
string |
Uploaded file extention |
data.media.url |
string |
Uploaded file URL |
data.media.width |
integer |
Uploaded file image width |
data.media.height |
integer |
Uploaded file image height |
data.media.weight |
integer |
Uploaded file size |
data.media.modifiedUrl |
any |
|
data.relation.native.smallImageId |
integer |
Logo media id |
data.relation.native.largeImageId |
integer |
Image media id |
data.relation.native.smallImage.id |
integer |
Logo media id |
data.relation.native.smallImage.folderId |
string |
Folder id |
data.relation.native.smallImage.userId |
integer |
User id |
data.relation.native.smallImage.width |
string |
width |
data.relation.native.smallImage.height |
string |
height |
data.relation.native.smallImage.name |
string |
name |
data.relation.native.smallImage.url |
string |
url |
data.relation.native.smallImage.href |
string |
href |
data.relation.native.smallImage.originName |
string |
originName |
data.relation.native.smallImage.path |
string |
path |
data.relation.native.smallImage.extension |
string |
extension |
data.relation.native.smallImage.mediaType |
string |
mediaType |
data.relation.native.smallImage.createdAt |
string |
createdAt |
data.relation.native.smallImage.updatedAt |
string |
updatedAt |
data.relation.native.smallImage.deletedAt |
string |
updatedAt |
data.relation.native.smallImage.weight |
string |
weight |
data.relation.native.largeImage.id |
integer |
Image media id |
data.relation.native.largeImage.folderId |
string |
Folder id |
data.relation.native.largeImage.userId |
integer |
User id |
data.relation.native.largeImage.width |
string |
width |
data.relation.native.largeImage.height |
string |
height |
data.relation.native.largeImage.name |
string |
name |
data.relation.native.largeImage.url |
string |
url |
data.relation.native.largeImage.href |
string |
href |
data.relation.native.largeImage.originName |
string |
originName |
data.relation.native.largeImage.path |
string |
path |
data.relation.native.largeImage.extension |
string |
extension |
data.relation.native.largeImage.mediaType |
string |
mediaType |
data.relation.native.largeImage.createdAt |
string |
createdAt |
data.relation.native.largeImage.updatedAt |
string |
updatedAt |
data.relation.native.largeImage.deletedAt |
string |
updatedAt |
data.relation.native.largeImage.weight |
string |
weight |
data.relation.native.assetDataDesc |
string |
Ad text |
data.relation.native.assetTitle |
string |
Ad title |
data.relation.native.assetDataSponsored |
string |
Brand name |
data.relation.native.assetCtaText |
string |
CTA button text |
data.relation.native.clickUrl |
string |
Click URL |
data.relation.native.displayUrl |
string |
Display URL |
data.relation.native.impTracker |
string |
Impression tracker |
4.8.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Creative created.",
"data": {
"id": 17,
"userId": 24,
"isActive": null,
"approved": null,
"creativeType": "native",
"name": "Native creative #3",
"frequencyType": "user",
"frequencyCap": 1,
"bidPrice": 0.5,
"autoresize": null,
"adaptiveCpm": null,
"size": "165 x 173",
"weight": "0.00 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:08",
"updatedAt": "2023-12-04 12:07:38",
"pendingAt": "2023-12-04 12:07:08",
"deletedAt": null,
"relation": {
"native": {
"smallImageId": 18,
"largeImageId": 18,
"smallImage": {
"id": 18,
"folderId": null,
"userId": 24,
"width": 165,
"height": 173,
"name": "24_5dc745c717aa082128a06b4cfab8334c.jpg",
"url": "http:\/\/conroy.net\/minus-et-molestiae-odit-harum.html24_5dc745c717aa082128a06b4cfab8334c.jpg",
"href": null,
"originName": "image.jpg",
"path": null,
"extension": "jpg",
"mediaType": "image",
"createdAt": "2023-12-04T12:07:08.000000Z",
"updatedAt": "2023-12-04T12:07:08.000000Z",
"deletedAt": null,
"weight": 161218
},
"largeImage": {
"id": 18,
"folderId": null,
"userId": 24,
"width": 165,
"height": 173,
"name": "24_5dc745c717aa082128a06b4cfab8334c.jpg",
"url": "http:\/\/conroy.net\/minus-et-molestiae-odit-harum.html24_5dc745c717aa082128a06b4cfab8334c.jpg",
"href": null,
"originName": "image.jpg",
"path": null,
"extension": "jpg",
"mediaType": "image",
"createdAt": "2023-12-04T12:07:08.000000Z",
"updatedAt": "2023-12-04T12:07:08.000000Z",
"deletedAt": null,
"weight": 161218
},
"assetDataDesc": "Suscipit amet.",
"assetTitle": "Officiis.",
"assetDataSponsored": "Eum itaque qui quis.",
"assetCtaText": "Explicabo sed.",
"clickUrl": "http:\/\/www.franecki.com\/quibusdam-doloremque-ut-porro-recusandae-iusto-et-quam-eum.html",
"displayUrl": "http:\/\/mcdermott.info\/",
"impTracker": null
}
}
}
}
4.9. Create a Custom Video Creative with Third-party tag
A `POST` request will create new creative.
4.9.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
name |
string |
Creative name |
+ |
creativeType |
string |
Creative type: banner, native, video, audio |
+ |
frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
+ |
frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
+ |
bidPrice |
float |
CPM |
+ |
video.sizes |
string |
Player size |
+ |
video.mimeType |
array |
MIME types |
+ |
video.admBody |
string |
Third-party tag |
+ |
subCategories.IAB1 |
array |
SubCategories (required if categories is empty) |
+ |
categories.IAB1 |
array |
Categories (required if subCategories is empty) |
+ |
4.9.2. HTTP Request
URL
POST api/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU4LCJleHAiOjE3MDE2OTUyNTgsIm5iZiI6MTcwMTY5MTY1OCwianRpIjoienNWdjFyZzk5Y29mZFU3NyIsInN1YiI6IjI1IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.XtFSuWlpqLwJ3mXaBceb8TAf3n2vSY19Q8bijdJHH2E
DATA
{ "name": "Video creative #3", "creativeType": "video", "frequencyType": "user", "frequencyCap": 1, "bidPrice": 100, "video": { "sizes": "small", "mimeType": [ "video\/mp4" ], "admBody": "<iframe src=\"url.to.script\"><\/iframe>" }, "subCategories": { "IAB1": [ "IAB1-1" ] }, "categories": { "IAB1": true } }
4.9.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/creatives' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU4LCJleHAiOjE3MDE2OTUyNTgsIm5iZiI6MTcwMTY5MTY1OCwianRpIjoienNWdjFyZzk5Y29mZFU3NyIsInN1YiI6IjI1IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.XtFSuWlpqLwJ3mXaBceb8TAf3n2vSY19Q8bijdJHH2E' \
-d '{
"name": "Video creative #3",
"creativeType": "video",
"frequencyType": "user",
"frequencyCap": 1,
"bidPrice": 100,
"video": {
"sizes": "small",
"mimeType": [
"video\/mp4"
],
"admBody": "<iframe src=\"url.to.script\"><\/iframe>"
},
"subCategories": {
"IAB1": [
"IAB1-1"
]
},
"categories": {
"IAB1": true
}
}'
4.9.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
data.id |
integer |
Creative Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Creative status |
data.approved |
string |
Creative approval status (approved, pending, disapproved) |
data.creativeType |
string |
Creative type: banner, native, video, audio |
data.name |
string |
Creative name |
data.frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
data.frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
data.bidPrice |
float |
CPM |
data.autoresize |
boolean |
autoresize |
data.adaptiveCpm |
bool |
adaptiveCpm |
data.size |
string |
Image width and height |
data.weight |
string |
File size |
data.folderId |
string |
Folder Id |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.pendingAt |
datetime |
Date of pending start |
data.deletedAt |
datetime |
Date of deletion |
data.relation.video.sizes |
string |
Player size |
data.relation.video.admBody |
string |
Third-party tag |
data.relation.video.mimeType |
array |
MIME types |
data.relation.video.width |
integer |
Video width |
data.relation.video.height |
integer |
Video height |
data.relation.video.duration |
integer |
Video duration |
data.relation.video.clickUrl |
string |
Click URL |
data.relation.video.partyTagFormat |
integer |
3 party tag format (0-NO VPAID, 1-VPAID 1, 2-VPAID 2, 3-ALL VPAID) |
4.9.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Creative created.",
"data": {
"id": 18,
"userId": 25,
"isActive": null,
"approved": null,
"creativeType": "video",
"name": "Video creative #3",
"frequencyType": "user",
"frequencyCap": 1,
"bidPrice": 100,
"autoresize": null,
"adaptiveCpm": null,
"size": "0 x 0",
"weight": "0.00 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:38",
"updatedAt": "2023-12-04 12:07:38",
"pendingAt": "2023-12-04 12:07:38",
"deletedAt": null,
"relation": {
"video": {
"sizes": "small",
"admBody": "<iframe src=\"url.to.script\"><\/iframe>",
"mimeType": [
"video\/mp4"
],
"width": 0,
"height": 0,
"duration": 0,
"clickUrl": "",
"partyTagFormat": null
}
}
}
}
4.10. Create a Custom Video Creative with Media image
A `POST` request will create new creative.
4.10.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
name |
string |
Creative name |
+ |
creativeType |
string |
Creative type: banner, native, video, audio |
+ |
frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
+ |
frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
+ |
mediaId |
array |
Media video Id |
+ |
bidPrice |
float |
CPM |
+ |
video.clickUrl |
string |
Click URL |
+ |
subCategories.IAB1 |
array |
SubCategories (required if categories is empty) |
+ |
categories.IAB1 |
array |
Categories (required if subCategories is empty) |
+ |
4.10.2. HTTP Request
URL
POST api/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU4LCJleHAiOjE3MDE2OTUyNTgsIm5iZiI6MTcwMTY5MTY1OCwianRpIjoiTGQydUZWak54aVBqU0VwSyIsInN1YiI6IjI2IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.2XVVZ7epolagPxz9ki1BP5oRb7qFZeqOEgeB-Zpv3Lc
DATA
{ "name": "Video creative #4", "creativeType": "video", "frequencyType": "user", "frequencyCap": 1, "mediaId": 19, "bidPrice": 100, "video": { "clickUrl": "http:\/\/kautzer.biz\/" }, "subCategories": { "IAB1": [ "IAB1-1" ] }, "categories": { "IAB1": true } }
4.10.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/creatives' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU4LCJleHAiOjE3MDE2OTUyNTgsIm5iZiI6MTcwMTY5MTY1OCwianRpIjoiTGQydUZWak54aVBqU0VwSyIsInN1YiI6IjI2IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.2XVVZ7epolagPxz9ki1BP5oRb7qFZeqOEgeB-Zpv3Lc' \
-d '{
"name": "Video creative #4",
"creativeType": "video",
"frequencyType": "user",
"frequencyCap": 1,
"mediaId": 19,
"bidPrice": 100,
"video": {
"clickUrl": "http:\/\/kautzer.biz\/"
},
"subCategories": {
"IAB1": [
"IAB1-1"
]
},
"categories": {
"IAB1": true
}
}'
4.10.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
data.id |
integer |
Creative Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Creative status |
data.approved |
string |
Creative approval status (approved, pending, disapproved) |
data.creativeType |
string |
Creative type: banner, native, video, audio |
data.name |
string |
Creative name |
data.frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
data.frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
data.bidPrice |
float |
CPM |
data.autoresize |
boolean |
autoresize |
data.adaptiveCpm |
bool |
adaptiveCpm |
data.size |
string |
Image width and height |
data.weight |
string |
File size |
data.folderId |
string |
Folder Id |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.pendingAt |
datetime |
Date of pending start |
data.deletedAt |
datetime |
Date of deletion |
data.media.id |
integer |
Media Id |
data.media.userId |
string |
User Id |
data.media.mediaType |
string |
Media type (html, image, video) |
data.media.originName |
string |
Uploaded file original name |
data.media.name |
string |
Uploaded file name |
data.media.extension |
string |
Uploaded file extention |
data.media.url |
string |
Uploaded file URL |
data.media.width |
integer |
Uploaded file image width |
data.media.height |
integer |
Uploaded file image height |
data.media.weight |
integer |
Uploaded file size |
data.media.modifiedUrl |
any |
|
data.relation.video.sizes |
string |
Player size |
data.relation.video.admBody |
string |
Third-party tag |
data.relation.video.mimeType |
array |
MIME types |
data.relation.video.width |
integer |
Video width |
data.relation.video.height |
integer |
Video height |
data.relation.video.duration |
integer |
Video duration |
data.relation.video.clickUrl |
string |
Click URL |
data.relation.video.partyTagFormat |
integer |
3 party tag format (0-NO VPAID, 1-VPAID 1, 2-VPAID 2, 3-ALL VPAID) |
4.10.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Creative created.",
"data": {
"id": 19,
"userId": 26,
"isActive": null,
"approved": null,
"creativeType": "video",
"name": "Video creative #4",
"frequencyType": "user",
"frequencyCap": 1,
"bidPrice": 100,
"autoresize": null,
"adaptiveCpm": null,
"size": "389 x 293",
"weight": "0.28 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:38",
"updatedAt": "2023-12-04 12:07:38",
"pendingAt": "2023-12-04 12:07:38",
"deletedAt": null,
"relation": {
"video": {
"sizes": "medium",
"admBody": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<VAST version=\"2.0\">\n<Ad id=\"[HASH]\">\n <InLine>\n <AdSystem>DSP<\/AdSystem>\n <AdTitle>Smartyads<\/AdTitle>\n <Description>RTB<\/Description>\n <Creatives>\n <Creative AdID=\"19\">\n <Linear>\n <Duration>00:00:05<\/Duration>\n <VideoClicks>\n <ClickThrough><![CDATA[https:\/\/kautzer.biz\/]]><\/ClickThrough>\n <\/VideoClicks>\n <MediaFiles>\n <MediaFile delivery=\"\" type=\"video\/mp4\" width=\"389\" height=\"293\"><![CDATA[http:\/\/www.smith.com\/26_72d19dc49ed8b2bfcaee931c802e2f20.mp4]]><\/MediaFile>\n <\/MediaFiles>\n <\/Linear>\n <\/Creative>\n <\/Creatives>\n <\/InLine>\n<\/Ad>\n<\/VAST>",
"mimeType": [
"video\/mp4"
],
"width": 389,
"height": 293,
"duration": 5,
"clickUrl": "https:\/\/kautzer.biz\/",
"partyTagFormat": null
}
}
}
}
4.11. Update a Custom Creative
A `PATCH` request will update creative.
4.11.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
isActive |
boolean |
Creative status |
4.11.2. HTTP Request
URL
PUT api/creatives/20 HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU4LCJleHAiOjE3MDE2OTUyNTgsIm5iZiI6MTcwMTY5MTY1OCwianRpIjoiU2IwNVNmaGdtb1VoRVdQaiIsInN1YiI6IjI3IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.u4cf64E_gfTJyez9YX7uBmIyZPB5UpKXmIawEfTEovU
DATA
{ "isActive": true }
4.11.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/creatives/20' -i -X PUT \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU4LCJleHAiOjE3MDE2OTUyNTgsIm5iZiI6MTcwMTY5MTY1OCwianRpIjoiU2IwNVNmaGdtb1VoRVdQaiIsInN1YiI6IjI3IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.u4cf64E_gfTJyez9YX7uBmIyZPB5UpKXmIawEfTEovU' \
-d '{
"isActive": true
}'
4.11.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
data.id |
integer |
Creative Id |
data.userId |
integer |
User Id |
data.isActive |
boolean |
Creative status |
data.approved |
string |
Creative approval status (approved, pending, disapproved) |
data.creativeType |
string |
Creative type: banner, native, video, audio |
data.name |
string |
Creative name |
data.frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
data.frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
data.bidPrice |
float |
CPM |
data.autoresize |
boolean |
autoresize |
data.adaptiveCpm |
bool |
adaptiveCpm |
data.size |
string |
Image width and height |
data.weight |
string |
File size |
data.folderId |
string |
Folder Id |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.pendingAt |
datetime |
Date of pending start |
data.deletedAt |
datetime |
Date of deletion |
data.relation.banner.apiFramework |
integer |
Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID |
data.relation.banner.admBody |
string |
Third-party tag |
data.relation.banner.bannerType |
String |
Banner type (banner,inBannerVideo) |
data.relation.banner.clickUrl |
string |
Click URL |
data.relation.banner.width |
integer |
Banner width |
data.relation.banner.height |
integer |
Banner height |
4.11.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Creative updated.",
"data": {
"id": 20,
"userId": 27,
"isActive": true,
"approved": "pending",
"creativeType": "banner",
"name": "excepturi impedit",
"frequencyType": "ip",
"frequencyCap": 8,
"bidPrice": "13.55",
"autoresize": 0,
"adaptiveCpm": false,
"size": " x ",
"weight": "0.00 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:38",
"updatedAt": "2023-12-04 12:07:38",
"pendingAt": "2023-12-04 12:07:38",
"deletedAt": null,
"relation": {
"banner": {
"apiFramework": null,
"admBody": null,
"bannerType": null,
"clickUrl": null,
"width": null,
"height": null
}
}
}
}
4.12. Delete a Custom Creative
A `DELETE` request will delete creative.
4.12.1. HTTP Request
URL
DELETE api/creatives/21 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU5LCJleHAiOjE3MDE2OTUyNTksIm5iZiI6MTcwMTY5MTY1OSwianRpIjoiZ3VFZnhsMnVtdnRQOXNhZyIsInN1YiI6IjI4IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.Sm05znf1lcQr7KxqhRU-omutUGIQoSfkaDMIPWeGiUI Content-type: application/x-www-form-urlencoded
DATA
{}
4.12.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/creatives/21' -i -X DELETE \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU5LCJleHAiOjE3MDE2OTUyNTksIm5iZiI6MTcwMTY5MTY1OSwianRpIjoiZ3VFZnhsMnVtdnRQOXNhZyIsInN1YiI6IjI4IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.Sm05znf1lcQr7KxqhRU-omutUGIQoSfkaDMIPWeGiUI' \
-H 'Content-type: application/x-www-form-urlencoded' \
-d '{}'
4.12.3. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
deleted |
boolean |
Deleted |
4.12.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Creative deleted.",
"deleted": true
}
5. Assign Creatives to Campaigns
5.1. Get list of Creatives assigned to Campaign
A `GET` request with Campaign Id in url will get list of Creatives assigned to Campaign
5.1.1. HTTP Request
URL
GET api/campaigns/7/creatives HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI1LCJleHAiOjE3MDE2OTUyMjUsIm5iZiI6MTcwMTY5MTYyNSwianRpIjoiQ3VlTWl6VGdqeTZ6TWFOMiIsInN1YiI6IjkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.ac6PST9g_QpTGYWI4XK-LGPuM-Tujzkse4mfHji1z4A
DATA
{}
5.1.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns/7/creatives' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI1LCJleHAiOjE3MDE2OTUyMjUsIm5iZiI6MTcwMTY5MTYyNSwianRpIjoiQ3VlTWl6VGdqeTZ6TWFOMiIsInN1YiI6IjkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.ac6PST9g_QpTGYWI4XK-LGPuM-Tujzkse4mfHji1z4A' \
-d '{}'
5.1.3. Response Body
Path | Type | Description |
---|---|---|
data.*.id |
integer |
Creative Id |
data.*.userId |
integer |
User Id |
data.*.isActive |
boolean |
Creative status |
data.*.approved |
string |
Creative approval status (approved, pending, disapproved) |
data.*.creativeType |
string |
Creative type: banner, native, video, audio |
data.*.name |
string |
Creative name |
data.*.frequencyType |
string |
Identify the user to limit the number of the ad shows for the specific user (user, ip) |
data.*.frequencyCap |
integer |
Show ads no more than frequencyCap times in 24 hours |
data.*.bidPrice |
float |
CPM |
data.*.autoresize |
boolean |
autoresize |
data.*.adaptiveCpm |
bool |
adaptiveCpm |
data.*.size |
string |
Image width and height |
data.*.weight |
string |
File size |
data.*.folderId |
string |
Folder Id |
data.*.createdAt |
datetime |
Date of creation |
data.*.updatedAt |
datetime |
Date of last modification |
data.*.pendingAt |
datetime |
Date of pending start |
data.*.deletedAt |
datetime |
Date of deletion |
meta.pagination.total |
integer |
Pagination: total items count |
meta.pagination.count |
integer |
Pagination: page items count |
meta.pagination.per_page |
integer |
Pagination: items per page |
meta.pagination.current_page |
integer |
Pagination: current page number |
meta.pagination.total_pages |
integer |
Pagination: total pages count |
meta.pagination.links |
object |
Pagination links |
5.1.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": [
{
"id": 1,
"userId": 9,
"isActive": 0,
"approved": "pending",
"creativeType": "banner",
"name": "Test Creative #1",
"frequencyType": "user",
"frequencyCap": 0,
"bidPrice": "10.59",
"autoresize": 0,
"adaptiveCpm": false,
"size": "660 x 352",
"weight": "0.24 MB",
"folderId": null,
"createdAt": "2023-12-04 12:07:05",
"updatedAt": "2023-12-04 12:07:05",
"pendingAt": "2023-12-04 12:07:05",
"deletedAt": null,
"media": {
"id": 1,
"userId": 9,
"mediaType": "image",
"originName": "image.jpg",
"name": "9_0800512353e688037df5c3da757a9c71.jpg",
"extension": "jpg",
"url": "https:\/\/www.reilly.com\/tempora-deserunt-sit-necessitatibus-blanditiis-quam-sed-natus9_0800512353e688037df5c3da757a9c71.jpg",
"width": 142,
"height": 240,
"weight": 250622
},
"relation": {
"banner": {
"apiFramework": 0,
"admBody": "<a target=\"_blank\" href=\"http:\/\/thiel.info\/est-eos-vero-consectetur-aut-rerum-eum-dicta\" ><img src=\"http:\/\/www.kunze.com\/\/10.jpg\"\/><\/a>",
"bannerType": "banner",
"clickUrl": "http:\/\/bradtke.biz\/delectus-qui-qui-saepe-veritatis-recusandae",
"width": 660,
"height": 352,
"childrenCreative": null,
"statusChildrenCreative": [],
"main": 1
}
}
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1000,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
5.2. Replace Creatives assigned to Campaign
A `POST` request with Campaign Id in url will replace Creatives assigned to Campaign
5.2.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
ids |
array |
array of Creative ids |
+ |
5.2.2. HTTP Request
URL
POST api/campaigns/8/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI1LCJleHAiOjE3MDE2OTUyMjUsIm5iZiI6MTcwMTY5MTYyNSwianRpIjoiVGYzQUtjOGxlSkNhdlBKNyIsInN1YiI6IjEwIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.-0xVCa1UzWT_-q_xzpG3QXK7uWtSwGYtHMBDRLsNSfQ
DATA
{ "ids": [ 2, 3 ] }
5.2.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns/8/creatives' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI1LCJleHAiOjE3MDE2OTUyMjUsIm5iZiI6MTcwMTY5MTYyNSwianRpIjoiVGYzQUtjOGxlSkNhdlBKNyIsInN1YiI6IjEwIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.-0xVCa1UzWT_-q_xzpG3QXK7uWtSwGYtHMBDRLsNSfQ' \
-d '{
"ids": [
2,
3
]
}'
5.2.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
5.2.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Replaced."
}
5.3. Append Creatives assigned to Campaign
A `PATCH` request with Campaign Id in url will append Creatives assigned to Campaign
5.3.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
ids |
array |
array of Creative ids |
+ |
5.3.2. HTTP Request
URL
PATCH api/campaigns/9/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI1LCJleHAiOjE3MDE2OTUyMjUsIm5iZiI6MTcwMTY5MTYyNSwianRpIjoiZFV6UFJOS25ScGhMSEFRMiIsInN1YiI6IjExIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.QLc1OpiSQNyjhbhA5VU_2eh2ai36-QX7NzT4T7kHXdU
DATA
{ "ids": [ 5 ] }
5.3.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns/9/creatives' -i -X PATCH \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI1LCJleHAiOjE3MDE2OTUyMjUsIm5iZiI6MTcwMTY5MTYyNSwianRpIjoiZFV6UFJOS25ScGhMSEFRMiIsInN1YiI6IjExIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.QLc1OpiSQNyjhbhA5VU_2eh2ai36-QX7NzT4T7kHXdU' \
-d '{
"ids": [
5
]
}'
5.3.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
5.3.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Appended."
}
5.4. Remove Creatives assigned to Campaign
A `DELETE` request with Campaign Id in url will remove Creatives assigned to Campaign
5.4.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
ids |
array |
array of Creative ids |
+ |
5.4.2. HTTP Request
URL
DELETE api/campaigns/10/creatives HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI1LCJleHAiOjE3MDE2OTUyMjUsIm5iZiI6MTcwMTY5MTYyNSwianRpIjoibmZRdjRqaFdZQ3E5VDRxQyIsInN1YiI6IjEyIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.GgxlvxNa9AUoxTMDm10lx2U2G7NFAr1ZMnXKaokbMtI Content-type: application/x-www-form-urlencoded
DATA
{ "ids": [ 7 ] }
5.4.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns/10/creatives' -i -X DELETE \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI1LCJleHAiOjE3MDE2OTUyMjUsIm5iZiI6MTcwMTY5MTYyNSwianRpIjoibmZRdjRqaFdZQ3E5VDRxQyIsInN1YiI6IjEyIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.GgxlvxNa9AUoxTMDm10lx2U2G7NFAr1ZMnXKaokbMtI' \
-H 'Content-type: application/x-www-form-urlencoded' \
-d '{
"ids": [
7
]
}'
5.4.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
deleted |
boolean |
Deleting result |
5.4.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Deleted.",
"deleted": true
}
6. Filterlists
6.1. Filter lists
A `GET` request will return a filter lists
6.1.1. HTTP Request
URL
GET api/filterlist HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU5LCJleHAiOjE3MDE2OTUyNTksIm5iZiI6MTcwMTY5MTY1OSwianRpIjoiRHFVemNOcWdTekt5OGd5MCIsInN1YiI6IjI5IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.LhwjJMyDg8FBMV_OZx6yltB9kygyHVen1MuJgKR9A0U
DATA
{}
6.1.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/filterlist' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU5LCJleHAiOjE3MDE2OTUyNTksIm5iZiI6MTcwMTY5MTY1OSwianRpIjoiRHFVemNOcWdTekt5OGd5MCIsInN1YiI6IjI5IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.LhwjJMyDg8FBMV_OZx6yltB9kygyHVen1MuJgKR9A0U' \
-d '{}'
6.1.3. Response Body
Path | Type | Description |
---|---|---|
data.*.id |
integer |
List Id |
data.*.isActive |
bool |
on/off |
data.*.userId |
integer |
User Id |
data.*.title |
string |
List title |
data.*.type |
string |
Filter list type: listDomains, listApps, listBundles, listDeviceIfas, listPublishers, listIpAdresses, listSiteAndAppIds, listUrls |
data.*.isInclude |
boolean |
White/Black list |
data.*.count |
integer |
Object count |
data.*.createdAt |
datetime |
Date of creation |
data.*.updatedAt |
datetime |
Date of last modification |
meta.pagination.total |
integer |
Pagination: total items count |
meta.pagination.count |
integer |
Pagination: page items count |
meta.pagination.per_page |
integer |
Pagination: items per page |
meta.pagination.current_page |
integer |
Pagination: current page number |
meta.pagination.total_pages |
integer |
Pagination: total pages count |
meta.pagination.links |
array |
Pagination: array links |
6.1.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": [
{
"id": 10,
"isActive": 0,
"userId": 29,
"title": "Test Filter list #1",
"type": "domain",
"isInclude": "White",
"count": 1,
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04"
},
{
"id": 11,
"isActive": 0,
"userId": 29,
"title": "Test Filter list #2",
"type": "ipAdresses",
"isInclude": "White",
"count": 2,
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04"
},
{
"id": 12,
"isActive": 0,
"userId": 29,
"title": "Test Filter list #3",
"type": "urls",
"isInclude": "White",
"count": 3,
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04"
}
],
"meta": {
"pagination": {
"total": 3,
"count": 3,
"per_page": 15,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
6.2. Get filter lists by ID
A `GET` request will return a filter list by ID
6.2.1. HTTP Request
URL
GET api/filterlist/13 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU5LCJleHAiOjE3MDE2OTUyNTksIm5iZiI6MTcwMTY5MTY1OSwianRpIjoiajM0YTV2MEtlaHl0VW1nRCIsInN1YiI6IjMwIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9._cy-7FbL7zV2T4Z4JBjkr1cnkWBmX_5m-51XfcQReYI
DATA
{}
6.2.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/filterlist/13' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU5LCJleHAiOjE3MDE2OTUyNTksIm5iZiI6MTcwMTY5MTY1OSwianRpIjoiajM0YTV2MEtlaHl0VW1nRCIsInN1YiI6IjMwIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9._cy-7FbL7zV2T4Z4JBjkr1cnkWBmX_5m-51XfcQReYI' \
-d '{}'
6.2.3. Response Body
Path | Type | Description |
---|---|---|
data.id |
integer |
List Id |
data.userId |
integer |
User Id |
data.isActive |
bool |
on/off |
data.title |
string |
List title |
data.type |
string |
Filter list type: listDomains, listApps, listBundles, listDeviceIfas, listPublishers, listIpAdresses, listSiteAndAppIds, listUrls |
data.isInclude |
boolean |
White/Black list |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.items |
array |
items |
data.listCount |
integer |
listCount |
6.2.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": {
"id": 13,
"userId": 30,
"isActive": 0,
"title": "Test Filter list #4",
"type": "domain",
"isInclude": true,
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04",
"items": [
"ebert.net",
"hauck.com",
"okuneva.net",
"wilderman.biz",
"ziemann.com"
],
"listCount": 5
}
}
6.3. Create a filter lists
A `POST` request will set new filter list
6.3.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
title |
string |
List title |
+ |
type |
string |
Filter list type: domain, apps, bundles, deviceIfas, publishers, ipAdresses, siteAndAppsIds, urls |
+ |
isInclude |
bool |
white/black |
+ |
items |
array |
List array items (can be empty if there fileName) |
|
fileName |
string |
null |
File name from upload file - Store filter list |
6.3.2. HTTP Request
URL
POST api/filterlist HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU5LCJleHAiOjE3MDE2OTUyNTksIm5iZiI6MTcwMTY5MTY1OSwianRpIjoid2k2dm0yNllnaGpIVlhWSiIsInN1YiI6IjMxIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.h9Yd80qu5wE58cus7YEtNL-i1DAesdBOVKAba0ZRlsc
DATA
{ "title": "Test Filter list #5", "type": "ipAdresses", "isInclude": true, "items": [ "26.16.200.104", "212.132.65.0", "104.139.76.221", "111.66.153.207", "62.197.111.15" ], "fileName": null }
6.3.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/filterlist' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjU5LCJleHAiOjE3MDE2OTUyNTksIm5iZiI6MTcwMTY5MTY1OSwianRpIjoid2k2dm0yNllnaGpIVlhWSiIsInN1YiI6IjMxIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.h9Yd80qu5wE58cus7YEtNL-i1DAesdBOVKAba0ZRlsc' \
-d '{
"title": "Test Filter list #5",
"type": "ipAdresses",
"isInclude": true,
"items": [
"26.16.200.104",
"212.132.65.0",
"104.139.76.221",
"111.66.153.207",
"62.197.111.15"
],
"fileName": null
}'
6.3.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
message |
data.id |
integer |
List Id |
data.userId |
integer |
User Id |
data.isActive |
bool |
on/off |
data.title |
string |
List title |
data.type |
string |
Filter list type: listDomains, listApps, listBundles, listDeviceIfas, listPublishers, listIpAdresses, listSiteAndAppIds, listUrls |
data.isInclude |
boolean |
White (1)/Black list(0) |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.items |
array |
List array items (can be empty if there fileName) |
data.listCount |
integer |
list count |
6.3.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "FilterList created.",
"data": {
"id": 14,
"userId": 31,
"isActive": null,
"title": "Test Filter list #5",
"type": "ipAdresses",
"isInclude": true,
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04",
"items": [],
"listCount": 0
}
}
6.4. Filter lists update
A `PATCH` request will update filter lists
6.4.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
title |
string |
List title |
|
isInclude |
bool |
white/black |
|
items |
array |
List array items (can be empty if there fileName) |
|
fileName |
string |
null |
File name from upload file - Store filter list |
6.4.2. HTTP Request
URL
PUT api/filterlist/15 HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYwLCJleHAiOjE3MDE2OTUyNjAsIm5iZiI6MTcwMTY5MTY2MCwianRpIjoiYnp0NXZvSExYb1BPUzNpUSIsInN1YiI6IjMyIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.VWJJfcn6cbIOnddtiWTmLXp_KBsL2DXHFFACS7i1K_w
DATA
{ "title": "Test FilterList #7", "isInclude": true, "items": [ "http:\/\/www.olson.com\/", "http:\/\/kovacek.org\/", "http:\/\/www.beahan.net\/" ], "fileName": null }
6.4.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/filterlist/15' -i -X PUT \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYwLCJleHAiOjE3MDE2OTUyNjAsIm5iZiI6MTcwMTY5MTY2MCwianRpIjoiYnp0NXZvSExYb1BPUzNpUSIsInN1YiI6IjMyIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.VWJJfcn6cbIOnddtiWTmLXp_KBsL2DXHFFACS7i1K_w' \
-d '{
"title": "Test FilterList #7",
"isInclude": true,
"items": [
"http:\/\/www.olson.com\/",
"http:\/\/kovacek.org\/",
"http:\/\/www.beahan.net\/"
],
"fileName": null
}'
6.4.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
data.id |
integer |
List Id |
data.userId |
integer |
User Id |
data.isActive |
bool |
on/off |
data.title |
string |
List title |
data.type |
string |
Filter list type: domain, apps, bundles, deviceIfas, publishers, ipAdresses, siteAndAppsIds, urls |
data.isInclude |
boolean |
white/black |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.items |
array |
List items |
data.listCount |
integer |
listCount |
6.4.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "FilterList updated.",
"data": {
"id": 15,
"userId": 32,
"isActive": 0,
"title": "Test FilterList #7",
"type": "urls",
"isInclude": true,
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04",
"items": [
"http:\/\/barrows.com\/qui-minus-vitae-sunt-ipsa-assumenda-sapiente-atque",
"http:\/\/kuhic.com\/natus-quia-voluptatem-eligendi-a-voluptates-soluta-et-vero"
],
"listCount": 2
}
}
6.5. Filter lists delete
A `DELETE` request will delete a filter lists
6.5.1. HTTP Request
URL
DELETE api/filterlist/16 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYwLCJleHAiOjE3MDE2OTUyNjAsIm5iZiI6MTcwMTY5MTY2MCwianRpIjoiNmpOOHFaRWlPQVBDWnlObyIsInN1YiI6IjMzIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.1z1V-Yvel6oHVNrotkGkvaaA4cf_u3CRCq4r-e7js2U Content-type: application/x-www-form-urlencoded
DATA
{}
6.5.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/filterlist/16' -i -X DELETE \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYwLCJleHAiOjE3MDE2OTUyNjAsIm5iZiI6MTcwMTY5MTY2MCwianRpIjoiNmpOOHFaRWlPQVBDWnlObyIsInN1YiI6IjMzIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.1z1V-Yvel6oHVNrotkGkvaaA4cf_u3CRCq4r-e7js2U' \
-H 'Content-type: application/x-www-form-urlencoded' \
-d '{}'
6.5.3. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
deleted |
boolean |
is deleted |
6.5.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "FilterList deleted.",
"deleted": true
}
7. Assign Filterlists to Campaigns
7.1. Get list of Filter Lists assigned to Campaign
A `GET` request with Campaign Id in url will get list of Filter Lists assigned to Campaign
7.1.1. HTTP Request
URL
GET api/campaigns/11/filterlists HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI2LCJleHAiOjE3MDE2OTUyMjYsIm5iZiI6MTcwMTY5MTYyNiwianRpIjoiektQVzdtTkQyeHd4dHhxaiIsInN1YiI6IjEzIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.po1x1S6HYnetNfVvkjNzdptVPjN4cUsEz9RB4cpPKsQ
DATA
{}
7.1.2. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns/11/filterlists' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI2LCJleHAiOjE3MDE2OTUyMjYsIm5iZiI6MTcwMTY5MTYyNiwianRpIjoiektQVzdtTkQyeHd4dHhxaiIsInN1YiI6IjEzIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.po1x1S6HYnetNfVvkjNzdptVPjN4cUsEz9RB4cpPKsQ' \
-d '{}'
7.1.3. Response Body
Path | Type | Description |
---|---|---|
data.*.isInclude |
boolean |
List is Include |
data.*.filterList.id |
integer |
List Id |
data.*.filterList.isActive |
bool |
on/off |
data.*.filterList.userId |
integer |
User Id |
data.*.filterList.title |
string |
List title |
data.*.filterList.type |
string |
Filter list type: listDomains, listApps, listBundles, listDeviceIfas, listPublishers, listIpAdresses, listSiteAndAppIds, listUrls |
data.*.filterList.isInclude |
boolean |
White/Black list |
data.*.filterList.count |
integer |
Object count |
data.*.filterList.createdAt |
datetime |
Date of creation |
data.*.filterList.updatedAt |
datetime |
Date of last modification |
meta.pagination.total |
integer |
Pagination: total items count |
meta.pagination.count |
integer |
Pagination: page items count |
meta.pagination.per_page |
integer |
Pagination: items per page |
meta.pagination.current_page |
integer |
Pagination: current page number |
meta.pagination.total_pages |
integer |
Pagination: total pages count |
meta.pagination.links |
array |
Pagination: array links |
7.1.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": [
{
"isInclude": true,
"filterList": {
"id": 1,
"isActive": 0,
"userId": 13,
"title": "Test Filter list #1",
"type": "domain",
"isInclude": "White",
"count": 1,
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04"
}
},
{
"isInclude": true,
"filterList": {
"id": 2,
"isActive": 0,
"userId": 13,
"title": "Test Filter list #2",
"type": "ipAdresses",
"isInclude": "White",
"count": 1,
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04"
}
},
{
"isInclude": true,
"filterList": {
"id": 3,
"isActive": 0,
"userId": 13,
"title": "Test Filter list #3",
"type": "urls",
"isInclude": "White",
"count": 1,
"createdAt": "2023-12-04",
"updatedAt": "2023-12-04"
}
}
],
"meta": {
"pagination": {
"total": 3,
"count": 3,
"per_page": 1000,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
7.2. Replace Filter Lists assigned to Campaign
A `POST` request with Campaign Id in url will replace Filter Lists assigned to Campaign
7.2.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
items.*.id |
integer |
Filter list id |
+ |
7.2.2. HTTP Request
URL
POST api/campaigns/12/filterlists HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI2LCJleHAiOjE3MDE2OTUyMjYsIm5iZiI6MTcwMTY5MTYyNiwianRpIjoiYzlYY3ZpT2tvMzZ1a3pIMyIsInN1YiI6IjE0IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.UHJSuwTqQ3iijYYrZ6xb3Ewyf8hTnf88qm87VdVe73s
DATA
{ "items": [ { "id": 4 }, { "id": 5 } ] }
7.2.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns/12/filterlists' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI2LCJleHAiOjE3MDE2OTUyMjYsIm5iZiI6MTcwMTY5MTYyNiwianRpIjoiYzlYY3ZpT2tvMzZ1a3pIMyIsInN1YiI6IjE0IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.UHJSuwTqQ3iijYYrZ6xb3Ewyf8hTnf88qm87VdVe73s' \
-d '{
"items": [
{
"id": 4
},
{
"id": 5
}
]
}'
7.2.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
7.2.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Replaced."
}
7.3. Append Filter Lists assigned to Campaign
A `PATCH` request with Campaign Id in url will append Filter Lists assigned to Campaign
7.3.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
items.*.id |
integer |
Filter list id |
+ |
items.*.isInclude |
boolean |
Filter list type: include or exclude |
+ |
7.3.2. HTTP Request
URL
PATCH api/campaigns/13/filterlists HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI2LCJleHAiOjE3MDE2OTUyMjYsIm5iZiI6MTcwMTY5MTYyNiwianRpIjoiU09yN1hMa0JEdThZTXZtZiIsInN1YiI6IjE1IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.LxY9u0ViDvn9k03sdG6sLq5ebhWXifffQAqeiGeQFd4
DATA
{ "items": [ { "id": 7, "isInclude": true } ] }
7.3.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns/13/filterlists' -i -X PATCH \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI2LCJleHAiOjE3MDE2OTUyMjYsIm5iZiI6MTcwMTY5MTYyNiwianRpIjoiU09yN1hMa0JEdThZTXZtZiIsInN1YiI6IjE1IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.LxY9u0ViDvn9k03sdG6sLq5ebhWXifffQAqeiGeQFd4' \
-d '{
"items": [
{
"id": 7,
"isInclude": true
}
]
}'
7.3.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
7.3.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Appended."
}
7.4. Remove Filter Lists assigned to Campaign
A `DELETE` request with Campaign Id in url will remove Filter Lists assigned to Campaign
7.4.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
ids |
array |
List id to remove |
+ |
7.4.2. HTTP Request
URL
DELETE api/campaigns/14/filterlists HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI2LCJleHAiOjE3MDE2OTUyMjYsIm5iZiI6MTcwMTY5MTYyNiwianRpIjoiYkZuQjh4V29uRHNGdG84byIsInN1YiI6IjE2IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.zB1ub6AY0kctvqfqN8iGbyy8mOxKNObWRHlaXNBFPQM Content-type: application/x-www-form-urlencoded
DATA
{ "ids": [ 9 ] }
7.4.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/campaigns/14/filterlists' -i -X DELETE \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjI2LCJleHAiOjE3MDE2OTUyMjYsIm5iZiI6MTcwMTY5MTYyNiwianRpIjoiYkZuQjh4V29uRHNGdG84byIsInN1YiI6IjE2IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.zB1ub6AY0kctvqfqN8iGbyy8mOxKNObWRHlaXNBFPQM' \
-H 'Content-type: application/x-www-form-urlencoded' \
-d '{
"ids": [
9
]
}'
7.4.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
7.4.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"message": "Deleted."
}
8. Statistic
8.1. Statistic
A `POST` request will return statistic.
8.1.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
timezone |
integer |
Timezone |
|
from |
date |
Start date (yyyy-mm-dd) |
+ |
to |
date |
End date (yyyy-mm-dd) |
+ |
groupBy |
array |
Grouping fields: |
+ |
agregatedFields |
array |
Agregated fields: |
+ |
orderField |
string |
Sorting field |
|
orderDir |
string |
Sort order: "asc" or "desc" |
|
page |
integer |
Pagination: page number |
|
rowsOnPage |
integer |
Pagination: rows on page (min:10, max:50000) |
8.1.2. HTTP Request
URL
POST api/statistic HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYxLCJleHAiOjE3MDE2OTUyNjEsIm5iZiI6MTcwMTY5MTY2MSwianRpIjoiOVJQTlVrQUxtRnVZS3JidiIsInN1YiI6IjM4IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.AePN0f-UR5jGKllDzyKNnxJzj17hGgtIG8vpPWz5EDk
DATA
{ "timezone": "Etc\/GMT+10", "from": "2023-12-02", "to": "2023-12-04", "groupBy": [ "YMD", "campaignId", "creativeId" ], "agregatedFields": [ "bids", "wins", "impressions", "clicks", "dspSpend", "winrate", "ctr" ], "orderField": "YMD", "orderDir": "desc", "page": 1, "rowsOnPage": 25 }
8.1.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/statistic' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYxLCJleHAiOjE3MDE2OTUyNjEsIm5iZiI6MTcwMTY5MTY2MSwianRpIjoiOVJQTlVrQUxtRnVZS3JidiIsInN1YiI6IjM4IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.AePN0f-UR5jGKllDzyKNnxJzj17hGgtIG8vpPWz5EDk' \
-d '{
"timezone": "Etc\/GMT+10",
"from": "2023-12-02",
"to": "2023-12-04",
"groupBy": [
"YMD",
"campaignId",
"creativeId"
],
"agregatedFields": [
"bids",
"wins",
"impressions",
"clicks",
"dspSpend",
"winrate",
"ctr"
],
"orderField": "YMD",
"orderDir": "desc",
"page": 1,
"rowsOnPage": 25
}'
8.1.4. Response Body
Path | Type | Description |
---|---|---|
status |
string |
Report status |
data.*.YMD |
date |
Date |
data.*.campaignId |
integer |
Campaign id |
data.*.campaignId_dict |
string |
Campaign name |
data.*.creativeId |
integer |
Creative id |
data.*.creativeId_dict |
string |
Creative name |
data.*.bids |
integer |
Bids |
data.*.wins |
integer |
Wins |
data.*.impressions |
integer |
Impressions |
data.*.dspSpend |
float |
Spend, $ |
data.*.winrate |
float |
Win Rate, % |
data.*.ecpm |
integer |
eCPM, $ |
data.*.clicks |
integer |
Clicks |
data.*.conversions |
integer |
Conversions |
data.*.ctr |
float |
CTR, % |
totals.YMD |
date |
Date |
totals.campaignId |
integer |
Campaign id |
totals.campaignId_dict |
string |
Campaign name |
totals.creativeId |
integer |
Creative id |
totals.creativeId_dict |
string |
Creative name |
totals.bids |
integer |
Bids |
totals.wins |
integer |
Wins |
totals.impressions |
integer |
Impressions |
totals.dspSpend |
float |
Spend, $ |
totals.winrate |
float |
Win Rate, % |
totals.ecpm |
integer |
eCPM, $ |
totals.clicks |
integer |
Clicks |
totals.conversions |
integer |
Conversions |
totals.ctr |
float |
CTR, % |
pagination.page |
integer |
Pagination: current page number |
pagination.per_page |
integer |
Pagination: items per page |
pagination.total |
integer |
Pagination: total items count |
8.1.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"status": "success",
"data": [
{
"YMD": "2023-12-04",
"campaignId": 1,
"campaignId_dict": "Optio aut| id# 1",
"creativeId": 12,
"creativeId_dict": "Ut ut| id# 12",
"bids": 477,
"wins": 158,
"impressions": 132,
"dspSpend": 0.22009,
"winrate": 33.123689727463315,
"ecpm": 1.667348484848485,
"clicks": 5,
"conversions": 10,
"ctr": 3.787878787878788
},
{
"YMD": "2023-12-04",
"campaignId": 2,
"campaignId_dict": "Qui sed| id# 2",
"creativeId": 11,
"creativeId_dict": "Quo rerum| id# 11",
"bids": 332,
"wins": 223,
"impressions": 181,
"dspSpend": 0.10504,
"winrate": 67.16867469879519,
"ecpm": 0.5803314917127071,
"clicks": 48,
"conversions": 44,
"ctr": 26.519337016574585
},
{
"YMD": "2023-12-04",
"campaignId": 2,
"campaignId_dict": "Sit quo| id# 2",
"creativeId": 12,
"creativeId_dict": "Illum ratione| id# 12",
"bids": 204,
"wins": 119,
"impressions": 84,
"dspSpend": 0.15848,
"winrate": 58.333333333333336,
"ecpm": 1.886666666666667,
"clicks": 15,
"conversions": 9,
"ctr": 17.857142857142858
},
{
"YMD": "2023-12-03",
"campaignId": 1,
"campaignId_dict": "Laboriosam fugit| id# 1",
"creativeId": 11,
"creativeId_dict": "Iusto aut| id# 11",
"bids": 107,
"wins": 63,
"impressions": 45,
"dspSpend": 0.32794,
"winrate": 58.87850467289719,
"ecpm": 7.287555555555556,
"clicks": 32,
"conversions": 26,
"ctr": 71.11111111111111
},
{
"YMD": "2023-12-04",
"campaignId": 1,
"campaignId_dict": "Nesciunt itaque| id# 1",
"creativeId": 11,
"creativeId_dict": "Nam quae| id# 11",
"bids": 723,
"wins": 398,
"impressions": 305,
"dspSpend": 0.26494,
"winrate": 55.04840940525588,
"ecpm": 0.868655737704918,
"clicks": 11,
"conversions": 49,
"ctr": 3.6065573770491803
},
{
"YMD": "2023-12-03",
"campaignId": 1,
"campaignId_dict": "Necessitatibus sequi| id# 1",
"creativeId": 12,
"creativeId_dict": "Officia architecto| id# 12",
"bids": 327,
"wins": 121,
"impressions": 107,
"dspSpend": 0.49355,
"winrate": 37.00305810397553,
"ecpm": 4.6126168224299064,
"clicks": 26,
"conversions": 29,
"ctr": 24.299065420560748
},
{
"YMD": "2023-12-03",
"campaignId": 2,
"campaignId_dict": "Molestias voluptas| id# 2",
"creativeId": 11,
"creativeId_dict": "Vitae laudantium| id# 11",
"bids": 648,
"wins": 245,
"impressions": 186,
"dspSpend": 0.30665,
"winrate": 37.80864197530864,
"ecpm": 1.6486559139784944,
"clicks": 45,
"conversions": 17,
"ctr": 24.193548387096776
},
{
"YMD": "2023-12-03",
"campaignId": 2,
"campaignId_dict": "Nisi delectus| id# 2",
"creativeId": 12,
"creativeId_dict": "Vero id| id# 12",
"bids": 974,
"wins": 386,
"impressions": 340,
"dspSpend": 0.3704,
"winrate": 39.630390143737166,
"ecpm": 1.0894117647058825,
"clicks": 22,
"conversions": 30,
"ctr": 6.470588235294118
},
{
"YMD": "2023-12-02",
"campaignId": 1,
"campaignId_dict": "Voluptas eaque| id# 1",
"creativeId": 11,
"creativeId_dict": "Mollitia soluta| id# 11",
"bids": 891,
"wins": 477,
"impressions": 426,
"dspSpend": 0.2264,
"winrate": 53.535353535353536,
"ecpm": 0.5314553990610328,
"clicks": 0,
"conversions": 3,
"ctr": 0
},
{
"YMD": "2023-12-02",
"campaignId": 1,
"campaignId_dict": "Quae nostrum| id# 1",
"creativeId": 12,
"creativeId_dict": "Provident doloribus| id# 12",
"bids": 425,
"wins": 143,
"impressions": 116,
"dspSpend": 0.16782,
"winrate": 33.64705882352941,
"ecpm": 1.4467241379310345,
"clicks": 18,
"conversions": 21,
"ctr": 15.517241379310345
},
{
"YMD": "2023-12-02",
"campaignId": 2,
"campaignId_dict": "Laudantium veniam| id# 2",
"creativeId": 11,
"creativeId_dict": "Rem dolorem| id# 11",
"bids": 399,
"wins": 225,
"impressions": 194,
"dspSpend": 0.49936,
"winrate": 56.390977443609025,
"ecpm": 2.574020618556701,
"clicks": 22,
"conversions": 17,
"ctr": 11.34020618556701
},
{
"YMD": "2023-12-02",
"campaignId": 2,
"campaignId_dict": "Aut nihil| id# 2",
"creativeId": 12,
"creativeId_dict": "Vero maxime| id# 12",
"bids": 997,
"wins": 552,
"impressions": 398,
"dspSpend": 0.30412,
"winrate": 55.36609829488465,
"ecpm": 0.7641206030150753,
"clicks": 14,
"conversions": 36,
"ctr": 3.5175879396984926
}
],
"totals": {
"YMD": "",
"campaignId": 0,
"campaignId_dict": "",
"creativeId": 0,
"creativeId_dict": "",
"bids": 6504,
"wins": 3110,
"impressions": 2514,
"dspSpend": 3.4447900000000002,
"winrate": 48.82784917984524,
"ecpm": 2.079796933013872,
"clicks": 258,
"conversions": 291,
"ctr": 17.35168872477367
},
"pagination": {
"page": 1,
"per_page": 25,
"total": 12
}
}
8.2. Filtering statistic
A `POST` request will return statistic.
8.2.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
timezone |
integer |
Timezone |
|
from |
date |
Start date (yyyy-mm-dd) |
+ |
to |
date |
End date (yyyy-mm-dd) |
+ |
groupBy |
array |
Grouping fields: |
+ |
agregatedFields |
array |
Agregated fields: |
+ |
filter.campaignId |
integer |
Filtering by Campaign Id(cid) |
|
filter.creativeId |
integer |
Filtering by Creative Id(bid) |
|
orderField |
string |
Sorting field |
|
orderDir |
string |
Sort order: "asc" or "desc" |
|
page |
integer |
Pagination: page number |
|
rowsOnPage |
integer |
Pagination: rows on page (min:10, max:50000) |
8.2.2. HTTP Request
URL
POST api/statistic HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYxLCJleHAiOjE3MDE2OTUyNjEsIm5iZiI6MTcwMTY5MTY2MSwianRpIjoiSUJNWEJ1SWtXbkZGUkJ6cCIsInN1YiI6IjM5IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.E1fBKsmi0g1XZus5UhRnimXWTYWtFA4svMsdINP7Cus
DATA
{ "timezone": "UTC", "from": "2023-12-02", "to": "2023-12-04", "groupBy": [ "YMD", "campaignId", "creativeId" ], "agregatedFields": [ "bids", "wins", "impressions", "clicks", "dspSpend", "winrate", "ctr" ], "filter": { "campaignId": 1, "creativeId": 10 }, "orderField": "YMD", "orderDir": "desc", "page": 1, "rowsOnPage": 25 }
8.2.3. Curl request
$ curl 'http://dsp-api.smartyads.com:80/api/statistic' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiaWF0IjoxNzAxNjkxNjYxLCJleHAiOjE3MDE2OTUyNjEsIm5iZiI6MTcwMTY5MTY2MSwianRpIjoiSUJNWEJ1SWtXbkZGUkJ6cCIsInN1YiI6IjM5IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.E1fBKsmi0g1XZus5UhRnimXWTYWtFA4svMsdINP7Cus' \
-d '{
"timezone": "UTC",
"from": "2023-12-02",
"to": "2023-12-04",
"groupBy": [
"YMD",
"campaignId",
"creativeId"
],
"agregatedFields": [
"bids",
"wins",
"impressions",
"clicks",
"dspSpend",
"winrate",
"ctr"
],
"filter": {
"campaignId": 1,
"creativeId": 10
},
"orderField": "YMD",
"orderDir": "desc",
"page": 1,
"rowsOnPage": 25
}'
8.2.4. Response Body
Path | Type | Description |
---|---|---|
status |
string |
Report status |
data.*.YMD |
date |
Date |
data.*.campaignId |
integer |
Campaign id |
data.*.campaignId_dict |
string |
Campaign name |
data.*.creativeId |
integer |
Creative id |
data.*.creativeId_dict |
string |
Creative name |
data.*.bids |
integer |
Bids |
data.*.wins |
integer |
Wins |
data.*.impressions |
integer |
Impressions |
data.*.dspSpend |
float |
Spend, $ |
data.*.winrate |
float |
Win Rate, % |
data.*.ecpm |
integer |
eCPM, $ |
data.*.clicks |
integer |
Clicks |
data.*.conversions |
integer |
Conversions |
data.*.ctr |
float |
CTR, % |
totals.YMD |
date |
Date |
totals.campaignId |
integer |
Campaign id |
totals.campaignId_dict |
string |
Campaign name |
totals.creativeId |
integer |
Creative id |
totals.creativeId_dict |
string |
Creative name |
totals.bids |
integer |
Bids |
totals.wins |
integer |
Wins |
totals.impressions |
integer |
Impressions |
totals.dspSpend |
float |
Spend, $ |
totals.winrate |
float |
Win Rate, % |
totals.ecpm |
integer |
eCPM, $ |
totals.clicks |
integer |
Clicks |
totals.conversions |
integer |
Conversions |
totals.ctr |
float |
CTR, % |
pagination.page |
integer |
Pagination: current page number |
pagination.per_page |
integer |
Pagination: items per page |
pagination.total |
integer |
Pagination: total items count |
8.2.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"status": "success",
"data": [
{
"YMD": "2023-12-03",
"campaignId": 1,
"campaignId_dict": "Eaque tempore| id# 1",
"creativeId": 10,
"creativeId_dict": "Animi eveniet| id# 10",
"bids": 489,
"wins": 262,
"impressions": 210,
"dspSpend": 0.29647,
"winrate": 53.578732106339466,
"ecpm": 1.411761904761905,
"clicks": 19,
"conversions": 15,
"ctr": 9.047619047619047
},
{
"YMD": "2023-12-04",
"campaignId": 1,
"campaignId_dict": "Beatae voluptas| id# 1",
"creativeId": 10,
"creativeId_dict": "Aut aut| id# 10",
"bids": 181,
"wins": 110,
"impressions": 90,
"dspSpend": 0.2555,
"winrate": 60.773480662983424,
"ecpm": 2.838888888888889,
"clicks": 26,
"conversions": 4,
"ctr": 28.88888888888889
},
{
"YMD": "2023-12-02",
"campaignId": 1,
"campaignId_dict": "Ipsam doloremque| id# 1",
"creativeId": 10,
"creativeId_dict": "Praesentium fugiat| id# 10",
"bids": 914,
"wins": 374,
"impressions": 299,
"dspSpend": 0.18652,
"winrate": 40.91903719912472,
"ecpm": 0.6238127090301002,
"clicks": 34,
"conversions": 24,
"ctr": 11.37123745819398
}
],
"totals": {
"YMD": "",
"campaignId": 0,
"campaignId_dict": "",
"creativeId": 0,
"creativeId_dict": "",
"bids": 1584,
"wins": 746,
"impressions": 599,
"dspSpend": 0.7384900000000001,
"winrate": 51.75708332281587,
"ecpm": 1.6248211675602982,
"clicks": 79,
"conversions": 43,
"ctr": 16.435915131567306
},
"pagination": {
"page": 1,
"per_page": 25,
"total": 3
}
}
Request validation list
Campaign.contentCategories
-
IAB1
-
IAB2
-
IAB3
-
IAB4
-
IAB5
-
IAB6
-
IAB7
-
IAB8
-
IAB9
-
IAB10
-
IAB11
-
IAB12
-
IAB13
-
IAB14
-
IAB15
-
IAB16
-
IAB17
-
IAB18
-
IAB19
-
IAB20
-
IAB21
-
IAB22
-
IAB23
Campaign.connectionTypes
-
wifi
-
ethernet
-
cellular_all
-
cellular_all
-
cellular_3g
-
cellular_4g
Campaign.OS
-
'Android',
-
'Android 8.0',
-
'Android 8.1',
-
'Android 9.0',
-
'Android 10.0',
-
'Android 11.0',
-
'Android 12.0',
-
'Android 13.0',
-
'Android 14.0',
-
'iOS',
-
'iOS 10.0',
-
'iOS 10.1',
-
'iOS 10.2',
-
'iOS 10.3',
-
'iOS 11.0',
-
'iOS 11.1',
-
'iOS 11.2',
-
'iOS 11.3',
-
'iOS 12.0',
-
'iOS 12.1',
-
'iOS 12.2',
-
'iOS 12.3',
-
'iOS 12.4',
-
'iOS 13.1',
-
'iOS 13.2',
-
'iOS 13.3',
-
'iOS 13.4',
-
'iOS 13.5',
-
'iOS 13.6',
-
'iOS 14.0',
-
'iOS 14.1',
-
'iOS 14.2',
-
'iOS 14.3',
-
'iOS 14.4',
-
'iOS 14.5',
-
'iOS 14.6',
-
'iOS 14.7',
-
'iOS 14.8',
-
'iOS 15.0',
-
'iOS 15.1',
-
'iOS 15.2',
-
'iOS 15.3',
-
'iOS 15.4',
-
'iOS 15.5',
-
'iOS 15.6',
-
'iOS 15.7',
-
'iOS 16.0',
-
'iOS 16.1',
-
'iOS 16.2',
-
'iOS 16.3',
-
'iOS 16.4',
-
'Mac OS',
-
'Mac OS 10.1',
-
'Mac OS 10.2',
-
'Mac OS 10.3',
-
'Mac OS 10.4',
-
'Mac OS 10.5',
-
'Mac OS 10.6',
-
'Mac OS 10.7',
-
'Mac OS 10.8',
-
'Mac OS 10.9',
-
'Mac OS 10.10',
-
'Mac OS 10.11',
-
'Mac OS 10.12',
-
'Mac OS 10.13',
-
'Mac OS 10.14',
-
'Mac OS 10.15',
-
'Mac OS 11.0',
-
'Mac OS 11.1',
-
'Mac OS 11.2',
-
'Mac OS 11.3',
-
'Mac OS 11.4',
-
'Mac OS 11.5',
-
'Mac OS 11.6',
-
'Mac OS 12.0',
-
'Mac OS 12.1',
-
'Mac OS 12.2',
-
'Mac OS 12.3',
-
'Mac OS 12.4',
-
'Mac OS 12.5',
-
'Mac OS 12.6',
-
'Mac OS 13.0',
-
'Mac OS 13.1',
-
'Mac OS 13.2',
-
'BlackBerry',
-
'Linux',
-
'Windows',
-
'Windows 8.1',
-
'Windows 10',
-
'Windows 11',
-
'Windows Mobile',
-
'Symbian',
-
'Symbian 9.1',
-
'Symbian 9.2',
-
'Symbian 9.3',
-
'Symbian 9.4',
Campaign.browser * 'Chrome', * 'Edge', * 'IE', * 'Safari', * 'Mozilla', * 'Opera', * 'UCBrowser', * 'Yandex',