List Campaigns

List Campaigns

GET https://api.ocamba.com/v2/adex/campaigns
Returns a list of Campaigns

Tip
Searchable fields are id, name and description. Default sorting field is name. Filterable fields are: id, name, external_demand_id, source_campaign_id, remote_id, type, status, pricing_model, score, cpc_bid_strategy_id, cpm_bid_strategy_id, creative_types, start_time, end_time, create_time and update_time.
Info
The response example is representing a full view.

Query parameters

parameters

Response schemas

curl -X GET \
 "https://api.ocamba.com/v2/adex/campaigns" \
  -H "Authorization: Bearer {TOKEN}"
const url = 'https://api.ocamba.com/v2/adex/campaigns';
const options = {
  method: 'GET',
  headers: {
    Authorization: `Bearer {TOKEN}`
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v2/adex/campaigns");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

200 OK

{
  "total": 92,
  "items": [
    {
      "id": "10001233",
      "company_id": "7196310",
      "account_id": "52794322",
      "account": {
        "id": "10073337",
        "name": "John Smith",
        "status": "active",
        "image": "https://dev-storage.ocamba.com/6197120/adex/accounts/90130201/images/%D9%8A%D9%8A%D9%8A%D9%8A%D9%8A.png"
      },
      "creator_id": "1000225",
      "creator": {
        "id": "1000225",
        "name": "John Smith",
        "image": "https://dev-storage.ocamba.com/6197120/adex/accounts/90130201/images/%D9%8A%D9%8A%D9%8A%D9%8A%D9%8A.png"
      },
      "external_demand_id": "12341",
      "external_demand": {
        "id": "7552",
        "partner_id": "280",
        "status": "active",
        "name": "Demo External Demand"
      },
      "source_campaign_id": "1231412",
      "remote_id": "1241412",
      "name": "DemoCampaign",
      "description": "Description goes here",
      "status": "active",
      "effective_status": "monthly-limit",
      "type": "internal",
      "pricing_model": "cpc",
      "score": 78,
      "bid_modifiers": [
        null
      ],
      "cpc_bid_strategy_id": "1231",
      "cpm_bid_strategy_id": "1332",
      "max_bid": 12.24,
      "creative_types": "dynamic-native,web-push-object",
      "creative_distribution": 1,
      "has_creatives": 1,
      "iab_categories": [
        null
      ],
      "frequency_cap": {
        "impression": {
          "expiry_time": 10,
          "max_count": 2
        },
        "click": {
          "expiry_time": 10,
          "max_count": 2
        },
        "conversion": {
          "expiry_time": 10,
          "max_count": 2
        }
      },
      "start_time": "2021-10-20 12:47:00",
      "end_time": "2021-10-29 13:07:04",
      "stats": {
        "impression": 111,
        "click": 451,
        "spam_click": 113,
        "conversion": 661,
        "income": 125.65,
        "ctr": 10.84
      },
      "targeting": {
        "countries": {
          "items": [
            "RS"
          ],
          "lists": [
            "1838"
          ],
          "op": "in"
        },
        "regions": {
          "items": [
            "2661876"
          ],
          "lists": [
            "2934"
          ],
          "op": "in"
        },
        "subids": {
          "items": [
            "fut_t10_18-24-MULTI_GG"
          ],
          "lists": [
            "1835"
          ],
          "op": "in"
        },
        "ip": {
          "items": [
            "123.523.123.4"
          ],
          "lists": [
            "2691"
          ],
          "op": "in"
        },
        "pages": {
          "items": [
            "ocamba.com"
          ],
          "lists": [
            "2725"
          ],
          "op": "in"
        },
        "tags": {
          "items": [
            "1303"
          ],
          "op": "in"
        },
        "device_types": {
          "items": [
            "console"
          ],
          "op": "in"
        },
        "device_manufacturers": {
          "items": [
            "13"
          ],
          "op": "in"
        },
        "os": {
          "items": [
            {
              "id": "12",
              "op": "in",
              "versions": [
                "10.0"
              ]
            }
          ]
        },
        "browsers": {
          "items": [
            {
              "id": "10",
              "op": "in",
              "versions": [
                "10.0"
              ]
            }
          ]
        },
        "connections": {
          "items": [
            "1"
          ],
          "op": "nin"
        },
        "time": {
          "items": [
            "[0,15,30,45 12,13,14 * 6 1]"
          ],
          "op": "in"
        },
        "languages": {
          "items": [
            "sr"
          ],
          "op": "nin"
        },
        "keywords": {
          "items": "keyword01!\\|keyword02_%"
        },
        "categories": {},
        "user_age": {
          "from": 20,
          "to": 30,
          "time_unit": "hour"
        },
        "device_tracking": 1,
        "has_user_data": 1
      },
      "metadata": {
        "key1": "value1"
      },
      "sync_status": "2",
      "create_time": "2021-10-29 12:47:00",
      "update_time": "2021-10-30 14:27:26"
    }
  ]
}
Responses