Marketing API Version

PlacementAds

Provides operations to create, read, update and delete PlacementAds.

Read PlacementAds

Permissions

A user access token with Atlas API capability is required to request placementad details.

Fields

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

Read Ad PlacmentAds

You can get details of placement ads 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>/placement_ads

Response:

{
  "data": [
    {
      "ad_id": "11002200631400",
      "created_date": "2013-12-19T12:12:35-08:00",
      "id": "11002200632300",
      "last_modified_date": "2013-12-19T12:12:35-08:00",
      "placement_id": "11002200632400",
            "version": "1",
      "weight": "0"
    }
 ]
}

Curl Example

A curl example to get placement ads for an ad:

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

Read Placement PlacmentAds

You can get details of placement ads associated with a placement by making an HTTP GET request.

An example of the request and response:

Request:

https://graph.facebook.com/<API_VERSION>/<PLACEMENT_ID>/placement_ads

Response:

{
  "data": [
    {
      "ad_id": "11002200631400",
      "created_date": "2013-12-19T12:12:35-08:00",
      "id": "11002200632300",
      "last_modified_date": "2013-12-19T12:12:35-08:00",
      "placement_id": "11002200632400",
            "version": "1",
      "weight": "0"
    }
 ]
}

Curl Example

A curl example to get placement ads for a placement:

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

Create Ad PlacementAds

Permissions

A user access token with Atlas API capability is required to create placementads for an ad.

Fields

Creating this endpoint returns a single or an array of PlacementAd objects.

Create Ad PlacementAd

You can create placementads for an ad by making an HTTP POST request.

An example of the request and response:

Request:

https://graph.facebook.com/<API_VERSION>/<AD_ID>/placement_ads?placement_ads=[{ "placement_id": "11002200632400", "ad_id": "11002200631400",  "weight": "1" }]

Response:

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

Curl Example

A curl example to create placementads for an ad:


curl \ -F 'placement_ads=[{ "placement_id": "11002200632400", "ad_id": "11002200631400", "weight": "1" }]' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v2.0/<AD_ID>/placement_ads

Delete PlacementAds

Permissions

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

Delete PlacementAd

You can delete placement ads by making an HTTP DELETE request.

An example of the request and response:

Request:

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

Response:

{
  "data": [
    {
      "placement_ad": {
        "id": "11002200632300", 
        "created_by": "1444052100", 
        "created_date": "2014-09-11T10:34:54-07:00", 
        "last_modified_by": "1444052100", 
        "last_modified_date": "2014-09-11T10:40:21-07:00", 
        "is_deleted": true, 
        "version": "2", 
        "placement_id": "11002200632400", 
        "ad_id": "11002200631400", 
        "weight": "1"
      }
    }
  ]
}

Curl Example

A curl example to delete placement ads:

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