Schnittstelle:
Json
- Infos
- Allgemein
- Felder
- Fehlercodes
- Funktionen
- Kunden
- • newClient
- • updateClient
- BÜ-Formular
- • newTemplate
- • updateTemplate
- BÜ-Vorgang
- • newProcess
- • listProcess
- • getProcess
- • updateProcess
- • preparationProcess
newClient
Die Funktion dient zum Anlegen eines neuen Kunden.
Request Beispiel
$UpdateParams = array(
"APIData" => array(
"_Security_Token_" => "vZHa8ChCkhjPG2l253zmgg80s6NdgkKRqiytY2Q4yN6vH5rMzVkVJMdswbmOlG5", //Security_Token zur Authentifizierung
"action" => 'newClient' // Funktion die ausgeführt werden soll
),
"clients" => array(
"clients_extern_id" => "10007",
"clients_origin" => "API",
"clients_salutation" => "Herr",
"clients_company" => "",
"clients_firstname" => "Paul",
"clients_lastname" => "Otto",
"clients_street" => "Dorfstraße",
"clients_street_number" => "1",
"clients_citycode" => "09366",
"clients_city" => "Stollberg",
"clients_mail" => "paul.otto@don-irmscher.de",
"clients_dob" => "1971-12-01",
"clients_telephone" => "037296-12345678",
"clients_mobile" => "0177-12345678",
)
);
$url = 'https://www.bewerte-deine-versicherung.de/app/core/api/json/v1.0'; //URL der bewerte-deine-Versicherung.de-API
$tmp = execCurl( json_encode( $UpdateParams ), $url ); //Wandelt das Array $UpdateParams in ein json um und startet den Request
Response Beispiel
$data = json_decode( $tmp, true );
print_r( $data );
Array
(
[function] => newClient
[status] => success // success gibt an das der Request erfolgreich war
[clients_id] => 101 // neue ID vom Auftraggeber
[error_code] => 0 // 0 für keine Fehler
[request] => Array
(
[APIData] => Array
(
[_Security_Token_] => vZHa8ChCkhjPG2l253zmgg80s6NdgkKRqiytY2Q4yN6vH5rMzVkVJMdswbmOlG5
[action] => newClient
[core_version] => 1.0.4
[api_version] => 1.0
)
[clients] => Array
(
[clients_extern_id] => 10017
[clients_origin] => API
[clients_salutation] => Herr
[clients_company] =>
[clients_firstname] => Paul
[clients_lastname] => Otto
[clients_street] => Dorfstraße
[clients_street_number] => 1
[clients_citycode] => 09366
[clients_city] => Stollberg
[clients_mail] => paul.otto@don-irmscher.de
[clients_dob] => 1971-12-01
[clients_telephone] => 037296-12345678
[clients_mobile] => 0177-12345678
)
)
)