expo-IP CMS Benutzerhandbuch
Für die Nutzung des expo-IP CMS benötigen Sie einen beliebigen aktuellen Browser, der fehlerfrei den aktuellen HTML5 Standard unterstützt. Hierzu zählt NICHT der Browser: Microsoft INTERNET EXPLORER.Webhook UserUpDate
Mit diesem Webhook können Daten eines Event-Besucher aktualisiert werden.
URL zum UpDate von Userdaten
https://<messename>.expo-ip.com/api/user/update/[userid]
HTTP HEADER
Key |
Type |
Required |
Option |
X-API-KEY |
string |
yes |
|
POST Parameter
Key |
Type |
Required |
Option |
firstname |
string |
no |
|
lastname |
string |
no |
|
|
string |
no |
|
title |
string |
no |
|
salutation |
integer |
no |
1 = Herr / Mr. 2 = Frau / Mrs. 3 = divers / other 4 = unbekannt / unknown |
timezone |
srtring |
no |
https://www.php.net/manual/de/timezones.php |
CustomFieldUser |
array |
no |
|
login_hash |
sting |
no |
|
password |
string |
no |
|
Die Struktur des CustomFieldUser [Array]
[
id =>
[
value => [string | id]
]
]
Return Values
Wenn API Key fehlerhaft: HTTP/1.1 404 Not Found
Wenn API Key korrekt im JSON Format (Beispiel):
{
„success“:“1″,
„resultMessage“:“UpDate erfolgreich“
}
Beispiel:
Die Daten des User mit der UserId 6568 sollen mit folgenden Werten belegt werden:
firstname= „Max“
lastname= „Muster“
email= „max@muster.de“
salutation = 1 (Mann / Mr.)
timezone = „Europe/Berlin“
Firmenname im CustomFieldUser [64] = „EXPO-IP GmbH“
Auswahlfeld im CustomFieldUser [82] = 1
Beispielcode für das UpDate von Benutzerdatenin PHP:
// MESSENAME durch den tatsächlichen Namen der Messe ersetzen: $userId = 6568; $strTargetURL = 'https://MESSENAME.expo-ip.com/api/user/update/' . $userId; // API Key hier einsetzen $apiKey = 'aaaaXXXXaaaaXXXXaaaaXXXX'; // Die zu sendenden Daten $arrUserdata = [ 'User' => [ 'email' => 'max@muster.de', 'firstname' => 'Max', 'lastname' => 'Muster', 'salutation' => 1, 'title' => 'Dr.', 'timezone' => 'Europe/Berlin', ], 'CustomFieldUser' => [ 64 => [ 'value' => 'EXPO-IP GmbH' ], 82 => [ 'value' => '1' ] ] ]; $ch = curl_init($strTargetURL); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-API-KEY: " . $apiKey)); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($arrUserdata) ); curl_setopt($ch, CURLOPT_VERBOSE, '1'); curl_setopt($ch, CURLINFO_HEADER_OUT, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); if( ! $result = curl_exec($ch)) { die('Ein Fehler ist aufgetreten: ' . curl_error($ch)); } print 'Antwort vom Server:'; print $result;
Der Webhook sendet ein Ergebnis im JSON Format zurück, z.B.
{
„success“:“1″,
„resultMessage“:“UpDate erfolgreich“
}