---
# System prepended metadata

title: Data from mobiles

---

# Data from mobiles

## What

* Add loyalty card
* Remove loyalty card
* BLE connection duration
* Issues/feedbacks improvements with mobile info

## When

### Loyalty cards/BLE

Action -> Mobile buffer -(when internet is available)-> backend

### Issues/feedbacks

Uppon submit

## Where

### Loyalty cards/BLE

`POST` `/users/{id:"me"}/activities` (new)

### Issues

`POST` `/users/{id:"me"}/issues` (existing)

### Feedbacks

`POST` `/feedbacks` (existing)

## How

### Loyalty cards/BLE

```json
{
    "id": "123456789" // set by backend
    "user": "abcdefghij" // set by backend
    "kind": "add-loyalty" // add-loyalty, remove-loyalty, ble-connection
    "datetime": "1977-04-22T01:00:00-05:00" // UTC (ISO-8601)
    "value": "0xDC12" // uid
}

{
    "id": "123456789" // set by backend
    "user": "abcdefghij" // set by backend
    "kind": "ble-connection" // add-loyalty, remove-loyalty, ble-connection
    "datetime": "1977-04-22T01:00:00-05:00" // UTC (ISO-8601)
    "value": "1500" // seconds
}
```

### Issues/Feedbacks

```json
{
    "id": "",
    "...": "",
    "from": "mobile://samsung:galaxy_s9/android:10.2", // Android
    "from": "mobile://apple:iphone_10/ios:13.5", // iOS
    "from": "browser://firefox:12365.325", // browser
}
```

