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 SmartWiFi API endpoints.

    1. All requests to the v2 API require your SmartWiFi API Token.
    2. All requests are done via HTTPS and depending on the environment will use one of the following hostnames.
      US-A Environment
      api.smartwifiplatform.com
      US-B Environment
      api-usb.smartwifiplatform.com

      Please contact support to determine which environment your hotspot is located in.

    3. All responses contain JSON. 

Available Endpoints


Endpoint: /v2/client/guests-guest-plans?api_token=<api-token>
Description: Returns a list of guest plans associated with the client api token based on the parameters used.
Available Parameters:

Parameter RequiredDefaultFormat/ExampleLimits 
api_tokenYesnone
stateNoactiveactive | expired
started_since_timestamp No none yyyy-mm-dd hh:mm:ss 7 days ago 
started_since_relative No 12h 10m, 4h, 2d 7 days 


Example:
https://api-usb.smartwifiplatform.com/v2/client/guests-guest-plans?api_token=<api-token>&started_since_relative=4d&state=active
Example response:

[ 
  { 
    "token": "Token linked to the Guest Profile for the MAC that purchased this plan", 
    "macaddress": "AA-BB-CC-DD-EE-FF", 
    "email": "If one is available", 
    "guest_plan_name": "The name of the Guest Plan purchased", 
    "guest_plan_start": "yyyy-mm-dd hh:mm:ss", 
    "guest_plan_expire": "yyyy-mm-dd hh:mm:ss", 
    "guest_plan_state": "Active or Expired", 
    "session_profile_name": "The name of the session profile associated to the Guest Plan purchased", 
    "payment_gateway": "Lists if Voucher, Paypal, or the configured Payment processor was used" 

    "gateway_transaction_id": "The Voucher Code or Payment Reference code returned by the payment processor.
  }
]

Endpoint: /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" 
    } 
]

Endpoint:/v2/guests/get?api_token=<api-token>&guest_token=<guest-token>
Description: Delivers the Guest Profile details for the guest token associated to the client token.
Example:https://api.smartwifiplatform.com/v2/guests/get?api_token=<api-token>&guest_token=<guest-token>
Example response:

{
"custom1":null,
"custom2":null,
"custom3":null,
"custom4":null,
"custom5":null,
"custom6":null,
"custom7":null,
"custom8":null,
"custom9":null,
"custom10":null,
"client":{
"id":53,
"company":"TECH DEPT"
},
"profile":{
"firstname":null,
"lastname":null,
"email":"myemail@gmail.com",
"mobilephone":null,
"birthdate":null,
"macaddress":"4A-4A-EA-4A-4A-FA",
"gender":null,
"country":null,
"region":null,
"city":null,
"address":null,
"postal_code":null
},
"last_connection":{
"name":"TECHHOTSPOT",
"nasidentifier":"TECHHOTSPOT"
},
"unsubscribed":false
}

Endpoint: /v2/zapier/client/guests?api_token=<api-token>
Description: Returns a list of
all guests associated with the client api token.
Available Parameters:

 

Parameter
RequiredDefaultFormat/ExampleLimits 
api_tokenYesnoneactive | expired
unsubscribedNononetrue | false


Example:https://api.smartwifiplatform.com/v2/zapier/client/guests?api_token=<api-token>&unsubscribed=false
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,
    "unsubscribed": false
  },
  {
    "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
    "unsubscribed": false
  },
  {
    "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
    "unsubscribed": false
  },
  {
    "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
    "unsubscribed": false
  }
]

Endpoint:/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" }

Endpoint: /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.
Available Parameters:

Parameter
RequiredDefaultFormat/ExampleLimits 
api_tokenYesnoneactive | expired
from_dateNononeyyyy-mm-ddinclusive
to_dateNononeyyyy-mm-ddexclusive
hotspotidNo none #####12 hours of data

When using hotspotid the data returned will only be for the past 12 hours.

Notes on date and time fromat

  • You may include a time in the from_date and to_date format. Please note the delimiter T in the example provided.
    Example: yyyy-mm-ddThh:mm:ss
    (note the delimiter T)
  • The date range can not exceed 30 days.
  • 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,
        "useragent": "Mozilla/5.0 (Linux; Android 11; DN2101 Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/99.0.4844.58 Mobile Safari/537.36",
        "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,        "useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0",
        "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 November 27, 2023

Was this article helpful?

Related Articles