# Selectively delete by given date range

**DELETE** `https://api.zoined.com/data/sales/daterange?start=2024-10-01&end=2024-10-31&store=1234&sourceSystem=myPos`
The endpoint allows deleting existing transaction data by giving a date range (eg. two sales dates) for data already existing in the warehouse. 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}/daterange
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, required)
    End date for the date range.

  - `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 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)

