Public API – POST Update Beacon

The Beacons endpoint allows Beacons to be updated with a given Beacon Id.

URL to call

https://api.bluedotinnovation.com/1/beacons

Content Type

The content type should be specified in the Content-Type HTTP header as “application/json”.

image

Content-Type: application/json

Parameters

No URL Parameters required. See example JSON below.

Key JSON fields

Name Required Data Type Description Format
customerApiKey String API key for customer (rather than the app).
apiKey String API key for app.
beaconId String The identifier for the Beacon to be updated.
type String The type field represents the target mobile platform for the Beacon and must be one of the following:

  • IOS
    If the Beacon is required for iOS then the proximityUUID, major and minor fields are mandatory; these form part of the iBeacon standard.
  • Android
    If the Beacon is required for Android then the macAddress field is mandatory. If Beacon ranging is to be utilized on the Android platform, the txPower field must be provided.
  •  Both
    If the both Android and iOS Beacons are required then proximityUUID, major, minor and macAddress are mandatory fields. For Beacon ranging on the Android platform, the txPower field should be utilized.
IOS/Android/Both
name String A distinct name for the Beacon being created.
longitude Number Approximate longitude of the Beacon location.
latitude Number Approximate latitude of the Beacon location.
proximityUUID  iOS/Both String A value that encapsulates a group of iBeacons. ProximityUUID is specific to the Apple iBeacon standard and the Bluedot Point SDK for Android does not use this to identify or trigger a Beacon. It is recommended to have the same proximityUUID for all iBeacons deployed within a given organization and use major and minor values to identify a specific Beacon. An example of a proximityUUID is “de305d54-75b4-431b-adb2-eb6b9e546014”. A proximityUUID is required to create an iBeacon in Bluedot Systems.
The proximityUUID can be obtained from the manufacturer of an iBeacon or using a configuration app provided by the manufacturer.
major  iOS/Both Number The major value is an integer that can range from 1 to 65535; it identifies a grouping of iBeacons within a proximityUUID. For example; a San Fransico location can be assigned 1 and a Melbourne location can be assigned 2. 1 to 65535
minor  iOS/Both Number The minor value is an integer that can range from 1 to 65535; it identifies a specific iBeacon within a proximityUUID and major value. For example; an iBeacon in a San Francisco location can have 1 for major value and 25 as a minor value. 1 to 65535
macAddress  Android/Both String This is the hardware address of the Bluetooth Beacon. The MAC address can be obtained from the manufacturer of a Beacon or using the configuration app provided by the manufacturer. An example of Mac Address is ’00-15-E9-2B-99-3C’.
txPower  Android/Both Number The Tx Power (transmit power) is a configuration setting common to all Bluetooth Beacons. This is set by the Beacon manufacturer and may be shown in the documentation or be configurable with a supplied tool. The range of Tx Power is -100 to 0. -100 to 0
description String This optional field can be used to store any additional information such as the descriptive location of the Beacon.

Example: JSON request to update a ‘Both’ type Beacon

{
    "security": {
        "customerApiKey": "bc199c80-5441-11e4-b7bb-a0481cdc3311",
        "apiKey": "d3161e80-38d1-11e4-b039-bc305bf60831"
    },
    "content": {
        "beacon": {
            "beaconId": "4ea1e334-b5b1-4d35-8e77-a3892a21cdb6",
            "name": "180 Sansome St, San Francisco, CA 94104 - Updated",
            "proximityUUID": "23A01AF0-232A-4518-9C0E-323FB773F5EF",
            "longitude": -122.4006339,
            "latitude": 37.7919951,
            "type": "Both",
            "major": 1,
            "minor": 2,
            "txPower": -77,
            "macAddress": "01:17:C5:31:84:19",
            "description": "San Francisco office front door"
        }
    }
}

Example: JSON request to update an ‘Android’ type Beacon

{
    "security": {
        "customerApiKey": "bc199c80-5441-11e4-b7bb-a0481cdc3311",
        "apiKey": "d3161e80-38d1-11e4-b039-bc305bf60831"
    },
    "content": {
        "beacon": {
            "beaconId": "4ea1e334-b5b1-4d35-8e77-a3892a21cdb6",
            "name": "180 Sansome St, San Francisco, CA 94104 - Updated",
            "longitude": -122.4006339,
            "latitude": 37.7919951,
            "type": "Android",
            "txPower": -77,
            "macAddress": "01:17:C5:31:84:19",
            "description": "San Francisco office front door"
        }
    }
}

Example: JSON request to update an ‘iOS’ type Beacon

{
    "security": {
        "customerApiKey": "bc199c80-5441-11e4-b7bb-a0481cdc3311",
        "apiKey": "d3161e80-38d1-11e4-b039-bc305bf60831"
    },
    "content": {
        "beacon": {
            "beaconId": "4ea1e334-b5b1-4d35-8e77-a3892a21cdb6",
            "name": "180 Sansome St, San Francisco, CA 94104 - Updated",
            "proximityUUID": "23A01AF0-232A-4518-9C0E-323FB773F5EF",
            "longitude": -122.4006339,
            "latitude": 37.7919951,
            "type": "iOS",
            "major": 1,
            "minor": 2,
            "description": "San Francisco office front door"
        }
    }
}

Example: JSON response to request

{
    "beaconId": "4ea1e334-b5b1-4d35-8e77-a3892a21cdb6",
    "message": "Your request has been successfully processed.",
    "messageCode": 200
}

Source code examples

Created by Bluedot DevOps on March 5, 2018

Start the discussion