---
title: Retrieve a device message
method: GET
weight: 3
section: 'Basics'
---

import {
  EndpointHeader,
  ParamField,
  ParamFields,
  CodeGroup,
  RequestExample,
  ResponseExample,
} from '@/components/api';

<EndpointHeader method="GET" path="/api/v1/message_equipment_types/:id" />

Returns a single device message by its identifier. The response has the same fields as a list item, wrapped in a single `data` object.

<ParamFields title="Path parameters">
  <ParamField name="id" type="integer" required>
    Identifier (unique key) of the message in the system.
  </ParamField>
</ParamFields>

## Response fields

| Attribute                            | Description                                                                             |
| ------------------------------------ | --------------------------------------------------------------------------------------- |
| `id`                                 | Identifier (unique key) of the message in the system                                    |
| `name`                               | Message name                                                                            |
| `description`                        | Message description                                                                     |
| `device_code`                        | Device message code                                                                     |
| `equipment_type_id`                  | Identifier of the metering device configuration type (corrector configuration type key) |
| `equipment_type_varname`             | String unique identifier of the metering device configuration type                      |
| `referenceparameter_archive_type_id` | Archive type identifier                                                                 |
| `archive_type_varname`               | String unique identifier of the archive type                                            |
| `message_typical_id`                 | Typical message identifier                                                              |
| `channel_id`                         | Channel identifier (unique key), `null` if not bound to a channel                       |
| `channel_varname`                    | Channel string identifier, `null` if not bound to a channel                             |
| `data`                               | Returned message object                                                                 |

<RequestExample>
  <CodeGroup labels={["curl", "Node", "Python", "Go", "PHP"]}>
    <Fragment slot="panel-0">

```bash
curl -i \
  --header "access-token: *********************" \
  --header "token-type: Bearer" \
  --header "client: **********************" \
  --header "uid: user@local.net" \
  --header "Content-Type: application/json" \
  --request GET \
  "https://uztgs.uz/api/v1/message_equipment_types/1"
```

    </Fragment>
    <Fragment slot="panel-1">

```js
const res = await fetch('https://uztgs.uz/api/v1/message_equipment_types/1', {
  headers: {
    'access-token': '*********************',
    'token-type': 'Bearer',
    client: '**********************',
    uid: 'user@local.net',
    'Content-Type': 'application/json',
  },
});
const data = await res.json();
```

    </Fragment>
    <Fragment slot="panel-2">

```python
import requests

res = requests.get(
    "https://uztgs.uz/api/v1/message_equipment_types/1",
    headers={
        "access-token": "*********************",
        "token-type": "Bearer",
        "client": "**********************",
        "uid": "user@local.net",
        "Content-Type": "application/json",
    },
)
data = res.json()
```

    </Fragment>
    <Fragment slot="panel-3">

```go
req, _ := http.NewRequest("GET", "https://uztgs.uz/api/v1/message_equipment_types/1", nil)
req.Header.Set("access-token", "*********************")
req.Header.Set("token-type", "Bearer")
req.Header.Set("client", "**********************")
req.Header.Set("uid", "user@local.net")
req.Header.Set("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)
```

    </Fragment>
    <Fragment slot="panel-4">

```php
$ch = curl_init("https://uztgs.uz/api/v1/message_equipment_types/1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "access-token: *********************",
    "token-type: Bearer",
    "client: **********************",
    "uid: user@local.net",
    "Content-Type: application/json",
]);
$data = json_decode(curl_exec($ch), true);
```

    </Fragment>

  </CodeGroup>
</RequestExample>

<ResponseExample>

```json
{
  "data": {
    "id": 1,
    "name": "Accumulated volume",
    "description": "Scheduled communication",
    "device_code": "0",
    "equipment_type_id": 11,
    "equipment_type_varname": "EK-270",
    "referenceparameter_archive_type_id": 25,
    "archive_type_varname": "nesht",
    "message_typical_id": 2,
    "channel_id": null,
    "channel_varname": null
  }
}
```

</ResponseExample>
