Unmark transaction for erasure

With the Unmark Transaction for Erasure API, marking for erasure can be reverted. Transactions that were marked for erasure before are unmarked and will not be deleted.

Syntax

POST /api/transactions/unmark-for-erasure

Examples

Example request

  1. POST /api/transactions/unmark-for-erasure
  2. Authorization: Bearer token
  3. Content-Type: application/json
  4. X-Tenant: dealflo
  5. {
  6.   "transaction_ids": [
  7.     "6cca2f64-2781-49fc-85de-f80361581968",
  8.     "6cca2f64-2781-49fc-85de-f80361581969",
  9.     "6cca2f64-2781-49fc-85de-f80361581970"
  10.   ]
  11. }'

Example response

  1. {
  2. message: "Some of the transactions could be unmarked for erasure other couldn't."
  3.  
  4. transactions: [
  5.  
  6.   {
  7.     transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
  8.     unmarking_event: "Transaction Recovery - Accepted" # TBC Transaction Recovery - Unmarked
  9.     message: "Success unmarked for erasure and won't be deleted until the data retention policy has been reached." # In 1 Use Case
  10.   },
  11.  
  12.   {
  13.     transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
  14.     unmarking_event: "Transaction Recovery - ID field error"
  15.     message: ""
  16.   },
  17.  
  18.   {
  19.     transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
  20.     unmarking_event: "Transaction Recovery - Transaction Not Found"
  21.     message: "This transaction doesn't exist, therefore cannot be marked for erasure."
  22.   },
  23.  
  24.   {
  25.     transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
  26.     unmarking_event: "Transaction Recovery - Fail"
  27.     message: "Failed to unmark for erasure, the transaction was not marked for erasure."
  28.   }
  29. ]
  30. }

Headers

Request headers

The following headers are included in the request:

Status codes

Status codes lists the status codes.

Status codes
Status code Name Description
202 Accepted All transactions were unmarked for deletion.
207   Some transactions were unmarked for deletion, others were not. See each transaction operation status in the response body.
400 Bad Request

Validation error. Empty list of transaction_ids.

Can occur if one of the following applies:

  • X-Tenant is not matching the token.
  • grace_period is a negative number.
  • None of the transaction_ids were accepted.
  • There are too few or too many transactions.
401 Unauthorized Invalid token.
404 Not Found Wrong URL. Transactions provided in the list were not found.
500 Internal Server Error Server or application error.