cURL
curl -X PUT \
/customers/{customerId}/remove-parent \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/customers/{customerId}/remove-parent"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/customers/{customerId}/remove-parent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/customers/{customerId}/remove-parent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Hierarchy
Remove parent customer
Removes the parent customer assignment, making this customer a root-level customer in the organization hierarchy.
This endpoint requires the customer.hierarchy feature to be enabled.
customer:writePUT
/
customers
/
{customerId}
/
remove-parent
cURL
curl -X PUT \
/customers/{customerId}/remove-parent \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/customers/{customerId}/remove-parent"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/customers/{customerId}/remove-parent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/customers/{customerId}/remove-parent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Removes the parent customer assignment from a child customer. After removal, the customer becomes a standalone root-level customer without hierarchy membership.
Feature Flag
This endpoint requires thecustomer.hierarchy feature to be enabled. If the feature is not active, a 501 Not Implemented response is returned.
Webhooks
A successful removal dispatches thecustomer.parent.removed webhook event, which includes the customer payload.Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Pfadparameter
The ID of the customer to remove the parent from
Antwort
Parent customer removed successfully
The ID of the customer
War diese Seite hilfreich?