# Opera Ads Marketing API Integration Guide

Opera Ads Marketing API is a common API that can be used by advertisers to report their campaign conversion events to the Opera Ads server.

# Markting API WorkFlow

# Controlled By OperaAds

OperaAds bidder delivers ads whose click-through url will have click_id value added e.g. https://example.com?click_id=xxxx

Important to note that the value of click_id is dynamic, different with each ad click. So advertisers need to get it from the url query string.

# Controller By Advertisers

When users click the ads and are redirected to advertisers' product, advertisers should store click_id value in the click-through url in preparation for future macro substitution when calling OperaAds marketing API.

When conversion events happen, e.g. registration, advertisers should follow the API's specification to correctly substitute corresponding macros and call Marking API Endpoint.

# API Specification

# Request

# Example

curl -X GET "https://cb.adx.opera.com/marketing/pb?partner=p_name&click_id=NTcxMJGxNiwyODVjOXcwZjFmAzAOZWIwLElELTI0NFdhMGE2M2ExODk5ND%3D&event_name=purchase&event_value=&payout=0.5"

# Specifications

HTTP Method: GET
Query String Parameters:

Parameters Type Description Mandatory
partner string The advertiser name assigned by Opera. YES
click_id string An ID generated by Opera Ads server dynamically (different click_id for different AD request.) and put in the click-through URL. Advertisers need to get the click_id from the click-through URL, put it in this click_id parameter without any change and post back to Opera Ads Server. YES
event_name string Event name install, register, login, purchase, place_bet. If advertisers need more customized events, please contact Opera Ads to create. YES
event_value string Event value if have, optional. Optional
payout string The payout to Opera in USD, optional. Optional

# Response

# Status Code

HTTP Status Code:200
Opera Ads server always return 200 if the request is processed.

# Response body

HTTP Body in JSON format: {"status":0,"message":"ok"}

Field Type Description
status int 0 means report success, otherwise failure.
message string “ok” or the failure reason.