NowFloats is a unique online marketing solution, which has been specifically engineered to encompass the dynamic business requirements of organisations and individuals around the globe. Nowfloats enables you to:

APIs have been developed for all the above and more to enable you to deploy our platform and create applications of your own.

Reach us at dev@nowfloats.com and we will generate a client ID for you.

So get started, have fun and let us in on it too!

Floating Point Creation

Description: This API creates a NowFloats micro-site.

URL: https://api.withfloats.com/Discover/v2/floatingpoint/create/

Method: PUT

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client.
String tag* Tag name of the business
String contactName* Name of the business owner
String name* Title of the site (preferably Business name)
String desc* Description of the site (preferably Business description)String address*
String address* Address of the business store with comma separationString city*
String city* City in which the business store is present
String pincode* Pincode of the area in which business store is present
String country* Country in which the business store is present
String email Email of the business store or contact person of the store
String primaryNumber*Contact number of the business store owner (this will not be exposed) Contact number of the business store owner (this will not be exposed)
String primaryNumberCountryCode* Country code should be provided. Example: +91 for india
String Uri Other website of the business if exists already. Example: http://samplestore.com
String fbPageName Facebook page name if exists already. Example: http://facebook.com/pagename
String primaryCategory Only pagename is required not the entire facebook page url
String primaryCategory
contacts: [{String name : "", String number: "" }] Contact numbers of the business store. Name key is owner name of the store. Example:
[
{name: "Owner Name", number: "9999999999"},
{name: " Owner Name ", number: "0000000000"},
]
timings :[{ String From: "", String To: "" }] Timings of a business store, you can specify different timings for different days. Example:
Week starts with Sunday
[
{From: "",To: ""},
{From: "11:30am",To: "5:30pm"},
{From: "",To: ""},
{From: "10:00am",To: "4:00pm"},
{From: "10:00am",To: "4:00pm"},
{From: "10:00am",To: "4:00pm"},
{From: "",To: ""}
]
So if From and To values are empty then that particular day is holiday. From above example Sunday and Saturday are holidays and On Monday the store has a 11:30 am to 5:30 pm.
String[]category* RETAIL
Int PaymentState 0
Int PaymentLevel 0
Boolean isSF True

Expected Response: You will receive a unique id of the Floating point you have created.


Floating Point Creation Basic

Description: This API creates a website with basic fields.

URL: https://api.withfloats.com/Discover/v3/floatingpoint/create/

Method: PUT

Type: Json

Input Parameters:

Parameter name Description
String tag* Tag name of the business
String clientId* Developer token given for specific client.
String contactName* Name of the business owner
String name* Title of the site (preferably Business name)
String desc* Description of the site (preferably Business description)String address*
String address* Address of the business store with comma separationString city*
String city* City in which the business store is present
String pincode* Pincode of the area in which business store is present
String country* Country in which the business store is present
String email Email of the business store or contact person of the store
String primaryNumber*Contact number of the business store owner (this will not be exposed) Contact number of the business store owner (this will not be exposed)
String primaryNumberCountryCode* Country code should be provided. Example: +91 for india
String Uri Other website of the business if exists already. Example: http://samplestore.com
String fbPageName Facebook page name if exists already. Example: http://facebook.com/pagename
String primaryCategory Only pagename is required not the entire facebook page url
String primaryCategory
Double lat Latitude of the business store
Double lng Longitude of the business store

Expected Response: You will receive a unique id of the Floating point you have created.


Float Text Update

Description: This API posts a text update to the site.

URL: https://api.withfloats.com/Discover/v1/FloatingPoint/createBizMessage/

Method: PUT

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client.
boolean sendToSubscribers Set True or False to send the update to the subscribers or not.
Default: True
String message* Text that needs to be sent to the site.
String merchantId* Merchant Id is the Unique id given to a particular store.

Expected Response: You will receive a unique id for the update.


Float Picture Update

Description: This API posts a picture update to the site.

URL: https://api.withfloats.com/Discover/v1/FloatingPoint/createBizImage?clientId={clientId}&requestType={requestType}&requestId={requestId}&totalChunks={totalChunks}&currentChunkNumber={currentChunkNumber}&bizMessageId={bizMessageId}

Method: PUT

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client.
String requestType* Sequential or Parallel.
String requestId* Text that needs to be sent to the site.
String bizMessageId* Unique id of the particular message you want to upload a picture
String totalChunks* Send 1 if it is a single stream upload or send the total number of chunks you have divided your stream into.
String currentChunkNumber* Send the current chunk number.
Stream Request Body* Byte stream as a Request Body

Expected Response: You will receive a unique id of the picture you have uploaded.


Delete Update

Description: This API can be used to delete a Floating Point Message.

URL: https://api.withfloats.com/Discover/v1/floatingpoint/archiveMessage

Method: DELETE

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client.
String dealId* The Unique Id of the Message that needs to be deleted.

Subscribe to Store Updates

Description: This API adds a subscriber to the site.

URL: https://api.withfloats.com/Discover/v1/FloatingPoint/subscribe

Method: PUT

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client.
String fpTag* Unique Tag of floating point or the subdomainname of the store
String userContact* Phone number or email id of the business owner
String countryCode* +91 for India

Unsubscribe to Store Updates

Description: This API removes a subscriber from the site.

URL: https://api.withfloats.com/Discover/v1/FloatingPoint/unsubscribe

Method: PUT

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client.
String fpTag* Unique Tag of floating point or the subdomainname of the store
String userContact* Phone number or email id of the business owner
String countryCode* +91 for India

Forward Update as SMS/Email

Description: This API allows you to forward an update as an SMS/Email.

URL: https://api.withfloats.com/Discover/v1/fp/bizfloat/sendDetailsToUser

Method: PUT

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client.
String bizFloatId* Unique Id of the Message/Update/business float created
String contact* Phone number or email id of the business owner
String userIp* IP Address of user

Talk to Business

Description: This API is used to send a query to a business owner as an SMS.

URL: https://api.withfloats.com/Discover/v1/FloatingPoint/customerRequest/create

Method: POST

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client.
String message* Question/Query/Message need to be sent.
String customerContact* Email/Mobile number of the contacting person.
String merchantId* Unique id of the store.

Upload Featured Image

Description: This API creates a website with all the widgets.

URL: https://api.withfloats.com/Discover/v1/FloatingPoint/createImage?clientId={clientId}&fpId={fpId}&reqType={requestType}&reqtId={requestId}&totalChunks={totalChunks}&currentChunkNumber={currentChunkNumber}

Method: PUT

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client
String fpId* The Unique Id of the Store/Site/Floating point.
String requestType* "sequential" or "parallel"
String requestId* Unique Id for the chunks of the image to identify the image.
String totalChunks* The total number of chunks generated for the image
String currentChunkNumber* The index of the chunk of the stream
Stream Request Body* Byte stream as a Request Body

Expected Response: You will receive a unique id for the image.


Upload To Image Gallery

Description: This API can be used to add an Image to the Image Gallery.

URL: https://api.withfloats.com/Discover/v1/FloatingPoint/createSecondaryImage?clientId={clientId}&fpId={fpId}&reqType={requestType}&reqtId={requestId}&totalChunks={totalChunks}&currentChunkNumber={currentChunkNumber}

Method: PUT

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client
String fpId* The Unique Id of the Store/Site/Floating point.
String requestType* "sequential" or "parallel"
String requestId* Unique Id for the chunks of the image to identify the image.
String totalChunks* The total number of chunks generated for the image
String currentChunkNumber* The index of the chunk of the stream
Stream Request Body* Byte stream as a Request Body

Expected Response: You will receive a unique id for the image.


Delete From Image Gallery

Description: This API deletes a particular image from image gallery.

URL: https://api.withfloats.com/Discover/v1/floatingpoint/removeSecondaryImage

Method: DELETE

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client.
String fpId* The Unique Id of the Store/Site/Floating point.
String secondaryImageFilename* Unique Id of the image.

Get Store Search Queries

Description: This API gets the search queries of the store.

URL: https://api.withfloats.com/Search/v1/queries/report?offset={offset}

Method: POST

Type: Json

Input Parameters: Offset is sent as a url parameter and all the other parameters are sent together as an object in POST.

Parameter name Description
String clientId* Developer token given for specific client.
String offset Offset is the value/index, where to start the search queries from. Default is 1
String fpTag* Unique Tag of floating point or the subdomainname of the store
String fpIdentifierType* SINGLE

Expected Response: Search queries are returned with maximum count of 10 array of Objects.
{
"SearchRank": "PageRank",
"createdOn": "DateTime",
"fptag": "TagName",
"ip": "0.0.0.0",
"keyword": "keyword search in the search engines"
}


Get Store Updates

Description: This API gets updates of the store.

URL: https://api.withfloats.com/Search/v1/queries/report?offset={offset}

Method: POST

Type: Json

Input Parameters: Offset is sent as a url parameter and all the other parameters are sent together as an object in POST.

Parameter name Description
String clientId* Developer token given for specific client.
String offset Offset is the value/index, where to start the search queries from. Default is 1
String fpTag* Unique Tag of floating point or the subdomainname of the store
String fpIdentifierType* SINGLE

Expected Response: Search queries are returned with maximum count of 10 array of Objects.
{
"SearchRank": "PageRank",
"createdOn": "DateTime",
"fptag": "TagName",
"ip": "0.0.0.0",
"keyword": "keyword search in the search engines"
}


Get Floating Point Details

Description: This API can be used to get Details for a Site.

URL: https://api.withfloats.com/Discover/v1/floatingPoint/{fpTag}?clientId={clientId}

Method: GET

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client.
String fpTag* Unique Tag of floating point or the sub domain name of the store

Get Dashboard Details

Description: This API returns the Dashboard details for a Site.

URL: https://api.withfloats.com/Dashboard/v1/{fpTag}/details

Method: PUT

Type: Json

Input Parameters: DateFormat: yyyy/mm/dd

Parameter name Description
String fpTag* Unique Tag of floating point or the sub domain name of the store
String clientId* Developer token given for specific client.
String startDate* Start Date for the visitor data
String endDate* End Date for the visitor data
String detailsType* Visitor = 0,
UniqueVistor = 1,
Subscriber = 2,
Messages = 3
String scope 0

Get Customer Messages

Description: This API can be used to get queries that customer sends to the business owner through the site.

URL: https://api.withfloats.com/ Dashboard/v1/{fpId}/topmessagedetails?clientId={clientId}&startDate={startDate}&endDate={enddate}&scope={scope}

Method: GET

Type: Json

Input Parameters: DateFormat: yyyy/mm/dd

Parameter name Description
String fpTag* Unique Tag of floating point or the sub domain name of the store
String clientId* Developer token given for specific client.
String startDate* Start Date for the visitor data
String endDate* End Date for the visitor data
String scope 0

Floating Point Update

Description: This API can be used to update Floating Point Details.

URL: https://api.withfloats.com/v1/FloatingPoint/update/

Method: POST

Type: Json

Input Parameters:

Parameter name Description
String clientId* Developer token given for specific client.
String fpTag* Unique Tag of floating point or the subdomainname of the store
{}[] updates* It is an array of objects
{
key: " ",
value: " "
}

Keys

Key: "NAME",
Value: update Name/Title on the Site.

Key: "DESCRIPTION",
Value: update description on the Site.

Key: "EMAIL",
Value: update contact email on the Site.

Key: "URL",
Value: update URL of other site, which exists already.

Key: "TIMINGS", to update the Timings of the site.
Value: "00,00#10:00am,4:00pm#11:30am,7:30pm#00,00#00,00#00,00#00,00" From above example, if a particular day is holiday just pass 00,00
Comma is used to separate the from and to time of the day and # is used to separate the day. Day of the week starts with Sunday.

Key: "FB",
Value: Update the Facebook page name only the page name not the entire url
Example: http://www.facebook.com/pagename only pagename.

Key: "CONTACTS",
Value: Add/Change the contacts, send multiple contacts with # separation
Example: "0000000000#9999999999"


Code Snippets

Create Floating Point

Code:

PHP
C#

<?php

function createFloatingPoint($clientId, $tag, $contactName, $name, $desc, $address, $city, $pincode, $country, $primaryNumber,
              $email, $primaryNumberCountryCode, $Uri, $fbPageName, $primaryCategory, $lat, $lng, $parentId,
              $accuracy, $height, $category, $searchTags, $contacts, $timings, $PaymentState, $PaymentLevel)
{
$data = array(
  "clientId" => $clientId,
   "tag" => $tag,
   "contactName" => $contactName,
   "name" => $name,
   "desc" => $desc,
   "address" => $address,
   "city" => $city,
   "pincode" => $pincode,
   "country" => $country,
   "primaryNumber" =>  $primaryNumber,
   "email" => $email,
   "primaryNumberCountryCode" => $primaryNumberCountryCode,
   "Uri" => $Uri,
   "fbPageName" => $fbPageName,
   "primaryCategory" => $primaryCategory,
   "lat" => $lat,
   "lng" => $lng,
   "parentId" => $parentId,
   "isSF" => true,
   "generateLogin" => false,
   "accuracy" => $accuracy,
   "height" => $height,
   "catagory" => $category,
   "searchTags" => $searchTags,
   "contacts" => $contacts,
   "timings" => $timings,
   "PaymentState" => $PaymentState,
   "PaymentLevel" => $PaymentLevel
);

  $json_data = json_encode($data);

  try
  {
    $ch = curl_init('https://api.withfloats.com/Discover/v2/floatingpoint/create');
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_VERBOSE, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($json_data))
    );

    $result = curl_exec($ch);
    $response = json_decode($result, true);
    curl_close($ch);
    return $response;
  }
  catch(exception $ex)
  {
    echo 'Message: ' .$ex->getMessage();
  }
}

$clientId = "Replace with the ClientId";
$tag = "testhackathon";
$contactName = "Hackathon Test";
$name = "Hackathon Test 1";
$desc = "This is a test site for Hackathon";
$address = "Micsorostft, Banagalore";
$city = "Bangalore";
$pincode  = "560080";
$country  = "India";
$primaryNumber = "9849569879";
$email = "mounatinmonty@gmail.com";
$primaryNumberCountryCode = "+91";
$Uri = "";
$fbPageName = "";
$primaryCategory = "RETAIL";
$parentId = "";
$accuracy = 0;
$lat = 78;
$lng = 17;
$height = 0;
$category = array("RETAIL");
$searchTags = array();
$contacts = array();
$timings = array();
$PaymentState  = 20;
$PaymentLevel = 20;

$response = createFloatingPoint($clientId, $tag, $contactName, $name, $desc, $address, $city, $pincode, $country, $primaryNumber, $email, $primaryNumberCountryCode, $Uri, $fbPageName, $primaryCategory, $lat, $lng, $parentId, $accuracy, $height, $category, $searchTags, $contacts, $timings, $PaymentState, $PaymentLevel);
print_r($response);

?>

public static String CreateFloatingPoint(string tag, string name, string contactName, string description, string address, string city, string pincode, string country,
    string primaryNumber, string email, string primaryNumberCountryCode, string uri, string fbPageName, string primaryCategory,double latitude, double longitude)
    {
      try
      {
        HttpWebRequest request = (HttpWebRequest)WebRequest.Create( "https://api.withfloats.com/Discover/v3/FloatingPoint/create");
        request.ContentType = "application/json";
        request.Method = "PUT";
        BasicFloatingPointCreateModel requestModel = new BasicFloatingPointCreateModel()
        {
          address = address,
          city = city,
          clientId = "Replace With The Client Id",
          contactName = contactName,
          country = country,
          desc = description,
          email = email,
          fbPageName = fbPageName,
          lat = latitude,
          lng = longitude,
          name = name,
          pincode = pincode,
          primaryCategory = primaryCategory,
          primaryNumber = primaryNumber,
          primaryNumberCountryCode = primaryNumberCountryCode,
          tag = tag,
          Uri = uri
        };
        using (Stream requestStream = request.GetRequestStream())
        {
          DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(BasicFloatingPointCreateModel))
          serializer.WriteObject(requestStream, requestModel);
        }
        var response = request.GetResponse();
        using(Stream responseStream = response.GetResponseStream())
        {
          using(StreamReader reader = new StreamReader(responseStream))
          {
            return reader.ReadToEnd();
          }
        }
      }
      catch (Exception ex)
      {
        throw ex;
      }
    }

Code Snippets

Talk To Biz

Code:

PHP
C#

<?php

function createCustomerRequest($clientId, $message, $customerContact, $merchantId)
{
$data = array(
  "clientId" => $clientId,
  "message" => $message,
  "customerContact" => $customerContact,
  "merchantId" => $merchantId
);

  $json_data = json_encode($data);
  echo $json_data;
  try
  {
    $ch = curl_init('https://api.withfloats.com/Discover/v1/FloatingPoint/customerRequest/create');
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_VERBOSE, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($json_data))
    );

    $result = curl_exec($ch);
    $response = json_decode($result, true);
    curl_close($ch);
    return $response;
  }
  catch(exception $ex)
  {
    echo 'Message: ' .$ex->getMessage();
  }
}

$clientId = "Replace with Client Id";
$message = "Hi! This is a test Message!";
$customerContact = "Replaace with customer contact";
$merchantId = "Replace with Id";

$response = createCustomerRequest($clientId, $message, $customerContact, $merchantId);
print_r($response);

?>

public static void CreateCustomerRequest( string message, string customerContact, string merchantId, string clientId)
    {
      try
      {
        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(String.Format(_customerRequestUrl, _serverUrl));
        request.ContentType = "application/json";
        request.Method = "POST";
        using (Stream requestStream = request.GetRequestStream())
        {
          DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(CustomerFPRequestCreateMessage));
          serializer.ReadObject(requestStream);
        }
        var response = request.GetResponse();
      }
      catch (Exception ex)
      {
        throw ex;
      }
    }

Code Snippets

Delete Secondary Image

Code:

PHP
C#

<?php

function createCustomerRequest($fpId, $secondaryImageFilename, $clientId)
{
$data = array(
  "clientId" => $clientId,
  "fpId" => $fpId,
  "secondaryImageFilename" => $secondaryImageFilename
);

  $json_data = json_encode($data);
  echo $json_data;
  try
  {
    $ch = curl_init('https://api.withfloats.com/Discover/v1/floatingpoint/removeSecondaryImage');
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_VERBOSE, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($json_data))
    );

    $result = curl_exec($ch);
    $response = json_decode($result, true);
    curl_close($ch);
    return $response;
  }
  catch(exception $ex)
  {
    echo 'Message: ' .$ex->getMessage();
  }
}

$clientId = "Replace with Client Id";
$secondaryImageFilename = "Replace with Image File Name";
$fpId = "Replace With FP Id";

$response = createCustomerRequest($fpId, $secondaryImageFilename, $clientId);
print_r($response);

?>

public static void DeleteGalleryImage(string fpId, string secondaryImageFilename)
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://api.withfloats.com/Discover/v1/floatingpoint/removeSecondaryImage");
            request.Method = "DELETE";
            request.ContentType = "application/json";
            using (Stream requestStream = request.GetRequestStream())
            {
                FPSecondaryImageDeleteRequest requestModel = new FPSecondaryImageDeleteRequest()
                {
                    clientId = "Replace wtih the ClientId",
                    fpId = fpId,
                    secondaryImageFilename = secondaryImageFilename
                };
                DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(FPSecondaryImageDeleteRequest));
                serializer.WriteObject(requestStream, requestModel);
            }
            var response = request.GetResponse();
        }