GET call to https://graph.facebook.com/v16.0/{ads-pixel-id}/?fields=is_consolidated_container to detect if the advertiser’s dataset is consolidated and thus eligible for passing offline events using the Conversions API.action_source as physical_store for all offline and store events. Note that this parameter is required for all server event types. By using the Conversions API, you agree that the action_source parameter is accurate to the best of your knowledge.upload_tag parameter is still supported for offline event uploads for advertisers using legacy API for offline events.| Parameter names | Parameter | Hashing required |
|---|---|---|
Email Address(es) | email | YES |
Phone Number(s) | phone | YES |
Gender | gen | YES |
Date of Birth | db | YES |
Last Name | ln | YES |
First Name | fn | YES |
City | ct | YES |
US States | st | YES |
Zip codes | zip | YES |
Country | country | YES |
Mobile Advertiser ID | madid | Do not hash The advertising ID from an Android device or the Advertising Identifier (IDFA) from an Apple device. |
Third-party user id | external_id | Highly recommended |
The lead id from Lead Ads | lead_id | Do not hash |
| Parameter | Description |
|---|---|
event_timetype: integer | Required The UNIX timestamp of the conversion event. Example: '1456870055' |
event_nametype: string | Required Type of event. Example: ViewContent, Search, AddToCart, AddToWishlist, InitiateCheckout, AddPaymentInfo, Purchase, Lead, Other |
store_datatype: JSON dictionary | Optional Store location data about conversion event. Example: |
currencytype: string | Required Three-letter ISO currency code for this conversion event. Required for Purchase events.Example: USD |
valuetype: double | Required Value of conversion event. Required for Purchase events.Example: 16.00 |
content_typetype: string | |
contentstype: JSON array | Optional. Required if you integrate your ads with catalog. Required: id, quantityRecommended: price, brand, categoryRequired: [ {id: "A", quantity: 1}, {id: "B", quantity: 2}, {id: "C", quantity: 1}]Recommended: [ {id: "A", quantity: 1, brand: "Brand_A", category: "", price: 10.0}] |
custom_datatype: JSON dictionary | Optional. Information about this conversion event. Example: {category: 'ICECREAM'} |
order_idtype: string | Optional. Unique identifier for each transaction or order in an offline event set. For example, for retail this can be a receipt ID. Example: ATN10001, 123456 |
item_numbertype: string | Optional. Unique identifier to distinguish events within the same order or transaction. Example: 1, a |
POST request to the Conversions API from this path: https://graph.facebook.com/{API_VERSION}/{DATASET_ID}/events?access_token={TOKEN}curl -X POST \
-F 'data=[
{
"event_name": "Purchase",
"event_time": 1674000041,
"user_data": {
"em": [
"309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd"
],
"ph": [
"254aa248acb47dd654ca3ea53f48c2c26d641d23d7e2e93a1ec56258df7674c4",
"6f4fcb9deaeadc8f9746ae76d97ce1239e98b404efe5da3ee0b7149740f89ad6"
]
},
"custom_data": {
"currency": "usd",
"value": 123.45,
"contents": [{
"id": "product123",
"quantity": 1
}]
},
"action_source": "physical_store"
}
]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v15.0/<DATASET_ID>/events
event_time can be up to 7 days before you send an event to Meta. If any event_time in data is greater than 7 days in the past, we return an error for the entire request and process no events. For offline and physical store events with physical_store as action_source, you should upload transactions within 62 days of the conversion.dataset_id, event_time, event_name, item_number, and the key field based on method in the given event’s payload.event_time, event_name having the same order_id or same set of Customer Information Parameters without order_id, we will consider them duplicate events and take the first event. The user based deduplication method only works with the same Customer Information Parameters fields in the two payloads.physical_store action source when applicable. By using the Conversions API, you agree that the action_source parameter is accurate to the best of your knowledge.