Overview

The Delete Transfer endpoint allows you to remove individual transfers from a bulk transfer batch that hasn’t been executed. This is useful for correcting errors or removing unnecessary transfers before batch execution.

You can only delete transfers from batches that are in the created status. Once a batch is executing or completed, transfers cannot be deleted.

Endpoint

DELETE /bulk-transfers/{batch_id}/transfers/{id}

Path Parameters

batch_id
string
required

The unique identifier of the bulk transfer batch

  • Must be a valid UUID
  • Batch must be in created status
id
string
required

The unique identifier of the transfer to delete

  • Must be a valid UUID
  • Transfer must be part of the specified batch

Request Example

curl -X DELETE "https://api.spendjuice.com/bulk-transfers/88dbcb86-5025-4ac9-9750-4aa5a77a723c/transfers/e2df31d2-828e-11ef-8f08-acde48001122" \
-H "Authorization: Bearer YOUR_API_KEY"

Response

A successful delete operation returns an HTTP 204 (No Content) response with no response body.

Error Responses

Validation Rules

  1. Batch Status

    • Only transfers in batches with created status can be deleted
    • Deletion blocked if batch is executing/completed
    • Batch must belong to your account
  2. Transfer Requirements

    • Transfer must exist in the specified batch
    • Transfer must not be in processing state
    • Transfer ID must be valid format

Status Impact

Deleting a transfer:

  • Reduces the batch’s total transfer count
  • Updates batch metadata
  • Cannot be undone - requires re-adding if needed
  • Does not affect other transfers in the batch

Best Practices

  1. Validation

    • Verify batch and transfer status before deletion
    • Handle expected error cases gracefully
    • Log deletion attempts for audit purposes
  2. Error Handling

    • Implement retry logic for network errors
    • Show clear error messages to users
    • Monitor deletion success rates
  3. Security

    • Validate user permissions
    • Log all deletion operations
    • Implement rate limiting
    • Use HTTPS for all requests

Need Help?

For additional assistance: