# device_id_required

> deviceId missing

- Status: 400 Bad Request
- Returned by: /api/public
- Operations: [sendOrderToDevice](https://developers.rivr.io/reference/api-public/sendOrderToDevice.md)
- Retry (`retryWhen`): `after_fix`
- Did anything happen? (`outcome`): `none` (It did not happen)
- Sending an order to a device in /api/public
- Page in the portal: https://developers.rivr.io/errors/device_id_required
- Try it: `GET https://developers.rivr.io/errors/simulate/device_id_required` answers with the code's exact wire form; `?succeedAfter=N&attempt=K` gives a 200 once `attempt` passes `N`

## What it means

The body of `POST /api/public/orders/{orderId}/send-to-device` has no `deviceId`. Nothing was sent.

## What your system does

Send the device's id in `deviceId`. `GET /api/public/devices` lists the clinic's devices.

## Is it worth retrying?

No, not without changing the call.

`retryWhen`: `after_fix`. Change the request first, as the code's page says: a value, the token, a header or a new key. Then send it.

## Did anything happen?

`outcome`: `none`. **It did not happen.** This call did not do what you asked for and changed nothing else that you can see or that concerns money. Where the code has an `outcomeNote`, it takes precedence.

## Example: /api/public

```http
HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "propertyName": "DeviceId",
  "message": "The deviceId is required",
  "errorCode": "device_id_required",
  "code": "device_id_required",
  "type": "https://developers.rivr.io/errors/device_id_required"
}
```

The `title`, `detail`, `message` and `error_description` texts are exactly as the API writes them today.
