---
title: "Delete All Records"
method: POST
path: "/api/mdm/delete_all_records"
tags: ["MDM"]
---

# Delete All Records

`POST /api/mdm/delete_all_records`

**Function**: `delete_all_records`
**Type**: API Endpoint (POST)

**Purpose**:  
Makes a specified table inactive or active in the customer database based on its current status.

**URL**:  
`POST /api/mdm/delete_all_records`

**Parameters**:
- `Table_Name` (Header, required): The name of the table to be made inactive.
- `Customer_Key` (Header, required): A base64 encoded string containing `lscode` and `firmcode` for the customer.

**Response**:
- A JSON object containing a status message and a brief description of the operation result.

**Exceptions**:
- Handles exceptions related to database operations and invalid customer key formats, providing appropriate error messages.

## Headers

- `Table-Name` string, required
- `Customer-Key` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi.md) · [All operations](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/leapsurgebi/leapsurgeapi/revisions/5a6b1464bfeb/schema)
