Graph API Version

Offline Conversion Data Set

Reading

A Data Set for Offline Conversions object

Example

Graph API Explorer
GET /v4.0/{offline-conversion-data-set-id} 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(
    '/{offline-conversion-data-set-id}',
    '{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(
    "/{offline-conversion-data-set-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{offline-conversion-data-set-id}",
    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:@"/{offline-conversion-data-set-id}"
                                      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

FieldDescription
id
numeric string

ID of the data set

business

Business id of the owner of the data set

config
string

The configuration to use for uploads to this data set. Format determined by the method of upload (eg. UI or SDK)

creation_time
datetime

Time when dataset was created

description
string

The description given by the owner of this data set

duplicate_entries
integer

Number of duplicate entries for this data set

enable_auto_assign_to_accounts
bool

Whether the data set is auto assigned and auto tracked for all accounts that the owner business owns

event_stats
string

Event stats of this data set

event_time_max
integer

Latest entry of this data set

event_time_min
integer

Earliest entry of this data set

is_mta_use
bool

Whether the data set is restricted to MTA only

is_restricted_use
bool

Whether the data set is restricted to Lift only

is_unavailable
bool

Whether this data set is unavailable

last_upload_app
string

The app that made the most recent upload

last_upload_app_changed_time
integer

Time when the app that made the most recent upload last changed

match_rate_approx
int32

Approximate match rate percentage for the entries in this data set

matched_entries
integer

Number of matched entries of this data set

name
string

The name given by the owner of this data set

usage
OfflineConversionDataSetUsage

Usage info for the data set

valid_entries
integer

Number of valid entries of this data set

Edges

EdgeDescription

Ad Accounts that have access to this data set

Agencies that have access to this data set

Audiences sourced by this data set

Custom conversions sourced by this data set

Statistics of the data set

The uploads associated with this data set

Validation Rules

ErrorDescription
100Invalid parameter
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 /v4.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/v4.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
294Managing advertisements requires an access token with the extended permission for ads_management
275Cannot determine the target object for this request. Currently supported objects include ad account, business account and associated objects.
You can make a POST request to users edge from the following paths:
When posting to this edge, an OfflineConversionDataSet will be created.

Parameters

ParameterDescription
data
list<Object>

An array of match keys

Required
email_fn
list<string>

phone_fn
list<string>

email
list<string>

phone
list<string>

madid
list<string>

ln_fn_zip
list<string>

ln_fn_ct_st
list<string>

ln_fi_zip
list<string>

ln_fi_ct_st
list<string>

ln_fi_st_dob
list<string>

ln_fn_dob
list<string>

ln_fn_zip_doby
list<string>

ln_fn_ct_st_doby
list<string>

ln_fn_st_doby
list<string>

EMAIL_FN_SHA256
list<string>

PHONE_FN_SHA256
list<string>

EMAIL_SHA256
list<string>

PHONE_SHA256
list<string>

MADID_SHA256
list<string>

LN_FN_ZIP_SHA256
list<string>

LN_FN_CT_ST_SHA256
list<string>

LN_FI_ZIP_SHA256
list<string>

LN_FI_CT_ST_SHA256
list<string>

LN_FI_ST_DOB_SHA256
list<string>

LN_FN_DOB_SHA256
list<string>

LN_FN_ZIP_DOBY_SHA256
list<string>

LN_FN_CT_ST_DOBY_SHA256
list<string>

LN_FN_ST_DOBY_SHA256
list<string>

lead_id
string

extern_id
string

gen
list<string>

doby
list<string>

dobm
list<string>

dobd
list<string>

ln
list<string>

fn
list<string>

fi
list<string>

ct
list<string>

st
list<string>

zip
list<string>

country
list<string>

partialphone
list<string>

phoneid
list<string>

streetname
list<string>

streetnum
list<string>

streettype
list<string>

street2row
list<string>

streetaddress
list<string>

appuid
Object

app
int64

Required
uid
int64

Required
pageuid
Object

page
int64

Required
uid
int64

Required
f5first
list<string>

f5last
list<string>

email_md5
list<string>

phone_md5
list<string>

dob
list<string>

Return Type

Struct {
id: numeric string,
num_processed_entries: int32,
}

Validation Rules

ErrorDescription
100Invalid parameter

Updating

You can update an OfflineConversionDataSet by making a POST request to /{offline_conversion_data_set_id}.

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

SELF_EXPLANATORY

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

SELF_EXPLANATORY

Return Type

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
success: bool,
}

Validation Rules

ErrorDescription
200Permissions error
100Invalid parameter
You can update an OfflineConversionDataSet by making a POST request to /{offline_conversion_data_set_id}/validate.

Parameters

ParameterDescription
data
list<JSON-encoded string>

Event data uploaded by customer, need follow the correct format

namespace_id
numeric string or integer

Scope used for resolving external_id in event data

Return Type

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
total_validated_count: int32,
events_without_match_keys_count: int32,
match_count: int32,
unique_match_count: int32,
duplicate_events: int32,
unique_event_time_of_day_count: int32,
events_lagged_2_days_count: int32,
events_lagged_7_days_count: int32,
events_lagged_90_days_count: int32,
events_with_value_count: int32,
unique_value_count: int32,
no_orderid_count: int32,
events_with_itemnum_no_orderid_count: int32,
nonunique_orderid_itemnum_count: int32,
orderid_itemnum_nonunique_event_time_count: int32,
orderid_nonunique_match_keys_count: int32,
dataset_not_assigned_to_adaccount: bool,
dataset_shared_to_agency: bool,
events_before_adaccount_assignment: List [
Struct {
business_id: numeric string,
adaccount_id: numeric string,
adaccount_name: string,
assign_time: timestamp,
events_before_assignment: int32,
}
],
events_contents_with_nonstandard_category: Struct {
count: int32,
samples: List [
string
],
},
}

Validation Rules

ErrorDescription
100Invalid parameter

Deleting

You can delete an OfflineConversionDataSet by making a DELETE request to /{offline_conversion_data_set_id}.

Parameters

This endpoint doesn't have any parameters.

Return Type

Struct {
success: bool,
}

Validation Rules

ErrorDescription
200Permissions error