NAV Navigation
Shell JavaScript Ruby Python Java Go

AdButler Self-Serve API v2.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

AdButler Self-Serve.

API Endpoint

https://api.adbutler.com

Base URLs:

Email: Support

Authentication

Include your secret API key in the Authorization header when making any request.


--header 'Authorization: Basic {API_KEY}'


xhr.setRequestHeader("Authorization", "Basic {API_KEY}");


request["Authorization"] = 'Basic {API_KEY}'


headers = { 'Authorization': "Basic {API_KEY}" }


.header("Authorization", "Basic {API_KEY}")


req.Header.Add("Authorization", "Basic {API_KEY}")

AdButler uses secret API keys to allow access to the API. You can register a new AdButler API key by visiting the AdButler API Settings page (Settings → API Settings). The API Settings page also lets you manage your existing API keys. Never share your secret API keys on public websites or in the client-side code.

You must include secret API key in all your API requests. API requests without the secret API key will fail. Language bindings take care of that for you once you initialize them with your secret API key. This is another incentive to use the appropriate language bindings whenever possible.

Always send requests over HTTPS. Language bindings does that for you automatically. Requests over HTTP will fail and you run the risk of exposing your secret API key. If you believe that your secret API key has been compromised, then go to AdButler API Settings page and delete the compromised API key and create a new one.

API Errors

AdButler API uses conventional HTTP response codes to indicate the success or failure of a request, listed and described in the table below.

Code Meaning
200 OK — Everything worked as expected.
400 Bad Request — The request was unacceptable, often due to missing a required parameter.
402 Request Failed — parameters were valid but the request failed.
403 Forbidden — An issue with the API key or AdButler account, or not requesting over HTTPS.
404 Not Found — The requested resource was not found.
405 Method Not Allowed — An action was attempted on an object that doesn't exist or cannot be modified
409 Conflict — Resource cannot be modified, or the resource already exists.
410 Gone — The resource or endpoint requested has been removed from our servers.
429 Too Many Requests — You're sending too many requests. Slow down!
500 Internal Server Error — We had a problem with our server. Try again after a few minutes.
501 Not Implemented — The requested method is not supported by our servers and will not be handled.
503 Service Unavailable — We're temporarily offline for maintanance. Please try again later.

Cart Items

A Cart Item is part of a Cart and is an ad creative associated with a specific Portal Zone. A Cart Item will become part of an Order Item when an Order is created.

Get a list of Cart Items

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/portals/234/cart/744/cart-items", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/portals/{portal}/cart/{cart}/cart-items

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
cart path integer true Identifier of the Cart.
limit path integer false The number of objects returned in the response, sometimes called "take".
offset path integer false The position to start the retrieval of objects, sometimes called "skip".
id path string false A list of IDs by which to filter the list of objects returned. Formatted as a list of the IDs separated by commas. (e.g. "1134,1153,1138,1176")

Example responses

default Response

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "/v2/self-serve/portals/234/cart/744/cart-items",
  "data": [
    {
      "type": "template",
      "destination": "https://example.com",
      "custom_html": "",
      "alt_text": "",
      "keywords": "golf,soccer,tennis",
      "file": null,
      "template": 71,
      "template_variables": [
        {
          "id": 234,
          "value": "Acme Fresh Soap"
        }
      ],
      "bid_amount": 5,
      "daily_limit": 50,
      "total_limit": 200,
      "portal_zone": 100795,
      "cpm": 5,
      "cpc": null,
      "quantity": 0,
      "multipler": 1,
      "cart": 744,
      "object": "cart-item",
      "self": "/v2/self-serve/portal/234/carts/744/cart-items/1215fa9ae62760c65fa9af73e906f",
      "id": "1215fa9ae62760c65fa9af73e906f"
    }
  ]
}

Responses

Status Meaning Description Schema
default Default successful operation cart_item_list

Create a Cart Item

Code samples

curl --request POST \
  --url https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"type":"template","destination":"https://example.com","custom_html":"","alt_text":"","keywords":"golf,soccer,tennis","file":null,"template":71,"template_variables":[{"id":234,"value":"Acme Fresh Soap"}],"bid_amount":5,"daily_limit":50,"total_limit":200,"portal_zone":100795}'
var data = JSON.stringify({
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "portal_zone": 100795
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{\"type\":\"template\",\"destination\":\"https://example.com\",\"custom_html\":\"\",\"alt_text\":\"\",\"keywords\":\"golf,soccer,tennis\",\"file\":null,\"template\":71,\"template_variables\":[{\"id\":234,\"value\":\"Acme Fresh Soap\"}],\"bid_amount\":5,\"daily_limit\":50,\"total_limit\":200,\"portal_zone\":100795}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{\"type\":\"template\",\"destination\":\"https://example.com\",\"custom_html\":\"\",\"alt_text\":\"\",\"keywords\":\"golf,soccer,tennis\",\"file\":null,\"template\":71,\"template_variables\":[{\"id\":234,\"value\":\"Acme Fresh Soap\"}],\"bid_amount\":5,\"daily_limit\":50,\"total_limit\":200,\"portal_zone\":100795}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("POST", "/v2/self-serve/portals/234/cart/744/cart-items", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{\"type\":\"template\",\"destination\":\"https://example.com\",\"custom_html\":\"\",\"alt_text\":\"\",\"keywords\":\"golf,soccer,tennis\",\"file\":null,\"template\":71,\"template_variables\":[{\"id\":234,\"value\":\"Acme Fresh Soap\"}],\"bid_amount\":5,\"daily_limit\":50,\"total_limit\":200,\"portal_zone\":100795}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items"

	payload := strings.NewReader("{\"type\":\"template\",\"destination\":\"https://example.com\",\"custom_html\":\"\",\"alt_text\":\"\",\"keywords\":\"golf,soccer,tennis\",\"file\":null,\"template\":71,\"template_variables\":[{\"id\":234,\"value\":\"Acme Fresh Soap\"}],\"bid_amount\":5,\"daily_limit\":50,\"total_limit\":200,\"portal_zone\":100795}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

POST /self-serve/portals/{portal}/cart/{cart}/cart-items

Body parameter

{
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "portal_zone": 100795
}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
cart path integer true Identifier of the Cart.
body body cart_item_post false none
» type body string false The ad type between 'image', 'html5', 'raw' or 'template'.
» destination body string false The click destination URL.
» custom_html body string false Body contents of a Custom HTML ad (aka 3rd Party).
» alt_text body string false The alt text for an 'image' ad.
» keywords body string false A keyword string.
» file body integer false The ID of an image, video or zip file.
» template body integer false The identifier of a valid Native Ad Template.
» template_variables body [template_variable_value] false An array of JSON objects of the respective Native Ad Template variable IDs and user provided values. Values can be strings or numeric e.g. an image ID.
»» id body integer false The template variable ID.
»» value body string false The user provided value for the variable.
» bid_amount body float false The bid amount. Only auction-based
» daily_limit body float false A daily money limit. Only auction-based
» total_limit body float false A total money limit. Only auction-based
» portal_zone body integer true A valid Portal Zone ID.

Example responses

default Response

{
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "portal_zone": 100795,
  "cpm": 5,
  "cpc": null,
  "quantity": 0,
  "multipler": 1,
  "cart": 744,
  "object": "cart-item",
  "self": "/v2/self-serve/portal/234/carts/744/cart-items/1215fa9ae62760c65fa9af73e906f",
  "id": "1215fa9ae62760c65fa9af73e906f"
}

Responses

Status Meaning Description Schema
default Default successful operation cart_item_get

Get a Single Cart Item

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/portals/{portal}/cart/{cart}/cart-items/{id}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
cart path integer true Identifier of the Cart.
id path string true Identifier of the Cart Item you'd like to update.

Example responses

default Response

{
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "portal_zone": 100795,
  "cpm": 5,
  "cpc": null,
  "quantity": 0,
  "multipler": 1,
  "cart": 744,
  "object": "cart-item",
  "self": "/v2/self-serve/portal/234/carts/744/cart-items/1215fa9ae62760c65fa9af73e906f",
  "id": "1215fa9ae62760c65fa9af73e906f"
}

Responses

Status Meaning Description Schema
default Default successful operation cart_item_get

Update a Cart Item

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"type":"template","destination":"https://example.com","custom_html":"","alt_text":"","keywords":"golf,soccer,tennis","file":null,"template":71,"template_variables":[{"id":234,"value":"Acme Fresh Soap"}],"bid_amount":5,"daily_limit":50,"total_limit":200}'
var data = JSON.stringify({
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{\"type\":\"template\",\"destination\":\"https://example.com\",\"custom_html\":\"\",\"alt_text\":\"\",\"keywords\":\"golf,soccer,tennis\",\"file\":null,\"template\":71,\"template_variables\":[{\"id\":234,\"value\":\"Acme Fresh Soap\"}],\"bid_amount\":5,\"daily_limit\":50,\"total_limit\":200}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{\"type\":\"template\",\"destination\":\"https://example.com\",\"custom_html\":\"\",\"alt_text\":\"\",\"keywords\":\"golf,soccer,tennis\",\"file\":null,\"template\":71,\"template_variables\":[{\"id\":234,\"value\":\"Acme Fresh Soap\"}],\"bid_amount\":5,\"daily_limit\":50,\"total_limit\":200}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{\"type\":\"template\",\"destination\":\"https://example.com\",\"custom_html\":\"\",\"alt_text\":\"\",\"keywords\":\"golf,soccer,tennis\",\"file\":null,\"template\":71,\"template_variables\":[{\"id\":234,\"value\":\"Acme Fresh Soap\"}],\"bid_amount\":5,\"daily_limit\":50,\"total_limit\":200}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f"

	payload := strings.NewReader("{\"type\":\"template\",\"destination\":\"https://example.com\",\"custom_html\":\"\",\"alt_text\":\"\",\"keywords\":\"golf,soccer,tennis\",\"file\":null,\"template\":71,\"template_variables\":[{\"id\":234,\"value\":\"Acme Fresh Soap\"}],\"bid_amount\":5,\"daily_limit\":50,\"total_limit\":200}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/portals/{portal}/cart/{cart}/cart-items/{id}

Body parameter

{
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200
}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
cart path integer true Identifier of the Cart.
id path string true Identifier of the Cart Item you'd like to update.
body body cart_item_put false none
» type body string false The ad type between 'image', 'html5', 'raw' or 'template'.
» destination body string false The click destination URL.
» custom_html body string false Body contents of a Custom HTML ad (aka 3rd Party).
» alt_text body string false The alt text for an 'image' ad.
» keywords body string false A keyword string.
» file body integer false The ID of an image, video or zip file.
» template body integer false The identifier of a valid Native Ad Template.
» template_variables body [template_variable_value] false An array of JSON objects of the respective Native Ad Template variable IDs and user provided values. Values can be strings or numeric e.g. an image ID.
»» id body integer false The template variable ID.
»» value body string false The user provided value for the variable.
» bid_amount body float false The bid amount. Only auction-based
» daily_limit body float false A daily money limit. Only auction-based
» total_limit body float false A total money limit. Only auction-based

Example responses

default Response

{
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "portal_zone": 100795,
  "cpm": 5,
  "cpc": null,
  "quantity": 0,
  "multipler": 1,
  "cart": 744,
  "object": "cart-item",
  "self": "/v2/self-serve/portal/234/carts/744/cart-items/1215fa9ae62760c65fa9af73e906f",
  "id": "1215fa9ae62760c65fa9af73e906f"
}

Responses

Status Meaning Description Schema
default Default successful operation cart_item_get

Delete a Cart Item

Code samples

curl --request DELETE \
  --url https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("DELETE", "/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.delete("https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/cart/744/cart-items/1215fa9ae62760c65fa9af73e906f"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

DELETE /self-serve/portals/{portal}/cart/{cart}/cart-items/{id}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
cart path integer true Identifier of the Cart.
id path string true Identifier of the Cart Item you'd like to delete.

Example responses

default Response

{
  "id": 1362,
  "deleted": true
}

Responses

Status Meaning Description Schema
default Default successful operation deleted

Carts

A Cart is the entry point for adding new creatives (Cart Items) before an Order is created.

Create a Cart

Code samples

curl --request POST \
  --url https://api.adbutler.com/v2/self-serve/portals/234/cart \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"start_date":"2020-11-26","end_date":"2020-11-30"}'
var data = JSON.stringify({
  "start_date": "2020-11-26",
  "end_date": "2020-11-30"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.adbutler.com/v2/self-serve/portals/234/cart");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/cart")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{\"start_date\":\"2020-11-26\",\"end_date\":\"2020-11-30\"}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{\"start_date\":\"2020-11-26\",\"end_date\":\"2020-11-30\"}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("POST", "/v2/self-serve/portals/234/cart", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://api.adbutler.com/v2/self-serve/portals/234/cart")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{\"start_date\":\"2020-11-26\",\"end_date\":\"2020-11-30\"}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/cart"

	payload := strings.NewReader("{\"start_date\":\"2020-11-26\",\"end_date\":\"2020-11-30\"}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

POST /self-serve/portals/{portal}/cart

Body parameter

{
  "start_date": "2020-11-26",
  "end_date": "2020-11-30"
}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
body body cart_post false none
» start_date body string false The start date for the order
» end_date body string false The end date for the order.

Example responses

default Response

{
  "object": "cart",
  "self": "/v2/self-serve/portals/234/cart/744",
  "id": 744,
  "portal": 234,
  "set_dates": true,
  "start_date": "2020-11-26 00:00:00",
  "end_date": "2020-11-30 23:59:59"
}

Responses

Status Meaning Description Schema
default Default successful operation cart_get

Get a Single Cart

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/portals/234/cart/744 \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/portals/234/cart/744");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/cart/744")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/portals/234/cart/744", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/portals/234/cart/744")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/cart/744"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/portals/{portal}/cart/{id}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
id path integer true Identifier of the order you'd like to get.

Example responses

default Response

{
  "object": "cart",
  "self": "/v2/self-serve/portals/234/cart/744",
  "id": 744,
  "portal": 234,
  "set_dates": true,
  "start_date": "2020-11-26 00:00:00",
  "end_date": "2020-11-30 23:59:59"
}

Responses

Status Meaning Description Schema
default Default successful operation cart_get

Update a Cart

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/portals/234/cart/744 \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"set_dates":false}'
var data = JSON.stringify({
  "set_dates": false
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/portals/234/cart/744");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/cart/744")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{\"set_dates\":false}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{\"set_dates\":false}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/portals/234/cart/744", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/portals/234/cart/744")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{\"set_dates\":false}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/cart/744"

	payload := strings.NewReader("{\"set_dates\":false}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/portals/{portal}/cart/{id}

Body parameter

{
  "set_dates": false
}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
id path integer true Identifier of the Cart you'd like to update.
body body cart_put false none
» set_dates body boolean false Whether dates are being used for the order.

Example responses

default Response

{
  "object": "cart",
  "self": "/v2/self-serve/portals/234/cart/744",
  "id": 744,
  "set_dates": false,
  "start_date": null,
  "end_date": null
}

Responses

Status Meaning Description Schema
default Default successful operation cart_get_no_dates

Delete a Cart

Code samples

curl --request DELETE \
  --url https://api.adbutler.com/v2/self-serve/portals/234/cart/744 \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.adbutler.com/v2/self-serve/portals/234/cart/744");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/cart/744")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("DELETE", "/v2/self-serve/portals/234/cart/744", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.delete("https://api.adbutler.com/v2/self-serve/portals/234/cart/744")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/cart/744"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

DELETE /self-serve/portals/{portal}/cart/{id}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
id path integer true Identifier of the Cart you'd like to delete.

Example responses

default Response

{
  "id": 1362,
  "deleted": true
}

Responses

Status Meaning Description Schema
default Default successful operation deleted

Customers

A Customer is advertiser specific to Self-Serve and is directly related to an AdButler Advertiser. A Customer has a Wallet balance.

Get a list of Customers

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/customers \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/customers");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/customers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/customers", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/customers")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/customers"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/customers

Parameters

Name In Type Required Description
limit path integer false The number of objects returned in the response, sometimes called "take".
offset path integer false The position to start the retrieval of objects, sometimes called "skip".
id path string false A list of IDs by which to filter the list of objects returned. Formatted as a list of the IDs separated by commas. (e.g. "1134,1153,1138,1176")

Example responses

default Response

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "/v2/self-serve/customers",
  "data": [
    {
      "email": "example@mycompany.com",
      "first_name": "John",
      "last_name": "Smith",
      "company_name": "My Company",
      "object": "customer",
      "self": "/v2/self-serve/customers/20156",
      "id": 20156,
      "advertiser": 984586,
      "balance": 235.82,
      "low_funds_amount": 10,
      "low_funds_notify": true,
      "zero_funds_notify": false,
      "created_date": "2020-10-27 15:43:07",
      "last_accessed": "2020-10-30 16:52:36"
    }
  ]
}

Responses

Status Meaning Description Schema
default Default successful operation customer_list

Create a Customer

Code samples

curl --request POST \
  --url https://api.adbutler.com/v2/self-serve/customers \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"email":"example@mycompany.com","first_name":"John","last_name":"Smith","company_name":"My Company","password":"**********","portal":"234"}'
var data = JSON.stringify({
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company",
  "password": "**********",
  "portal": "234"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.adbutler.com/v2/self-serve/customers");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/customers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{\"email\":\"example@mycompany.com\",\"first_name\":\"John\",\"last_name\":\"Smith\",\"company_name\":\"My Company\",\"password\":\"**********\",\"portal\":\"234\"}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{\"email\":\"example@mycompany.com\",\"first_name\":\"John\",\"last_name\":\"Smith\",\"company_name\":\"My Company\",\"password\":\"**********\",\"portal\":\"234\"}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("POST", "/v2/self-serve/customers", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://api.adbutler.com/v2/self-serve/customers")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{\"email\":\"example@mycompany.com\",\"first_name\":\"John\",\"last_name\":\"Smith\",\"company_name\":\"My Company\",\"password\":\"**********\",\"portal\":\"234\"}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/customers"

	payload := strings.NewReader("{\"email\":\"example@mycompany.com\",\"first_name\":\"John\",\"last_name\":\"Smith\",\"company_name\":\"My Company\",\"password\":\"**********\",\"portal\":\"234\"}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

POST /self-serve/customers

Body parameter

{
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company",
  "password": "**********",
  "portal": "234"
}

Parameters

Name In Type Required Description
body body customer_post false none
» email body string true A valid email to allow the customer to access their account.
» first_name body string false First name of the customer.
» last_name body string false Last name of the customer.
» company_name body string false A company name.
» password body string true The password used by the customer to access their account.
» portal body integer true A valid Self-Serve Portal ID. The customer will have permission to use this Portal.

Example responses

default Response

{
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company",
  "object": "customer",
  "self": "/v2/self-serve/customers/20156",
  "id": 20156,
  "advertiser": 984586,
  "balance": 235.82,
  "low_funds_amount": 10,
  "low_funds_notify": true,
  "zero_funds_notify": false,
  "created_date": "2020-10-27 15:43:07",
  "last_accessed": "2020-10-30 16:52:36"
}

Responses

Status Meaning Description Schema
default Default successful operation customer_get

Get a Single Customer

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/customers/20156 \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/customers/20156");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/customers/20156")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/customers/20156", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/customers/20156")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/customers/20156"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/customers/{id}

Parameters

Name In Type Required Description
id path integer true Identifier of the customer you'd like to get.

Example responses

default Response

{
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company",
  "object": "customer",
  "self": "/v2/self-serve/customers/20156",
  "id": 20156,
  "advertiser": 984586,
  "balance": 235.82,
  "low_funds_amount": 10,
  "low_funds_notify": true,
  "zero_funds_notify": false,
  "created_date": "2020-10-27 15:43:07",
  "last_accessed": "2020-10-30 16:52:36"
}

Responses

Status Meaning Description Schema
default Default successful operation customer_get

Update a Customer

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/customers/20156 \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"email":"example@mycompany.com","first_name":"John","last_name":"Smith","company_name":"My Company","password":"**********"}'
var data = JSON.stringify({
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company",
  "password": "**********"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/customers/20156");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/customers/20156")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{\"email\":\"example@mycompany.com\",\"first_name\":\"John\",\"last_name\":\"Smith\",\"company_name\":\"My Company\",\"password\":\"**********\"}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{\"email\":\"example@mycompany.com\",\"first_name\":\"John\",\"last_name\":\"Smith\",\"company_name\":\"My Company\",\"password\":\"**********\"}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/customers/20156", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/customers/20156")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{\"email\":\"example@mycompany.com\",\"first_name\":\"John\",\"last_name\":\"Smith\",\"company_name\":\"My Company\",\"password\":\"**********\"}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/customers/20156"

	payload := strings.NewReader("{\"email\":\"example@mycompany.com\",\"first_name\":\"John\",\"last_name\":\"Smith\",\"company_name\":\"My Company\",\"password\":\"**********\"}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/customers/{id}

Body parameter

{
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company",
  "password": "**********"
}

Parameters

Name In Type Required Description
id path integer true Identifier of the customer you'd like to update.
body body customer_put false none
» email body string false A valid email to allow the customer to access their account.
» first_name body string false First name of the customer.
» last_name body string false Last name of the customer.
» company_name body string false A company name.
» password body string false The password used by the customer to access their account.

Example responses

default Response

{
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company",
  "object": "customer",
  "self": "/v2/self-serve/customers/20156",
  "id": 20156,
  "advertiser": 984586,
  "balance": 235.82,
  "low_funds_amount": 10,
  "low_funds_notify": true,
  "zero_funds_notify": false,
  "created_date": "2020-10-27 15:43:07",
  "last_accessed": "2020-10-30 16:52:36"
}

Responses

Status Meaning Description Schema
default Default successful operation customer_get

Add Funds to a Customer

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/customers/20156/add-funds \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"amount":500}'
var data = JSON.stringify({
  "amount": 500
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/customers/20156/add-funds");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/customers/20156/add-funds")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{\"amount\":500}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{\"amount\":500}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/customers/20156/add-funds", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/customers/20156/add-funds")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{\"amount\":500}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/customers/20156/add-funds"

	payload := strings.NewReader("{\"amount\":500}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/customers/{id}/add-funds

Body parameter

{
  "amount": 500
}

Parameters

Name In Type Required Description
id path integer true Identifier of the customer you'd like to update.
body body customer_add_funds false none
» amount body float true The amount of funds to add to the customer.

Example responses

default Response

{
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company",
  "object": "customer",
  "self": "/v2/self-serve/customers/20156",
  "id": 20156,
  "advertiser": 984586,
  "balance": 735.82,
  "low_funds_amount": 10,
  "low_funds_notify": true,
  "zero_funds_notify": false,
  "created_date": "2020-10-27 15:43:07",
  "last_accessed": "2020-10-30 16:52:36"
}

Responses

Status Meaning Description Schema
default Default successful operation customer_get_new_funds

Order Items

An Order Item contains the data for a creative that is to be served. When an Order is approved, the data from each Order Item is used to create the ad-item, campaign, placement, schedule and campaign assignment.

Get a list of Order Items

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/portals/234/orders/150211/order-items", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/portals/{portal}/orders/{order}/order-items

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
order path integer true Identifier of the Order.
limit path integer false The number of objects returned in the response, sometimes called "take".
offset path integer false The position to start the retrieval of objects, sometimes called "skip".
id path string false A list of IDs by which to filter the list of objects returned. Formatted as a list of the IDs separated by commas. (e.g. "1134,1153,1138,1176")

Example responses

default Response

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "/v2/self-serve/portals/234/orders/150211/order-items",
  "data": [
    {
      "object": "order-item",
      "self": "/v2/self-serve/portals/234/orders/150211/order-items/582002",
      "id": 582002,
      "order": 150211,
      "portal_zone": 148,
      "portal_channel": null,
      "campaign": 56895,
      "from_date": "2020-11-26 00:00:00",
      "to_date": "2020-11-30 29:59:59",
      "type": "template",
      "destination": "https://example.com",
      "custom_html": "",
      "alt_text": "",
      "keywords": "golf,soccer,tennis",
      "file": null,
      "template": 71,
      "template_variables": [
        {
          "id": 234,
          "value": "Acme Fresh Soap"
        }
      ],
      "cpm": 5,
      "cpc": null,
      "quantity": null,
      "multipler": 1,
      "impressions": 50000,
      "clicks": 562,
      "conversion": 0,
      "impressions_multi": 50000,
      "bid_amount": 5,
      "daily_limit": 50,
      "total_limit": 200,
      "serving_status": "Serving"
    }
  ]
}

Responses

Status Meaning Description Schema
default Default successful operation order_item_list

Get an Order Item

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002 \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/portals/234/orders/150211/order-items/582002", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/portals/{portal}/orders/{order}/order-items/{id}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
order path integer true Identifier of the Order.
id path integer true Identifier of the Order Item you'd like to get.

Example responses

default Response

{
  "object": "order-item",
  "self": "/v2/self-serve/portals/234/orders/150211/order-items/582002",
  "id": 582002,
  "order": 150211,
  "portal_zone": 148,
  "portal_channel": null,
  "campaign": 56895,
  "from_date": "2020-11-26 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "cpm": 5,
  "cpc": null,
  "quantity": null,
  "multipler": 1,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "serving_status": "Serving"
}

Responses

Status Meaning Description Schema
default Default successful operation order_item_get

Update bid or limits for an Order Item

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/bid-update \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"bid_amount":5,"daily_limit":50,"total_limit":200,"send_email":false}'
var data = JSON.stringify({
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "send_email": false
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/bid-update");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/bid-update")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{\"bid_amount\":5,\"daily_limit\":50,\"total_limit\":200,\"send_email\":false}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{\"bid_amount\":5,\"daily_limit\":50,\"total_limit\":200,\"send_email\":false}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/portals/234/orders/150211/order-items/582002/bid-update", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/bid-update")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{\"bid_amount\":5,\"daily_limit\":50,\"total_limit\":200,\"send_email\":false}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/bid-update"

	payload := strings.NewReader("{\"bid_amount\":5,\"daily_limit\":50,\"total_limit\":200,\"send_email\":false}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/portals/{portal}/orders/{order}/order-items/{id}/bid-update

Body parameter

{
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "send_email": false
}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
order path integer true Identifier of the Order.
id path integer true Identifier of the Order Item you'd like to update.
body body order_item_bid_update false none
» bid_amount body float false The Bid amount.
» daily_limit body float false A daily money limit.
» total_limit body float false A total money limit.
» send_email body boolean false Whether to send an email of the changes to the advertiser. Defaults to true.

Example responses

default Response

{
  "object": "order-item",
  "self": "/v2/self-serve/portals/234/orders/150211/order-items/582002",
  "id": 582002,
  "order": 150211,
  "portal_zone": 148,
  "portal_channel": null,
  "campaign": 56895,
  "from_date": "2020-11-26 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "cpm": 5,
  "cpc": null,
  "quantity": null,
  "multipler": 1,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "serving_status": "Serving"
}

Responses

Status Meaning Description Schema
default Default successful operation order_item_get

Manually Finish an Order Item

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/finish \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{}'
var data = JSON.stringify({});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/finish");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/finish")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/portals/234/orders/150211/order-items/582002/finish", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/finish")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/finish"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/portals/{portal}/orders/{order}/order-items/{id}/finish

Body parameter

{}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
order path integer true Identifier of the Order.
id path integer true Identifier of the Order Item you'd like to finish.
body body order_item_finish false none

Example responses

default Response

{
  "object": "order-item",
  "self": "/v2/self-serve/portals/234/orders/150211/order-items/582002",
  "id": 582002,
  "order": 150211,
  "portal_zone": 148,
  "portal_channel": null,
  "campaign": 56895,
  "from_date": "2020-11-26 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "cpm": 5,
  "cpc": null,
  "quantity": null,
  "multipler": 1,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "serving_status": "Complete"
}

Responses

Status Meaning Description Schema
default Default successful operation order_item_finish_get

Pause an Order Item

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/pause \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{}'
var data = JSON.stringify({});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/pause");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/pause")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/portals/234/orders/150211/order-items/582002/pause", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/pause")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/pause"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/portals/{portal}/orders/{order}/order-items/{id}/pause

Body parameter

{}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
order path integer true Identifier of the Order.
id path integer true Identifier of the Order Item you'd like to update.
body body order_item_pause false none

Example responses

200 Response

{
  "object": "order-item",
  "self": "/v2/self-serve/portals/234/orders/150211/order-items/582002",
  "id": 582002,
  "order": 150211,
  "portal_zone": 148,
  "portal_channel": null,
  "campaign": 56895,
  "from_date": "2020-11-26 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "cpm": 5,
  "cpc": null,
  "quantity": null,
  "multipler": 1,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "serving_status": "Paused"
}

Responses

Status Meaning Description Schema
200 OK successful operation order_item_pause_get

Resume an Order Item

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/resume \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{}'
var data = JSON.stringify({});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/resume");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/resume")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/portals/234/orders/150211/order-items/582002/resume", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/resume")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/order-items/582002/resume"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/portals/{portal}/orders/{order}/order-items/{id}/resume

Body parameter

{}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
order path integer true Identifier of the Order.
id path integer true Identifier of the Order Item you'd like to update.
body body order_item_resume false none

Example responses

200 Response

{
  "object": "order-item",
  "self": "/v2/self-serve/portals/234/orders/150211/order-items/582002",
  "id": 582002,
  "order": 150211,
  "portal_zone": 148,
  "portal_channel": null,
  "campaign": 56895,
  "from_date": "2020-11-26 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "cpm": 5,
  "cpc": null,
  "quantity": null,
  "multipler": 1,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "serving_status": "Serving"
}

Responses

Status Meaning Description Schema
200 OK successful operation order_item_get

Orders

A Order contains the elements required to begin serving new creative campaigns. The Order contains Order Items which determine how the Order will operate.

Get a list of Orders

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/portals/234/orders");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/portals/234/orders", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/portals/234/orders")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/portals/{portal}/orders

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
limit path integer false The number of objects returned in the response, sometimes called "take".
offset path integer false The position to start the retrieval of objects, sometimes called "skip".
id path string false A list of IDs by which to filter the list of objects returned. Formatted as a list of the IDs separated by commas. (e.g. "1134,1153,1138,1176")

Example responses

default Response

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "/v2/self-serve/portals/234/orders",
  "data": [
    {
      "object": "order",
      "self": "/v2/self-serve/portals/234/orders/150211",
      "id": 150211,
      "portal": 234,
      "customer": 20546,
      "from_date": "2020-11-28 00:00:00",
      "to_date": "2020-11-30 29:59:59",
      "reject_message": null,
      "reject_email": null,
      "item_count": 1,
      "total_cost": 0,
      "amount_paid": 0,
      "credit_used": 0,
      "incomplete_refund": 0,
      "quantiy": 0,
      "impressions": 50000,
      "clicks": 562,
      "conversion": 0,
      "impressions_multi": 50000,
      "tax_rate": 0,
      "type": "auction",
      "finalized_date": "2020-10-27 15:47:07",
      "order_process_date": "2020-10-27 16:43:07",
      "completed_date": "2020-12-01 00:05:01",
      "created_date": "2020-10-24 15:43:07",
      "order_items": [
        {
          "id": 184751
        }
      ],
      "status": "APPROVED",
      "serving_status": "Serving"
    }
  ]
}

Responses

Status Meaning Description Schema
default Default successful operation order_list

Create an order

Code samples

curl --request POST \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"cart":848,"customer":20156}'
var data = JSON.stringify({
  "cart": 848,
  "customer": 20156
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.adbutler.com/v2/self-serve/portals/234/orders");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{\"cart\":848,\"customer\":20156}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{\"cart\":848,\"customer\":20156}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("POST", "/v2/self-serve/portals/234/orders", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://api.adbutler.com/v2/self-serve/portals/234/orders")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{\"cart\":848,\"customer\":20156}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders"

	payload := strings.NewReader("{\"cart\":848,\"customer\":20156}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

POST /self-serve/portals/{portal}/orders

Body parameter

{
  "cart": 848,
  "customer": 20156
}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
body body order_post false none
» cart body integer true The Self-Serve Cart ID
» customer body integer true A valid Self-Serve Customer ID.

Example responses

default Response

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ],
  "status": "SUBMITTED",
  "serving_status": "Pending"
}

Responses

Status Meaning Description Schema
default Default successful operation order_create_get

Get a Single Order

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders/150211 \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/portals/234/orders/150211", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/portals/{portal}/orders/{id}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
id path integer true Identifier of the order you'd like to get.

Example responses

default Response

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ],
  "status": "APPROVED",
  "serving_status": "Serving"
}

Responses

Status Meaning Description Schema
default Default successful operation order_get

Approve an Order

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/approve \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{}'
var data = JSON.stringify({});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/approve");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/approve")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/portals/234/orders/150211/approve", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/approve")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/approve"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/portals/{portal}/orders/{id}/approve

Body parameter

{}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
id path integer true Identifier of the order you'd like to approve.
body body order_approve false none

Example responses

default Response

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ],
  "status": "APPROVED",
  "serving_status": "Serving"
}

Responses

Status Meaning Description Schema
default Default successful operation order_get

Manually Finish an Order

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/finish \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{}'
var data = JSON.stringify({});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/finish");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/finish")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/portals/234/orders/150211/finish", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/finish")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/finish"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/portals/{portal}/orders/{id}/finish

Body parameter

{}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
id path integer true Identifier of the order you'd like to finish.
body body order_finish false none

Example responses

default Response

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ],
  "status": "APPROVED",
  "serving_status": "Complete"
}

Responses

Status Meaning Description Schema
default Default successful operation order_finish_get

Pause an Order

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/pause \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{}'
var data = JSON.stringify({});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/pause");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/pause")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/portals/234/orders/150211/pause", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/pause")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/pause"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/portals/{portal}/orders/{id}/pause

Body parameter

{}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
id path integer true Identifier of the order you'd like to pause.
body body order_pause false none

Example responses

200 Response

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ],
  "status": "APPROVED",
  "serving_status": "Paused"
}

Responses

Status Meaning Description Schema
200 OK successful operation order_pause_get

Reject an Order

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/reject \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{}'
var data = JSON.stringify({});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/reject");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/reject")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/portals/234/orders/150211/reject", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/reject")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/reject"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/portals/{portal}/orders/{id}/reject

Body parameter

{}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
id path integer true Identifier of the order you'd like to reject.
body body order_reject false none

Example responses

default Response

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ],
  "status": "REJECTED",
  "serving_status": "Rejected"
}

Responses

Status Meaning Description Schema
default Default successful operation order_reject_get

Resume an Order

Code samples

curl --request PUT \
  --url https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/resume \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{}'
var data = JSON.stringify({});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/resume");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/resume")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

payload = "{}"

headers = {
    'content-type': "application/json",
    'accept': "application/json"
    }

conn.request("PUT", "/v2/self-serve/portals/234/orders/150211/resume", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.put("https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/resume")
  .header("content-type", "application/json")
  .header("accept", "application/json")
  .body("{}")
  .asString();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/orders/150211/resume"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

PUT /self-serve/portals/{portal}/orders/{id}/resume

Body parameter

{}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
id path integer true Identifier of the order you'd like to finish.
body body order_resume false none

Example responses

200 Response

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ],
  "status": "APPROVED",
  "serving_status": "Serving"
}

Responses

Status Meaning Description Schema
200 OK successful operation order_get

Portal Zones

A Portal Zone defines the variables used to create a Cart Item and subsequently an Order Item. The Portal Zone is directly associated with a parent Publisher Zone (e.g. /v2/zones/standard).

Get a list of Portal Zones

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/portals/234/zones \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/portals/234/zones");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/zones")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/portals/234/zones", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/portals/234/zones")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/zones"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/portals/{portal}/zones

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
limit path integer false The number of objects returned in the response, sometimes called "take".
offset path integer false The position to start the retrieval of objects, sometimes called "skip".
id path string false A list of IDs by which to filter the list of objects returned. Formatted as a list of the IDs separated by commas. (e.g. "1134,1153,1138,1176")

Example responses

default Response

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "/v2/self-serve/portals/234/zones",
  "data": [
    {
      "name": "Native Listing",
      "portal": 234,
      "publisher": 714988,
      "zone": 104383,
      "cpm": 5,
      "cpc": 0,
      "multiplier": 1,
      "width": 300,
      "height": 250,
      "keywords": "golf,soccer,tennis",
      "keyword_requirement": "ONE",
      "languages": null,
      "max_file_size": 1024,
      "more_info_url": "",
      "allow_image": false,
      "allow_rich_media": false,
      "allow_3rd_party": false,
      "allow_templates": true,
      "templates": [
        12,
        71
      ],
      "keyword_templates": [
        4
      ],
      "inventory_type": "MANUAL",
      "inventory_percentage": 80,
      "inventory_manual": 1000000,
      "inventory_30_day": 1268459,
      "enabled": true,
      "object": "zone",
      "self": "/v2/self-serve/portal/234/zones/104383",
      "id": 104383,
      "created_date": "2020-10-27 15:43:07"
    }
  ]
}

Responses

Status Meaning Description Schema
default Default successful operation portal_zone_list

Get a Single Portal Zone

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/portals/234/zones/104383 \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/portals/234/zones/104383");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234/zones/104383")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/portals/234/zones/104383", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/portals/234/zones/104383")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234/zones/104383"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/portals/{portal}/zones/{id}

Parameters

Name In Type Required Description
portal path integer true Identifier of the Portal.
id path integer true Identifier of the portal you'd like to get.

Example responses

default Response

{
  "name": "Native Listing",
  "portal": 234,
  "publisher": 714988,
  "zone": 104383,
  "cpm": 5,
  "cpc": 0,
  "multiplier": 1,
  "width": 300,
  "height": 250,
  "keywords": "golf,soccer,tennis",
  "keyword_requirement": "ONE",
  "languages": null,
  "max_file_size": 1024,
  "more_info_url": "",
  "allow_image": false,
  "allow_rich_media": false,
  "allow_3rd_party": false,
  "allow_templates": true,
  "templates": [
    12,
    71
  ],
  "keyword_templates": [
    4
  ],
  "inventory_type": "MANUAL",
  "inventory_percentage": 80,
  "inventory_manual": 1000000,
  "inventory_30_day": 1268459,
  "enabled": true,
  "object": "zone",
  "self": "/v2/self-serve/portal/234/zones/104383",
  "id": 104383,
  "created_date": "2020-10-27 15:43:07"
}

Responses

Status Meaning Description Schema
default Default successful operation portal_zone_get

Portals

A Portal is the overall platform containing the elements needed to create Self-Serve Orders including Portal Zones and assigned Customers.

Get a list of Portals

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/portals \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/portals");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/portals", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/portals")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/portals

Parameters

Name In Type Required Description
limit path integer false The number of objects returned in the response, sometimes called "take".
offset path integer false The position to start the retrieval of objects, sometimes called "skip".
id path string false A list of IDs by which to filter the list of objects returned. Formatted as a list of the IDs separated by commas. (e.g. "1134,1153,1138,1176")

Example responses

default Response

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "/v2/self-serve/portals",
  "data": [
    {
      "name": "My Portal",
      "subdomain_name": "myportal",
      "logo": 12345,
      "support_email": "support@mycompany.com",
      "order_process_days": 5,
      "default_order_action": "reject",
      "is_public": false,
      "timezone": "America/Los_Angeles",
      "set_min_order_value": false,
      "min_order_value": false,
      "set_max_order_value": 50,
      "max_order_value": 2000,
      "enabled": "2020-10-27 15:43:07",
      "tax_rate": 8.5,
      "footer_link1_name": "Terms of Service",
      "footer_link1_url": "https://mycompany.com/terms-of-service",
      "footer_link2_name": null,
      "footer_link2_url": null,
      "object": "portal",
      "self": "/v2/self-serve/portals/234",
      "id": 234,
      "portal_type": "publisher",
      "custom_domain": "https://orders.mycompany.com",
      "custom_domain_requested": false,
      "publisher": 714988,
      "zone_count": 3,
      "use_zero_cost": false,
      "type": "auction",
      "created_date": "2020-10-27 15:43:07"
    }
  ]
}

Responses

Status Meaning Description Schema
default Default successful operation portal_list

Get a Single Portal

Code samples

curl --request GET \
  --url https://api.adbutler.com/v2/self-serve/portals/234 \
  --header 'accept: application/json'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.adbutler.com/v2/self-serve/portals/234");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);
require 'uri'
require 'net/http'

url = URI("https://api.adbutler.com/v2/self-serve/portals/234")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.adbutler.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/v2/self-serve/portals/234", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
HttpResponse response = Unirest.get("https://api.adbutler.com/v2/self-serve/portals/234")
  .header("accept", "application/json")
  .asString();
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.adbutler.com/v2/self-serve/portals/234"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET /self-serve/portals/{id}

Parameters

Name In Type Required Description
id path integer true Identifier of the portal you'd like to get.

Example responses

default Response

{
  "name": "My Portal",
  "subdomain_name": "myportal",
  "logo": 12345,
  "support_email": "support@mycompany.com",
  "order_process_days": 5,
  "default_order_action": "reject",
  "is_public": false,
  "timezone": "America/Los_Angeles",
  "set_min_order_value": false,
  "min_order_value": false,
  "set_max_order_value": 50,
  "max_order_value": 2000,
  "enabled": "2020-10-27 15:43:07",
  "tax_rate": 8.5,
  "footer_link1_name": "Terms of Service",
  "footer_link1_url": "https://mycompany.com/terms-of-service",
  "footer_link2_name": null,
  "footer_link2_url": null,
  "object": "portal",
  "self": "/v2/self-serve/portals/234",
  "id": 234,
  "portal_type": "publisher",
  "custom_domain": "https://orders.mycompany.com",
  "custom_domain_requested": false,
  "publisher": 714988,
  "zone_count": 3,
  "use_zero_cost": false,
  "type": "auction",
  "created_date": "2020-10-27 15:43:07"
}

Responses

Status Meaning Description Schema
default Default successful operation portal_get

Schemas

cart

{}

Properties

None

cart_get

{
  "object": "cart",
  "self": "/v2/self-serve/portals/234/cart/744",
  "id": 744,
  "portal": 234,
  "set_dates": true,
  "start_date": "2020-11-26 00:00:00",
  "end_date": "2020-11-30 23:59:59"
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
portal integer false none The identifier for the Portal being used.
set_dates boolean false none Whether dates are being used for the order. Only auction-based
start_date string false none The start date for the order. Only auction-based
end_date string false none The end date for the order. Only auction-based

cart_get_no_dates

{
  "object": "cart",
  "self": "/v2/self-serve/portals/234/cart/744",
  "id": 744,
  "set_dates": false,
  "start_date": null,
  "end_date": null
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
set_dates boolean false none Whether dates are being used for the order. Only auction-based
start_date string false none The start date for the order. Only auction-based
end_date string false none The end date for the order. Only auction-based

cart_item

{
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200
}

Properties

Name Type Required Restrictions Description
type string false none The ad type between 'image', 'html5', 'raw' or 'template'.
destination string false none The click destination URL.
custom_html string false none Body contents of a Custom HTML ad (aka 3rd Party).
alt_text string false none The alt text for an 'image' ad.
keywords string false none A keyword string.
file integer false none The ID of an image, video or zip file.
template integer false none The identifier of a valid Native Ad Template.
template_variables [template_variable_value] false none An array of JSON objects of the respective Native Ad Template variable IDs and user provided values. Values can be strings or numeric e.g. an image ID.
bid_amount float false none The bid amount. Only auction-based
daily_limit float false none A daily money limit. Only auction-based
total_limit float false none A total money limit. Only auction-based

cart_item_get

{
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "portal_zone": 100795,
  "cpm": 5,
  "cpc": null,
  "quantity": 0,
  "multipler": 1,
  "cart": 744,
  "object": "cart-item",
  "self": "/v2/self-serve/portal/234/carts/744/cart-items/1215fa9ae62760c65fa9af73e906f",
  "id": "1215fa9ae62760c65fa9af73e906f"
}

Properties

Name Type Required Restrictions Description
type string false none The ad type between 'image', 'html5', 'raw' or 'template'.
destination string false none The click destination URL.
custom_html string false none Body contents of a Custom HTML ad (aka 3rd Party).
alt_text string false none The alt text for an 'image' ad.
keywords string false none A keyword string.
file integer false none The ID of an image, video or zip file.
template integer false none The identifier of a valid Native Ad Template.
template_variables [template_variable_value] false none An array of JSON objects of the respective Native Ad Template variable IDs and user provided values. Values can be strings or numeric e.g. an image ID.
bid_amount float false none The bid amount. Only auction-based
daily_limit float false none A daily money limit. Only auction-based
total_limit float false none A total money limit. Only auction-based
portal_zone integer false none The identifier of a valid Portal Zone ID.
cpm float false none The current CPM value in relation to the portal_zone (also used as the Bid floor).
cpc float false none The current CPC value in relation to the portal_zone (also used as the Bid floor).
quantity integer false none The number of impression set. Only order-based
multipler integer false none A DOOH impression mulitplier value. Only DOOH
cart integer false none The identifier of the Cart being used.
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id string false none The current resource identifier(ID).

cart_item_list

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "/v2/self-serve/portals/234/cart/744/cart-items",
  "data": [
    {
      "type": "template",
      "destination": "https://example.com",
      "custom_html": "",
      "alt_text": "",
      "keywords": "golf,soccer,tennis",
      "file": null,
      "template": 71,
      "template_variables": [
        {
          "id": 234,
          "value": "Acme Fresh Soap"
        }
      ],
      "bid_amount": 5,
      "daily_limit": 50,
      "total_limit": 200,
      "portal_zone": 100795,
      "cpm": 5,
      "cpc": null,
      "quantity": 0,
      "multipler": 1,
      "cart": 744,
      "object": "cart-item",
      "self": "/v2/self-serve/portal/234/carts/744/cart-items/1215fa9ae62760c65fa9af73e906f",
      "id": "1215fa9ae62760c65fa9af73e906f"
    }
  ]
}

Properties

Name Type Required Restrictions Description
object string false none For list resources, the value of 'object' will always be 'list'.
has_more boolean false none True if there are more data beyond the offset and limit.
limit integer false none The number of resources to return. Sometimes called 'take'
offset integer false none The number of resources in sequenece to ignore, sometimes called 'skip'.
url string false none The url of the current resource list.
data [cart_item_get] false none none

cart_item_post

{
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "portal_zone": 100795
}

Properties

Name Type Required Restrictions Description
type string false none The ad type between 'image', 'html5', 'raw' or 'template'.
destination string false none The click destination URL.
custom_html string false none Body contents of a Custom HTML ad (aka 3rd Party).
alt_text string false none The alt text for an 'image' ad.
keywords string false none A keyword string.
file integer false none The ID of an image, video or zip file.
template integer false none The identifier of a valid Native Ad Template.
template_variables [template_variable_value] false none An array of JSON objects of the respective Native Ad Template variable IDs and user provided values. Values can be strings or numeric e.g. an image ID.
bid_amount float false none The bid amount. Only auction-based
daily_limit float false none A daily money limit. Only auction-based
total_limit float false none A total money limit. Only auction-based
portal_zone integer true none A valid Portal Zone ID.

cart_item_put

{
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200
}

Properties

Name Type Required Restrictions Description
type string false none The ad type between 'image', 'html5', 'raw' or 'template'.
destination string false none The click destination URL.
custom_html string false none Body contents of a Custom HTML ad (aka 3rd Party).
alt_text string false none The alt text for an 'image' ad.
keywords string false none A keyword string.
file integer false none The ID of an image, video or zip file.
template integer false none The identifier of a valid Native Ad Template.
template_variables [template_variable_value] false none An array of JSON objects of the respective Native Ad Template variable IDs and user provided values. Values can be strings or numeric e.g. an image ID.
bid_amount float false none The bid amount. Only auction-based
daily_limit float false none A daily money limit. Only auction-based
total_limit float false none A total money limit. Only auction-based

cart_item_static

{
  "portal_zone": 100795,
  "cpm": 5,
  "cpc": null,
  "quantity": 0,
  "multipler": 1,
  "cart": 744
}

Properties

Name Type Required Restrictions Description
portal_zone integer false none The identifier of a valid Portal Zone ID.
cpm float false none The current CPM value in relation to the portal_zone (also used as the Bid floor).
cpc float false none The current CPC value in relation to the portal_zone (also used as the Bid floor).
quantity integer false none The number of impression set. Only order-based
multipler integer false none A DOOH impression mulitplier value. Only DOOH
cart integer false none The identifier of the Cart being used.

cart_post

{
  "start_date": "2020-11-26",
  "end_date": "2020-11-30"
}

Properties

Name Type Required Restrictions Description
start_date string false none The start date for the order
end_date string false none The end date for the order.

cart_put

{
  "set_dates": false
}

Properties

Name Type Required Restrictions Description
set_dates boolean false none Whether dates are being used for the order.

customer

{
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company"
}

Properties

Name Type Required Restrictions Description
email string false none A valid email to allow the customer to access their account.
first_name string false none First name of the customer.
last_name string false none Last name of the customer.
company_name string false none A company name.

customer_add_funds

{
  "amount": 500
}

Properties

Name Type Required Restrictions Description
amount float true none The amount of funds to add to the customer.

customer_get

{
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company",
  "object": "customer",
  "self": "/v2/self-serve/customers/20156",
  "id": 20156,
  "advertiser": 984586,
  "balance": 235.82,
  "low_funds_amount": 10,
  "low_funds_notify": true,
  "zero_funds_notify": false,
  "created_date": "2020-10-27 15:43:07",
  "last_accessed": "2020-10-30 16:52:36"
}

Properties

Name Type Required Restrictions Description
email string false none A valid email to allow the customer to access their account.
first_name string false none First name of the customer.
last_name string false none Last name of the customer.
company_name string false none A company name.
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
advertiser integer false none The identifier of the associated Advertiser.
balance float false none The current account balance.
low_funds_amount float false none The low funds to which the customer is notified by email if enable.
low_funds_notify integer false none Sets the low funds email notification.
zero_funds_notify integer false none Sets the zero funds email notification.
created_date string(date-time) false none The date and time when the customer was created.
last_accessed string(date-time) false none The date and time when this account was last accessed.

customer_get_new_funds

{
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company",
  "object": "customer",
  "self": "/v2/self-serve/customers/20156",
  "id": 20156,
  "advertiser": 984586,
  "balance": 735.82,
  "low_funds_amount": 10,
  "low_funds_notify": true,
  "zero_funds_notify": false,
  "created_date": "2020-10-27 15:43:07",
  "last_accessed": "2020-10-30 16:52:36"
}

Properties

Name Type Required Restrictions Description
email string false none A valid email to allow the customer to access their account.
first_name string false none First name of the customer.
last_name string false none Last name of the customer.
company_name string false none A company name.
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
advertiser integer false none The identifier of the associated Advertiser.
balance float false none The current account balance.
low_funds_amount float false none The low funds to which the customer is notified by email if enable.
low_funds_notify integer false none Sets the low funds email notification.
zero_funds_notify integer false none Sets the zero funds email notification.
created_date string(date-time) false none The date and time when the customer was created.
last_accessed string(date-time) false none The date and time when this account was last accessed.

customer_list

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "/v2/self-serve/customers",
  "data": [
    {
      "email": "example@mycompany.com",
      "first_name": "John",
      "last_name": "Smith",
      "company_name": "My Company",
      "object": "customer",
      "self": "/v2/self-serve/customers/20156",
      "id": 20156,
      "advertiser": 984586,
      "balance": 235.82,
      "low_funds_amount": 10,
      "low_funds_notify": true,
      "zero_funds_notify": false,
      "created_date": "2020-10-27 15:43:07",
      "last_accessed": "2020-10-30 16:52:36"
    }
  ]
}

Properties

Name Type Required Restrictions Description
object string false none For list resources, the value of 'object' will always be 'list'.
has_more boolean false none True if there are more data beyond the offset and limit.
limit integer false none The number of resources to return. Sometimes called 'take'
offset integer false none The number of resources in sequenece to ignore, sometimes called 'skip'.
url string false none The url of the current resource list.
data [customer_get] false none none

customer_post

{
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company",
  "password": "**********",
  "portal": "234"
}

Properties

Name Type Required Restrictions Description
email string true none A valid email to allow the customer to access their account.
first_name string false none First name of the customer.
last_name string false none Last name of the customer.
company_name string false none A company name.
password string true none The password used by the customer to access their account.
portal integer true none A valid Self-Serve Portal ID. The customer will have permission to use this Portal.

customer_put

{
  "email": "example@mycompany.com",
  "first_name": "John",
  "last_name": "Smith",
  "company_name": "My Company",
  "password": "**********"
}

Properties

Name Type Required Restrictions Description
email string false none A valid email to allow the customer to access their account.
first_name string false none First name of the customer.
last_name string false none Last name of the customer.
company_name string false none A company name.
password string false none The password used by the customer to access their account.

data_resource_get

{
  "object": "string",
  "url": "string"
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
url string false none The relative URL of the current resource being requested or affected.

deleted

{
  "id": 1362,
  "deleted": true
}

Properties

Name Type Required Restrictions Description
id integer false none The identifier of the resource that was deleted.
deleted boolean false none true if deletion was successful.

error_resource_does_not_exist

{
  "object": "error",
  "http_status": 404,
  "type": "resource_not_found_error",
  "message": "Resource not found."
}

Properties

Name Type Required Restrictions Description
object string false none The object type, which will always be error when an error occurs.
http_status integer false none none
type string false none none
message string false none none

exception

{
  "object": "error",
  "http_status": 0,
  "type": "string",
  "message": "string"
}

Properties

Name Type Required Restrictions Description
object string false none The object type, which will always be error when an error occurs.
http_status integer false none The HTTP status of the response.
type string false none The type of error that occurred.
message string false none The details of the error.

list

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0
}

Properties

Name Type Required Restrictions Description
object string false none For list resources, the value of 'object' will always be 'list'.
has_more boolean false none True if there are more data beyond the offset and limit.
limit integer false none The number of resources to return. Sometimes called 'take'
offset integer false none The number of resources in sequenece to ignore, sometimes called 'skip'.

order

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ]
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
portal integer false none Identifier of the Portal.
customer integer false none Identifier of the Customer.
from_date string(date-time) false none The earliest starting date for the Order.
to_date string(date-time) false none The latest end date for the Order.
reject_message string false none The message given for a rejected Order.
reject_email string false none The email address with which a Reject message is sent.
item_count integer false none The number of Order Items in the Order.
total_cost integer false none The total cost of the Order. Only order-based
amount_paid integer false none The amount paid as a processed payment. Only order-based
credit_used integer false none The funds used as part of a balance credit. Only order-based
incomplete_refund integer false none Any funds returned as credit. Only order-based
quantiy integer false none The total impression quantity to be used for serving. Only order-based
impressions integer false none The number of impressions served.
clicks integer false none The number of clicks made.
conversion integer false none The number of conversions made.
impressions_multi integer false none The number of impressions served in relation to a multiplier. Only DOOH
tax_rate float false none A tax rate to apply to orders or payments.
type string false none Whether the Order uses auction-based or order-based serving.
finalized_date string(date-time) false none The date signified tha approval or rejection of the Order
order_process_date string(date-time) false none The date after which the Order is automatically approved or rejected.
completed_date string(date-time) false none The date signifying the end of all serving for the Order.
created_date string(date-time) false none The date and time when the Order was created.
order_items [order_item_id] false none An array of Order Item IDs for the Order

order_approve

{}

Properties

None

order_create_get

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ],
  "status": "SUBMITTED",
  "serving_status": "Pending"
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
portal integer false none Identifier of the Portal.
customer integer false none Identifier of the Customer.
from_date string(date-time) false none The earliest starting date for the Order.
to_date string(date-time) false none The latest end date for the Order.
reject_message string false none The message given for a rejected Order.
reject_email string false none The email address with which a Reject message is sent.
item_count integer false none The number of Order Items in the Order.
total_cost integer false none The total cost of the Order. Only order-based
amount_paid integer false none The amount paid as a processed payment. Only order-based
credit_used integer false none The funds used as part of a balance credit. Only order-based
incomplete_refund integer false none Any funds returned as credit. Only order-based
quantiy integer false none The total impression quantity to be used for serving. Only order-based
impressions integer false none The number of impressions served.
clicks integer false none The number of clicks made.
conversion integer false none The number of conversions made.
impressions_multi integer false none The number of impressions served in relation to a multiplier. Only DOOH
tax_rate float false none A tax rate to apply to orders or payments.
type string false none Whether the Order uses auction-based or order-based serving.
finalized_date string(date-time) false none The date signified tha approval or rejection of the Order
order_process_date string(date-time) false none The date after which the Order is automatically approved or rejected.
completed_date string(date-time) false none The date signifying the end of all serving for the Order.
created_date string(date-time) false none The date and time when the Order was created.
order_items [order_item_id] false none An array of Order Item IDs for the Order
status string false none The Order status.
serving_status string false none The serving status of the Order.

order_finish

{}

Properties

None

order_finish_get

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ],
  "status": "APPROVED",
  "serving_status": "Complete"
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
portal integer false none Identifier of the Portal.
customer integer false none Identifier of the Customer.
from_date string(date-time) false none The earliest starting date for the Order.
to_date string(date-time) false none The latest end date for the Order.
reject_message string false none The message given for a rejected Order.
reject_email string false none The email address with which a Reject message is sent.
item_count integer false none The number of Order Items in the Order.
total_cost integer false none The total cost of the Order. Only order-based
amount_paid integer false none The amount paid as a processed payment. Only order-based
credit_used integer false none The funds used as part of a balance credit. Only order-based
incomplete_refund integer false none Any funds returned as credit. Only order-based
quantiy integer false none The total impression quantity to be used for serving. Only order-based
impressions integer false none The number of impressions served.
clicks integer false none The number of clicks made.
conversion integer false none The number of conversions made.
impressions_multi integer false none The number of impressions served in relation to a multiplier. Only DOOH
tax_rate float false none A tax rate to apply to orders or payments.
type string false none Whether the Order uses auction-based or order-based serving.
finalized_date string(date-time) false none The date signified tha approval or rejection of the Order
order_process_date string(date-time) false none The date after which the Order is automatically approved or rejected.
completed_date string(date-time) false none The date signifying the end of all serving for the Order.
created_date string(date-time) false none The date and time when the Order was created.
order_items [order_item_id] false none An array of Order Item IDs for the Order
status string false none The Order status.
serving_status string false none The serving status of the Order.

order_get

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ],
  "status": "APPROVED",
  "serving_status": "Serving"
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
portal integer false none Identifier of the Portal.
customer integer false none Identifier of the Customer.
from_date string(date-time) false none The earliest starting date for the Order.
to_date string(date-time) false none The latest end date for the Order.
reject_message string false none The message given for a rejected Order.
reject_email string false none The email address with which a Reject message is sent.
item_count integer false none The number of Order Items in the Order.
total_cost integer false none The total cost of the Order. Only order-based
amount_paid integer false none The amount paid as a processed payment. Only order-based
credit_used integer false none The funds used as part of a balance credit. Only order-based
incomplete_refund integer false none Any funds returned as credit. Only order-based
quantiy integer false none The total impression quantity to be used for serving. Only order-based
impressions integer false none The number of impressions served.
clicks integer false none The number of clicks made.
conversion integer false none The number of conversions made.
impressions_multi integer false none The number of impressions served in relation to a multiplier. Only DOOH
tax_rate float false none A tax rate to apply to orders or payments.
type string false none Whether the Order uses auction-based or order-based serving.
finalized_date string(date-time) false none The date signified tha approval or rejection of the Order
order_process_date string(date-time) false none The date after which the Order is automatically approved or rejected.
completed_date string(date-time) false none The date signifying the end of all serving for the Order.
created_date string(date-time) false none The date and time when the Order was created.
order_items [order_item_id] false none An array of Order Item IDs for the Order
status string false none The Order status.
serving_status string false none The serving status of the Order.

order_item

{
  "object": "order-item",
  "self": "/v2/self-serve/portals/234/orders/150211/order-items/582002",
  "id": 582002,
  "order": 150211,
  "portal_zone": 148,
  "portal_channel": null,
  "campaign": 56895,
  "from_date": "2020-11-26 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "cpm": 5,
  "cpc": null,
  "quantity": null,
  "multipler": 1,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
order integer false none The identifier of the Order being used.
portal_zone integer false none The identifier of a valid Portal Zone ID.
portal_channel integer false none The identifier of a valid Portal Channel ID.
campaign integer false none The identifier of a valid Campaign ID.
from_date string(date-time) false none The start date for the Order Item.
to_date string(date-time) false none The end date for the Order Item.
type string false none The ad type between 'image', 'html5', 'raw' or 'template'.
destination string false none The click destination URL.
custom_html string false none Body contents of a Custom HTML'raw' ad (aka 3rd Party).
alt_text string false none The alt text for an 'image' ad.
keywords string false none A keyword string.
file integer false none The ID of an image, video or zip file.
template integer false none The identifier of a valid Native Ad Template.
template_variables [template_variable_value] false none An array of JSON objects of the respective Native Ad Template variable IDs and user provided values. Values can be strings or numeric e.g. an image ID.
cpm float false none The current CPM value in relation to the portal_zone (also used as the Bid floor).
cpc float false none The current CPC value in relation to the portal_zone (also used as the Bid floor).
quantity integer false none The number of impression set. Only order-based
multipler integer false none A DOOH impression mulitplier value.
impressions integer false none The number of impressions served.
clicks integer false none The number of clicks made.
conversion integer false none The number of conversions made.
impressions_multi integer false none The number of impressions served in relation to a multiplier.
bid_amount float false none The Bid amount. Only auction-based
daily_limit float false none A daily money limit. Only auction-based
total_limit float false none A total money limit. Only auction-based

order_item_bid_update

{
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "send_email": false
}

Properties

Name Type Required Restrictions Description
bid_amount float false none The Bid amount.
daily_limit float false none A daily money limit.
total_limit float false none A total money limit.
send_email boolean false none Whether to send an email of the changes to the advertiser. Defaults to true.

order_item_finish

{}

Properties

None

order_item_finish_get

{
  "object": "order-item",
  "self": "/v2/self-serve/portals/234/orders/150211/order-items/582002",
  "id": 582002,
  "order": 150211,
  "portal_zone": 148,
  "portal_channel": null,
  "campaign": 56895,
  "from_date": "2020-11-26 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "cpm": 5,
  "cpc": null,
  "quantity": null,
  "multipler": 1,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "serving_status": "Complete"
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
order integer false none The identifier of the Order being used.
portal_zone integer false none The identifier of a valid Portal Zone ID.
portal_channel integer false none The identifier of a valid Portal Channel ID.
campaign integer false none The identifier of a valid Campaign ID.
from_date string(date-time) false none The start date for the Order Item.
to_date string(date-time) false none The end date for the Order Item.
type string false none The ad type between 'image', 'html5', 'raw' or 'template'.
destination string false none The click destination URL.
custom_html string false none Body contents of a Custom HTML'raw' ad (aka 3rd Party).
alt_text string false none The alt text for an 'image' ad.
keywords string false none A keyword string.
file integer false none The ID of an image, video or zip file.
template integer false none The identifier of a valid Native Ad Template.
template_variables [template_variable_value] false none An array of JSON objects of the respective Native Ad Template variable IDs and user provided values. Values can be strings or numeric e.g. an image ID.
cpm float false none The current CPM value in relation to the portal_zone (also used as the Bid floor).
cpc float false none The current CPC value in relation to the portal_zone (also used as the Bid floor).
quantity integer false none The number of impression set. Only order-based
multipler integer false none A DOOH impression mulitplier value.
impressions integer false none The number of impressions served.
clicks integer false none The number of clicks made.
conversion integer false none The number of conversions made.
impressions_multi integer false none The number of impressions served in relation to a multiplier.
bid_amount float false none The Bid amount. Only auction-based
daily_limit float false none A daily money limit. Only auction-based
total_limit float false none A total money limit. Only auction-based
serving_status string false none The serving status of the Order Item.

order_item_get

{
  "object": "order-item",
  "self": "/v2/self-serve/portals/234/orders/150211/order-items/582002",
  "id": 582002,
  "order": 150211,
  "portal_zone": 148,
  "portal_channel": null,
  "campaign": 56895,
  "from_date": "2020-11-26 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "cpm": 5,
  "cpc": null,
  "quantity": null,
  "multipler": 1,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "serving_status": "Serving"
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
order integer false none The identifier of the Order being used.
portal_zone integer false none The identifier of a valid Portal Zone ID.
portal_channel integer false none The identifier of a valid Portal Channel ID.
campaign integer false none The identifier of a valid Campaign ID.
from_date string(date-time) false none The start date for the Order Item.
to_date string(date-time) false none The end date for the Order Item.
type string false none The ad type between 'image', 'html5', 'raw' or 'template'.
destination string false none The click destination URL.
custom_html string false none Body contents of a Custom HTML'raw' ad (aka 3rd Party).
alt_text string false none The alt text for an 'image' ad.
keywords string false none A keyword string.
file integer false none The ID of an image, video or zip file.
template integer false none The identifier of a valid Native Ad Template.
template_variables [template_variable_value] false none An array of JSON objects of the respective Native Ad Template variable IDs and user provided values. Values can be strings or numeric e.g. an image ID.
cpm float false none The current CPM value in relation to the portal_zone (also used as the Bid floor).
cpc float false none The current CPC value in relation to the portal_zone (also used as the Bid floor).
quantity integer false none The number of impression set. Only order-based
multipler integer false none A DOOH impression mulitplier value.
impressions integer false none The number of impressions served.
clicks integer false none The number of clicks made.
conversion integer false none The number of conversions made.
impressions_multi integer false none The number of impressions served in relation to a multiplier.
bid_amount float false none The Bid amount. Only auction-based
daily_limit float false none A daily money limit. Only auction-based
total_limit float false none A total money limit. Only auction-based
serving_status string false none The serving status of the Order Item.

order_item_id

{
  "id": 184751
}

Properties

Name Type Required Restrictions Description
id integer false none The Order Item ID.

order_item_list

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "/v2/self-serve/portals/234/orders/150211/order-items",
  "data": [
    {
      "object": "order-item",
      "self": "/v2/self-serve/portals/234/orders/150211/order-items/582002",
      "id": 582002,
      "order": 150211,
      "portal_zone": 148,
      "portal_channel": null,
      "campaign": 56895,
      "from_date": "2020-11-26 00:00:00",
      "to_date": "2020-11-30 29:59:59",
      "type": "template",
      "destination": "https://example.com",
      "custom_html": "",
      "alt_text": "",
      "keywords": "golf,soccer,tennis",
      "file": null,
      "template": 71,
      "template_variables": [
        {
          "id": 234,
          "value": "Acme Fresh Soap"
        }
      ],
      "cpm": 5,
      "cpc": null,
      "quantity": null,
      "multipler": 1,
      "impressions": 50000,
      "clicks": 562,
      "conversion": 0,
      "impressions_multi": 50000,
      "bid_amount": 5,
      "daily_limit": 50,
      "total_limit": 200,
      "serving_status": "Serving"
    }
  ]
}

Properties

Name Type Required Restrictions Description
object string false none For list resources, the value of 'object' will always be 'list'.
has_more boolean false none True if there are more data beyond the offset and limit.
limit integer false none The number of resources to return. Sometimes called 'take'
offset integer false none The number of resources in sequenece to ignore, sometimes called 'skip'.
url string false none The url of the current resource list.
data [order_item_get] false none none

order_item_pause

{}

Properties

None

order_item_pause_get

{
  "object": "order-item",
  "self": "/v2/self-serve/portals/234/orders/150211/order-items/582002",
  "id": 582002,
  "order": 150211,
  "portal_zone": 148,
  "portal_channel": null,
  "campaign": 56895,
  "from_date": "2020-11-26 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "type": "template",
  "destination": "https://example.com",
  "custom_html": "",
  "alt_text": "",
  "keywords": "golf,soccer,tennis",
  "file": null,
  "template": 71,
  "template_variables": [
    {
      "id": 234,
      "value": "Acme Fresh Soap"
    }
  ],
  "cpm": 5,
  "cpc": null,
  "quantity": null,
  "multipler": 1,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "bid_amount": 5,
  "daily_limit": 50,
  "total_limit": 200,
  "serving_status": "Paused"
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
order integer false none The identifier of the Order being used.
portal_zone integer false none The identifier of a valid Portal Zone ID.
portal_channel integer false none The identifier of a valid Portal Channel ID.
campaign integer false none The identifier of a valid Campaign ID.
from_date string(date-time) false none The start date for the Order Item.
to_date string(date-time) false none The end date for the Order Item.
type string false none The ad type between 'image', 'html5', 'raw' or 'template'.
destination string false none The click destination URL.
custom_html string false none Body contents of a Custom HTML'raw' ad (aka 3rd Party).
alt_text string false none The alt text for an 'image' ad.
keywords string false none A keyword string.
file integer false none The ID of an image, video or zip file.
template integer false none The identifier of a valid Native Ad Template.
template_variables [template_variable_value] false none An array of JSON objects of the respective Native Ad Template variable IDs and user provided values. Values can be strings or numeric e.g. an image ID.
cpm float false none The current CPM value in relation to the portal_zone (also used as the Bid floor).
cpc float false none The current CPC value in relation to the portal_zone (also used as the Bid floor).
quantity integer false none The number of impression set. Only order-based
multipler integer false none A DOOH impression mulitplier value.
impressions integer false none The number of impressions served.
clicks integer false none The number of clicks made.
conversion integer false none The number of conversions made.
impressions_multi integer false none The number of impressions served in relation to a multiplier.
bid_amount float false none The Bid amount. Only auction-based
daily_limit float false none A daily money limit. Only auction-based
total_limit float false none A total money limit. Only auction-based
serving_status string false none The serving status of the Order Item.

order_item_resume

{}

Properties

None

order_list

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "/v2/self-serve/portals/234/orders",
  "data": [
    {
      "object": "order",
      "self": "/v2/self-serve/portals/234/orders/150211",
      "id": 150211,
      "portal": 234,
      "customer": 20546,
      "from_date": "2020-11-28 00:00:00",
      "to_date": "2020-11-30 29:59:59",
      "reject_message": null,
      "reject_email": null,
      "item_count": 1,
      "total_cost": 0,
      "amount_paid": 0,
      "credit_used": 0,
      "incomplete_refund": 0,
      "quantiy": 0,
      "impressions": 50000,
      "clicks": 562,
      "conversion": 0,
      "impressions_multi": 50000,
      "tax_rate": 0,
      "type": "auction",
      "finalized_date": "2020-10-27 15:47:07",
      "order_process_date": "2020-10-27 16:43:07",
      "completed_date": "2020-12-01 00:05:01",
      "created_date": "2020-10-24 15:43:07",
      "order_items": [
        {
          "id": 184751
        }
      ],
      "status": "APPROVED",
      "serving_status": "Serving"
    }
  ]
}

Properties

Name Type Required Restrictions Description
object string false none For list resources, the value of 'object' will always be 'list'.
has_more boolean false none True if there are more data beyond the offset and limit.
limit integer false none The number of resources to return. Sometimes called 'take'
offset integer false none The number of resources in sequenece to ignore, sometimes called 'skip'.
url string false none The url of the current resource list.
data [order_get] false none none

order_pause

{}

Properties

None

order_pause_get

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ],
  "status": "APPROVED",
  "serving_status": "Paused"
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
portal integer false none Identifier of the Portal.
customer integer false none Identifier of the Customer.
from_date string(date-time) false none The earliest starting date for the Order.
to_date string(date-time) false none The latest end date for the Order.
reject_message string false none The message given for a rejected Order.
reject_email string false none The email address with which a Reject message is sent.
item_count integer false none The number of Order Items in the Order.
total_cost integer false none The total cost of the Order. Only order-based
amount_paid integer false none The amount paid as a processed payment. Only order-based
credit_used integer false none The funds used as part of a balance credit. Only order-based
incomplete_refund integer false none Any funds returned as credit. Only order-based
quantiy integer false none The total impression quantity to be used for serving. Only order-based
impressions integer false none The number of impressions served.
clicks integer false none The number of clicks made.
conversion integer false none The number of conversions made.
impressions_multi integer false none The number of impressions served in relation to a multiplier. Only DOOH
tax_rate float false none A tax rate to apply to orders or payments.
type string false none Whether the Order uses auction-based or order-based serving.
finalized_date string(date-time) false none The date signified tha approval or rejection of the Order
order_process_date string(date-time) false none The date after which the Order is automatically approved or rejected.
completed_date string(date-time) false none The date signifying the end of all serving for the Order.
created_date string(date-time) false none The date and time when the Order was created.
order_items [order_item_id] false none An array of Order Item IDs for the Order
status string false none The Order status.
serving_status string false none The serving status of the Order.

order_post

{
  "cart": 848,
  "customer": 20156
}

Properties

Name Type Required Restrictions Description
cart integer true none The Self-Serve Cart ID
customer integer true none A valid Self-Serve Customer ID.

order_reject

{}

Properties

None

order_reject_get

{
  "object": "order",
  "self": "/v2/self-serve/portals/234/orders/150211",
  "id": 150211,
  "portal": 234,
  "customer": 20546,
  "from_date": "2020-11-28 00:00:00",
  "to_date": "2020-11-30 29:59:59",
  "reject_message": null,
  "reject_email": null,
  "item_count": 1,
  "total_cost": 0,
  "amount_paid": 0,
  "credit_used": 0,
  "incomplete_refund": 0,
  "quantiy": 0,
  "impressions": 50000,
  "clicks": 562,
  "conversion": 0,
  "impressions_multi": 50000,
  "tax_rate": 0,
  "type": "auction",
  "finalized_date": "2020-10-27 15:47:07",
  "order_process_date": "2020-10-27 16:43:07",
  "completed_date": "2020-12-01 00:05:01",
  "created_date": "2020-10-24 15:43:07",
  "order_items": [
    {
      "id": 184751
    }
  ],
  "status": "REJECTED",
  "serving_status": "Rejected"
}

Properties

Name Type Required Restrictions Description
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
portal integer false none Identifier of the Portal.
customer integer false none Identifier of the Customer.
from_date string(date-time) false none The earliest starting date for the Order.
to_date string(date-time) false none The latest end date for the Order.
reject_message string false none The message given for a rejected Order.
reject_email string false none The email address with which a Reject message is sent.
item_count integer false none The number of Order Items in the Order.
total_cost integer false none The total cost of the Order. Only order-based
amount_paid integer false none The amount paid as a processed payment. Only order-based
credit_used integer false none The funds used as part of a balance credit. Only order-based
incomplete_refund integer false none Any funds returned as credit. Only order-based
quantiy integer false none The total impression quantity to be used for serving. Only order-based
impressions integer false none The number of impressions served.
clicks integer false none The number of clicks made.
conversion integer false none The number of conversions made.
impressions_multi integer false none The number of impressions served in relation to a multiplier. Only DOOH
tax_rate float false none A tax rate to apply to orders or payments.
type string false none Whether the Order uses auction-based or order-based serving.
finalized_date string(date-time) false none The date signified tha approval or rejection of the Order
order_process_date string(date-time) false none The date after which the Order is automatically approved or rejected.
completed_date string(date-time) false none The date signifying the end of all serving for the Order.
created_date string(date-time) false none The date and time when the Order was created.
order_items [order_item_id] false none An array of Order Item IDs for the Order
status string false none The Order status.
serving_status string false none The serving status of the Order.

order_resume

{}

Properties

None

portal

{
  "name": "My Portal",
  "subdomain_name": "myportal",
  "logo": 12345,
  "support_email": "support@mycompany.com",
  "order_process_days": 5,
  "default_order_action": "reject",
  "is_public": false,
  "timezone": "America/Los_Angeles",
  "set_min_order_value": false,
  "min_order_value": false,
  "set_max_order_value": 50,
  "max_order_value": 2000,
  "enabled": "2020-10-27 15:43:07",
  "tax_rate": 8.5,
  "footer_link1_name": "Terms of Service",
  "footer_link1_url": "https://mycompany.com/terms-of-service",
  "footer_link2_name": null,
  "footer_link2_url": null
}

Properties

Name Type Required Restrictions Description
name string false none Name of the Portal
subdomain_name string false none The subdomain name for the Portal.
logo integer false none The ID of the logo image.
support_email string false none The email address for order submission and advertiser support.
order_process_days integer false none The number of days before an order is automatically approve or rejected.
default_order_action string false none Where to approve or reject and order when it has reached the auto-process date.
is_public boolean false none Whether the Portal requires initial login.
timezone string false none The timezone in use for the Portal.
set_min_order_value boolean false none Whether a minimum order value is used.
min_order_value float false none The minimum allowed order amount.
set_max_order_value boolean false none Whether a maximum order value is used.
max_order_value float false none The maxiumm allowed order amount.
enabled boolean false none Whether the Portal is enabled for use.
tax_rate float false none A tax rate to apply to orders or payments.
footer_link1_name string false none Name of Footer link #1.
footer_link1_url string false none URL of Footer link #1.
footer_link2_name string false none Name of Footer link #2.
footer_link2_url string false none URL of Footer link #2

portal_get

{
  "name": "My Portal",
  "subdomain_name": "myportal",
  "logo": 12345,
  "support_email": "support@mycompany.com",
  "order_process_days": 5,
  "default_order_action": "reject",
  "is_public": false,
  "timezone": "America/Los_Angeles",
  "set_min_order_value": false,
  "min_order_value": false,
  "set_max_order_value": 50,
  "max_order_value": 2000,
  "enabled": "2020-10-27 15:43:07",
  "tax_rate": 8.5,
  "footer_link1_name": "Terms of Service",
  "footer_link1_url": "https://mycompany.com/terms-of-service",
  "footer_link2_name": null,
  "footer_link2_url": null,
  "object": "portal",
  "self": "/v2/self-serve/portals/234",
  "id": 234,
  "portal_type": "publisher",
  "custom_domain": "https://orders.mycompany.com",
  "custom_domain_requested": false,
  "publisher": 714988,
  "zone_count": 3,
  "use_zero_cost": false,
  "type": "auction",
  "created_date": "2020-10-27 15:43:07"
}

Properties

Name Type Required Restrictions Description
name string false none Name of the Portal
subdomain_name string false none The subdomain name for the Portal.
logo integer false none The ID of the logo image.
support_email string false none The email address for order submission and advertiser support.
order_process_days integer false none The number of days before an order is automatically approve or rejected.
default_order_action string false none Where to approve or reject and order when it has reached the auto-process date.
is_public boolean false none Whether the Portal requires initial login.
timezone string false none The timezone in use for the Portal.
set_min_order_value boolean false none Whether a minimum order value is used.
min_order_value float false none The minimum allowed order amount.
set_max_order_value boolean false none Whether a maximum order value is used.
max_order_value float false none The maxiumm allowed order amount.
enabled boolean false none Whether the Portal is enabled for use.
tax_rate float false none A tax rate to apply to orders or payments.
footer_link1_name string false none Name of Footer link #1.
footer_link1_url string false none URL of Footer link #1.
footer_link2_name string false none Name of Footer link #2.
footer_link2_url string false none URL of Footer link #2
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
portal_type string false none Whether this is a publisher or channel Portal.
custom_domain string false none The URL string for a custom domain.
custom_domain_requested boolean false none Whether a custom domain had been requested for use.
publisher integer false none The ID of respective publisher, if applicable.
zone_count integer false none The number of Self-Serve zones in use for the Portal.
use_zero_cost boolean false none Whether the Portal uses no costs.
type string false none Whether the Portal uses auction-based or order-based serving.
created_date string(date-time) false none The date and time when the portal was created.

portal_list

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "/v2/self-serve/portals",
  "data": [
    {
      "name": "My Portal",
      "subdomain_name": "myportal",
      "logo": 12345,
      "support_email": "support@mycompany.com",
      "order_process_days": 5,
      "default_order_action": "reject",
      "is_public": false,
      "timezone": "America/Los_Angeles",
      "set_min_order_value": false,
      "min_order_value": false,
      "set_max_order_value": 50,
      "max_order_value": 2000,
      "enabled": "2020-10-27 15:43:07",
      "tax_rate": 8.5,
      "footer_link1_name": "Terms of Service",
      "footer_link1_url": "https://mycompany.com/terms-of-service",
      "footer_link2_name": null,
      "footer_link2_url": null,
      "object": "portal",
      "self": "/v2/self-serve/portals/234",
      "id": 234,
      "portal_type": "publisher",
      "custom_domain": "https://orders.mycompany.com",
      "custom_domain_requested": false,
      "publisher": 714988,
      "zone_count": 3,
      "use_zero_cost": false,
      "type": "auction",
      "created_date": "2020-10-27 15:43:07"
    }
  ]
}

Properties

Name Type Required Restrictions Description
object string false none For list resources, the value of 'object' will always be 'list'.
has_more boolean false none True if there are more data beyond the offset and limit.
limit integer false none The number of resources to return. Sometimes called 'take'
offset integer false none The number of resources in sequenece to ignore, sometimes called 'skip'.
url string false none The url of the current resource list.
data [portal_get] false none none

portal_zone

{
  "name": "Native Listing",
  "portal": 234,
  "publisher": 714988,
  "zone": 104383,
  "cpm": 5,
  "cpc": 0,
  "multiplier": 1,
  "width": 300,
  "height": 250,
  "keywords": "golf,soccer,tennis",
  "keyword_requirement": "ONE",
  "languages": null,
  "max_file_size": 1024,
  "more_info_url": "",
  "allow_image": false,
  "allow_rich_media": false,
  "allow_3rd_party": false,
  "allow_templates": true,
  "templates": [
    12,
    71
  ],
  "keyword_templates": [
    4
  ],
  "inventory_type": "MANUAL",
  "inventory_percentage": 80,
  "inventory_manual": 1000000,
  "inventory_30_day": 1268459,
  "enabled": true
}

Properties

Name Type Required Restrictions Description
name string false none The name of the Portal Zone
portal integer false none The identifier of the Portal being used.
publisher integer false none The identifier of the Publisher associated with the Portal.
zone integer false none The identifier of the parent Zone.
cpm integer false none The CPM value (also used as the Bid floor).
cpc integer false none The CPC value (also used as the Bid floor).
multiplier integer false none A DOOH impression multiplier. Only DOOH
width integer false none Zone width, if appliable.
height integer false none Zone height, if appliable.
keywords string false none A keyword string.
keyword_requirement string false none Whether one or more keywords are required from 'NONE', 'ONE' (exactly one), 'MULTIPLE' (one or more).
languages [integer] false none none
max_file_size integer false none A file size maximum in KiB's (kibibytes).
more_info_url string false none A URL string for use as a external link for more info.
allow_image boolean false none Whether to provide the image ad type
allow_rich_media boolean false none Whether to provide the HTML5 Rich Media ad type
allow_3rd_party boolean false none Whether to provide the Custom HTML (3rd Party) ad type
allow_templates boolean false none Whether to provide the Native Ad Template ad type
templates [object] false none An array of objects giving chosen Native Ad templates.
keyword_templates [string] false none An array of string integers giving chosen keyword templates.
inventory_type string false none The chosen inventory type between 'MANUAL' and 'PERCENT'
inventory_percentage integer false none A percetange for use in caculating given inventory.
inventory_manual integer false none A number for use in caculating given inventory.
inventory_30_day integer false none The current 30-day inventory traffic estimation.
enabled boolean false none Whether the Portal Zone is active.

portal_zone_get

{
  "name": "Native Listing",
  "portal": 234,
  "publisher": 714988,
  "zone": 104383,
  "cpm": 5,
  "cpc": 0,
  "multiplier": 1,
  "width": 300,
  "height": 250,
  "keywords": "golf,soccer,tennis",
  "keyword_requirement": "ONE",
  "languages": null,
  "max_file_size": 1024,
  "more_info_url": "",
  "allow_image": false,
  "allow_rich_media": false,
  "allow_3rd_party": false,
  "allow_templates": true,
  "templates": [
    12,
    71
  ],
  "keyword_templates": [
    4
  ],
  "inventory_type": "MANUAL",
  "inventory_percentage": 80,
  "inventory_manual": 1000000,
  "inventory_30_day": 1268459,
  "enabled": true,
  "object": "zone",
  "self": "/v2/self-serve/portal/234/zones/104383",
  "id": 104383,
  "created_date": "2020-10-27 15:43:07"
}

Properties

Name Type Required Restrictions Description
name string false none The name of the Portal Zone
portal integer false none The identifier of the Portal being used.
publisher integer false none The identifier of the Publisher associated with the Portal.
zone integer false none The identifier of the parent Zone.
cpm integer false none The CPM value (also used as the Bid floor).
cpc integer false none The CPC value (also used as the Bid floor).
multiplier integer false none A DOOH impression multiplier. Only DOOH
width integer false none Zone width, if appliable.
height integer false none Zone height, if appliable.
keywords string false none A keyword string.
keyword_requirement string false none Whether one or more keywords are required from 'NONE', 'ONE' (exactly one), 'MULTIPLE' (one or more).
languages [integer] false none none
max_file_size integer false none A file size maximum in KiB's (kibibytes).
more_info_url string false none A URL string for use as a external link for more info.
allow_image boolean false none Whether to provide the image ad type
allow_rich_media boolean false none Whether to provide the HTML5 Rich Media ad type
allow_3rd_party boolean false none Whether to provide the Custom HTML (3rd Party) ad type
allow_templates boolean false none Whether to provide the Native Ad Template ad type
templates [object] false none An array of objects giving chosen Native Ad templates.
keyword_templates [string] false none An array of string integers giving chosen keyword templates.
inventory_type string false none The chosen inventory type between 'MANUAL' and 'PERCENT'
inventory_percentage integer false none A percetange for use in caculating given inventory.
inventory_manual integer false none A number for use in caculating given inventory.
inventory_30_day integer false none The current 30-day inventory traffic estimation.
enabled boolean false none Whether the Portal Zone is active.
object string false none A string denoting the current resource being requested or affected.
self string false none The relative URL of the current resource being requested or affected.
id integer false none The current resource identifier(ID).
created_date string(date-time) false none The date and time when the zone was created.

portal_zone_list

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "/v2/self-serve/portals/234/zones",
  "data": [
    {
      "name": "Native Listing",
      "portal": 234,
      "publisher": 714988,
      "zone": 104383,
      "cpm": 5,
      "cpc": 0,
      "multiplier": 1,
      "width": 300,
      "height": 250,
      "keywords": "golf,soccer,tennis",
      "keyword_requirement": "ONE",
      "languages": null,
      "max_file_size": 1024,
      "more_info_url": "",
      "allow_image": false,
      "allow_rich_media": false,
      "allow_3rd_party": false,
      "allow_templates": true,
      "templates": [
        12,
        71
      ],
      "keyword_templates": [
        4
      ],
      "inventory_type": "MANUAL",
      "inventory_percentage": 80,
      "inventory_manual": 1000000,
      "inventory_30_day": 1268459,
      "enabled": true,
      "object": "zone",
      "self": "/v2/self-serve/portal/234/zones/104383",
      "id": 104383,
      "created_date": "2020-10-27 15:43:07"
    }
  ]
}

Properties

Name Type Required Restrictions Description
object string false none For list resources, the value of 'object' will always be 'list'.
has_more boolean false none True if there are more data beyond the offset and limit.
limit integer false none The number of resources to return. Sometimes called 'take'
offset integer false none The number of resources in sequenece to ignore, sometimes called 'skip'.
url string false none The url of the current resource list.
data [portal_zone_get] false none none

resource_get

{
  "object": "string",
  "self": "string",
  "id": 1234
}

Properties

Name Type Required Restrictions Description
object string false read-only A string denoting the current resource being requested or affected.
self string false read-only The relative URL of the current resource being requested or affected.
id integer false read-only The current resource identifier(ID).

resource_list

{
  "object": "list",
  "has_more": false,
  "limit": 10,
  "offset": 0,
  "url": "list",
  "data": [
    {
      "object": "string",
      "self": "string",
      "id": 1234
    }
  ]
}

Properties

Name Type Required Restrictions Description
object string false none For list resources, the value of 'object' will always be 'list'.
has_more boolean false none True if there are more data beyond the offset and limit.
limit integer false none The number of resources to return. Sometimes called 'take'
offset integer false none The number of resources in sequenece to ignore, sometimes called 'skip'.
url string false none The url of the current resource list.
data [resource_get] false none The resources in this list

template_variable_value

{
  "id": 234,
  "value": "Acme Fresh Soap"
}

Properties

Name Type Required Restrictions Description
id integer false none The template variable ID.
value string false none The user provided value for the variable.

vast_order_item_id

{
  "id": 44563
}

Properties

Name Type Required Restrictions Description
id integer false none The VAST Order Item ID.