Mark Transaction for Erasure
  • 07 Oct 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

Mark Transaction for Erasure

  • Dark
    Light
  • PDF

Article summary

The Mark Transaction for Erasure API facilitates the deletion of a transaction. Users can request to delete one or more completed or incomplete transactions. They can also specify the time when the transaction should be deleted.

Within the grace period, i.e. the time between the marking of a transaction for erasure and the actual deletion, transactions can be recovered by unmarking them for erasure. For more information, see Unmark transaction for erasure.

Syntax

POST /api/transactions/mark-for-erasure

Examples

Example request

POST /api/transactions/mark-for-erasure
Authorization: Bearer token
Content-Type: application/json
X-Tenant: dealflo
{
  "grace_period": 25,
  "transaction_ids": [
    "6cca2f64-2781-49fc-85de-f80361581968",
    "6cca2f64-2781-49fc-85de-f80361581969",
    "6cca2f64-2781-49fc-85de-f80361581970"
  ]
}

Example response

{
message: "Some of the transactions could be marked for erasure others couldn't."
 
transactions: [
  {
    transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
    marking_event: "Transaction Erase Request - Accepted"
    message: "The transaction has been accepted to be marked for erasure, there could be a short period where the transaction is recoverable, it depends on the data retention policy (grace period)."
  },
 
  {
    transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
    marking_event: "Transaction Erase Request - ID field error"
    message: "This transaction doesn't exist, therefore cannot be marked for erasure."
  },
 
  {
    transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
    marking_event: "Transaction Erase Request - Transaction Not Found"
    message: "This transaction doesn't exist, therefore cannot be marked for erasure."
  },
 
  {
    transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
    marking_event: "Transaction Erase Request - Transaction currently active"
    message: "Failed to mark for erasure, the transaction was active (New or In Post Processing),  if it needs to be mark for erasure, it must first be cancelled."
  },
 
  {
    transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
    marking_event: "Transaction Erase Request - Fail" # Note that if this generic use case doesn't exist, don't create it.
    message: "Failed to mark for erasure. {descriptive_error_message}"
    message: "Failed to mark for erasure, the transaction was locked, please try again later."
  }
 
]
}

Headers

Request headers

The following headers are included in the request:

Status codes

Status codes

Status code

Name

Description

202

Accepted

All transactions were marked for deletion and will be deleted when the timestamp has been reached.

207

 

Some transactions were marked 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.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence