Marketing API Version

Ad Events

Provides operations to create, read, update and delete Atlas AdEvents.

Read AdEvents

Permissions

A user access token with Atlas API capability is required to request ad event details for an ad.

Fields

Reading this endpoint returns a single or an array of AdEvent objects with the same fields as the node.

Read AdEvent

You can get details of an ad event using the <AD_EVENT_ID> by making an HTTP GET request.

An example of the request and response:

Request:

https://graph.facebook.com/<API_VERSION>/<AD_EVENT_ID>

Response:

{
  "ad_id": "11002200631400", 
  "alias": "1", 
  "click_through_id": "11002200632200", 
  "created_date": "2013-12-19T20:12:16+0000", 
  "id": "11002200632100", 
  "last_modified_date": "2013-12-19T20:12:16+0000", 
  "name": "Test", 
  "version": "1"
}

Curl Example

A curl example to get ad event details:

curl -G \
  -d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/<AD_EVENT_ID>

Read Ad AdEvent

You can get details of ad events associated with an ad by making an HTTP GET request.

An example of the request and response:

Request:

https://graph.facebook.com/<API_VERSION>/<AD_ID>/ad_events

Response:

{
  "data": [
    {
        "ad_id": "11002200631400", 
      "alias": "1",
      "click_through_id": "11002200632200",
        "created_date": "2013-12-19T12:12:16-08:00",
      "id": "11002200632100",
      "last_modified_date": "2013-12-19T12:12:16-08:00",
      "name": "Test",
      "version": "1"
    }
 ]
}

Curl Example

A curl example to get ad events for an ad:

curl -G \
  -d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/<AD_ID>/atlasadevents

Create AtlasAd AdEvents

Permissions

A user access token with Atlas API capability is required to create adevent details.

Fields

Publishing this endpoint returns a single or an array of AdEvent objects.

Create Ad AdEvent

You can create adevent for an ad by making an HTTP POST request. It will update the adevent if it already exists. Make sure that the <CLICK_THROUGH_ID> belongs to the same campaign.

An example of the request and response:

Request:

https://graph.facebook.com/<API_VERSION>/<AD_ID>/ad_events?ad_events=[{"click_through_id":11002200632200, "name":"TestAdEvent","is_default_ad_event":true}]

Response:

{
  "data": [
    {
      "id": "11002200632100", 
      "success": true
    }
  ]
}

Curl Example

A curl example to create adevent for an ad:


curl \ -F 'ad_events=[{"click_through_id":11002200632200, "name":"TestAdEvent","is_default_ad_event":true}]' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v2.0/<AD_ID>/ad_events

Delete Atlas AdEvents

Permissions

A user access token with Atlas API capability is required to delete adevents.

Delete AdEvents

You can delete an adevent by making an HTTP DELETE request.

An example of the request and response:

Request:

https://graph.facebook.com/<API_VERSION>/<AD_EVENT_ID>

Response:

{
  "data": [
    {
      "ad_event": {
        "id": "11002200635000", 
        "created_by": "1444052100", 
        "created_date": "2014-09-11T12:29:59-07:00", 
        "last_modified_by": "1444052100", 
        "last_modified_date": "2014-09-11T12:29:59-07:00", 
        "is_deleted": true, 
        "version": "1", 
        "ad_id": "11002200631400", 
        "name": "TestAdEvent", 
        "click_through_id": "11002200632200", 
        "alias": ""
      }
    }
  ]
}

Curl Example:

A curl example to delete an adevent:

curl -XDELETE \
  -F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/<AD_EVENT_ID>