| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- $url = "https://webdev.services.vision4it.de/kunden/xtend2/onboarding_mail.php";
- // The data to send to the API
- $postData = json_decode('{
- "ignite": [
- "other",
- "telefon"
- ],
- "startdatum": "2024-07-31",
- "employeeType": "Agent",
- "position": "Service Specialist",
- "mykene": "ja",
- "ap": "Stefanie Uhler",
- "areamanager": "Guido Baumeister",
- "name": {
- "vorname": "Andreas",
- "nachname": "Schiefer"
- },
- "kuerzel": "ASC",
- "benutzername": "ASCHI",
- "email": "andreas.schiefer@xtend.de",
- "anrede": "Herr",
- "durchwahl": 1234,
- "agentengruppen": [
- "Aushilfe"
- ],
- "abteilung": "EDV",
- "ms365lizenz": "Basic",
- "infos": "Info 1\nInfo 2"
- }');
- // Setup cURL
- $ch = curl_init($url);
- curl_setopt_array($ch, array(
- CURLOPT_POST => TRUE,
- CURLOPT_RETURNTRANSFER => TRUE,
- CURLOPT_HTTPHEADER => array(
- 'Content-Type: application/json;charset=UTF-8'
- ),
- CURLOPT_POSTFIELDS => json_encode($postData)
- ));
- // Send the request
- $response = curl_exec($ch);
- // Check for errors
- if($response === FALSE){
- die(curl_error($ch));
- }
- // Decode the response
- $responseData = json_decode($response, TRUE);
- // Close the cURL handler
- curl_close($ch);
- // Print the date from the response
- var_dump($responseData);
- ?>
|