Technical Documentation
Example Request
To save person data, a HTTP POST call that sends JSON data is required. At least the email is mandatory, we would suggest to also add an action.
A minimal example would be:
HTTP-POST:
https://{Cambuildr-Url}/api/v1/people
{
"email" : "[email protected]",
"actions" :
[
{
"name": "signup", // Action Verb: What happened?
"context": "Newsletter" // Context: What does the action refer?
"source": "Titel of Page" // Source: Where did the action happen?
"vendor": "Campaign Website", // System, optional
}
]
}
The Cambuildr-URL can be found in the admin mask:
The complete URL for this example request would be https://demo.cambuildr.com/api/v1/people
Possible parameters
HTTP-POST: https://{Cambuildr-Url}/api/v1/people
{
"name" : "Markus", // first name, optional
"surname" : "Mustermann" // last name, optional
"email" : "[email protected]", // e-mail, mandatory
"actions" :
[
{
"name": "signup", // Action Verb: What happened?
"context": "Newsletter" // Context: What does the action refer?
"source": "Titel of Page" // Source: Where did the action happen?
"vendor": "Campaign Website", // System, optional
"tags": ["Topic A", "Topic B"], // tags of the action, optional
"value": 10.00 // A value for this action. This value has to be numeric to be able to be used for selecting target audiences
"custom_key": "custom_value" // arbitrary key-value pairs, that can be accessed with the placeholder %action.custom_key%
"disclaimer_accepted": true, // if the signup disclaimer was accepted
"disclaimer_text": "I consent to the disclaimer..." // text of the disclaimer
}
],
"tags":[ // optional
{ "screen_name":"tag-1" },
{ "screen_name":"tag-2" }
],
"gender": "m", // gender, optional (m or f)
"birthdate": "YYYY-MM-DD", //birthdate, optional
"phone": "+43 1 5323201", //phone number, optional
"address": { // address, optional
"street" : "Gölsdorfgasse 4/6",
"city" : "Wien",
"zip_code" : "1010",
"country_alpha2" : "AT"
},
"custom_fields": // optional
[
{
"name": "Name of first custom field",
"value": "Value of first custom field"
},
{
"name": "Name of second custom field",
"value": "Value of second custom field"
}
],
"social_connectors": [{ // optional
"name": "custom",
"foreign_id": "12345",
"social_user_name": "External Name"
}]
}
Please not, that the custom fields need to exist in the CamBuildr before they can be stored via the API. Otherwise an error '412 Precondition Failed' is returned.
Attention
Be aware, that, when sending tags
(event with empty array), and are using this route with an authenticated user, all tags, that are not sent with the request, will be removed from the contact.