Delete Customer
curl --request DELETE \
--url https://api.launchmystore.io/api/v1/customers/{id}.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/customers/{id}.json"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/customers/{id}.json', 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://api.launchmystore.io/api/v1/customers/{id}.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/customers/{id}.json"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.launchmystore.io/api/v1/customers/{id}.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/customers/{id}.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyCustomers
Delete Customer
Delete a customer from the store customer list
DELETE
/
api
/
v1
/
customers
/
{id}
.json
Delete Customer
curl --request DELETE \
--url https://api.launchmystore.io/api/v1/customers/{id}.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/customers/{id}.json"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/customers/{id}.json', 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://api.launchmystore.io/api/v1/customers/{id}.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/customers/{id}.json"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.launchmystore.io/api/v1/customers/{id}.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/customers/{id}.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyDelete Customer
Deletes a customer from the store’s customer list. Requires thewrite_customers scope. Fires the customers/delete webhook.
Only customer-list entries (customers created by the merchant or through
Create Customer) can be deleted. A
storefront account — a shopper who signed up on the store, the id an
order reports as
customer.id — belongs to the shopper and is refused with
422. Orders keep their copy of the customer details either way.Request
curl -X DELETE "https://api.launchmystore.io/api/v1/customers/9b2f4c1e-7d3a-4e8b-a1c5-2f6e8d9b0a14.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch(
'https://api.launchmystore.io/api/v1/customers/9b2f4c1e-7d3a-4e8b-a1c5-2f6e8d9b0a14.json',
{ method: 'DELETE', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN' } }
);
Path Parameters
string
required
The customer’s
id.Response
The standard response envelope with a confirmation message.{
"status": 200,
"state": "success",
"message": "Customer deleted successfully"
}
Error Codes
| Status | Description |
|---|---|
404 | No customer with this id in the store |
422 | The id is a storefront account, which can’t be deleted through the API |
401 | Invalid or missing access token |
403 | App doesn’t have the write_customers scope |