# Eliminar elemento

Para borrar un elemento en una Master Db en Persat, se debe enviar un DELETE como el que se especifica a continuación.

{% hint style="danger" %}
Recuerde que esta operación no se puede deshacer.
{% endhint %}

<mark style="color:red;">`DELETE`</mark> `https://api.persat.com.ar/v1/masterdbvalues/mdb_id/field_1`

#### Path Parameters

| Name                                       | Type   | Description                            |
| ------------------------------------------ | ------ | -------------------------------------- |
| mdb\_id<mark style="color:red;">\*</mark>  | Number | Identificado de la Master db           |
| field\_1<mark style="color:red;">\*</mark> | String | Identificador del elemento a modificar |

#### Headers

| Name                                            | Type   | Description     |
| ----------------------------------------------- | ------ | --------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer API\_KEY |

{% tabs %}
{% tab title="200: OK La consulta se ejecutó con éxito" %}

```json
{
    "success": true,
    "data": {
        "mdb_id": 4,
        "field_1": "DEST-123AALK"
    }
}
```

{% endtab %}

{% tab title="404: Not Found El elemento a borrar no existe. O no existe el mdb\_id" %}

```json
{
    "success": false,
    "error": {
        "status": 404,
        "type": "NOT_FOUND",
        "userMessage": "No se encontro el mdb value"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Error en alguno de los campos enviados. userMessage contiene informacipon adicional." %}

```javascript
{
    "success": false,
    "error": {
        "status": 400,
        "type": "BAD_REQUEST",
        "userMessage": "'mdb_id' es un number (entero) obligatorio"
    }
}
```

{% endtab %}
{% endtabs %}

### Ejemplo de request

En este ejemplo vamos a borrar el elemento identificado como DEST-123AALK de la Master Db de "Productos" (mdb\_id = 4)

* mdb\_id: <mark style="color:blue;">4</mark>
* field\_1 (Identificador del elemento): <mark style="color:green;">DEST-123AALK</mark>

Asi sería la consulta

<mark style="color:red;">**DELETE -**</mark> <https://api.persat.com.ar/v1/masterdbvalues/><mark style="color:blue;">4</mark>/<mark style="color:green;">DEST-123AALK</mark>

### Analizando la Respuesta

En caso que no haya ningun error, obtenemos los datos de identificación del objeto borrado

```json
{
    "success": true,
    "data": {
        "mdb_id": 4,
        "field_1": "DEST-123AALK"
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.api.persat.com.ar/entidades-basicas/master-db/eliminar-elemento.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
