Merge two customers

Merge two customers using POST.

Request

POST https://www.kursguiden.no/api/v2/merge-customers/:id-customer-from/:id-customer-to

For every API request you make, you'll need to present the API access key in the HTTP Header as X-API-Key to be authenticated.

Example code in PHP

$request_url = 'https://www.kursguiden.no/api/v2/merge-customers/:id-customer-from/:id-customer-to';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'X-API-Key: {your-api-key}',
  'Accept: application/json',
));
$result = curl_exec($ch);
curl_close($ch);
               

Response

If the method is successful it responds with an JSON structure, as it is shown below.

<html><head><title>404 Page Not Found</title><style>body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif;}h1{margin:0;font-size:48px;font-weight:normal;line-height:48px;}strong{display:inline-block;width:65px;}</style></head><body><h1>404 Page Not Found</h1><p>The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.</p><a href="/api/">Visit the Home Page</a></body></html>

Unsuccessful response sample:

{
    "error": "Wrong API Key"
}      
© 2024 FrontCore