Skip to main content

Delete a Customer

DELETE Delete by ID

https://useast.api.elasticpath.com/v2/customers/:id

Deletes a customer by ID.

Parameters

Path parameters

NameRequiredTypeDescription
idRequiredstringThe ID for the Customer to delete.

Headers

NameRequiredTypeDescription
X-Moltin-Customer-TokenOptionalstringA customer token used to access customer implicitly.
AuthorizationRequiredstringThe Bearer token required to get access to the API. If there is no customer token the grant type must be client_credentials.

Request Example Delete by ID

Curl

curl -X DELETE https://useast.api.elasticpath.com/v2/customers/:id \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \

JavaScript SDK

const MoltinGateway = require("@moltin/sdk").gateway;
const Moltin = MoltinGateway({
client_id: "X",
client_secret: "X",
});
const id = "XXXX";
Moltin.Customers.Delete(id).then((response) => {
// Do something
});

Request Example Delete With Customer Token

curl -X DELETE https://useast.api.elasticpath.com/v2/customers/:id \
-H "X-Moltin-Customer-Token: XXXX"
-H "Authorization: Bearer XXXX"

Request Example Delete Without Customer Token

curl -X DELETE https://useast.api.elasticpath.com/v2/customers/:id \
-H "Authorization: Bearer XXXX"

Response Example

204 No Content