Skip to content

Deletion status endpoint

Endpoint
GET /v1/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.

| 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

Terminal window
$ curl -X 'GET' \
'/v1/deletions/25' \
-H 'accept: application/json'

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"
}

Pending deletion

{
"deletion_id": 25,
"status": "PENDING",
"message": "Deletion is pending"
}

Failed deletion

{
"deletion_id": 25,
"status": "FAILURE",
"message": "The deletion process encountered an error and was rolled back"
}