These callbacks are triggered in response to changes in data associated with the Person API. To receive callbacks, please make sure your endpoint is compatible with our endpoint specifications .
Before you register...
Set up your endpoint before sending any callback configurations. Do not use a "fake" URL to test the configuration, as this will result in errors.
Available Callbacks
Person Added Callback
The Person Added callback event is triggered when a new person record is added to your mobile database.
Callback configuration
When registering for this callback, your request body should look something like the below example.
{
"callback_type":"person_added",
"destination":{
"url":"YOUR_DESTINATION_URL_W_HTTPS", /*Do not use a "fake" URL (such as google.com).*/
"method":"POST",
"content_type":"application/json"
}
}
Callback body
The body of this callback will include the new person entity that was added. Note that the API version will be the version used when creating the callbacks. If you used Version 2 of our APIs when you created the callback, you will receive MDNs in E.164 format.
{
"event_id":"AB234SDFD234",
"callback_type":"person_added",
"event_type":"person_added", //deprecated
"event_date":"2017-03-15T15:42:23Z",
"person":{
"person_id": "12344566",
"external_person_id":"542342",
"mobile_phone":{
"mdn":"+12995551234",
"carrier_code":"104"
},
"timezone": "US/Central",
"timezone_source: "area_code",
"custom_fields":{
"first_name":"Steve",
"birthdate":"1950-12-01T00:00:00Z",
"rewards_id":"543557654",
"favorite_stores":[
{
"id":"4",
"name":"My Hardware Store",
"option_key":"my_hardware_store"
},
{
"id":"12",
"name":"Local Grocery",
"option_key":"local_grocery"
}
]
},
"created_at":"2017-01-15T14:30Z",
"updated_at":"2017-02-18T19:30Z",
"url":"/companies/:company_key/mobiledb/persons/:person_id"
}
}
Person Updated Callback
The Person Updated callback event is triggered when an existing person record has been modified in your mobile database. This includes scenarios where a person was requested to be added, but an existing person was located and matched.
Callback configuration
When registering for this callback, your request body should look something like the below example.
{
"callback_type":"person_updated",
"destination":{
"url":"YOUR_DESTINATION_URL_W_HTTPS", /*Do not use a "fake" URL (such as google.com).*/
"method":"POST",
"content_type":"application/json"
}
}
Callback body
The callback body will include the person object, which represents the complete updated state of the person record. Note that the API version will be the version used when creating the callbacks. If you used Version 2 of our APIs when you created the callback, you will receive MDNs in E.164 format.
{
"event_id":"AB234SDFD234",
"callback_type":"person_updated",
"event_type":"person_updated", //deprecated
"event_date":"2017-03-15T15:42:23Z",
"person":{
"person_id": "12344566",
"external_person_id":"542342",
"mobile_phone":{
"mdn":"+12995551234",
"carrier_code":"104"
},
"timezone": "US/Central",
"timezone_source: "area_code",
"custom_fields":{
"first_name":"Steve",
"birthdate":"1950-12-01T00:00:00Z",
"rewards_id":"543557654",
"favorite_stores":[
{
"id":"4",
"name":"My Hardware Store"
},
{
"id":"12",
"name":"Local Grocery",
"option_key":"local_grocery"
}
]
},
"created_at":"2017-01-15T14:30Z",
"updated_at":"2017-02-18T19:30Z",
"url":"/companies/:company_key/mobiledb/persons/:person_id"
}
}