Schnittstelle:

newTemplate

Die Funktion dient zum Anlegen eines neuen BÜ-Vorgang.

Request Beispiel

$UpdateParams = array(
    "APIData" => array(
        "_Security_Token_" => "vZHa8ChCkhjPG2l253zmgg80s6NdgkKRqiytY2Q4yN6vH5rMzVkVJMdswbmOlG5", //Security_Token zur Authentifizierung
        "action" => 'newTemplate' // Funktion die ausgeführt werden soll
    ),
    "templates" => array(
        "templates_title" => "Auftragsdatenverarbeitung",
        "templates_text" => "<h1>Hier kommt HTML-Text</h1>...",
        "templates_status" => "1",
        "templates_sort" => "10",
    )
);

$url = 'https://www.bewerte-deine-versicherung.de/app/core/api/json/v1.0'; //URL der BÜ-BOX-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] => newTemplate
    [status] => success // success gibt an das der Request erfolgreich war
    [templates_id] => 79 // neue ID vom Template
    [error_code] => 0 // 0 für keine Fehler
    [request] => Array
        (
            [APIData] => Array
                (
                    [_Security_Token_] => vZHa8ChCkhjPG2l253zmgg80s6NdgkKRqiytY2Q4yN6vH5rMzVkVJMdswbmOlG5
                    [action] => newTemplate
                    [core_version] => 1.0.4
                    [api_version] => 1.0
                )

            [templates] => Array
                (
                    [templates_title] => Allgemeine Bestandsübertragung
                    [templates_text] => <h1>Hier kommt HTML-Text</h1>...
                    [templates_status] => 1
                    [templates_sort] => 10
                )
        )
)