Cloud Cruiser became HPE Consumption Analytics on Nov. 1st. You'll still see the old name in places while we update this site.

 

 

Consumption Analytics Documentation

Home > Cloud Cruiser 4 > REST API reference > Customers > Delete a customer by ID

Delete a customer by ID

Deletes a customer specified by its numeric ID.

Resource URL

DELETE http://<ccServerURL>/rest/v2/customers/<id>

Request

Parameters
Version 4.0
Version 4.1 and later

For Cloud Cruiser 4.1 and later, use the following parameters:

  Name Type Description
URL path parameters (required) id integer The ID of the customer to deleteUse a pipe (|) to separate the levels of your account structure.
URL query parameters (optional) deleteAssociates boolean Whether to delete the customer's associated transactions and discount/surcharge instances. The default is false.
Body

None

Response

Content-Type

text/plain

Body

A statement of whether the deletion is successful.​

Examples

URL invocation (basic)

DELETE http://localhost:8080/rest/v2/customers/10301

URL invocation (delete associated transactions and discounts)

DELETE http://localhost:8080/rest/v2/customers/10301?deleteAssociates=true

Java invocation
Response body (success)

Successfully deleted the customer with id 10301

Response body (nonexistent customer)

<message>Failed to delete the customer Cause: com.cloudcruiser.common.exceptions.NoSuchRecordException: Unable to locate specified Customer</message>

Response body (customer has transactions or discounts)

<message>Failed to delete the customer Cause: com.cloudcruiser.common.exceptions.CannotDeleteCustomerWithTransactionsException: This customer has associated transactions and/or discount revisions.<br/>Are you sure you want to delete?</message>

Last modified

Tags

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP