Skip to content

Open API Documentation ​

Overview ​

This document describes the Open API endpoints for inventory management. All API endpoints require authentication via Bearer token in the Authorization header.

Authentication ​

All API requests must include a valid authorization token in the request header:

Authorization: Bearer <your_auth_token>

App Management ​

Create App ​

Creates a new app.

Endpoint: POST https://ofp.adx.opera.com/openapi/inventory/v1/app/create

Request Body:

FieldTypeRequiredDescription
namestringYesApp name
deviceTypeintYesDevice type (see Device Types)
osTypeintYesOperating system type (see OS Types)
trafficTypeintYesTraffic type (see Traffic Types)
pkgNamestringConditionalPackage name (required when trafficType = 0 for App)
domainNamestringConditionalDomain name (required when trafficType = 1 for Web)
urlstringYesApp store URL or website URL
appAdsTxtLinkstringYesApp-ads.txt URL
iabCategorystringYesIAB category code, e.g. "IAB1-1"
coppaCompliantbooleanNoCOPPA compliance flag (default: false)

Example Request:

json
{
  "name": "My App",
  "deviceType": 1,
  "osType": 2,
  "trafficType": 0,
  "pkgName": "com.example.myapp",
  "url": "https://play.google.com/store/apps/details?id=com.example.myapp",
  "appAdsTxtLink": "https://example.com/app-ads.txt",
  "iabCategory": "IAB1-1",
  "coppaCompliant": false
}

Response:

json
{
  "publisherId": "pub213660626112",
  "appId": "app14463798688768",
  "displayId": "app14463798688768",
  "name": "My App",
  "deviceType": 1,
  "osType": 2,
  "trafficType": 0,
  "pkgName": "com.example.myapp",
  "domainName": "",
  "url": "https://play.google.com/store/apps/details?id=com.example.myapp",
  "appAdsTxtLink": "https://example.com/app-ads.txt",
  "iabCategory": "IAB1-1",
  "coppaCompliant": false,
  "status": "active",
  "createTime": "2026-01-13T08:54:15Z",
  "updateTime": "2026-01-13T08:54:15Z"
}

Update App ​

Updates an existing app. This API supports incremental updates — only the fields included in the request body will be updated, and omitted fields will retain their current values.

Endpoint: POST https://ofp.adx.opera.com/openapi/inventory/v1/app/update

Request Body:

FieldTypeRequiredDescription
appIdstringYesApp ID to update
statusstringNoStatus: "active", "inactive"
namestringNoApp name
deviceTypeintNoDevice type
osTypeintNoOperating system type
trafficTypeintNoTraffic type
pkgNamestringNoPackage name
domainNamestringNoDomain name
urlstringNoApp store URL or website URL
appAdsTxtLinkstringNoApp-ads.txt URL
iabCategorystringNoIAB category code
coppaCompliantbooleanNoCOPPA compliance flag

Example Request:

json
{
  "appId": "app_67890",
  "name": "My Updated App",
  "status": "inactive"
}

Response:

Same structure as Create App response.


List Apps ​

Retrieves a list of apps.

Endpoint: POST https://ofp.adx.opera.com/openapi/inventory/v1/app/list

Request Body:

FieldTypeRequiredDescription
deviceTypeintNoFilter by device type
osTypeintNoFilter by OS type
trafficTypeintNoFilter by traffic type
iabCategorystringNoFilter by IAB category
statusstring[]NoFilter by status list: "active", "inactive"

Example Request:

json
{
  "deviceType": 1,
  "osType": 2,
  "status": ["inactive", "active"]
}

Response:

json
{
  "list": [
    {
      "publisherId": "pub213660626112",
      "appId": "app14463798688768",
      "displayId": "app14463798688768",
      "name": "My Updated App",
      "deviceType": 1,
      "osType": 2,
      "trafficType": 0,
      "pkgName": "com.example.myapp",
      "domainName": "",
      "url": "https://play.google.com/store/apps/details?id=com.example.myapp",
      "appAdsTxtLink": "https://example.com/app-ads.txt",
      "iabCategory": "IAB1-1",
      "coppaCompliant": false,
      "status": "inactive",
      "createTime": "2026-01-13T08:54:15Z",
      "updateTime": "2026-01-13T08:55:08Z"
    }
  ],
  "totalCount": 1
}

Placement Management ​

Create Placement ​

Creates a new ad placement.

Endpoint: POST https://ofp.adx.opera.com/openapi/inventory/v1/placement/create

Request Body:

FieldTypeRequiredDescription
appIdstringYesApp ID to create placement for
namestringYesPlacement name
floorPricenumberNoFloor price in USD (e.g., 0.5 = $0.50)
countryFloorPricearrayNoCountry-specific floor prices (see below)
sdkAdFormatintYesSDK ad format (see SDK Ad Formats)
sdkAdTypesint[]ConditionalSDK ad types (required if sdkAdFormat is 1,3 or 5; see SDK Ad Types)
sdkAdSizeintConditionalSDK ad size (required if sdkAdFormat is 2; see SDK Ad Sizes)
sdkAutoRefreshbooleanNoEnable auto refresh
sdkAutoRefreshIntervalintConditionalAuto refresh interval in seconds, between 15 and 150
rewardedNamestringNoReward name (for rewarded ads, max 50 characters)
rewardedQuantityintNoReward quantity (1-1000)
rewardedDeliverySettingintNoReward delivery setting (0=No callback, 1=Server callback)
callbackUrlstringNoServer-to-server callback URL (required if rewardedDeliverySetting=1)
securityKeystringNoSecurity key

Country Floor Price Object:

FieldTypeDescription
countryCodesstringComma-separated country codes (e.g., "US,CA") or "*" for all
floorPricenumberFloor price in USD

Example Request:

json
{
  "appId": "app14463798688768",
  "name": "Banner Bottom",
  "floorPrice": 0.5,
  "countryFloorPrice": [
    { "countryCodes": "US,CA", "floorPrice": 0.8 },
    { "countryCodes": "CN", "floorPrice": 0.3 }
  ],
  "sdkAdFormat": 2,
  "sdkAdSize": 1,
  "sdkAutoRefresh": true,
  "sdkAutoRefreshInterval": 30
}

Response:

json
{
  "sid": "s14463823852672",
  "appId": "app14463798688768",
  "name": "Banner Bottom",
  "status": "active",
  "floorPrice": 0.5,
  "countryFloorPrice": [
    {
      "countryCodes": "US,CA",
      "floorPrice": 0.8
    },
    {
      "countryCodes": "CN",
      "floorPrice": 0.3
    }
  ],
  "sdkAdFormat": 2,
  "sdkAdTypes": [],
  "sdkAdSize": 1,
  "sdkAutoRefreshInterval": 30,
  "sdkAutoRefresh": true,
  "orientation": 0,
  "rewardedName": "",
  "rewardedQuantity": 0,
  "rewardedDeliverySetting": 0,
  "callbackUrl": "",
  "securityKey": "",
  "createTime": "2026-01-13T09:00:48Z",
  "updateTime": "2026-01-13T09:00:48Z"
}

Update Placement ​

Updates an existing placement. This API supports incremental updates — only the fields included in the request body will be updated, and omitted fields will retain their current values.

Endpoint: POST https://ofp.adx.opera.com/openapi/inventory/v1/placement/update

Request Body:

FieldTypeRequiredDescription
sidstringYesPlacement ID to update
statusstringNoStatus: "active", "inactive"
namestringNoPlacement name
floorPricenumberNoFloor price in USD
countryFloorPricearrayNoCountry-specific floor prices
sdkAdFormatintNoSDK ad format
sdkAdTypesint[]ConditionalSDK ad types (required if sdkAdFormat is 1,3 or 5; see SDK Ad Types)
sdkAdSizeintConditionalSDK ad size (required if sdkAdFormat is 2; see SDK Ad Sizes)
sdkAutoRefreshbooleanNoEnable auto refresh
sdkAutoRefreshIntervalintConditionalAuto refresh interval in seconds, between 15 and 150
orientationintNoAd orientation
rewardedNamestringNoReward name (max 50 characters)
rewardedQuantityintNoReward quantity (1-1000)
rewardedDeliverySettingintNoReward delivery setting (0=No callback, 1=Server callback)
callbackUrlstringNoCallback URL (required if rewardedDeliverySetting=1)
securityKeystringNoSecurity key

Example Request:

json
{
  "sid": "s14463823852672",
  "name": "Banner Top",
  "floorPrice": 0.6,
  "status": "inactive"
}

Response:

Same structure as Create Placement response.


List Placements ​

Retrieves a list of placements.

Endpoint: POST https://ofp.adx.opera.com/openapi/inventory/v1/placement/list

Request Body:

FieldTypeRequiredDescription
appIdstringNoFilter by app ID
appTypeintNoFilter by app type
sdkAdFormatintNoFilter by SDK ad format
iabCategorystringNoFilter by IAB category
statusstringNoFilter by status: "active", "inactive"

Example Request:

json
{
  "appId": "app_67890",
  "status": "inactive"
}

Response:

json
{
  "list": [
    {
      "sid": "s14463823852672",
      "appId": "app14463798688768",
      "name": "Banner Top",
      "status": "inactive",
      "floorPrice": 0.6,
      "countryFloorPrice": [
        {
          "countryCodes": "US,CA",
          "floorPrice": 0.8
        },
        {
          "countryCodes": "CN",
          "floorPrice": 0.3
        }
      ],
      "sdkAdFormat": 2,
      "sdkAdTypes": [],
      "sdkAdSize": 1,
      "sdkAutoRefreshInterval": 30,
      "sdkAutoRefresh": true,
      "orientation": 0,
      "rewardedName": "",
      "rewardedQuantity": 0,
      "rewardedDeliverySetting": 0,
      "callbackUrl": "",
      "securityKey": "",
      "createTime": "2026-01-13T09:00:48Z",
      "updateTime": "2026-01-13T09:01:45Z"
    }
  ],
  "totalCount": 1
}

Enumerations ​

Device Types ​

ValueDescription
0Unknown
1Phone
2Tablet
3Desktop
4Connected Device
5Set Top Box
6Others

OS Types ​

ValueDescription
0Unknown
1iOS
2Android
3Roku
4Windows
5Tizen
6Other
7Fire
8Web
9Linux
10Mac
11Feature Phone

Traffic Types ​

ValueDescription
0App
1Web

SDK Ad Formats ​

ValueDescription
1App Open
2Banner
3Interstitial
4MREC
5Native
6Rewarded
7Rewarded Interstitial

SDK Ad Types ​

ValueDescription
1Image
2Video

SDK Ad Sizes ​

ValueDescription
1320*50
2300*250
3300*50
4320*100
5320*480
6468*60
7728*90

Error Handling ​

All API responses follow a consistent format:

Success Response:

json
{
  "code": 0,
  "msg": "ok",
  "data": { ... }
}

Error Response:

json
{
  "code": <error_code>,
  "msg": "<error_message>"
}

Common Error Codes ​

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing token
403Forbidden - Insufficient scope
500Internal Server Error

Rate Limiting ​

API requests are subject to rate limiting. If you exceed the rate limit, you will receive a 429 Too Many Requests response. Please implement appropriate retry logic with exponential backoff.