NAV Navigation
HTTP PHP JavaScript Node.JS GO Python Ruby

Optimise Network API v1.0.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.

This is the documentation for the Optimise Network API.

Authentication

To authenticate an apikey must be specified in the header of the request. The API Key can be generated by creating a Service Account in Insights Dashboard.

Base URLs:

Campaigns

List Campaigns

Code samples

GET https://public.api.optimisemedia.com/v1/campaigns/?contactId=type,string,format,int64&agencyId=type,string,format,int64 HTTP/1.1
Host: public.api.optimisemedia.com
Accept: application/json

 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://public.api.optimisemedia.com/v1/campaigns/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://public.api.optimisemedia.com/v1/campaigns/',
  method: 'get',
  data: '?contactId=type,string,format,int64&agencyId=type,string,format,int64',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://public.api.optimisemedia.com/v1/campaigns/?contactId=type,string,format,int64&agencyId=type,string,format,int64',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://public.api.optimisemedia.com/v1/campaigns/", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://public.api.optimisemedia.com/v1/campaigns/', params={
  'contactId': {
  "type": "string",
  "format": "int64"
},  'agencyId': {
  "type": "string",
  "format": "int64"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://public.api.optimisemedia.com/v1/campaigns/',
  params: {
  'contactId' => 'string(int64)',
'agencyId' => 'string(int64)'
}, headers: headers

p JSON.parse(result)

GET /campaigns/

Gets a list of campaigns

Parameters

</tbody>
Name In Type Required Description Enumerated Values
contactId query string(int64) true contactId of the advertiser or publisher
agencyId query string(int64) true id of the agency for commission groups
contactType query string(int64) false Contact Type
offset query string(int64) false How many items to skip for pagination
limit query string(int64) false How many items to skip for pagination
showInactive query string false contact deactivated flag
sortColumnName query string false Name of column to sort by
sortDirection query string false direction of column to sort 'asc'/'desc'
statuses query string false status of the campaigns
campaignTypeIds query string false ids of the campaign types
advertiserContactIds query string false ids of the advertisers
payoutTypeIds query string false ids of the payout Type
sectorIds query string false ids of the sectors
platformTypeIds query string false ids of the platforms
countryIds query string false ids of the countries
returnPublishersForCampaign query string false If true it will return the publishers for the returned campaigns
orderBy query string false ordering the results (productId, alphabetically, launchDate)

Example responses

200 Response

{
  "oneOf": [
    {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "integer"
          },
          "contactId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "payout": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            }
          },
          "vertical": {
            "type": "object",
            "properties": {
              "primary": {
                "type": "string"
              },
              "secondary": {
                "type": "string"
              },
              "campaignId": {
                "type": "integer"
              }
            }
          },
          "publishers": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "status": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "integer"
          },
          "campaignId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "productTypeName": {
            "type": "string"
          },
          "countryName": {
            "type": "string"
          },
          "platformName": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "liveDate": {
            "type": "string"
          },
          "rejectedDate": {
            "type": "string"
          },
          "appliedDate": {
            "type": "string"
          },
          "cancelledDate": {
            "type": "string"
          },
          "advertiserId": {
            "type": "string"
          },
          "advertiserName": {
            "type": "string"
          },
          "EPC": {
            "type": "string"
          },
          "commission": {
            "type": "object",
            "properties": {
              "min": {
                "type": "string"
              },
              "minType": {
                "type": "string"
              },
              "max": {
                "type": "string"
              },
              "maxType": {
                "type": "string"
              }
            }
          },
          "vertical": {
            "type": "object",
            "properties": {
              "primary": {
                "type": "string"
              },
              "secondary": {
                "type": "string"
              }
            }
          },
          "payout": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful response Inline
403 Forbidden Access denied None
500 Internal Server Error Internal error None

Response Schema

Get Campaign

Code samples

GET https://public.api.optimisemedia.com/v1/campaigns/{productId}?contactId=type,string,format,int64&agencyId=type,string,format,int64 HTTP/1.1
Host: public.api.optimisemedia.com
Accept: application/json

 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://public.api.optimisemedia.com/v1/campaigns/{productId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://public.api.optimisemedia.com/v1/campaigns/{productId}',
  method: 'get',
  data: '?contactId=type,string,format,int64&agencyId=type,string,format,int64',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://public.api.optimisemedia.com/v1/campaigns/{productId}?contactId=type,string,format,int64&agencyId=type,string,format,int64',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://public.api.optimisemedia.com/v1/campaigns/{productId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://public.api.optimisemedia.com/v1/campaigns/{productId}', params={
  'contactId': {
  "type": "string",
  "format": "int64"
},  'agencyId': {
  "type": "string",
  "format": "int64"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://public.api.optimisemedia.com/v1/campaigns/{productId}',
  params: {
  'contactId' => 'string(int64)',
'agencyId' => 'string(int64)'
}, headers: headers

p JSON.parse(result)

GET /campaigns/{productId}

Gets a campaign by id. NOTE: Does not yet support requests from the Advertiser scope.

Parameters

</tbody>
Name In Type Required Description Enumerated Values
productId path string(int64) true Id of the campaign
contactId query string(int64) true contactId of the advertiser or publisher
agencyId query string(int64) true id of the agency for commission groups

Example responses

200 Response

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "PID/CampaignId"
        },
        "campaignId": {
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "Campaign name"
        },
        "description": {
          "type": "string",
          "description": "Campaign description"
        },
        "status": {
          "type": "string",
          "description": "Status of the campaign"
        },
        "productTypeName": {
          "type": "string",
          "description": "Campaign type"
        },
        "countryName": {
          "type": "string",
          "description": "Primary market of the campaign"
        },
        "platformName": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "validationWindow": {
          "type": "string"
        },
        "validationPeriod": {
          "type": "string"
        },
        "liveDate": {
          "type": "string"
        },
        "rejectedDate": {
          "type": "string"
        },
        "appliedDate": {
          "type": "string"
        },
        "cancelledDate": {
          "type": "string"
        },
        "advertiserId": {
          "type": "string"
        },
        "advertiserName": {
          "type": "string",
          "description": "Advertiser Name"
        },
        "EPC": {
          "type": "string",
          "description": "Averge EPC for the campaign"
        },
        "autoCrossSell": {
          "type": "string"
        },
        "deepLinkEnabled": {
          "type": "string",
          "description": "Indicates whether deeplinking is enabled"
        },
        "uidEnabled": {
          "type": "string",
          "description": "Indicates whether UID/SubID is enabled"
        },
        "cookieDuration": {
          "type": "string",
          "description": "The cookie duration in days"
        },
        "dailyCap": {
          "type": "string"
        },
        "firstLastCookie": {
          "type": "string",
          "description": "Indicates whether attribution is based on first or last cookie"
        },
        "cashback": {
          "type": "string",
          "description": "Indicates whether cashback promotion is permitted for the campaign"
        },
        "voucher": {
          "type": "string",
          "description": "Indicates whether voucher/coupon promotion is permitted for the campaign"
        },
        "brandBidding": {
          "type": "string",
          "description": "Indicates whether brand bidding promotion is permitted for the campaign"
        },
        "email": {
          "type": "string",
          "description": "Indicates whether email promotion is permitted for the campaign"
        },
        "socialMedia": {
          "type": "string",
          "description": "Indicates whether social media promotion is permitted for the campaign"
        },
        "behaviouralRetargeting": {
          "type": "string",
          "description": "Indicates whether behavioural retargeting promotion is permitted for the campaign"
        },
        "adultContent": {
          "type": "string",
          "description": "Indicates whether adult promotion is permitted for the campaign"
        },
        "fCAAuthorised": {
          "type": "string",
          "description": "Indicates whether the campaign requires FCA authorised publishers"
        },
        "popUnderUp": {
          "type": "string",
          "description": "Indicates whether popup promotion is permitted for the campaign"
        },
        "postClickView": {
          "type": "string"
        },
        "agencyName": {
          "type": "string",
          "description": "Optimise Agency which operates the campaign"
        },
        "containerTagType": {
          "type": "string"
        },
        "thirdPartyTracking": {
          "type": "string"
        },
        "postback": {
          "type": "string"
        },
        "commission": {
          "type": "object",
          "description": "Publisher commission rates for the campaign",
          "properties": {
            "min": {
              "type": "string",
              "description": "Minimum threshold for the tier"
            },
            "minType": {
              "type": "string",
              "description": "indicates the type of Commission"
            },
            "max": {
              "type": "string",
              "description": "Maximum threshold for the tier"
            },
            "maxType": {
              "type": "string",
              "description": "indicates the type of Commission"
            }
          }
        },
        "vertical": {
          "type": "object",
          "properties": {
            "primary": {
              "type": "string",
              "description": "Primary vertical of the campaign"
            },
            "secondary": {
              "type": "string",
              "description": "Secondary vertical of the campaign"
            }
          }
        },
        "payout": {
          "type": "object",
          "properties": {
            "currency": {
              "type": "string",
              "description": "Payout currency code in 3 digit ISO"
            },
            "type": {
              "type": "string"
            }
          }
        },
        "baseTrackingUrl": {
          "type": "string",
          "description": "The base tracking URL of the campaign"
        },
        "markets": {
          "type": "array",
          "description": "The markets in which the campaign operates",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "CountryId of the markets in which the campaign operates"
              },
              "name": {
                "type": "string",
                "description": "Name of the markets in which the campaign operates"
              },
              "primary": {
                "type": "boolean",
                "description": "Indicates if the market is the primary market"
              }
            }
          }
        }
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful response Inline
403 Forbidden Access denied None
500 Internal Server Error Internal error None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id integer false none PID/CampaignId
» campaignId string false none none
» name string false none Campaign name
» description string false none Campaign description
» status string false none Status of the campaign
» productTypeName string false none Campaign type
» countryName string false none Primary market of the campaign
» platformName string false none none
» currencyCode string false none none
» validationWindow string false none none
» validationPeriod string false none none
» liveDate string false none none
» rejectedDate string false none none
» appliedDate string false none none
» cancelledDate string false none none
» advertiserId string false none none
» advertiserName string false none Advertiser Name
» EPC string false none Averge EPC for the campaign
» autoCrossSell string false none none
» deepLinkEnabled string false none Indicates whether deeplinking is enabled
» uidEnabled string false none Indicates whether UID/SubID is enabled
» cookieDuration string false none The cookie duration in days
» dailyCap string false none none
» firstLastCookie string false none Indicates whether attribution is based on first or last cookie
» cashback string false none Indicates whether cashback promotion is permitted for the campaign
» voucher string false none Indicates whether voucher/coupon promotion is permitted for the campaign
» brandBidding string false none Indicates whether brand bidding promotion is permitted for the campaign
» email string false none Indicates whether email promotion is permitted for the campaign
» socialMedia string false none Indicates whether social media promotion is permitted for the campaign
» behaviouralRetargeting string false none Indicates whether behavioural retargeting promotion is permitted for the campaign
» adultContent string false none Indicates whether adult promotion is permitted for the campaign
» fCAAuthorised string false none Indicates whether the campaign requires FCA authorised publishers
» popUnderUp string false none Indicates whether popup promotion is permitted for the campaign
» postClickView string false none none
» agencyName string false none Optimise Agency which operates the campaign
» containerTagType string false none none
» thirdPartyTracking string false none none
» postback string false none none
» commission object false none Publisher commission rates for the campaign
»» min string false none Minimum threshold for the tier
»» minType string false none indicates the type of Commission
»» max string false none Maximum threshold for the tier
»» maxType string false none indicates the type of Commission
» vertical object false none none
»» primary string false none Primary vertical of the campaign
»» secondary string false none Secondary vertical of the campaign
» payout object false none none
»» currency string false none Payout currency code in 3 digit ISO
»» type string false none none
» baseTrackingUrl string false none The base tracking URL of the campaign
» markets [object] false none The markets in which the campaign operates
»» id integer false none CountryId of the markets in which the campaign operates
»» name string false none Name of the markets in which the campaign operates
»» primary boolean false none Indicates if the market is the primary market

Invoices

List Invoices

Code samples

GET https://public.api.optimisemedia.com/v1/invoices/ HTTP/1.1
Host: public.api.optimisemedia.com
Accept: application/json

 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://public.api.optimisemedia.com/v1/invoices/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://public.api.optimisemedia.com/v1/invoices/',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://public.api.optimisemedia.com/v1/invoices/',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://public.api.optimisemedia.com/v1/invoices/", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://public.api.optimisemedia.com/v1/invoices/', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://public.api.optimisemedia.com/v1/invoices/',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /invoices/

Gets a list of invoices for an Advertiser

Parameters

</tbody>
Name In Type Required Description Enumerated Values
agencyId query string(int32) false Agency Id
startDate query string(datetime) false Start date
endDate query string(datetime) false End date
advertiserId query string(int64) false Advertiser Id
status query string false Status
accountManager query string(int64) false Status
showPayments query string false Show the payments
invoiceId query string(int64) false Invoice Id
culture query string false Invoice Id
invoiceTypeId query string(int32) false The type on invoice
includeDeleted query string false Show the deleted invoices
campaignName query string false Name of the campaign
showOnlyInvoicesWithNoOutstanding query string false Show invoices that are not outstanding
commissionTypeId query string(int32) false Commission Type
currencyId query string(int32) false currencyId
contactId query string(int32) false Contact Id
agencyUser query string(int32) false Agency User

Example responses

200 Response

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "invoiceId": {
        "type": "integer",
        "format": "int64",
        "description": "The Optimise ID of the invoice"
      },
      "parentInvoiceId": {
        "type": "integer",
        "format": "int64",
        "description": "The ID of a parent invoice (if linked)"
      },
      "accountManager": {
        "type": "string",
        "description": "The Account Manager of the Advertiser account"
      },
      "advertiser": {
        "type": "string",
        "description": "The Advertiser associated with the invoice"
      },
      "date": {
        "type": "string"
      },
      "net": {
        "type": "number",
        "format": "currency",
        "description": "The net value of the invoice"
      },
      "vat": {
        "type": "number",
        "format": "currency",
        "description": "The VAT/GST/Service tax applied to the invoice"
      },
      "gross": {
        "type": "number",
        "format": "currency",
        "description": "The gross amount of the invoice"
      },
      "dateCreated": {
        "type": "string",
        "format": "date-time"
      },
      "dateSent": {
        "type": "string",
        "format": "date-time",
        "description": "The date & time the invoice was created"
      },
      "status": {
        "type": "string",
        "description": "The current status of the invoice"
      },
      "invoiceType": {
        "type": "string",
        "description": "The type of invoice"
      },
      "commissionType": {
        "type": "string"
      },
      "deleted": {
        "type": "boolean",
        "description": "Indicates whether the invoice has been marked as deleted"
      },
      "receipts": {
        "type": "number",
        "format": "currency"
      },
      "oustanding": {
        "type": "number",
        "format": "currency",
        "description": "The outstanding balance on the invoice"
      },
      "currencySymbol": {
        "type": "string",
        "description": "The Currency symbol associated with the invoice"
      },
      "poNumber": {
        "type": "string",
        "description": "The Purchase Order Number associated with the invoice"
      },
      "poValue": {
        "type": "number",
        "format": "currency"
      },
      "poDifference": {
        "type": "number",
        "format": "currency"
      },
      "invoiceFileName": {
        "type": "string"
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Successful response Inline
400 Bad Request Bad request string
401 Unauthorized Unauthorised request string

Response Schema

Status Code 200

Name Type Required Restrictions Description
» invoiceId integer(int64) false none The Optimise ID of the invoice
» parentInvoiceId integer(int64) false none The ID of a parent invoice (if linked)
» accountManager string false none The Account Manager of the Advertiser account
» advertiser string false none The Advertiser associated with the invoice
» date string false none none
» net number(currency) false none The net value of the invoice
» vat number(currency) false none The VAT/GST/Service tax applied to the invoice
» gross number(currency) false none The gross amount of the invoice
» dateCreated string(date-time) false none none
» dateSent string(date-time) false none The date & time the invoice was created
» status string false none The current status of the invoice
» invoiceType string false none The type of invoice
» commissionType string false none none
» deleted boolean false none Indicates whether the invoice has been marked as deleted
» receipts number(currency) false none none
» oustanding number(currency) false none The outstanding balance on the invoice
» currencySymbol string false none The Currency symbol associated with the invoice
» poNumber string false none The Purchase Order Number associated with the invoice
» poValue number(currency) false none none
» poDifference number(currency) false none none
» invoiceFileName string false none none

Vouchercodes

List Voucher Codes

Code samples

GET https://public.api.optimisemedia.com/v1/vouchercodes/?agencyId=type,string,format,int64&contactId=type,string,format,int64 HTTP/1.1
Host: public.api.optimisemedia.com
Accept: application/json

 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://public.api.optimisemedia.com/v1/vouchercodes/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://public.api.optimisemedia.com/v1/vouchercodes/',
  method: 'get',
  data: '?agencyId=type,string,format,int64&contactId=type,string,format,int64',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://public.api.optimisemedia.com/v1/vouchercodes/?agencyId=type,string,format,int64&contactId=type,string,format,int64',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://public.api.optimisemedia.com/v1/vouchercodes/", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://public.api.optimisemedia.com/v1/vouchercodes/', params={
  'agencyId': {
  "type": "string",
  "format": "int64"
},  'contactId': {
  "type": "string",
  "format": "int64"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://public.api.optimisemedia.com/v1/vouchercodes/',
  params: {
  'agencyId' => 'string(int64)',
'contactId' => 'string(int64)'
}, headers: headers

p JSON.parse(result)

GET /vouchercodes/

Retrieves offers & voucher code for campaigns that Publishers are promoting.

Parameters

</tbody>
Name In Type Required Description Enumerated Values
agencyId query string(int64) true The agency Id
contactId query string(int64) true The contact Id
advertiserContactId query string(int64) false The advertiser Id
categoryId query string(int32) false The category Id. [Category Lookup Table](https://knowledge.optimisemedia.com/docs/apireference/#file-explorer-categoryid)
active query string false Include active voucher codes
expired query string false Include expired voucher codes
startDate query string(date-time) false The Start date
endDate query string(date-time) false The end date
historyDays query string(int32) false Number of days to search
id query string(int32) false Voucher code Id
pid query string(int32) false The product Id
offset query string(int32) false The offset
limit query string(int32) false The limit
cultureCode query string(cultureCode) false The culture code
exclusive query string false Exlusive

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "readOnly": true,
      "description": "Unique ID of the offer"
    },
    "productId": {
      "type": "integer",
      "format": "int64",
      "description": "The PID/CampaignID associated with the offer"
    },
    "campaignName": {
      "type": "string",
      "description": "The Campaign associated with the offer"
    },
    "companyName": {
      "type": "string",
      "description": "The Advertiser company name"
    },
    "code": {
      "type": "string",
      "description": "The voucher code (if applicable)"
    },
    "description": {
      "type": "string",
      "description": "A description of the offer"
    },
    "activationDate": {
      "type": "string",
      "format": "date-time",
      "description": "The start date of the offer"
    },
    "expiryDate": {
      "type": "string",
      "format": "date-time",
      "description": "The expiry date of the offer"
    },
    "title": {
      "type": "string",
      "description": "The title of the offer"
    },
    "campaignId": {
      "type": "integer",
      "format": "int64",
      "description": "The publisher campaign ID of the offer"
    },
    "deepLinkURL": {
      "type": "string",
      "description": "The advertiser deeplink URL associated with the offer"
    },
    "trackingURL": {
      "type": "string",
      "description": "The tracking URL associated with the offer. Concatenate URL Encoded deepLinkURL to create a complete deeplink tracking URL"
    },
    "addedon": {
      "type": "string",
      "format": "date-time",
      "description": "Date & time the offer was crated"
    },
    "categoryName": {
      "type": "string",
      "description": "The Category of the offer"
    },
    "type": {
      "type": "string",
      "description": "Not in use"
    },
    "discount": {
      "type": "string",
      "description": "Not in use"
    },
    "categoryId": {
      "type": "integer",
      "format": "int32",
      "description": "The categoryId of the offer"
    },
    "status": {
      "type": "string",
      "description": "The current status of the offer"
    },
    "affiliateSpecific": {
      "type": "boolean",
      "description": "Indicates whether the offer is unique to the Publisher requesting"
    },
    "CultureCode": {
      "type": "string",
      "description": "The culture code associated with the offer (used for targeting)"
    },
    "Exclusive": {
      "type": "boolean",
      "description": "Indicates whether the offer is exclusive to Optimise"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK succesful response Inline
404 Not Found Tracking URL not found None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id integer(int32) false read-only Unique ID of the offer
» productId integer(int64) false none The PID/CampaignID associated with the offer
» campaignName string false none The Campaign associated with the offer
» companyName string false none The Advertiser company name
» code string false none The voucher code (if applicable)
» description string false none A description of the offer
» activationDate string(date-time) false none The start date of the offer
» expiryDate string(date-time) false none The expiry date of the offer
» title string false none The title of the offer
» campaignId integer(int64) false none The publisher campaign ID of the offer
» deepLinkURL string false none The advertiser deeplink URL associated with the offer
» trackingURL string false none The tracking URL associated with the offer. Concatenate URL Encoded deepLinkURL to create a complete deeplink tracking URL
» addedon string(date-time) false none Date & time the offer was crated
» categoryName string false none The Category of the offer
» type string false none Not in use
» discount string false none Not in use
» categoryId integer(int32) false none The categoryId of the offer
» status string false none The current status of the offer
» affiliateSpecific boolean false none Indicates whether the offer is unique to the Publisher requesting
» CultureCode string false none The culture code associated with the offer (used for targeting)
» Exclusive boolean false none Indicates whether the offer is exclusive to Optimise

Conversions

List Conversions

Code samples

GET https://public.api.optimisemedia.com/v1/conversions/?agencyId=type,string,format,int64&contactId=type,string,format,int64 HTTP/1.1
Host: public.api.optimisemedia.com
Accept: application/json

 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://public.api.optimisemedia.com/v1/conversions/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://public.api.optimisemedia.com/v1/conversions/',
  method: 'get',
  data: '?agencyId=type,string,format,int64&contactId=type,string,format,int64',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://public.api.optimisemedia.com/v1/conversions/?agencyId=type,string,format,int64&contactId=type,string,format,int64',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://public.api.optimisemedia.com/v1/conversions/", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://public.api.optimisemedia.com/v1/conversions/', params={
  'agencyId': {
  "type": "string",
  "format": "int64"
},  'contactId': {
  "type": "string",
  "format": "int64"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://public.api.optimisemedia.com/v1/conversions/',
  params: {
  'agencyId' => 'string(int64)',
'contactId' => 'string(int64)'
}, headers: headers

p JSON.parse(result)

GET /conversions/

Gets a list of conversions

Parameters

</tbody>
Name In Type Required Description Enumerated Values
agencyId query string(int64) true AgencyId
contactId query string(int64) true MID or AdvertiserId
campaignId query string false Filter conversions by campaign id (for conversionType conversions, conversionsByBasketItem)
advertiserId query string false Filter conversions by advertiser id (for conversionType conversions, conversionsByBasketItem)
publisherId query string false Filter conversions by publisher id (for conversionType conversions & contactType advertiser)
invoicePayoutId query string false Filter conversions by invoice payout id (for coversionType conversionsByPayment)
queryAppGuid query string false Search app guid (for conversionType conversions, conversionsByBasketItem)
queryMerchantRef query string false search merchant ref (for conversionType conversions, conversionsByBasketItem)
queryUid query string false search merchant uid (for conversionType conversions)
status query string false Filter conversions by status (for conversionType conversions, conversionsByBasketItem)

approved

pending

rejected

paymentStatus query string false Filter conversions by payment status (for conversionType conversions)

nextPayment

advertiserInvoiced

awaitingInvoicing

paymentSent

fromDate query string(date) false Filter conversion from after the specified date (required for conversionType conversions, conversionsByBasketItem)
toDate query string(date) false Filter conversion from before the specified date (required for conversionType conversions, conversionsByBasketItem)
dateField query string false The event date field we want to filter down by (required for conversionType conversions, conversionsByBasketItem)

impression

click

conversion

invoice

legacyId query string(int64) false Old legacy conversion id
offset query string false The number of conversions to skip
limit query string false The number of conversions to return
conversionType query string false The type of the conversion to get

conversions

conversionsByPayment

conversionsByBasketItem

Example responses

200 Response

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "conversionId": {
        "type": "string",
        "format": "uuid",
        "readOnly": true
      },
      "advertiserRef": {
        "type": "string",
        "readOnly": true
      },
      "legacyId": {
        "type": "integer",
        "format": "int64",
        "readOnly": true
      },
      "agencyId": {
        "type": "integer",
        "format": "int64",
        "readOnly": true
      },
      "publisherId": {
        "type": "integer",
        "format": "int64",
        "readOnly": true
      },
      "advertiserId": {
        "type": "integer",
        "format": "int64",
        "readOnly": true
      },
      "publisherName": {
        "type": "string",
        "readOnly": true
      },
      "advertiserName": {
        "type": "string",
        "readOnly": true
      },
      "campaignId": {
        "type": "integer",
        "format": "int64",
        "readOnly": true
      },
      "campaignTypeId": {
        "type": "integer",
        "format": "int64",
        "readOnly": true
      },
      "publisherCampaignId": {
        "type": "integer",
        "format": "int64",
        "readOnly": true
      },
      "creativeId": {
        "type": "integer",
        "format": "int64",
        "readOnly": true
      },
      "campaignName": {
        "type": "string",
        "readOnly": true
      },
      "plid": {
        "type": "integer",
        "format": "int32",
        "readOnly": true
      },
      "status": {
        "type": "string",
        "enum": [
          "pending",
          "validated",
          "rejected"
        ]
      },
      "paid": {
        "type": "integer",
        "format": "int64",
        "readOnly": true
      },
      "conversionDate": {
        "type": "string",
        "format": "date-time",
        "readOnly": true
      },
      "clickDate": {
        "type": "string",
        "format": "date-time",
        "readOnly": true
      },
      "impressionDate": {
        "type": "string",
        "format": "date-time",
        "readOnly": true
      },
      "invoiceDate": {
        "type": "string",
        "format": "date-time"
      },
      "calcDate": {
        "type": "string",
        "format": "date-time"
      },
      "lastModifiedDate": {
        "type": "string",
        "format": "date-time",
        "readOnly": true
      },
      "timezone": {
        "type": "string",
        "readOnly": true
      },
      "country": {
        "type": "string",
        "readOnly": true
      },
      "ipAddress": {
        "type": "string",
        "readOnly": true
      },
      "referrer": {
        "type": "string",
        "readOnly": true
      },
      "conversionValue": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "readOnly": true
          },
          "amount": {
            "type": "string",
            "format": "currency",
            "readOnly": false
          }
        }
      },
      "origConversionValue": {
        "type": "object",
        "readOnly": true,
        "properties": {
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "format": "currency"
          }
        }
      },
      "commission": {
        "type": "object",
        "readOnly": true,
        "properties": {
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "format": "currency"
          },
          "bandId": {
            "type": "integer",
            "format": "int16"
          },
          "rejectedAmount": {
            "type": "integer",
            "format": "int16"
          }
        }
      },
      "cost": {
        "type": "object",
        "readOnly": true,
        "properties": {
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "format": "currency"
          },
          "bandId": {
            "type": "integer",
            "format": "int16"
          }
        }
      },
      "voucher": {
        "type": "string",
        "readOnly": true
      },
      "extendedData": {
        "type": "object",
        "description": "Extended data attributes passed on Conversion. Only send a value if it is necessary to update an attribute's value",
        "properties": {
          "ex1": {
            "type": "string",
            "description": "Extended Data attribute 1"
          },
          "ex2": {
            "type": "string",
            "description": "Extended Data attribute 2"
          },
          "ex3": {
            "type": "string",
            "description": "Extended Data attribute 3"
          },
          "ex4": {
            "type": "string",
            "description": "Extended Data attribute 4"
          },
          "ex5": {
            "type": "string",
            "description": "Extended Data attribute 5"
          },
          "ex6": {
            "type": "string",
            "description": "Extended Data attribute 6"
          },
          "ex7": {
            "type": "string",
            "description": "Extended Data attribute 7"
          },
          "ex8": {
            "type": "string",
            "description": "Extended Data attribute 8"
          },
          "ex9": {
            "type": "string",
            "description": "Extended Data attribute 9"
          },
          "ex10": {
            "type": "string",
            "description": "Extended Data attribute 10"
          },
          "ex11": {
            "type": "string",
            "description": "Extended Data attribute 11"
          }
        }
      },
      "uniqueIds": {
        "type": "object",
        "description": "Publisher UID/SubID",
        "readOnly": true,
        "properties": {
          "uid": {
            "type": "string"
          },
          "uid2": {
            "type": "string"
          },
          "uid3": {
            "type": "string"
          },
          "uid4": {
            "type": "string"
          },
          "uid5": {
            "type": "string"
          }
        }
      },
      "items": {
        "type": "object",
        "readOnly": true,
        "properties": {
          "name": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "volume": {
            "type": "string"
          }
        }
      },
      "rejectionReason": {
        "type": "string",
        "readOnly": true
      },
      "rejectionCode": {
        "type": "string"
      },
      "readOnly": {
        "type": "boolean",
        "readOnly": true
      },
      "deviceType": {
        "type": "string"
      },
      "invoicePayoutId": {
        "type": "integer",
        "readOnly": true
      },
      "placement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          }
        }
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK succesful response Inline
404 Not Found Conversion not found None
500 Internal Server Error Internal Server Error None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» conversionId string(uuid) false read-only none
» advertiserRef string false read-only none
» legacyId integer(int64) false read-only none
» agencyId integer(int64) false read-only none
» publisherId integer(int64) false read-only none
» advertiserId integer(int64) false read-only none
» publisherName string false read-only none
» advertiserName string false read-only none
» campaignId integer(int64) false read-only none
» campaignTypeId integer(int64) false read-only none
» publisherCampaignId integer(int64) false read-only none
» creativeId integer(int64) false read-only none
» campaignName string false read-only none
» plid integer(int32) false read-only none
» status string false none none
» paid integer(int64) false read-only none
» conversionDate string(date-time) false read-only none
» clickDate string(date-time) false read-only none
» impressionDate string(date-time) false read-only none
» invoiceDate string(date-time) false none none
» calcDate string(date-time) false none none
» lastModifiedDate string(date-time) false read-only none
» timezone string false read-only none
» country string false read-only none
» ipAddress string false read-only none
» referrer string false read-only none
» conversionValue object false none none
»» currency string false read-only none
»» amount string(currency) false none none
» origConversionValue object false read-only none
»» currency string false none none
»» amount string(currency) false none none
» commission object false read-only none
»» currency string false none none
»» amount string(currency) false none none
»» bandId integer(int16) false none none
»» rejectedAmount integer(int16) false none none
» cost object false read-only none
»» currency string false none none
»» amount string(currency) false none none
»» bandId integer(int16) false none none
» voucher string false read-only none
» extendedData object false none Extended data attributes passed on Conversion. Only send a value if it is necessary to update an attribute's value
»» ex1 string false none Extended Data attribute 1
»» ex2 string false none Extended Data attribute 2
»» ex3 string false none Extended Data attribute 3
»» ex4 string false none Extended Data attribute 4
»» ex5 string false none Extended Data attribute 5
»» ex6 string false none Extended Data attribute 6
»» ex7 string false none Extended Data attribute 7
»» ex8 string false none Extended Data attribute 8
»» ex9 string false none Extended Data attribute 9
»» ex10 string false none Extended Data attribute 10
»» ex11 string false none Extended Data attribute 11
» uniqueIds object false read-only Publisher UID/SubID
»» uid string false none none
»» uid2 string false none none
»» uid3 string false none none
»» uid4 string false none none
»» uid5 string false none none
» items object false read-only none
»» name string false none none
»» sku string false none none
»» volume string false none none
» rejectionReason string false read-only none
» rejectionCode string false none none
» readOnly boolean false read-only none
» deviceType string false none none
» invoicePayoutId integer false read-only none
» placement object false none none
»» id number false none none
»» name string false none none

Enumerated Values

Property Value
status pending
status validated
status rejected

Response Headers

Status Header Type Format Description
200 X-Total-Count integer Total number of conversions
200 X-Offset integer Current offset for conversions
200 X-Limit integer Current limit of conversions

Bulk Update Conversions

Code samples

PUT https://public.api.optimisemedia.com/v1/conversions/bulk?agencyId=type,string,format,int64&contactId=type,string,format,int64 HTTP/1.1
Host: public.api.optimisemedia.com
Content-Type: application/json

 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://public.api.optimisemedia.com/v1/conversions/bulk', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://public.api.optimisemedia.com/v1/conversions/bulk',
  method: 'put',
  data: '?agencyId=type,string,format,int64&contactId=type,string,format,int64',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "properties": {
    "conversions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "advertiserConversionId": {
            "type": "string",
            "description": "The orderId for the Conversion"
          },
          "advertiserId": {
            "type": "integer",
            "description": "MID or advertiserId"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected"
            ],
            "description": "Sets the validation status of the Conversion"
          },
          "invoiceDate": {
            "type": "string",
            "description": "Add the Conversion to a specified invoice period. Leave empty to use default value."
          },
          "calcDate": {
            "type": "string",
            "description": "Used to apply commission rates used at an earlier date. Specify a date for a previous commission group. Leave empty to use default value."
          },
          "conversionValue": {
            "type": "object",
            "description": "Update the Conversion Value in format ##,###.##",
            "properties": {
              "amount": {
                "type": "string"
              }
            }
          },
          "rejectionCode": {
            "type": "string",
            "description": "Include a [rejection](https://knowledge.optimisemedia.com/docs/apireference/#rejection-codes) code if the conversion is being rejected"
          },
          "extendedData": {
            "type": "object",
            "properties": {
              "ex1": {
                "type": "string"
              },
              "ex2": {
                "type": "string"
              },
              "ex3": {
                "type": "string"
              },
              "ex4": {
                "type": "string"
              },
              "ex5": {
                "type": "string"
              },
              "ex6": {
                "type": "string"
              },
              "ex7": {
                "type": "string"
              },
              "ex8": {
                "type": "string"
              },
              "ex9": {
                "type": "string"
              },
              "ex10": {
                "type": "string"
              },
              "ex11": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}';
const headers = {
  'Content-Type':'application/json'

};

fetch('https://public.api.optimisemedia.com/v1/conversions/bulk?agencyId=type,string,format,int64&contactId=type,string,format,int64',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://public.api.optimisemedia.com/v1/conversions/bulk", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json'
}

r = requests.put('https://public.api.optimisemedia.com/v1/conversions/bulk', params={
  'agencyId': {
  "type": "string",
  "format": "int64"
},  'contactId': {
  "type": "string",
  "format": "int64"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json'
}

result = RestClient.put 'https://public.api.optimisemedia.com/v1/conversions/bulk',
  params: {
  'agencyId' => 'string(int64)',
'contactId' => 'string(int64)'
}, headers: headers

p JSON.parse(result)

PUT /conversions/bulk

Updates a conversion. This endpoint does not currently support batch updates, so pass in conversions as an array of length 1.

Body parameter

{
  "type": "object",
  "properties": {
    "conversions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "advertiserConversionId": {
            "type": "string",
            "description": "The orderId for the Conversion"
          },
          "advertiserId": {
            "type": "integer",
            "description": "MID or advertiserId"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected"
            ],
            "description": "Sets the validation status of the Conversion"
          },
          "invoiceDate": {
            "type": "string",
            "description": "Add the Conversion to a specified invoice period. Leave empty to use default value."
          },
          "calcDate": {
            "type": "string",
            "description": "Used to apply commission rates used at an earlier date. Specify a date for a previous commission group. Leave empty to use default value."
          },
          "conversionValue": {
            "type": "object",
            "description": "Update the Conversion Value in format ##,###.##",
            "properties": {
              "amount": {
                "type": "string"
              }
            }
          },
          "rejectionCode": {
            "type": "string",
            "description": "Include a [rejection](https://knowledge.optimisemedia.com/docs/apireference/#rejection-codes) code if the conversion is being rejected"
          },
          "extendedData": {
            "type": "object",
            "properties": {
              "ex1": {
                "type": "string"
              },
              "ex2": {
                "type": "string"
              },
              "ex3": {
                "type": "string"
              },
              "ex4": {
                "type": "string"
              },
              "ex5": {
                "type": "string"
              },
              "ex6": {
                "type": "string"
              },
              "ex7": {
                "type": "string"
              },
              "ex8": {
                "type": "string"
              },
              "ex9": {
                "type": "string"
              },
              "ex10": {
                "type": "string"
              },
              "ex11": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}

Parameters

</tbody>
Name In Type Required Description Enumerated Values
agencyId query string(int64) true AgencyId
contactId query string(int64) true MID or AdvertiserId
body body object false none
» conversions body [object] false none
»» advertiserConversionId body string false The orderId for the Conversion
»» advertiserId body integer false MID or advertiserId
»» status body string false Sets the validation status of the Conversion

pending

approved

rejected

»» invoiceDate body string false Add the Conversion to a specified invoice period. Leave empty to use default value.
»» calcDate body string false Used to apply commission rates used at an earlier date. Specify a date for a previous commission group. Leave empty to use default value.
»» conversionValue body object false Update the Conversion Value in format ##,###.##
»»» amount body string false none
»» rejectionCode body string false Include a [rejection](https://knowledge.optimisemedia.com/docs/apireference/#rejection-codes) code if the conversion is being rejected
»» extendedData body object false none
»»» ex1 body string false none
»»» ex2 body string false none
»»» ex3 body string false none
»»» ex4 body string false none
»»» ex5 body string false none
»»» ex6 body string false none
»»» ex7 body string false none
»»» ex8 body string false none
»»» ex9 body string false none
»»» ex10 body string false none
»»» ex11 body string false none

Responses

Status Meaning Description Schema
200 OK Success None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Conversion Not Found None
500 Internal Server Error Internal Server Error None

Conversion Enquiries

List Conversion Enquiries

Code samples

GET https://public.api.optimisemedia.com/v1/conversion-enquiries/?agencyId=type,string,format,int64&contactId=type,string,format,int64&offset=type,string,minimum,0&limit=type,string,minimum,1,default,50 HTTP/1.1
Host: public.api.optimisemedia.com
Accept: application/json

 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://public.api.optimisemedia.com/v1/conversion-enquiries/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://public.api.optimisemedia.com/v1/conversion-enquiries/',
  method: 'get',
  data: '?agencyId=type,string,format,int64&contactId=type,string,format,int64&offset=type,string,minimum,0&limit=type,string,minimum,1,default,50',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://public.api.optimisemedia.com/v1/conversion-enquiries/?agencyId=type,string,format,int64&contactId=type,string,format,int64&offset=type,string,minimum,0&limit=type,string,minimum,1,default,50',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://public.api.optimisemedia.com/v1/conversion-enquiries/", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://public.api.optimisemedia.com/v1/conversion-enquiries/', params={
  'agencyId': {
  "type": "string",
  "format": "int64"
},  'contactId': {
  "type": "string",
  "format": "int64"
},  'offset': {
  "type": "string",
  "minimum": 0
},  'limit': {
  "type": "string",
  "minimum": 1,
  "default": 50
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://public.api.optimisemedia.com/v1/conversion-enquiries/',
  params: {
  'agencyId' => 'string(int64)',
'contactId' => 'string(int64)',
'offset' => 'string',
'limit' => 'string'
}, headers: headers

p JSON.parse(result)

GET /conversion-enquiries/

Use this endpoint to view Conversion Enquiries for a Publisher Account.

Parameters

</tbody>
Name In Type Required Description Enumerated Values
agencyId query string(int64) true AgencyId for the active session
contactId query string(int64) true ContactId for the active session
enquiryIds query string(int64) false Enquiry ids to select
statusIds query string false statusIds to filter by
advertiserIds query string(int64) false Advertiser ids to filter by
publisherIds query string(int64) false Publisher ids to filter by
uIds query string(string) false UIDS to filter by
advertiserAppId query string false MerchantAppID to filter by
publisherRefs query string false publisherRefs to filter by
productId query string(int64) false Product id to filter by
customerName query string false Customer name to search by
fromDate query string(date) false Filter the from date
toDate query string(date) false Filter the to date
direction query string false The direction of the results

asc

desc

offset query string true The number to skip
limit query string true The number to return

Example responses

200 Response

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "enquiryId": {
          "type": "integer",
          "format": "int64",
          "readOnly": true
        },
        "lastUpdated": {
          "type": "string",
          "format": "date-time"
        },
        "clientDeadlineDate": {
          "type": "string",
          "format": "date-time",
          "nullable": true
        },
        "optimiseDeadlineDead": {
          "type": "string",
          "format": "date-time"
        },
        "optimiseNotes": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "uId": {
          "type": "string"
        },
        "customerName": {
          "type": "string"
        },
        "postCode": {
          "type": "string"
        },
        "customerEmail": {
          "type": "string"
        },
        "transactionDate": {
          "type": "string",
          "format": "date-time"
        },
        "transactionValue": {
          "type": "number",
          "format": "double"
        },
        "commissionValue": {
          "type": "number",
          "format": "double"
        },
        "appMatchCount": {
          "type": "integer",
          "nullable": true
        },
        "statusId": {
          "type": "integer"
        },
        "status": {
          "type": "string"
        },
        "enquiryTypeImported": {
          "type": "string"
        },
        "policyDate": {
          "type": "string",
          "format": "date-time"
        },
        "advertiserName": {
          "type": "string"
        },
        "advertiserAppId": {
          "type": "string"
        },
        "agencyId": {
          "type": "integer"
        },
        "campaign": {
          "type": "object",
          "readOnly": true,
          "properties": {
            "id": {
              "type": "integer"
            },
            "status": {
              "type": "string"
            }
          }
        },
        "publisher": {
          "type": "object",
          "readOnly": true,
          "properties": {
            "id": {
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "ref": {
              "type": "string"
            }
          }
        },
        "advertiser": {
          "type": "object",
          "readOnly": true,
          "properties": {
            "id": {
              "type": "integer"
            },
            "name": {
              "type": "string"
            }
          }
        },
        "conversion": {
          "type": "object",
          "readOnly": true,
          "properties": {
            "id": {
              "type": "integer",
              "nullable": true
            },
            "transactionDate": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "transactionValue": {
              "type": "number",
              "format": "double",
              "nullable": true
            },
            "commissionEarned": {
              "type": "number",
              "format": "double",
              "nullable": true
            },
            "completionDate": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "status": {
              "type": "string",
              "nullable": true
            },
            "typeId": {
              "type": "number",
              "nullable": true
            },
            "type": {
              "type": "string",
              "nullable": true
            },
            "uId": {
              "type": "string",
              "nullable": true
            },
            "advertiserAppId": {
              "type": "string",
              "nullable": true
            },
            "pId": {
              "type": "integer",
              "nullable": true
            },
            "productName": {
              "type": "string",
              "nullable": true
            },
            "productLastInvoiceDate": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "invoiceId": {
              "type": "number",
              "nullable": true
            },
            "rejectionReason": {
              "type": "string",
              "nullable": true
            }
          }
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "enquiryId": {
          "type": "integer",
          "format": "int64",
          "readOnly": true
        },
        "optimiseNotes": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "uId": {
          "type": "string"
        },
        "commissionValue": {
          "type": "number",
          "format": "double"
        },
        "statusId": {
          "type": "integer"
        },
        "status": {
          "type": "string"
        },
        "agencyId": {
          "type": "integer"
        },
        "campaign": {
          "type": "object",
          "readOnly": true,
          "properties": {
            "id": {
              "type": "integer"
            },
            "status": {
              "type": "string"
            }
          }
        },
        "publisher": {
          "type": "object",
          "readOnly": true,
          "properties": {
            "id": {
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "ref": {
              "type": "string"
            }
          }
        },
        "advertiser": {
          "type": "object",
          "readOnly": true,
          "properties": {
            "id": {
              "type": "integer"
            },
            "name": {
              "type": "string"
            }
          }
        },
        "conversion": {
          "type": "object",
          "readOnly": true,
          "properties": {
            "transactionDate": {
              "type": "string",
              "format": "date-time"
            },
            "commissionEarned": {
              "type": "number",
              "format": "double"
            },
            "status": {
              "type": "string",
              "nullable": true
            },
            "rejectionReason": {
              "type": "string"
            }
          }
        }
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful response Inline
403 Forbidden User forbidden to access resource None
500 Internal Server Error Server error None

Response Schema

Response Headers

Status Header Type Format Description
200 X-Total-Count integer Total number of enquiries
200 X-Offset integer Current offset for enquiries
200 X-Limit integer Current limit of enquiries

Files

Upload File

Code samples

POST https://public.api.optimisemedia.com/v1/files/?agencyId=type,string&contactId=type,string HTTP/1.1
Host: public.api.optimisemedia.com
Content-Type: multipart/form-data
Accept: application/json

 'multipart/form-data',
    'Accept' => 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://public.api.optimisemedia.com/v1/files/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

var headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json'

};

$.ajax({
  url: 'https://public.api.optimisemedia.com/v1/files/',
  method: 'post',
  data: '?agencyId=type,string&contactId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "properties": {
    "folderId": {
      "type": "integer",
      "description": "The ID of the folder to upload to. Leave blank"
    },
    "name": {
      "type": "string",
      "description": "Used to provide a custom name for the file"
    },
    "categoryId": {
      "type": "integer",
      "description": "Set the categoryId for the file to allow automatic processing"
    },
    "description": {
      "type": "string",
      "description": "Sets a description for the file"
    },
    "notifyUserIds": {
      "type": "integer",
      "description": "Notifies the specified users of the file upload"
    },
    "file": {
      "type": "string",
      "format": "binary",
      "description": "The file to upload"
    }
  }
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json'

};

fetch('https://public.api.optimisemedia.com/v1/files/?agencyId=type,string&contactId=type,string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"multipart/form-data"},
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://public.api.optimisemedia.com/v1/files/", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json'
}

r = requests.post('https://public.api.optimisemedia.com/v1/files/', params={
  'agencyId': {
  "type": "string"
},  'contactId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'multipart/form-data',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://public.api.optimisemedia.com/v1/files/',
  params: {
  'agencyId' => 'string',
'contactId' => 'string'
}, headers: headers

p JSON.parse(result)

POST /files/

Uploads a file to file explorer

Body parameter

type: object
properties:
  folderId:
    type: integer
    description: The ID of the folder to upload to. Leave blank
  name:
    type: string
    description: Used to provide a custom name for the file
  categoryId:
    type: integer
    description: Set the categoryId for the file to allow automatic processing
  description:
    type: string
    description: Sets a description for the file
  notifyUserIds:
    type: integer
    description: Notifies the specified users of the file upload
  file:
    type: string
    format: binary
    description: The file to upload

Parameters

</tbody>
Name In Type Required Description Enumerated Values
agencyId query string true ID of Agency to upload file to
contactId query string true AID or MID of the account to upload the file
body body object true The file you want to enter
» folderId body integer false The ID of the folder to upload to. Leave blank
» name body string false Used to provide a custom name for the file
» categoryId body integer false Set the categoryId for the file to allow automatic processing
» description body string false Sets a description for the file
» notifyUserIds body integer false Notifies the specified users of the file upload
» file body string(binary) false The file to upload

Example responses

200 Response

{
  "title": "entryId",
  "type": "integer"
}

Responses

Status Meaning Description Schema
200 OK Successful response integer
400 Bad Request Bad request string

Product Feeds

List Product Feeds

Code samples

GET https://public.api.optimisemedia.com/v1/product-feeds/?contactId=type,string,format,int64&agencyId=type,string,format,int64 HTTP/1.1
Host: public.api.optimisemedia.com
Accept: application/json

 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://public.api.optimisemedia.com/v1/product-feeds/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://public.api.optimisemedia.com/v1/product-feeds/',
  method: 'get',
  data: '?contactId=type,string,format,int64&agencyId=type,string,format,int64',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://public.api.optimisemedia.com/v1/product-feeds/?contactId=type,string,format,int64&agencyId=type,string,format,int64',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://public.api.optimisemedia.com/v1/product-feeds/", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://public.api.optimisemedia.com/v1/product-feeds/', params={
  'contactId': {
  "type": "string",
  "format": "int64"
},  'agencyId': {
  "type": "string",
  "format": "int64"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://public.api.optimisemedia.com/v1/product-feeds/',
  params: {
  'contactId' => 'string(int64)',
'agencyId' => 'string(int64)'
}, headers: headers

p JSON.parse(result)

GET /product-feeds/

Gets a list of product feeds for campaigns that Publishers are promoting. The feedId can be combined with AID to create a download URL

Parameters

</tbody>
Name In Type Required Description Enumerated Values
contactId query string(int64) true ContactId for the active session
agencyId query string(int64) true AgencyId for the active session
offset query string(int64) false How many items to skip for pagination
limit query string(int64) false How many items to limit to for pagination

Example responses

200 Response

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "integer",
        "format": "int64"
      },
      "name": {
        "type": "string",
        "description": "The Advertiser name"
      },
      "campaignId": {
        "type": "integer",
        "format": "int64",
        "description": "The campaignId for the product feed"
      },
      "campaignName": {
        "type": "string",
        "description": "The Campaign of the product feed"
      },
      "feedId": {
        "type": "integer",
        "format": "int32",
        "description": "The ID of the Feed used to create a feed request"
      },
      "feedName": {
        "type": "string",
        "description": "The name of the product feed"
      },
      "feedUrl": {
        "type": "string"
      },
      "itemCount": {
        "type": "integer",
        "format": "int32",
        "description": "The number of items in the product feed"
      },
      "itemChangedCount": {
        "type": "integer",
        "format": "int32",
        "description": "The number of items updated on the product feed in the last update"
      },
      "itemAddedCount": {
        "type": "integer",
        "format": "int32",
        "description": "The number of items added to the product feed in the last update"
      },
      "lastImportedDate": {
        "type": "string",
        "format": "date-time",
        "description": "The date & time of the last producy feed update"
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Successful response Inline
400 Bad Request bad request Inline
403 Forbidden Unauthorized None
500 Internal Server Error internal server error - query failed to execute Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id integer(int64) false none none
» name string false none The Advertiser name
» campaignId integer(int64) false none The campaignId for the product feed
» campaignName string false none The Campaign of the product feed
» feedId integer(int32) false none The ID of the Feed used to create a feed request
» feedName string false none The name of the product feed
» feedUrl string false none none
» itemCount integer(int32) false none The number of items in the product feed
» itemChangedCount integer(int32) false none The number of items updated on the product feed in the last update
» itemAddedCount integer(int32) false none The number of items added to the product feed in the last update
» lastImportedDate string(date-time) false none The date & time of the last producy feed update

Status Code 400

Name Type Required Restrictions Description
» info string false none none

Status Code 500

Name Type Required Restrictions Description
» info string false none none

Response Headers

Status Header Type Format Description
200 X-Total-Count integer Total number of product feeds

Payments

List Payments

Code samples

GET https://public.api.optimisemedia.com/v1/payments/?contactId=type,string,format,int64&agencyId=type,string,format,int64&startDate=type,string,format,date HTTP/1.1
Host: public.api.optimisemedia.com
Accept: application/json

 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://public.api.optimisemedia.com/v1/payments/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://public.api.optimisemedia.com/v1/payments/',
  method: 'get',
  data: '?contactId=type,string,format,int64&agencyId=type,string,format,int64&startDate=type,string,format,date',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://public.api.optimisemedia.com/v1/payments/?contactId=type,string,format,int64&agencyId=type,string,format,int64&startDate=type,string,format,date',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://public.api.optimisemedia.com/v1/payments/", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://public.api.optimisemedia.com/v1/payments/', params={
  'contactId': {
  "type": "string",
  "format": "int64"
},  'agencyId': {
  "type": "string",
  "format": "int64"
},  'startDate': {
  "type": "string",
  "format": "date"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://public.api.optimisemedia.com/v1/payments/',
  params: {
  'contactId' => 'string(int64)',
'agencyId' => 'string(int64)',
'startDate' => 'string(date)'
}, headers: headers

p JSON.parse(result)

GET /payments/

Gets a list of payments

Parameters

</tbody>
Name In Type Required Description Enumerated Values
id path string(int64) true payment id
contactId query string(int64) true ContactId for the active session
agencyId query string(int64) true agencyId for the active session
status query string false Publisher status
startDate query string(date) true publisher payment start date
endDate query string(date) false publisher payment end date

Example responses

200 Response

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "contactID": {
        "type": "integer",
        "format": "int64"
      },
      "dateCreated": {
        "type": "string",
        "format": "date-time"
      },
      "dateSent": {
        "type": "string",
        "format": "date-time"
      },
      "status": {
        "type": "string"
      },
      "fixedFee": {
        "type": "number",
        "format": "double"
      },
      "id": {
        "type": "integer",
        "format": "int64"
      },
      "netPayout": {
        "type": "number",
        "format": "double"
      },
      "publisherCurrencyCode": {
        "type": "string"
      },
      "sent": {
        "type": "boolean",
        "default": false
      },
      "total": {
        "type": "number",
        "format": "double"
      },
      "vatPayout": {
        "type": "number",
        "format": "double"
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK successful response Inline
400 Bad Request bad request Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» contactID integer(int64) false none none
» dateCreated string(date-time) false none none
» dateSent string(date-time) false none none
» status string false none none
» fixedFee number(double) false none none
» id integer(int64) false none none
» netPayout number(double) false none none
» publisherCurrencyCode string false none none
» sent boolean false none none
» total number(double) false none none
» vatPayout number(double) false none none

Status Code 400

Name Type Required Restrictions Description
» info string false none none