# Modificar Etiqueta

Para modificar una nueva etiqueta existente, se debe realizar la siguiente consulta.

<mark style="color:orange;">`PUT`</mark> `https://api.persat.com.ar/v1/deliveries-labels/label_id`

#### Path Parameters

| Name                                        | Type   | Description                              |
| ------------------------------------------- | ------ | ---------------------------------------- |
| label\_id<mark style="color:red;">\*</mark> | Number | id de la etiqueta que se desea modificar |

#### Headers

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

#### Request Body

| Name  | Type   | Description                                                                                                                                                     |
| ----- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name  | String | Nuevo nombre de la etiqueta                                                                                                                                     |
| color | String | Nuevo color de la etiqueta. Los colores habilitados se pueden ver en [Obtener Etiqueta](/modulos/gestion-de-entregas/administrar-etiquetas/obtener-etiqueta.md) |

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

```json
{
    "success": true,
    "data": {
        "id": 16,
        "name": "Nuevo",
        "color": "YELLOW"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Error en la consulta" %}

```json
{
    "success": false,
    "error": {
        "status": 400,
        "type": "BAD_REQUEST",
        "userMessage": "Debe estar definido al menos el 'name' o el 'color'. 'name' max 20 caracateres y 'color' debe ser un valor válido. Ver documentación"
    }
}
```

{% endtab %}

{% tab title="404: Not Found Etiqueta inexistente" %}

```json
{
    "success": false,
    "error": {
        "status": 404,
        "type": "NOT_FOUND",
        "userMessage": "No existe el label con id: 21323213"
    }
}
```

{% endtab %}
{% endtabs %}

### Análisis de la Respuesta

```json
{
    "success": true,
    "data": {
        "id": 16,
        "name": "Nuevo",
        "color": "YELLOW"
    }
}
```

Los datos obtenidos son los datos de la etiqueta recientemente modificada, tal como se puede ver en [Obtener Etiqueta](/modulos/gestion-de-entregas/administrar-etiquetas/obtener-etiqueta.md)


---

# 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/modulos/gestion-de-entregas/administrar-etiquetas/modificar-etiqueta.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.
