Contacts : Validation cancel
Omschrijving
Annuleer een actieve contactvalidatieEndpoint
POST https://api.nextname.nl/v2/contacts/handle/validate/cancel
Parameters
geenAntwoord
HTTP status code: 204 No Content
Voorbeeld
Beschrijving:
Validatie annuleren voor contact ABCD-0001
Opdracht in PHP:
<?php
$env = "live"; // live or test
$api_key = "XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$api_url = "/v2/contacts/ABCD-0001/validate/cancel";
$api_host = $env === "live" ? "https://api.nextname.nl" : "https://api-test.nextname.nl";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_host . $api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt( $ch, CURLOPT_POSTFIELDS, "" );
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: Bearer $api_key"));
$output = curl_exec($ch);
if(curl_getinfo($ch, CURLINFO_HTTP_CODE) === 204) {
echo "Contact validation successfully canceled";
}
curl_close($ch);
Opdracht in cURL:
curl -X POST -H "Authorization: Bearer XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ https://api-test.nextname.nl/v2/contacts/validate/cancel
HTTP/1.1 204 No Content