Create a customer deletion request
POST /v2/compliance/customers/delete
Sends a request to Instacart to delete the data for a Storefront Pro customer in accordance with the California Consumer Privacy Act (CCPA) and other applicable laws. You can identify customers in the request body by specifying a customer's email address, phone number, or other unique identifier.
info
If you are a retailer using Connect with your whitelabel storefront, use the Create a user deletion request endpoint instead of this endpoint.
If the request is received, the response contains the success field set to true. After Instacart receives the request, a user privacy workflow is initiated and the customer and any associated user data is deleted.
For more information, see Data Privacy.
Security
| Name | In | Description |
|---|---|---|
Authorization | header | The Authorization header with the bearer token acquired during authentication. |
Request
| Field | Type | Required | Description |
|---|---|---|---|
identifier | string | The customer identifier. |
Request Examples
- cURL
- Java
- Python
- Go
curl --request POST \
--url https://connect.instacart.com/v2/compliance/customers/delete \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"identifier": "string"
}'
HttpResponse<String> response = Unirest.post("https://connect.instacart.com/v2/compliance/customers/delete")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.header("Authorization", "Bearer <token>")
.body("{\n \"identifier\": \"string\"\n}")
.asString();
import http.client
conn = http.client.HTTPSConnection("connect.instacart.com")
payload = "{\n \"identifier\": \"string\"\n}"
headers = {
'Accept': "application/json",
'Content-Type': "application/json",
'Authorization': "Bearer <token>"
}
conn.request("POST", "/v2/compliance/customers/delete", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://connect.instacart.com/v2/compliance/customers/delete"
payload := strings.NewReader("{\n \"identifier\": \"string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Response
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | success flag. |
Response Examples
200 Success
200Customer delete request successful200Customer delete request already exists
{
"success": true
}
{
"success": false
}