---
title: "Upload Excel Data Endpoint"
method: POST
path: "/api/new_mdm/upload_excel_data"
tags: ["MDM NEW"]
---

# Upload Excel Data Endpoint

`POST /api/new_mdm/upload_excel_data`

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

**Purpose**:
This function uploads an Excel file to the specified container and sends a message to the service bus
to trigger the import of the file into the specified table.

**URL**:
`POST /api/upload_excel_data`

**Parameters**:
- `App_Code` (str): Base64 encoded application code.
- `Customer_Key` (str): Base64 encoded customer key.
- `Table_Name` (str): The name of the table to import the file into.
- `excel_file` (UploadFile): The Excel file to upload.

**Returns**:
- A JSON response indicating the success or failure of the operation.
- If successful, returns the uploaded file details.
- If the Customer_Key is invalid or if the table is not found, it returns a failure message.

**Exceptions**:
- Handles exceptions during base64 decoding and database operations, returning an appropriate error message.

## Headers

- `App-Code` string, required
- `User-Code` string, required
- `Customer-Key` string, required
- `Table-Name` 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)
