> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wede.pt/llms.txt
> Use this file to discover all available pages before exploring further.

# Devices

> Any machine that captures operations, from a phone to an ATM, registered once and accountable for every operation it produces

## Every machine is a device

wede treats every machine that captures operations the same way: a phone or a tablet with the wede SDK, and your own hardware, whatever the vertical. A POS terminal, an ATM, a kiosk, a meter, a vehicle unit, a medical device, an EV charger, the equipment of a solar plant, an industrial controller or a gateway is one device, with one identity in wede.

For a bank, an operator or a regulator this means one answer to a simple question: which machine produced this operation, and what happened to everything that machine produced. wede gives that answer for every operation it carries, online or captured with no network, and shows it by type of equipment in [Reconciliation](/concepts/reconciliation.md).

## One device, many identifiers

A real machine is known by several names: your inventory code, the terminal id that appears on bank statements, a serial number, the IMEI of its modem, the LoRa DevEUI of its radio. In wede they all belong to the same device:

| Field | Required | What it is |
| - | - | - |
| `device_id` | Yes | A code that never changes, for example your inventory code. Unique. |
| `device_kind` | Yes | `pos`, `atm`, `kiosk`, `meter`, `vehicle_unit`, `medical_device`, `ev_charger`, `energy_asset`, `industrial_controller`, `gateway` or `other`. Phones and tablets are `mobile`. |
| `name` | No | A readable name, for example `Branch 12 ATM`. |
| Other identifiers | No | Up to 20: `terminal_id`, `serial`, `imei`, `deveui`, `asset_tag`, `other`. Each unique in your organisation. |

An operation that carries any of these identifiers is attributed to the device. An operation that carries an identifier wede does not know is never refused: it is kept, and listed so that you can register its device.

## Registering devices

Register hardware before it starts operating. There are three ways, with the same fields and the same result.

**From a file.** In the dashboard, Devices, Import CSV. One device per line, with a header line; `device_id` and `device_kind` are required, `name`, `terminal_id`, `serial`, `imei`, `deveui`, `asset_tag` and `other_id` are optional. Comma or semicolon as separator. The page shows the lines with problems before sending and the result of every line after.

```csv theme={null}
device_id,device_kind,name,terminal_id,serial,imei,deveui,asset_tag,other_id
ATM-BRANCH-012,atm,Branch 12 ATM,12345678,SN-998877,,,,
POS-STORE-031,pos,Store 31 till 2,87654321,,,,,
```

**From your systems.** Up to 500 devices per request:

```bash theme={null}
curl -X POST https://api.wede.pt/v1/devices/hardware/batch \
  -H "X-Wede-API-Key: $WEDE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "devices": [
      { "device_id": "ATM-BRANCH-012", "device_kind": "atm", "name": "Branch 12 ATM",
        "aliases": [ { "kind": "terminal_id", "value": "12345678" }, { "kind": "serial", "value": "SN-998877" } ] }
    ]
  }'
```

Each device gets its own result: `registered`, `updated` or `rejected` with the reason. A rejected line never stops the others, and sending the same device again only updates it. One device at a time uses `POST /v1/devices/hardware` with the same fields.

**From the device itself.** Phones, tablets and Android terminals that run the wede SDK register themselves; their type can be set afterwards.

Hardware registered from your systems does not need the wede SDK: it does not run wede code. Every new device receives once an envelope key for degraded channels, to install on it if it sends by SMS, satellite or LoRa.

## Proof that nothing is missing

A device that numbers what it sends can prove that everything arrived. Phones, tablets and terminals with the wede SDK (from version 2.5.0) do it on their own; your own hardware does it when it sends its numbering, directly or through a [mapping](/concepts/mappings.md). For each such device, wede shows what was received, what is still missing and since when, what arrived late, what was sent twice and refused, when the device's counter started again, and whether the record of its operations is intact. Messages that arrive late close the gap they left; nothing is ever rewritten.

This works the same for every way a device reaches wede: operations sent online, operations captured with no network and synchronised later, messages sent by SMS, satellite or LoRa, and messages sent through a [mapping](/concepts/mappings.md). It shows numbers and integrity only, never the content of an operation, and only to your organisation.

After an outage, this is the answer to the question an auditor asks first: did every operation of this machine reach the books? `GET /v1/devices/{device_id}/completeness` gives the same view to your systems.

## What you see

The Devices page lists every device with its type, identifiers, the operations it captured, when it was last seen and by which channel, whether it is ready for degraded channels, and whether everything it numbered has arrived. Search finds a device by its device id, its name or any of its identifiers, and the counters at the top count every device you have, by type. Identifiers that arrived with operations but match no registered device are listed separately, ready to register.

See [Reconciliation](/concepts/reconciliation.md) for the results by device, and [Continuity, not connectivity](/concepts/continuity.md) for why hardware of any vertical belongs in the same layer as the phones in the field.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.