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.
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 about data privacy with Storefront Pro, 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 (email or provider_uid). | |
identifier_type | string | Type of identifier: 'email' (default) or 'provider_uid'. |
Request examples
- cURL
- Java
- Python
- Go
- Node.js
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",
"identifier_type": "email"
}'
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 \"identifier_type\": \"email\"\n}")
.asString();
import http.client
conn = http.client.HTTPSConnection("connect.instacart.com")
payload = "{\n \"identifier\": \"string\",\n \"identifier_type\": \"email\"\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 \"identifier_type\": \"email\"\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))
}
const http = require('https');
const options = {
method: 'POST',
hostname: 'connect.instacart.com',
port: null,
path: '/v2/compliance/customers/delete',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: 'Bearer <token>'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({identifier: 'string', identifier_type: 'email'}));
req.end();
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
}