> ## Documentation Index
> Fetch the complete documentation index at: https://docs.juicyway.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete from Bulk Transfer

> Remove individual transfers from a bulk transfer batch before execution

## 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.

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

## Endpoint

```bash theme={null}
DELETE /bulk-transfers/{batch_id}/transfers/{id}
```

## Path Parameters

<ParamField path="batch_id" type="string" required>
  The unique identifier of the bulk transfer batch

  * Must be a valid UUID
  * Batch must be in `created` status
</ParamField>

<ParamField path="id" type="string" required>
  The unique identifier of the transfer to delete

  * Must be a valid UUID
  * Transfer must be part of the specified batch
</ParamField>

## Request Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.spendjuice.com/bulk-transfers/88dbcb86-5025-4ac9-9750-4aa5a77a723c/transfers/e2df31d2-828e-11ef-8f08-acde48001122" \
  -H "Authorization:  YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.spendjuice.com/bulk-transfers/88dbcb86-5025-4ac9-9750-4aa5a77a723c/transfers/e2df31d2-828e-11ef-8f08-acde48001122',
    {
      method: 'DELETE',
      headers: {
        'Authorization': ' YOUR_API_KEY'
      }
    }
  );
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      'https://api.spendjuice.com/bulk-transfers/88dbcb86-5025-4ac9-9750-4aa5a77a723c/transfers/e2df31d2-828e-11ef-8f08-acde48001122',
      headers={'Authorization': ' YOUR_API_KEY'}
  )
  ```
</CodeGroup>

## Response

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

## Error Responses

<AccordionGroup>
  <Accordion title="400 - Invalid Request">
    ```json theme={null}
    {
      "error": {
        "code": "invalid_request",
        "message": "Invalid batch or transfer ID format"
      }
    }
    ```
  </Accordion>

  <Accordion title="404 - Not Found">
    ```json theme={null}
    {
      "error": {
        "code": "not_found",
        "message": "Transfer or batch not found"
      }
    }
    ```
  </Accordion>

  <Accordion title="409 - Conflict">
    ```json theme={null}
    {
      "error": {
        "code": "invalid_state",
        "message": "Cannot delete transfer from batch in current status"
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## 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

<Card title="Need Help?">
  For additional assistance:

  * Check our [Error Handling Guide](/errors)
  * Review [Bulk Transfer Overview](/transfers/bulk-transfers/overview)
  * Contact [Support](mailto:support@juicyway.com)
</Card>
