Deletion status endpoint#

Core action

This is a required action. All server implementations must support it.

GET /deletions/{id}

This endpoint enables clients to query the status of a deletion. When a client sends a DELETE request, the server must respond with a deletion_id that can be used with this endpoint to check whether a deletion has been successfully actioned.

Deletion status parameters#

Parameter

Type

Required?

Description

deletion_id

Integer

Yes

The ID of the deletion object

status

String

Yes

A status message indicating the status of the deletion. Available values:

  • SUCCESS

  • FAILURE

  • PENDING

message

String

No

A status message indicating the current status of the deletion, or any errors that were encountered

Parameters#

The client must send the deletion’s id in the path of the request.

Example request#

curl -X 'GET' \
  '/deletions/25' \
  -H 'accept: application/json'
curl -X 'GET' \
  '/deletions/25' \
  -H 'accept: application/xml'

Example 200 response#

The server must send a 200 (Success) if it can fetch a status object without issue. This response must contain information about the deletion_id passed in the query path.

Successful deletion#

{
   "deletion_id": 25,
   "status": "SUCCESS",
   "message": "Subscription deleted successfully"
}
<?xml version="1.0" encoding="UTF-8"?>
<deletion>
	<deletion_id>25</deletion_id>
	<status>SUCCESS</status>
	<message>Subscription deleted successfully</message>
</deletion>

Pending deletion#

{
   "deletion_id": 25,
   "status": "PENDING",
   "message": "Deletion is pending"
}
<?xml version="1.0" encoding="UTF-8"?>
<deletion>
	<deletion_id>25</deletion_id>
	<status>PENDING</status>
	<message>Deletion is pending</message>
</deletion>

Failed deletion#

{
   "deletion_id": 25,
   "status": "FAILURE",
   "message": "The deletion process encountered an error and was rolled back"
}
<?xml version="1.0" encoding="UTF-8"?>
<deletion>
	<deletion_id>25</deletion_id>
	<status>FAILURE</status>
	<message>The deletion process encountered an error and was rolled back</message>
</deletion>