Create a customer deletion request
POST /v2/compliance/customers/delete
Sends a request to Instacart to delete the data for a customer in accordance with the California Consumer Privacy Act (CCPA) and other applicable laws. You can identify the customer in the request body by specifying the customer's email address, phone number, or other unique identifier.
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.
note
This endpoint differs from the original Create a user deletion request endpoint, where you must specify the Connect user ID as a parameter in the URL.
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/ioutil"
)
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, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Response
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | success flag. |