Link Search Menu Expand Document

PDF

account object

Platform API


A business unit or business relationship as it is represented in OpenX, such as an ad network, advertiser, publisher, or agency.

The account object has the following calls:

CallDescription
GET /accountList all accounts.
GET /account/account_UIDRead the specified account.
GET /account/account_UID/default_marketRetrieve market information from the parent account.
GET /account/account_UID/generate_cookie_mapping_url_templateRetrieve data for the cookie-mappingURL form (used by the OpenX UI).
GET /account/account_UID/generate_rtb_data_url_templateRetrieve data for the Real-Time Bid Settings form (used by the OpenX UI).
GET /account/account_UID/lifetime_budget_remainingRetrieve payments-to-date minus lifetime-spending-to-date for the specified account.
GET /account/account_UID/list_accountsList sub-accounts for the specified account.
GET /account/account_UID/list_audience_segmentsList audience segments for the specified account.
GET /account/account_UID/list_conversion_tagsList conversion tags for the specified account.
GET /account/account_UID/list_creativesList creatives for the specified account.
GET /account/account_UID/list_ordersList orders for the specified account.
GET /account/account_UID/list_packagesList packages for the specified account.
GET /account/account_UID/list_payment_historyList payment history for the specified account.
GET /account/account_UID/list_sitesList sites for the specified account.
GET /account/account_UID/list_usersList users for the specified account.
GET /account/account_UID/monthly_budget_remaining• For Ad Exchange accounts without payments, return the monthly budget minus monthly spending.
• For Ad Exchange accounts with payments, return a number calculated based on lifetime payment, lifetime spending, monthly spending to date, and monthly budget.
• Otherwise, return 0.
GET /account/account_UID/payments_to_dateReturn the sum of all payments up to the current date for the specified account.
GET /account/available_fieldstype_full=account.type

See account object example 1
List the available_fields to create or update an account of the specified type.
GET /account/check_ssrtb_endpointValidate server-side real-time bidding (SSRTB) endpoints.
GET /account/performance/account_UIDGet the performance metrics for the specified account within the (optional) date range.

Parameters:
   • start_date: A specific date in yyyy-mm-dd HH:MM:SS format OR an integer for the days backward from today.

   For example, 7 = “seven days ago” and 0 = “starting today” (inclusive).

   • end_date: A specific date in yyyy-mm-dd HH:MM:SS format OR a negative integer for the days from now.

   For example, -7 = “until seven days from now” and 0 = “before today” (exclusive)
POST /account

See account object example 2
Create one or more accounts.
POST /account/account_UID/cloneCreate a copy of the specified account.
PUT /accountUpdate the specified accounts.
PUT /accountaccount_UIDUpdate the specified account.

Examples

Sample response and sample batch create examples.


Example 1

Sample response for GET /account/available_fieldstype_full=account.network.

Expand example 1
{
  "account_id": {
    "auto": true,
    "has_dependencies": false,
    "readonly": true,
    "required": false,
    "type": "int"
  },
  "account_uid": {
    "has_dependencies": false,
    "readonly": false,
    "required": true,
    "type": "account_uid",
    "url": "/options/account_options"
  },
  "acl": {
    "acl": "acl",
    "has_dependencies": false,
    "readonly": false,
    "required": false,
    "type": "flags"
  },
  "acl_override": {
    "acl": "network.acl_override",
    "available_fields": {},
    "default": {},
    "has_dependencies": false,
    "readonly": false,
    "required": false,
    "type": "object"
  },
  "country_of_business": {
    "default": "us",
    "has_dependencies": false,
    "maxlen": 255,
    "readonly": false,
    "required": true,
    "type": "varchar",
    "url": "/options/country_options"
  },
  "created_date": {
    "auto": true,
    "has_dependencies": false,
    "readonly": true,
    "required": false,
    "type": "datetime"
  },
  "currency": {
    "has_dependencies": false,
    "maxlen": 255,
    "readonly": false,
    "required": true,
    "type": "varchar",
    "url": "/options/currency_options"
  },
  "currency_id": {
    "auto": true,
    "has_dependencies": false,
    "readonly": true,
    "required": false,
    "type": "int"
  },
  "deleted": {
    "auto": true,
    "default": "0",
    "has_dependencies": false,
    "readonly": true,
    "required": false,
    "type": "int"
  },
  "dmp_sources": {
    "acl": "dmp",
    "has_dependencies": false,
    "maxlen": 255,
    "readonly": false,
    "required": false,
    "type": "varchar"
  },
  "experience": {
    "has_dependencies": false,
    "maxlen": 64,
    "readonly": false,
    "required": true,
    "type": "varchar",
    "url": "/options/network_experience_options"
  },
  "external_id": {
    "has_dependencies": false,
    "maxlen": 255,
    "readonly": false,
    "required": false,
    "type": "varchar"
  },
  "hidden": {
    "acl": "hidden",
    "default": "0",
    "has_dependencies": false,
    "readonly": false,
    "required": false,
    "type": "int"
  },
  "id": {
    "auto": true,
    "has_dependencies": false,
    "readonly": true,
    "required": false,
    "type": "int"
  },
  "instance_uid": {
    "auto": true,
    "has_dependencies": false,
    "maxlen": 255,
    "readonly": true,
    "required": false,
    "type": "varchar"
  },
  "market": {
    "available_fields": {
      "allow_unbranded_buyers": {
        "default": "1",
        "has_dependencies": false,
        "readonly": false,
        "required": false,
        "type": "int"
      },
      "blocked_adcategories": {
        "default": {
          "1": true,
          "10": true,
          "12": true,
          "26": true,
          "99": true
        },
        "has_dependencies": false,
        "items": {
          "has_dependencies": false,
          "maxlen": 255,
          "readonly": false,
          "required": true,
          "type": "varchar",
          "url": "/options/ad_category_options"
        },
        "readonly": false,
        "required": false,
        "type": "array"
      },
      "blocked_contentattributes": {
        "default": {
          "1": true,
          "15": true,
          "8": true
        },
        "has_dependencies": false,
        "items": {
          "has_dependencies": false,
          "maxlen": 255,
          "readonly": false,
          "required": true,
          "type": "varchar",
          "url": "/options/content_attribute_options"
        },
        "readonly": false,
        "required": false,
        "type": "array"
      },
      "blocked_creativetypes": {
        "default": {
          "11": true
        },
        "has_dependencies": false,
        "items": {
          "has_dependencies": false,
          "maxlen": 255,
          "readonly": false,
          "required": true,
          "type": "varchar",
          "url": "/options/creative_type_options"
        },
        "readonly": false,
        "required": false,
        "type": "array"
      },
      "blocked_languages": {
        "has_dependencies": false,
        "items": {
          "has_dependencies": false,
          "maxlen": 255,
          "readonly": false,
          "required": true,
          "type": "varchar",
          "url": "/options/language_options"
        },
        "readonly": false,
        "required": false,
        "type": "array"
      },
      "brand_labels": {
        "available_fields": {
          "label_ids": {
            "has_dependencies": false,
            "items": {
              "has_dependencies": false,
              "maxlen": 255,
              "readonly": false,
              "required": false,
              "type": "varchar",
              "url": "/options/market_brand_group_options"
            },
            "readonly": false,
            "required": false,
            "type": "array"
          },
          "op": {
            "default": "allow_all",
            "has_dependencies": false,
            "maxlen": 255,
            "readonly": false,
            "required": true,
            "type": "varchar",
            "url": "/options/market_filter_region_options"
          }
        },
        "has_dependencies": false,
        "readonly": false,
        "required": false,
        "type": "object"
      },
      "brands": {
        "available_fields": {
          "ids": {
            "has_dependencies": false,
            "items": {
              "has_dependencies": false,
              "readonly": false,
              "required": false,
              "type": "int"
            },
            "readonly": false,
            "required": false,
            "type": "array"
          },
          "op": {
            "default": "allow_all",
            "has_dependencies": false,
            "maxlen": 255,
            "readonly": false,
            "required": true,
            "type": "varchar",
            "url": "/options/market_filter_region_options"
          }
        },
        "has_dependencies": false,
        "readonly": false,
        "required": false,
        "type": "object"
      },
      "currency": {
        "default": "USD",
        "has_dependencies": false,
        "maxlen": 255,
        "readonly": false,
        "required": true,
        "type": "varchar",
        "url": "/options/currency_options"
      },
      "domains": {
        "has_dependencies": false,
        "items": {
          "has_dependencies": false,
          "maxlen": 255,
          "readonly": false,
          "required": true,
          "type": "varchar"
        },
        "readonly": false,
        "required": false,
        "type": "array"
      },
      "filters": {
        "has_dependencies": false,
        "items": {
          "available_fields": {
            "ids": {
              "has_dependencies": false,
              "items": {
                "has_dependencies": false,
                "readonly": false,
                "required": true,
                "type": "int"
              },
              "readonly": false,
              "required": false,
              "type": "array"
            },
            "op": {
              "default": "allow_all",
              "has_dependencies": false,
              "maxlen": 255,
              "readonly": false,
              "required": true,
              "type": "varchar",
              "url": "/options/market_filter_region_options"
            },
            "region": {
              "has_dependencies": false,
              "maxlen": 255,
              "readonly": false,
              "required": true,
              "type": "varchar",
              "url": "/options/market_operators"
            }
          },
          "has_dependencies": false,
          "readonly": false,
          "required": false,
          "type": "object"
        },
        "readonly": false,
        "required": false,
        "type": "array"
      }
    },
    "has_dependencies": false,
    "readonly": false,
    "required": true,
    "type": "object"
  },
  "market_active": {
    "auto": true,
    "default": "0",
    "has_dependencies": false,
    "readonly": true,
    "required": false,
    "type": "int"
  },
  "market_currency_id": {
    "auto": true,
    "has_dependencies": false,
    "readonly": true,
    "required": false,
    "type": "int"
  },
  "modified_date": {
    "auto": true,
    "has_dependencies": false,
    "readonly": true,
    "required": false,
    "type": "datetime"
  },
  "name": {
    "has_dependencies": false,
    "maxlen": 255,
    "readonly": false,
    "required": true,
    "type": "varchar"
  },
  "notes": {
    "has_dependencies": false,
    "maxlen": 25000,
    "readonly": false,
    "required": false,
    "type": "varchar"
  },
  "status": {
    "acl": "network.status",
    "default": "Active",
    "has_dependencies": false,
    "maxlen": 12,
    "readonly": false,
    "required": true,
    "type": "varchar",
    "url": "/options/account_status_options"
  },
  "third_party_network_uid": {
    "acl": [      "instance.buyer_experience"    ],
    "has_dependencies": false,
    "maxlen": 255,
    "readonly": false,
    "required": false,
    "type": "varchar",
    "url": "/options/third_party_network_options"
  },
  "timezone": {
    "default": "UTC",
    "has_dependencies": false,
    "maxlen": 255,
    "readonly": false,
    "required": true,
    "type": "varchar",
    "url": "/options/timezone_options"
  },
  "timezone_id": {
    "auto": true,
    "has_dependencies": false,
    "readonly": true,
    "required": false,
    "type": "int"
  },
  "type": {
    "auto": true,
    "default": "account",
    "has_dependencies": false,
    "maxlen": 255,
    "readonly": true,
    "required": false,
    "type": "varchar",
    "value": "account"
  },
  "type_full": {
    "has_dependencies": false,
    "maxlen": 64,
    "readonly": false,
    "required": true,
    "type": "varchar",
    "value": "account.network"
  },
  "uid": {
    "auto": true,
    "has_dependencies": false,
    "readonly": true,
    "required": false,
    "type": "uid"
  },
  "v": {
    "auto": true,
    "default": "3",
    "has_dependencies": false,
    "options": [],
    "readonly": true,
    "required": false,
    "type": "int"
  }
}

Example 2

Sample batch create example.

Expand example 2
curl -X POST --header "Content-Type: application/json" http://openx_server_name/ox/4.0/account \
                --cookie "openx3_access_token=token_string" \
                --data='[
                {
                "account_uid": "parent_account_uid",
                "account_id": "parent_account_id",
                "name": "Batch Account 1",
                "type_full": "account.publisher",
                "currency": "USD",
                "experience": "publisher"
                },
                {
                "account_uid": "parent_account_uid",
                "account_id": "parent_account_id",
                "name": "Batch Account 2",
                "type_full": "account.advertiser",
                "currency": "USD",
                "experience": "advertiser"
                }
        ]