dokNet.dk API


    Code example


    Hent status på respondent

    Du henter status på en respondent på adressen https://doknet.dk/api/respondent/status/{fid}

    Eksempel ved hjælp af PHP og curl

    <?php
        // The authorization token
        $authorization = "Authorization: Bearer <token>";
     
        // Parameters
        $fid = '<fid>';
     
        // Setup cURL
        $ch = curl_init('https://doknet.dk/api/respondent/status/' . $fid);
        curl_setopt_array($ch, array(
          CURLOPT_RETURNTRANSFER => TRUE,
          CURLOPT_SSL_VERIFYPEER => false,
          CURLOPT_HTTPHEADER => array( 'Content-Type: application/json', $authorization ),
        ));
     
        // Send the request
        $response = curl_exec($ch);
     
        // Check for errors
        if($response === FALSE){
          die(curl_error($ch));
        }
     
        // Print the data from the response
        echo $response . PHP_EOL;
    ?>