Graph API Version

Business Offline Conversion Data Sets

Reading

Get all offline conversion data sets for this business.

Example

Graph API Explorer
GET /v5.0/{business-id}/offline_conversion_data_sets HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{business-id}/offline_conversion_data_sets',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{business-id}/offline_conversion_data_sets",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{business-id}/offline_conversion_data_sets",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{business-id}/offline_conversion_data_sets"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {}, "summary": {} }

data

A list of OfflineConversionDataSet nodes.

The following fields will be added to each node that is returned:

FieldDescription
access_permission
string

Access permission regarding this data set

access_permission_details
string

Access permission details regarding this data set

access_status
enum

"CONFIRMED" if the access was granted and "PENDING" otherwise

access_type
enum

"OWNER" if this asset belongs to the referenced business and "AGENCY" if it belongs to the client business, that gave a permission for agency to manage this asset"

is_assigned_to_ad_accounts_in_business
bool

True if data set is assigned to any ad accounts in given busienss

permitted_roles
list<string>

Roles given for this asset to the referenced business

paging

For more details about pagination, see the Graph API guide.

summary

Aggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=total_count).

FieldDescription
total_count
int32

Total number data sets for this business.

Validation Rules

ErrorDescription
80004There have been too many calls to this ad-account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting.
200Permissions error

Creating

You can make a POST request to offline_conversion_data_sets edge from the following paths:
When posting to this edge, an OfflineConversionDataSet will be created.

Example

Graph API Explorer
POST /v5.0/{business-id}/offline_conversion_data_sets HTTP/1.1
Host: graph.facebook.com

name=offline_event_set&description=conversion+data+used+for+superbowl+campaign
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->post(
    '/{business-id}/offline_conversion_data_sets',
    array (
      'name' => 'offline_event_set',
      'description' => 'conversion data used for superbowl campaign',
    ),
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{business-id}/offline_conversion_data_sets",
    "POST",
    {
        "name": "offline_event_set",
        "description": "conversion data used for superbowl campaign"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
Bundle params = new Bundle();
params.putString("name", "offline_event_set");
params.putString("description", "conversion data used for superbowl campaign");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{business-id}/offline_conversion_data_sets",
    params,
    HttpMethod.POST,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
NSDictionary *params = @{
  @"name": @"offline_event_set",
  @"description": @"conversion data used for superbowl campaign",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{business-id}/offline_conversion_data_sets"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
curl -X POST \
     -d "name=offline_event_set" \
     -d "description=conversion+data+used+for+superbowl+campaign" \
        https://graph.facebook.com/v5.0/{business-id}/offline_conversion_data_sets
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

ParameterDescription
auto_assign_to_new_accounts_only
boolean
Default value: false

Assign data set to only new ad accounts.This flag can only be used with enable_auto_assign_to_accounts flag together.

description
UTF-8 encoded string

Description of the offline conversion data set.

enable_auto_assign_to_accounts
boolean

Enable/disable auto assign data set to accounts. If this flag is set to true, the data set will be assigned to all existing (optional, depends on the auto_assign_to_new_accounts_only flag) and new ad accounts owned by the business.

name
UTF-8 encoded string

Name of the offline conversion data set.

Required

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: numeric string,
}

Validation Rules

ErrorDescription
100Invalid parameter
275Cannot determine the target object for this request. Currently supported objects include ad account, business account and associated objects.
801Invalid operation
294Managing advertisements requires an access token with the extended permission for ads_management

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.