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
categorystringYesApp category
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",
  "category": "Games",
  "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",
  "category": "Games",
  "coppaCompliant": false,
  "status": 2,
  "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
statusintNoStatus (see Status Values)
namestringNoApp name
deviceTypeintNoDevice type
osTypeintNoOperating system type
trafficTypeintNoTraffic type
pkgNamestringNoPackage name
domainNamestringNoDomain name
urlstringNoApp store URL or website URL
appAdsTxtLinkstringNoApp-ads.txt URL
categorystringNoApp category
coppaCompliantbooleanNoCOPPA compliance flag

Example Request:

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

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
categorystringNoFilter by category
statusint[]NoFilter by status list

Example Request:

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

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",
      "category": "Games",
      "coppaCompliant": false,
      "status": 1,
      "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": 2,
  "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
statusintNoStatus (see Status Values)
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": 1
}

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
categorystringNoFilter by category
statusintNoFilter by status

Example Request:

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

Response:

json
{
  "list": [
    {
      "sid": "s14463823852672",
      "appId": "app14463798688768",
      "name": "Banner Top",
      "status": 1,
      "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

Status Values

ValueDescription
0Inactive
1Active

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

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.