1. Home
  2. Knowledge Base
  3. FAQs
  4. SmartWiFiPlatform API Endpoints

SmartWiFiPlatform API Endpoints

If you would like to retrieve information from the Smart WiFi Platform dashboard without utilizing one of the platforms integrations you have the choice to make your own requests to the Smart WiFi Platform API endpoints.This article references the v2 API.

Please remember the following when working with the  Marketing 4 WiFi API endpoints.

  1. All requests to the v2 API require your Marketing4WiFi API Token.
  2. All requests are done via HTTPS and use the hostname: api.smartwifiplatform.com
  3. All responses contain JSON. 

Available Endpoints

  • /v2/zapier/client/dropdown/hotspots?api_token=<api-token>
    Description: Returns a list of
    hotspots associated with the client api token.
    Example:
    https://api.smartwifiplatform.com/v2/zapier/client/dropdown/hotspots?api_token=<api-token>
    Example response: 
[ 
    { 
        "id"12261, 
        "name""ExampleHotspot" 
    }, 
    { 
        "id"12290, 
        "name""ExampleHotspot2" 
    } 
]

 

  • /v2/zapier/client/guests?api_token=<api-token>
    Description: Returns a list of
    all guests associated with the client api token.
    Example:https://api.smartwifiplatform.com/v2/zapier/client/guests?api_token=<api-token>
    Example response:

    [
      {
        "id": ,
        "macaddress": "AA-BB-CC-DD-EE-FF",
        "email": "",
        "profile_url": "",
        "first_name": "First_Name",
        "last_name": "Last_Name",
        "country": "",
        "region": "",
        "city": "",
        "address": "",
        "gender": "",
        "postal_code": "",
        "birthdate": null,
        "mobile_phone": null,
        "birthdate": "yyyy-mm-dd",
        "custom1": null,
        "custom2": null,
        "custom3": null,
        "custom4": null,
        "custom5": null,
        "custom6": null,
        "custom7": null,
        "custom8": null,
        "custom9": null,
        "custom10": null
      },
      {
        "id": ,
        "macaddress": "AB-CD-EF-12-34-56",
        "email": "",
        "profile_url": null,
        "display_name": null,
        "first_name": null,
        "last_name": null,
        "country": "",
        "region": "",
        "city": "",
        "address": "",
        "gender": "",
        "postal_code": "",
        "birthdate": null,
        "mobile_phone": null,
        "birthdate": null,
        "custom1": null,
        "custom2": null,
        "custom3": null,
        "custom4": null,
        "custom5": null,
        "custom6": null,
        "custom7": null,
        "custom8": null,
        "custom9": null,
        "custom10": null
      },
      {
        "id": ,
        "macaddress": "12-34-56-AB-CD-EF",
        "email": "",
        "profile_url": "",
        "display_name": "",
        "last_name": "<Last_Name",
        "country": "",
        "region": "",
        "city": "",
        "address": "",
        "gender": "",
        "postal_code": "",
        "birthdate": null,
        "mobile_phone": null,
        "birthdate": null,
        "custom1": null,
        "custom2": null,
        "custom3": null,
        "custom4": null,
        "custom5": null,
        "custom6": null,
        "custom7": null,
        "custom8": null,
        "custom9": null,
        "custom10": null
      },
      {
        "id": ,
        "macaddress": "BB-BB-BB-BB-BB-AA",
        "email": "",
        "profile_url": null,
        "display_name": "",
        "last_name": "<Last_Name",
        "country": "",
        "region": "",
        "city": "",
        "address": "",
        "gender": "",
        "postal_code": "",
        "birthdate": null,
        "mobile_phone": "",
        "birthdate": "yyyy-mm-dd",
        "custom1": "custom 1",
        "custom2": "custom 2",
        "custom3": null,
        "custom4": null,
        "custom5": null,
        "custom6": null,
        "custom7": null,
        "custom8": null,
        "custom9": null,
        "custom10": null
      }
    ]

     

 

  • /v2/zapier/client/guests?hotspotid=<hotspot_id_1,hotspot_id_2>&api_token=<api-token>
    Description: Re
    turns a list of guests created in the past 12 hours on the specified hotspots associated with the client api token.
    Example: https://api.smartwifiplatform.com/v2/zapier/client/guests?hotspotid=<hotspot_id_1,hotspot_id_2>&api_token=<api-token>

    Your hotspot ID can be found from the dashboard url when viewing the edit hotspot page.
    Example: https://dashboard.smartwifiplatform.com/manageHotspot.php?hotspotID=xxxx

 

  • /v2/zapier/client/ping?api_token=<api-token>
    Description: Pings the server and returns a success message.
    Example:

    https://api.smartwifiplatform.com/v2/zapier/client/ping?api_token=<api-token>
    Example response:
    {     "message""success" }

 

  • /v2/client/connections?api_token=<api-token>&from=<from_date>&to=<to_date>&hotspotid=<hotspot_ids>
    Description: Returns a list of Guest Connections associated with the api token for the date range provided. The fields returned will match the Guest Connections Report in the Dashboard.
    Parameters: <from_date>, <to_date>, <hotspot_ids>
    Both <from_date> & <to_date> are standard formats. You may supply a date in the format: yyyy-mm-dd
    Or you may include a time in the format: yyyy-mm-ddThh:mm:ss
    (note the delimiter T)
    <hotspot_ids> is an optional parameter. When not provided, all Hotspots are listed in the results. When it is provided, you may include a single hotspot id, or a comma-delimited list of hotspot ids.
    Notes:
    The date range can not exceed 30 days.

    The <from_date> is inclusive, the <to_date> is exclusive.
    When including a time, records that would otherwise be aggregated may be excluded. For example, if your gateway hardware sends multiple sets of records for a single guest connection (e.g. when a guest device roams from one AP to another) you will only receive records within the range specified.

    Example: https://api.smartwifiplatform.com/v2/client/connections?api_token=<api-token>&from=<from_date>&to=<to_date>
    Example Response: 

    [
        {
            "date": "2019-12-30T14:14:44.493576+00:00",
            "email": null,
            "phone": null,
            "device": "Apple",
            "mobile": null,
            "identity": "AA-BB-CC-DD-EE-FF",
            "lastname": null,
            "uploaded": 481731,
            "firstname": null,
            "downloaded": 1641142,
            "guesttoken": "1g36ga13-b4fd-4jd3-9bdc-6eb6e7e34cad",
            "macaddress": "AA-BB-CC-DD-EE-FF",
            "hotspotname": "Hotspot_1",
            "online_time": "00:05:14",
            "profileuser": null,
            "reason_for_termination": "Idle Timeout"
        },
        {
            "date": "2019-12-30T15:39:06.450232+00:00",
            "email": "user@email",
            "phone": null,
            "device": "Android",
            "mobile": null,
            "identity": "user@email.com",
            "lastname": null,
            "uploaded": 337187,
            "firstname": null,
            "downloaded": 1317635,
            "guesttoken": "2g36ga13-c4fd-4jd3-4bdc-6ec6e7e34cad",
            "macaddress": "FF-EE-DD-CC-BB-AA",
            "hotspotname": "Arena_345",
            "online_time": "00:50:28",
            "profileuser": null,
            "reason_for_termination": "Lost Service"
        }
    ]

     

Updated on March 11, 2020

Was this article helpful?

Related Articles