Public API – POST Create Beacon

The Beacon end point allows new Bluetooth Beacon to be created for a customer account. Once added to the customer account, the Beacons can then be associated with one or more zones, along with Geofences, to allow for seamless transition from outdoor to indoor location detection. The Actions and Conditions attached to a zone apply to Beacons as well as Geofences within the zone.

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 the app
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 mac Address field is mandatory. If Beacon ranging is to be utilized on the Android platform, the txPower field must be utilised.
  •  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 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 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 Sanfransico location can be assigned 1 and a Melbourne location can be assigned 2. 1 to 65535
minor Android 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 Sanfrancisco location can have 1 for major value and 25 as a minor value. 1 to 65535
macAddress Android 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 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 create a ‘Both’ type Beacon

{
    "security": {
        "customerApiKey": "dc67d0e0-397b-11e5-9931-0646bf53d23f",
        "apiKey": "a251fbd2-5035-4887-896d-0b56abb4102d"
    },
    "content": {
        "beacon": {
            "name": "180 Sansome St, San Francisco, CA 94104",
            "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": "Sanfrancisco office front door"
        }
    }
}

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

{
    "security": {
        "customerApiKey": "dc67d0e0-397b-11e5-9931-0646bf53d23f",
        "apiKey": "a251fbd2-5035-4887-896d-0b56abb4102d"
    },
    "content": {
        "beacon": {
            "name": "180 Sansome St, San Francisco, CA 94104",
            "longitude": -122.4006339,
            "latitude": 37.7919951,
            "type": "Android",
            "txPower": -77,
            "macAddress": "01:17:c5:31:84:19",
            "description": "Sanfrancisco office front door"
        }
    }
}

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

{
    "security": {
        "customerApiKey": "dc67d0e0-397b-11e5-9931-0646bf53d23f",
        "apiKey": "a251fbd2-5035-4887-896d-0b56abb4102d"
    },
    "content": {
        "beacon": {
            "name": "180 Sansome St, San Francisco, CA 94104",
            "proximityUUID": "23a01af0-232a-4518-9c0e-323fb773f5ef",
            "longitude": -122.4006339,
            "latitude": 37.7919951,
            "type": "IOS",
            "major": 1,
            "minor": 2,
            "description": "Sanfrancisco 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 January 22, 2018

Start the discussion