# Selectively delete by given batch date range

**DELETE** `https://api.zoined.com/data/sales/batchdate?start=2024-10-01&end=2024-10-31&store=1234&sourceSystem=myPos`
The endpoint allows deleting existing transaction data by giving a batch date range (ie. data receipt timestamp) for data already existing in the warehouse. This endpoint is handy if you want to for example delete eg. all data send to Zoined within last 7 days (to resend it later). Entity name for selective deletion is one of the end point names in lower case and singular form eg. sales, salespayment, salesorder, organisation, product etc.

Endpoint: DELETE /data/{entity}/batchdate
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer token

## Path parameters:

  - `entity` (string, required)
    Entity name to for this delete operation.

## Query parameters:

  - `start` (string, required)
    Start date for the date range.

  - `end` (string)
    End date for the date range. Default today.

  - `store` (string)
    Optional store id to limit delete operation to.

  - `sourceSystem` (string)
    Optional source system value to limit delete operation to.

## Response 204:

  - `204` (unknown)
    Data for the provided batch date range has been removed from warehouse.

## Response 400:

  - `400` (unknown)
    Invalid request (eg. unknown entity parameter).
**Headers**
- `Content-Type: application/json`

## Response 400 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Reason for error

## Response 401:

  - `401` (unknown)
    Missing or invalid authorization token in header
**Headers**
- `Content-Type: application/json`

## Response 401 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Unauthorized

## Response 500:

  - `500` (unknown)
    Internal error or exception
**Headers**
- `Content-Type: application/json`

## Response 500 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Reason for error

## Response 400 examples:

  - `response` (unknown)

## Response 401 examples:

  - `response` (unknown)

## Response 500 examples:

  - `response` (unknown)

