Create a user data deletion request
POST /v2/fulfillment/users/{user_id}/privacy_request
Sends a request to Instacart to delete the data for the specified Connect user account in accordance with applicable data privacy laws and regulations. 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 Connect user account and any associated user data is deleted.
Additional configuration is required before user data deletion requests can be processed. To update your configuration, contact your Instacart representative.
For more information about the data that Instacart collects, see Data privacy.
Security
Name | In | Description |
---|---|---|
Authorization | header | The Authorization header with the bearer token acquired during authentication. |
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
user_id | path | string | The ID of the user. |
Request
None.
Request examples
- cURL
- Java
- Python
- Go
curl --request POST \
--url 'https://connect.instacart.com/v2/fulfillment/users/{user_id}/privacy_request' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'
HttpResponse<String> response = Unirest.post("https://connect.instacart.com/v2/fulfillment/users/{user_id}/privacy_request")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.header("Authorization", "Bearer <token>")
.asString();
import http.client
conn = http.client.HTTPSConnection("connect.instacart.com")
headers = {
'Accept': "application/json",
'Content-Type': "application/json",
'Authorization': "Bearer <token>"
}
conn.request("POST", "/v2/fulfillment/users/{user_id}/privacy_request", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://connect.instacart.com/v2/fulfillment/users/{user_id}/privacy_request"
req, _ := http.NewRequest("POST", url, nil)
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 | Whether the request was successful. |
Response examples
200 Success
200
User data deletion request created
{
"success": true
}
4XX Errors
Error responses return either a single error or multiple errors.
HTTP Code | Cause | Error Message | Error Code | Error Meta |
---|---|---|---|---|
400 | User not found for the provided ID | "User Not Found" | 1001 | {"key":"user_id"} |