Create Personal Data Erasure Request
POSThttps://useast.api.elasticpath.com/v2/personal-data/erasure-requests
This request serves to create a new erasure request for a given resource ID and Type. All resources that belong to the same personal data set will be erased.
Request
- application/json
Body
data ErasureRequestrequired
Responses
- 201
- 400
- default
Created
- application/json
- Schema
- Example (auto)
- postErasureRequest
Schema
data object
{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"resource_type": "account",
"resource_id": "98140362-6caf-4829-b93d-953ac6adbe6e",
"type": "string",
"initiator": {
"access-token-email": "accounts@elasticpath.com",
"access-token-id": 1222341536243516000,
"access-token-name": "elastic path test team",
"access-token-store-id": "15ea9633-278c-4807-80f7-2009fed63c7e",
"access-token-type": "client-credentials-token"
},
"status": "string",
"status_description": "string",
"created_at": "string",
"updated_at": "string",
"links": {
"self": "string"
}
}
}
{
"data": {
"id": "fb25ecd9-c610-4659-97d6-0a7550ac0ddc",
"type": "erasure_request",
"resource_id": "98140362-6caf-4829-b93d-953ac6adbe6e",
"resource_type": "account",
"initiator": {
"access-token-email": "accounts@molt.in",
"access-token-id": "1222341536243515939",
"access-token-name": "moltin test team",
"access-token-store-id": "15ea9633-278c-4807-80f7-2009fed63c7e",
"access-token-type": "client-credentials-token"
},
"status": "CREATED",
"status_description": "The erasure request successfully created",
"created_at": "2022-06-07T12:25:38.52Z",
"updated_at": "2022-06-07T12:25:38.69Z",
"links": {
"self": "https://useast.api.elasticpath.com/v2/personal-data/erasure-requests/fb25ecd9-c610-4659-97d6-0a7550ac0ddc"
}
}
}
Bad Request
- application/json
- Schema
- Example (auto)
- bad-request-error
Schema
errors Error[]required
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Required field missing
{
"errors": [
{
"title": "Bad Request",
"status": "400",
"detail": "Validation failed: field 'Type' on the 'ttl-type' tag."
}
]
}
Internal server error.
- application/json
- Schema
- Example (auto)
- internal-server-error
Schema
errors Error[]required
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Internal server error
{
"errors": [
{
"title": "Internal Server Error",
"status": "500",
"detail": "there was a problem processing your request"
}
]
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://useast.api.elasticpath.com/v2/personal-data/erasure-requests");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"resource_type\": \"account\",\n \"resource_id\": \"98140362-6caf-4829-b93d-953ac6adbe6e\",\n \"type\": \"string\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear