Skip to content

Metadata

In version 6 of the Kontakt.io API we introduced metadata. Metadata allows you to add your own custom data to devices and venues in the form of a JSON object containing key-value pairs. You can use metadata to add data from your own application to Kontakt.io objects.

Example of metadata in a venue:

{
  "image": null,
  "metadata": {
    "access": "restricted",
    "buildingType": "office"
  },
  "address": null,
  "access": "OWNER",
  "devicesCount": 303,
  "lng": null,
  "description": "Where the best Beacons are made",
  "managerId": "4a23bb48-31c0-4f59-938e-d00a3a8c0186",
  "shares": [],
  "coverType": null,
  "name": "Kontakt.io HQ",
  "id": "fc856d3e-ce74-4330-9f17-cf9cbdddcc55",
  "lat": null
}

The access and buildingType properties have been defined by the API user and can have any string value.

Metadata is a virtual attribute, there is no need (and possibility) to synchronize these values via Bluetooth with an actual device. It is stored only on Kontakt.io backend. Use POST /device/update/ to add metadata to your device objects.

Sharing and metadata

Metadata is always associated with a user. If you share a device or venue, you can select to share it without metadata. If you share with metadata, a copy of the metadata is made for the shared device/venue - your original metadata will not be changed.