/customer/{customerId}/delete v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Customers
postCustomerIdDelete
Code samples
const headers = {
Accept: "application/json",
};
fetch("https://goldleaf.app/api/v1/customer/{customerId}/delete", {
method: "POST",
headers: headers,
})
.then(function (res) {
return res.json();
})
.then(function (body) {
console.log(body);
});
POST /customer/{customerId}/delete
Soft-delete a customer
Soft-deletes a customer and their most recent properties using the customer's MongoDB ID. Only users with the admin role are permitted to perform this action. Associated hose assemblies, hose kits, and sales estimates are also updated to reflect deletion.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| customerId | path | string(uuid) | true | The MongoDB ObjectId of the customer to delete |
Example responses
500 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Customer successfully soft-deleted | None |
| 500 | Internal Server Error | Server error | string |
