# Obtener Etiqueta

Para obtener los datos de una etiqueta conocida, se debe realizar la siguiente consulta.

<mark style="color:blue;">`GET`</mark> `https://api.persat.com.ar/v1/work-orders-labels/label_id`

#### Path Parameters

| Name                                        | Type   | Description                                                 |
| ------------------------------------------- | ------ | ----------------------------------------------------------- |
| label\_id<mark style="color:red;">\*</mark> | Number | Nro. de identificación de la etiqueta que se desea obtener. |

#### 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": {
        "id": 15,
        "name": "Urgente",
        "color": "RED_2"
    }
}
```

{% endtab %}

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

```json
{
    "success": false,
    "error": {
        "status": 400,
        "type": "BAD_REQUEST",
        "userMessage": "'label_id' debe ser un number (entero) obligatorio"
    }
}
```

{% endtab %}

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

```json
{
    "success": false,
    "error": {
        "status": 404,
        "type": "NOT_FOUND",
        "userMessage": "No existe la etiqueta de orden de trabajo con id: 3215"
    }
}
```

{% endtab %}
{% endtabs %}

### Análisis de la Respuesta

```json
{
    "success": true,
    "data": {
        "id": 15,
        "name": "Urgente",
        "color": "RED_2"
    }
}
```

**data.id:** Number identificando de forma unívoca a la etiqueta

**data.name:** String. Nombre de la etiqueta. Máx. 20 caracteres.

**data.color:** String que identifica el color de la etiqueta. La lista de colores disponibles es la siguiente

<figure><img src="https://3878285185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZX85SzYcp8wvaPjODD%2Fuploads%2FpdFlAkw2LoCohBDjC6kP%2Fimage.png?alt=media&#x26;token=5b7ed39b-cacf-4733-a4e3-d559ac5bd11c" alt=""><figcaption></figcaption></figure>

Cada uno de los colores tiene 3 tonos disponibles.

* RED\
  RED\_2\
  RED\_3
* ORANGE\
  ORANGE\_2\
  ORANGE\_3
* YELLOW\
  YELLOW\_2\
  YELLOW\_3
* GREEN\
  GREEN\_2\
  GREEN\_3
* LIGHTBLUE\
  LIGHTBLUE\_2\
  LIGHTBLUE\_3
* BLUE\
  BLUE\_2\
  BLUE\_3
* VIOLET\
  VIOLET\_2\
  VIOLET\_3
* PINK\
  PINK\_2\
  PINK\_3
* BLACK\
  BLACK\_2\
  BLACK\_3
