Bullseye Locations API

The Bullseye Locations Developer Hub

Welcome to the Bullseye Locations developer hub. You'll find comprehensive guides and documentation to help you start working with Bullseye Locations as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

RestSearchResults Object

 

This is a wrapper for the RestLocationResult list, and is returned by the DoSearch2() call.

Type
Name
Description

Int

TotalResults

Total # of results for the search.
A negative value in this field indicates an error condition.

ResultList

The subset of results requested, given StartIndex and PageSize.

Suggest Edits

RestLocationResult Object

 

This object represents a single location, in a search result set.

Type
Name
Description

Int

Id

Bullseye location ID

String

Name

The name of the location

String

URL

The location’s website URL

String

Address1

First line of Address

String

Address2

Second line of Address

String

Address3

Third line of Address

String

Address4

Fourth line of Address

String

City

The location’s city

String

State

The location’s state abbreviation (e.g. “NJ”)

String

PostCode

The location’s postal code (zip code in US)

String

EmailAddress

String

PhoneNumber

The location’s phone number

String

FaxNumber

String

MobileNumber

String

ContactName

String

ContactPosition

String

ThirdPartyId

Third-party ID assigned by client

Double

Distance

Distance from search point, in miles.

String

CategoryIds

Comma-separated list of category ID's to which this location is assigned

Attributes

List of attributes for this location.

Only text, numeric, and yes/no attributes are supported.

String

CountryCode

“US”, “CA” (Canada), etc.

Decimal

Latitude

If available

Decimal

Longitude

Int

GeoCodeStatusId

0=None, 1=Zip Level, 2=Street Level

Boolean

InternetLocation

True if this is an internet location.

String

BusinessHours

A formatted string, representing the location’s business hours.

String

LocationTypeName

Standard, Preferred, or Exclusive

String

TimeZone

String

FacebookPageId

Associates a Facebook page with the location.

String

ImageFileUrl

Location thumbnail image

Coupons

List of Coupons for the location

Events

List of upcoming Events which will be held at this location.

Boolean

IsStoreLocator

Indicates whether a location has the Store Locator service. Ignore if ReturnServices is not requested.

Boolean

IsLeadManager

Indicates whether a location has the Lead Manager service. Ignore if ReturnServices is not requested.

DailyHoursList

Returns the hours for the upcoming 7 days.

Suggest Edits

RestAttribute Object

 

Represents an attribute and its value.

Type
Name
Description

Int

AttributeId

Bullseye attribute ID

String

AttributeName

The name of the attribute

String

AttributeValue

The value of the attribute, as a string.

Boolean attributes will be “True” or “False”.

String

AttributeDisplayText

This parameter is only used for Link type Attributes; it contains the display text for the Link.

Suggest Edits

RestCoupon Object

 

Represents a coupon.

Type
Name
Description

Int

CouponId

Bullseye coupon ID

String

Name

The name of the coupon

String

CouponText

Text for the coupon

DateTime

StartDate

Date when coupon starts

Nullable DateTime

EndDate

Date when coupon ends

String

PromoPageURL

URL for the Coupon

String

CouponImage

URL for the coupon Image

String

ThumbnailImage

URL for coupon thumbnail

Suggest Edits

RestEvent Object

 

Represents an event associated with location.

Type
Name
Description

Int

EventId

Bullseye event ID

String

EventTitle

The title of an event

String

EventImageURL

Relative URL of an uploaded image

String

EventDescription

Description of an event

String

OrganizerName

Name of event organaizer

String

OrganizerDescription

Description of an event organizer

DateTime

StartDate

Date when event starts

Nullable DateTime

EndDate

Date when event ends

TimeSpan

StartTime

Time when event starts

Nullable TimeSpan

EndTime

Time when event starts

String

RegistrationURL

URL to register for the event

String

FacebookURL

URL for the event Facebook account

String

TwitterURL

URL for the event Twitter account

Suggest Edits

RestDailyHours

 

This class represents an entry in the list of Daily Hours for the week containing the current day.

Type
Name
Description

String

NameOfDay

Name of the day for which the following data applies.

Boolean

NoHoursAvailable

Indicates there was no data available for the day.

Boolean

Closed

Indicates the location is closed on this day.

Boolean

HolidayHours

Indicates the hours are for a Holiday.

Boolean

SpecialHours

Indicates the hours are non-standard for the day.

Nullable DateTime

OpeningTime

Time of the day at which the location opens.

Nullable DateTime

ClosingTime

Time of the day at which the location closes.

String

HolidayName

Name given to the current day, whether a Holiday or a Special Day such as Black Friday.

Int

DayOrder

Used internally to order all 7 days.

String

HoursDisplayText

The Opening and Closing times, or the word "Closed" formatted to display on a page. Format for times is HH:MM AM/PM.

Suggest Edits

RestCategory Object

 

Represents a category, and its place in the category tree.

Type
Name
Description

Int

CategoryId

Bullseye category ID

String

CategoryName

The name of the category

String

ThirdPartyID

Optional third-party ID

String

CategoryData

Optional additional data for this category

Nullable int

ParentCategoryID

Id of this category’s parent. Null if this is a root category.

Int

Depth

Depth of this category in the tree. 0 for root category.

String

Lineage

A string representing the lineage of this category.

This is a sequence of category ids from the root to this entry, separated by vertical bars. For example, if category 3 was under category 1 and 2, this value would be “|1|2|”. (It will be just “|” if root.)

Suggest Edits

RestCatSum Object

 

This is a list of categories and the count of locations within each category

Type
Name
Description

Int

CategoryId

Bullseye category ID

String

CategoryName

The name of the category

Int

Locations

Number of locations in this category

Suggest Edits

RestState Object

 

This represents a state or province.

Type
Name
Description

String

Abbr

State abbreviation, e.g. “NJ”

String

Name

State name, e.g. “New Jersey”

Suggest Edits

RestCountrySum Object

 

This represents a country summary item.

Type
Name
Description

Int

Id

Bullseye country ID. 1=US, 2=Canada, etc.

String

Name

Country name

String

Code

Country code, e.g. “US”, “CA”, etc.

Int

Pos

Can be used for ordering.

Int

Locations

Count of locations in country

Suggest Edits

RestCitySum Object

 

This represents a city summary item.

Type
Name
Description

String

Name

City name, e.g. “Somerset”

Int

RegionId

Bullseye region ID (state/prod)

Int

Locations

Count of locations in city

Suggest Edits

RestPostalCode Object

 

This represents a US or Canadian postal code.

Type
Name
Description

String

PostalCode

Five-digit US zip code, or six-character Canadian postal code.

String

State

State or provice code, e.g. "NJ"

String

City

City name

String

County

County name

Double

Latitude

zip center point latitude

Double

Longitude

zip center point longitude

Suggest Edits

RestSearchLogList Object

 

This is a wrapper for the RestSearchLog list, and is returned by the GetSearchLog() call.

Type
Name
Description

Int

TotalResults

Total # of results for the search.

RestSearchLog

The subset of results requested, given startDate and endDate.

Suggest Edits

RestSearchLog Object

 

Represents a RestSearchLog.

Type
Name
Description

String

IPAddress

IP address from which the search originated

String

DomainName

Domain Name

String

City

City

String

State

State

String

PostalCode

Postal Code

String

Country

Country

String

Keyword

Keyword

String

NumResults

Number Results returned

String

SearchSource

Search Source

DateTime

DateCreated

Date Created

String

InterfaceName

The name of the interface where the search was performed

Suggest Edits

RestSearchResponseLogList Object

 

This is a wrapper for the RestSearchResponseLog list, and is returned by the GetSearchResponseLog() call

Type
Name
Description

Int

TotalResults

Total # of results for the search.

RestSearchResponseLog

The subset of results requested, given startDate and endDate.

Suggest Edits

RestSearchResponseLog

 

Represents a RestSearchResponseLog.

Type
Name
Description

String

LocationName

Name of the location returned in a search

bool

Viewed

returns true

bool

URLClicked

returns true if URL link in the results was clicked

bool

EmailClicked

returns true if Email link in the results was clicked

bool

LocationResultsClicked

returns true if More Info link in the results was clicked

bool

LocationMapClicked

LocationMapClicked

bool

DirectionsClicked

returns true if map pin in the results was clicked

DateTime

DateCreated

Date Created

Suggest Edits

RestLogSearchRslt Object

 
Type
Name
Description

String

errorMsg

Suggest Edits

RestCompanyName Object

 

Represents a RestCompanyName and it's returned by the GetCompanyNames call.

Type
Name
Description

Int

ID

Company Name ID.

Int

ClientID

Client ID.

String

Name

Company Name name.

String

ThirdPartyID

Company Name third party ID.

Suggest Edits

RestTerritory Object

 

Returned by the GetTerritories call.

Type
Name
Description

Int

ID

Territory ID.

Int

ClientID

Client ID.

String

Name

Territory name.

Int

TypeID

Territory type ID. Can be null.

String

Type

Territory type.

Int

CountryID

Country ID. Can be null.

String

Country

Country.

Suggest Edits

DoSearch2

This method will return a list of locations, given search criteria. This call wraps the returned list in a structure that includes the total number of results. Default sorting and search type are configured in the admin under search rules.

Return Value: RestSearchResults

 
gethttps://ws.bullseyelocations.com/restsearch.svc/dosearch2

Query Params

ClientID
int32
required
ApiKey
string
required
PostalCode
string
City
string
State
string
CountryID
int32
required

Should be set to 1 for US and 2 for Canada. For other country codes, you can check the result of the GetCountryList method

CategoryIDs
string

Can include comma-delimited list to limit to those categories

Radius
int32

Specify radius in miles. To perform a literal search unconstrained by radius, pass -1 as the radius. This will allow you to retrieve all locations in a given postal code, state, or city/state, or matching a given keyword

StartIndex
int32
required

Use this to specify the start number of the results for the page you are requesting.

PageSize
int32
required

Specify the number of results returned within a paging request.

Latitude
string

If you specify a lat/lon pair, a radius search will be performed regardless of the configured search rules.

Longitude
string

If you specify a lat/lon pair, a radius search will be performed regardless of the configured search rules.

Keyword
string

Keyword search will perform a string match against the location name.

UserIPAddress
string

If you specify a user IP address, then this will be checked against the list of blocked IP addresses for this client. If the address is on the block list, the search will not be performed, and a 403 (forbidden) response code will be returned. Passing this argument also causes the given IP address to be logged, if search logging is enabled for this client. (If the user IP is not passed in, then the IP of the machine calling the web service will be logged.)

ReturnGeocode
boolean

If this flag is set, the web service call will geocode any locations that need it

FillAttr
boolean

If the FillAttr parameter is set to true, the web service will fill in the Attributes list in each location result. If not, then the attributes list will not be filled in. (In some instances, returning attributes can slow down the search. Do not return attributes unless you need them.)

ReturnCoupon
boolean

If set to true, the web service will fill in the coupons list in each location result.

SearchSourceName
string

Used to indicate the source of this search, for reporting purposes. Default source names are “Web” and “Facebook”. To use another source, you must set it up via the Bullseye admin site.

SearchTypeOverride
int32

See notes below.

CountryScope
string

This optional parameter is used to access all locations regardless of what country they are in. It must be used in conjunction with the SearchTypeOverride parameter being set to Country Search. It also requires that the Other International subscription has been set up through the Bullseye admin site, as it uses the search and sort rules associated with this subscription. For now this parameter only has one acceptable value, "All", which will return all locations worldwide. The locations can be filtered by Category and Keyword if those parameters have been provided.

MaxResults
int32

Used to set a ceiling on the number of results returned if this has not been set for a specific country, or to override that setting if it exists for the country that is being searched.

MatchAllCategories
boolean

By default performing a search with multiple categories will return locations that match "any" of the categories in the request. For search requests which require locations to match all of the categories input, the MatchAllCategories optional parameter can be used. This parameter is automatically set to false, but when overridden to true will require that any result be assigned to all categories passed in. Setting this parameter to "True" will return results that match "all" categories.

ReturnServices
boolean

When set to "True", this parameter results in two flags on the Location object being set for each location: IsStoreLocator and IsLeadManager. If not set, or set to false, these fields will not be populated and should be ignored

FindNearestForNoResults
boolean

Setting this parameter to "True" will return the single nearest result regardless of the specified radius. Results are limited to the country of the original request.

LanguageCode
string

Specify the ISO code of the language that results should be returned. Will return custom translations for both labels and categories if that subscription is enabled. Otherwise, will return global translations for labels only.

LanguageID
int32

Specify the Bullseye LanguageID to request translated values as defined above.

Usage Tip

Results should be retrieved one page at a time. To retrieve the first 25 results, specify StartIndex = 0 and PageSize = 25. To retrieve the next 25 results, specify StartIndex=25, PageSize=25

SearchTypeOverride

The optional parameter SearchTypeOverride can be used to change the inherent search type for a particular country. The inherent Search Type refers to the Search Rules configured for a country on the Bullseye admin site. For example, if the search type for Australia is set to Radius Search, setting the SearchTypeOverride to the value for Country Search will result in all Australian locations being returned. The defined search types are:

Radius: 1 - Retrieves all locations that fall within the distance defined by the Radius parameter. For the US, the value of the Radius parameter is interpreted in miles; in all other countries it is considered kilometers. A starting point needs to be defined through a combination of the City, State, PostalCode, Latitude and Longitude parameters.

Territory: 2 - Based on the inputted starting point, retrieves all locations that belong to defined territories that include the starting point.

Literal: 3 - Retrieves all locations within a country that have the value in the Keyword parameter in their name.

Country: 4 - Retrieves all locations that fall within the country defined by the CountryId parameter. An example of when to use the SearchTypeOverride parameter is if no results are returned for a country configured for Radius Search. The fallback for that situation would be to have a second call with SearchTypeOverride set to Country that would return all locations for that country.

InternationalRadius: 8 - Performs a radius search based on an inputted set of geocodes without regard to country. This search path will bypass requiring ClientSettings/RoutingMethod/RoutingDetails records.

An example of when to use the SearchTypeOverride parameter is if no results are returned for a country configured for Radius Search. The fallback for that situation would be to have a second call with SearchTypeOverride set to Country that would return all locations for that country.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using EasyHttp.Http;
using JsonFx.Json;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
 
namespace RestWebSvcCsharpConsoleTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string myUrl = 
                "http://ws.bullseyelocations.com/RestSearch.svc/DoSearch2"
                + "?ClientId=999&ApiKey=YOUR-API-KEY-HERE";
 
            // presumably, these values would come from the end-user 
            // and/or your business logic:
            int countryId = 1;      // US
            string zipCode = "08876";
            string city = "";
            string state = "";      // e.g. "NJ"
            int radius = 25;
            bool returnGeocodes = true;
            bool returnAttributes = false;
 
            // construct the full URL:
            myUrl += string.Format("&CountryId={0}", countryId);
            if (!string.IsNullOrEmpty(zipCode))
                myUrl += string.Format("&PostalCode={0}", zipCode);
            if (!string.IsNullOrEmpty(city))
                myUrl += string.Format("&City={0}", city);
            if (!string.IsNullOrEmpty(state))
                myUrl += string.Format("&State={0}", state);
            myUrl += string.Format("&Radius={0}", radius);
            if (returnGeocodes)
                myUrl += "&ReturnGeocode=true";
            if (returnAttributes)
                myUrl += "&FillAttr=true";
 
            myUrl += string.Format("&StartIndex={0}&PageSize={1}", 0, 25);
 
            var http = new HttpClient
            {
                Request = { Accept = HttpContentTypes.ApplicationJson }
            };
 
            EasyHttp.Http.HttpResponse response = null;
            try
            {
                response = http.Get(myUrl);
            }
            catch (WebException ex)
            {
                Console.WriteLine("Error: web exception - msg = {0}", ex.Message);
                return;
            }
 
            var statcode = response.StatusCode;
            string statdesc = response.StatusDescription;
 
            if (statcode != System.Net.HttpStatusCode.OK)
            {
                Console.WriteLine("Error: response code = {0}", statdesc);
                return;
            }
 
            // get the raw JSON:
            string rawresp = response.RawText;
 
            if (string.IsNullOrEmpty(rawresp))
            {
                Console.WriteLine("Error: no response text received from server.");
                return;
            }
 
            // create a dynamic var and pop it from the raw JSON:
            var reader = new JsonFx.Json.JsonReader();
            dynamic myResults = reader.Read(rawresp);
 
            int nTotResults = myResults.TotalResults;
 
            // optionally, deserialize it to a static variable:
            // NOTE that we use Json.Net here instead of JsonFx, 
            // due to some issues with JsonFx.
            // RestSearchResults myOtherRes = 
            //  JsonConvert.DeserializeObject<RestSearchResults>(rawresp);
 
            Console.WriteLine("total # of results: {0}\n\n", nTotResults);
 
            int nRows = 0;
            foreach (var row in myResults.ResultList)
            {
                nRows++;
                if (nRows > 10)
                    break;
                Console.WriteLine(
                    "Name:{0}, Distance:{1}, Address1:{2}, City:{3}, State:{4}\n",
                    row.Name, row.Distance, row.Address1, row.City, row.State);
                if (row.Attributes != null)
                {
                    foreach (var attr in row.Attributes)
                    {
                        Console.WriteLine("\tid={0}, name={1}, value={2}\n",
                            attr.AttributeId, attr.AttributeName, attr.AttributeValue);
                    }
                }
            }
 
            // or you can use LINQ via JSON.NET:
            Console.WriteLine("\nExtracting location names via JSON:");
            JObject jResults = JObject.Parse(rawresp);
            var jq = from row in jResults["ResultList"].Children()
                     orderby row["Name"]
                     select row["Name"];
            foreach (var rowName in jq)
            {
                Console.WriteLine(rowName);
            }
 
            if (nRows == 0)
                Console.WriteLine("Empty array returned.\n");
 
            Console.WriteLine("Press any key...");
            Console.ReadKey();
        }
    }
}
<?php
/* This next sample shows how to call the DoSearch2 method. */
 
$myUrl = "http://ws.bullseyelocations.com/RestSearch.svc/DoSearch2" .
"?ClientId=999&ApiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx " .
"&Latitude=40.665505&Longitude=-74.267242&Radius=25" .
"&UserIPAddress=1.2.3.4" .
"&StartIndex=0&PageSize=25";
 
print "$myUrl <br/>"; 
$method = "GET";
 
$myHeaders = array(
	'Accept: application/json',
	'Content-type: application/json'
	);
 
$handle = curl_init();
curl_setopt($handle, CURLOPT_URL, $myUrl);
 
curl_setopt($handle, CURLOPT_HTTPHEADER, $myHeaders);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
 
$response = curl_exec($handle);
$code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
 
print "return code = $code <br/>";
 
$myRespArr = json_decode($response, true);
print $myRespArr["TotalResults"] . " total results.<br/>\n";
print "<pre>";
var_dump($myRespArr);
print "</pre>";
?>
A binary file was returned

You couldn't be authenticated

{
  "FindNearestSearch": false,
  "ResultList": [
    {
      "Address1": "3121 US Hwy 22 East",
      "Address2": "Suite 301",
      "Address3": null,
      "Address4": null,
      "Attributes": null,
      "BusinessHours": "Mon-Tue 8:00 AM-5:00 PM|",
      "CategoryIds": "",
      "City": "Branchburg",
      "ContactName": null,
      "ContactPosition": null,
      "ContactURL": null,
      "CountryCode": "US",
      "Coupons": null,
      "DailyHoursList": null,
      "Distance": 0,
      "EmailAddress": "rachael@test.electricvine.com",
      "Events": null,
      "FaceBookPageId": null,
      "FaxNumber": null,
      "GeoCodeStatusId": 2,
      "Id": 4952378,
      "ImageFileUrl": null,
      "InternetLocation": false,
      "IsLeadManager": false,
      "IsStoreLocator": false,
      "LMServiceID": false,
      "Latitude": 40.600771,
      "LocationTypeName": "Standard",
      "Longitude": -74.686472,
      "MobileNumber": null,
      "Name": "Atlantic City Dinettes",
      "PhoneNumber": "609-646-6464",
      "PostCode": "08876",
      "State": "NJ",
      "ThirdPartyId": null,
      "TimeZone": "(GMT-05:00) Eastern Time (US & Canada)",
      "URL": null
    }
  ],
  "SearchReqLogId": 10514187,
  "TotalResults": 1
}
Suggest Edits

GetCategories

This method will return the full list of categories for a given client.

Return Value: RestCategory

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetCategories

Query Params

ClientId
int32
required
ApiKey
string
required
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get categories
$alphaOrdering = true;
$response = $bullseye->getCategories($alphaOrdering);
//4. Check response
if($response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "CategoryData": "",
    "CategoryId": 7935,
    "CategoryName": "Category A",
    "Depth": 0,
    "Lineage": "|",
    "ParentCategoryId": null,
    "ThirdPartyId": ""
  },
  {
    "CategoryData": "",
    "CategoryId": 7936,
    "CategoryName": "Category B",
    "Depth": 0,
    "Lineage": "|",
    "ParentCategoryId": null,
    "ThirdPartyId": ""
  }
]
Suggest Edits

GetCatSum

This method will return a list of categories, and the number of locations within each, given a set of criteria for a location search.

Return Value: RestCatSum

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetCatSum

Query Params

ClientId
int32
required
ApiKey
string
required
PostalCode
string

5-digit zip. If you specify postal code, your configured search type (territory or radius) will be used.

City
string

If you specify city/state, your configured search type (territory or radius) will be used.

State
string

2-alpha state code. If you specify city/state, your configured search type (territory or radius) will be used.

Latitude
string

If you specify a lat/lon pair, a radius search will be performed

Longitude
string

If you specify a lat/lon pair, a radius search will be performed

Keyword
string

If you specify a keyword, this will be used to filter results to locations containing that keyword in the name field

CategoryIds
string

You can specify a comma-delimited list of categories. This will limit the summary to locations within those categories.

Radius
int32
required

Specify radius in miles. Radius is required for any geographical search.

Specify postal code (5-digit zip), city and state (2-alpha state code), or latitude/longitude (degrees).

If you specify a lat/lon pair, a radius search will be performed. If you specify postal code or city/state, your configured search type (territory or radius) will be used.

If you specify a keyword, this will be used to filter results to locations containing that keyword in the name field.

You can specify a comma-delimited list of categories. This will limit the summary to locations within those categories.

Specify radius in miles.

	var mydata = {
	  ClientId: 999,
	  ApiKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
	  //PostalCode: "08876",
	  City: "Somerset", State: "NJ",
        //Latitude: 40.54374, Longitude: -74.66004,
        //CategoryIds: "1,2,3",
	  Radius: 5
	};
	$.ajax( {
	  url: "http://ws.bullseyelocations.com/RestSearch.svc/GetCatSum",
	  data: mydata,
	  type: "GET",
	  processData: true,
	  timeout: 10000,
	  dataType: "json",
	  success:
		function(data, status, xhr)
		  {
		  console.log(data);
		  console.log(status);
		  $("div#cats").text(data.length + " elements returned");
		  } ,
	  error:
		function(xhr, status, ex)
		  {
		  console.log("ERROR: "+status);
		  }
	} );
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get categories
$args = array(
  'City' => 'Somerset',
  'State' => 'NJ',
  'Radius' => 10
);
$response = $bullseye->getCatSum($args);
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "CategoryId": 1408,
    "CategoryName": "Accordion",
    "Locations": 9
  },
  {
    "CategoryId": 1410,
    "CategoryName": "Bagpipes",
    "Locations": 2
  }
  ]
Suggest Edits

GetLocation

This method retrieves information for a location, given a Bullseye location ID, or a third-party ID.

Return Value: LocationJson

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetLocation

Query Params

ClientId
int32
required
ApiKey
string
required
LocationId
int32
required
ThirdPartyId
string

This is identical to the GetLocation method in the RestLocation service. It is being made available in the search service also, for convenience.

//Json date returned from the API contains a 4 hour offset time
// offset needs to be included when converting a date to ASP.Net DateTime
private DateTime ConvertJsonStringToDateTime(string jsonTime)
        {
            if (!string.IsNullOrEmpty(jsonTime))
            {
                string milis = jsonTime;
                string sign = milis.IndexOf("+") > -1 ? "+" : "-";
                string hours = milis.Substring(milis.IndexOf(sign));
                milis = milis.Substring(0, milis.IndexOf(sign));
                return new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(Convert.ToInt64(milis)).AddHours(Convert.ToInt64(hours) / 100);
            }
 
            return DateTime.Now;
        }
 
//usage
 var time1 = ConvertJsonStringToDateTime("1442926800000-0400");
 var time2 = ConvertJsonStringToDateTime("1442955600000-0400");
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
$bullseye->debug(true);
//3. Call method to get the location
$locationId = '4885827';
$location = $bullseye->getLocation($locationId);
//4. Check location
if($location)
  print_r($location);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

{
  "Active": true,
  "Address1": "Little Heath,Barley Lane",
  "Address2": "Essex",
  "Address3": null,
  "Address4": null,
  "Attributes": [
    {
      "AttributeId": 226,
      "AttributeName": "My Rates",
      "AttributeTypeID": 1,
      "BoolValue": null,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058923,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": null,
      "OptionName": null,
      "TextValue": "30",
      "LinkValue": null
    },
    {
      "AttributeId": 238,
      "AttributeName": "Teaching Location",
      "AttributeTypeID": 1,
      "BoolValue": null,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058924,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": null,
      "OptionName": null,
      "TextValue": "Home",
      "LinkValue": null
    },
    {
      "AttributeId": 241,
      "AttributeName": "Years Teaching",
      "AttributeTypeID": 3,
      "BoolValue": null,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058925,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": 10,
      "OptionID": null,
      "OptionName": null,
      "TextValue": null,
      "LinkValue": null
    },
    {
      "AttributeId": 248,
      "AttributeName": "References Available?",
      "AttributeTypeID": 4,
      "BoolValue": false,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058926,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": null,
      "OptionName": null,
      "TextValue": null,
      "LinkValue": null
    },
    {
      "AttributeId": 232,
      "AttributeName": "In-Home Lessons?",
      "AttributeTypeID": 4,
      "BoolValue": false,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058927,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": null,
      "OptionName": null,
      "TextValue": null,
      "LinkValue": null
    },
    {
      "AttributeId": 249,
      "AttributeName": "MTNA Certified?",
      "AttributeTypeID": 4,
      "BoolValue": false,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058928,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": null,
      "OptionName": null,
      "TextValue": null,
      "LinkValue": null
    },
    {
      "AttributeId": 251,
      "AttributeName": "Newsletter?",
      "AttributeTypeID": 4,
      "BoolValue": false,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058929,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": null,
      "OptionName": null,
      "TextValue": null,
      "LinkValue": null
    },
    {
      "AttributeId": 261,
      "AttributeName": "Styles Taught",
      "AttributeTypeID": 7,
      "BoolValue": null,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058930,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": 209,
      "OptionName": "All Styles",
      "TextValue": null,
      "LinkValue": null
    }
  ],
  "BusinessHours": {
    "DateCreated": "/Date(1462448937963-0400)/",
    "DateDeleted": null,
    "DateLastModified": "/Date(1463046616583-0400)/",
    "FridayClose": null,
    "FridayOpen": null,
    "Id": 4886269,
    "LocationID": 4886269,
    "MondayClose": null,
    "MondayOpen": null,
    "SaturdayClose": null,
    "SaturdayOpen": null,
    "SundayClose": null,
    "SundayOpen": null,
    "ThursdayClose": null,
    "ThursdayOpen": null,
    "TimeZoneID": 5,
    "TimeZoneName": null,
    "TuesdayClose": null,
    "TuesdayOpen": null,
    "WednesdayClose": null,
    "WednesdayOpen": null,
    "Display24HourFormat": false
  },
  "BusinessHoursFmtd": null,
  "Categories": [],
  "City": "Essex",
  "ClientId": 267,
  "ContactName": "Contact name 3rd pty",
  "ContactPosition": "Daram",
  "ContactURL": null,
  "CountryId": 1,
  "CountryName": "United States",
  "Coupons": [],
  "DailyHoursList": null,
  "DateCreated": "/Date(1462448937917-0400)/",
  "DateDeleted": null,
  "DateLastGeoCoded": "/Date(1462448937887-0400)/",
  "DateLastModified": "/Date(1463046616567-0400)/",
  "EmailAddress": "test@gmail.com",
  "Events": [],
  "FacebookPageId": null,
  "FaxNumber": null,
  "GeoCodeStatusId": 1,
  "Id": 4886269,
  "ImageFileUrl": null,
  "InternationalAddress": null,
  "InternetLocation": false,
  "LMServiceID": true,
  "Latitude": 40.49934,
  "LocationTypeId": 656,
  "LocationTypeName": "Standard",
  "Longitude": -74.52138,
  "MemberId": null,
  "MobileNumber": null,
  "Name": "LOC name 3rd pty",
  "Password": null,
  "PhoneNumber": null,
  "PostCode": "08873",
  "RepFullName": null,
  "RepId": 139,
  "ResponsivenessId": 5,
  "ResponsivenessName": null,
  "RestAttributes": null,
  "RestHolidayHours": [],
  "RestLocationImage": [],
  "RestLocationSEO": null,
  "RestLocationSocialMedia": {
    "DateCreated": "/Date(-62135578800000-0500)/",
    "DateLastModified": "/Date(-62135578800000-0500)/",
    "FacebookURL": null,
    "GooglePlusURL": "",
    "ID": 2364,
    "LinkedInURL": "",
    "LocationID": 4886269,
    "PinterestURL": "",
    "TwitterURL": "",
    "YelpURL": ""
  },
  "RestLocationSocialMediaLinks": {
    "DateCreated": "/Date(-62135578800000-0500)/",
    "DateLastModified": "/Date(-62135578800000-0500)/",
    "FacebookURL": null,
    "GooglePlusURL": "",
    "ID": 2364,
    "LinkedInURL": "",
    "LocationID": 4886269,
    "PinterestURL": "",
    "TwitterURL": "",
    "YelpURL": ""
  },
  "Services": [
    {
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4421545,
      "LocationID": 4886269,
      "LocationName": null,
      "ServiceID": 1,
      "ServiceName": "Lead Manager"
    },
    {
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4421546,
      "LocationID": 4886269,
      "LocationName": null,
      "ServiceID": 2,
      "ServiceName": "Store Locator"
    }
  ],
  "StateAbbr": "NJ",
  "StateId": 35,
  "Territories": [],
  "ThirdPartyId": "TRDPID",
  "URL": null,
  "UserName": null
}
Suggest Edits

GetStatesByCountry

This method will return a list of states or provinces, given a country id.

Return Value: RestState

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetStatesByCountry

Query Params

ClientId
int32
required
ApiKey
string
required
CountryId
int32
required

1 for US, 2 for Canada.

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get states
$countryId = 2;
$response = $bullseye->getStatesByCountry($countryId);
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "Abbr": "AL",
    "CountryID": 0,
    "ID": 0,
    "Name": "Alabama"
  },
  {
    "Abbr": "AK",
    "CountryID": 0,
    "ID": 0,
    "Name": "Alaska"
  },
  {
    "Abbr": "AS",
    "CountryID": 0,
    "ID": 0,
    "Name": "American Samoa"
  },
  {
    "Abbr": "AZ",
    "CountryID": 0,
    "ID": 0,
    "Name": "Arizona"
  },
  {
    "Abbr": "AR",
    "CountryID": 0,
    "ID": 0,
    "Name": "Arkansas"
  },
  {
    "Abbr": "CA",
    "CountryID": 0,
    "ID": 0,
    "Name": "California"
  },
  {
    "Abbr": "CO",
    "CountryID": 0,
    "ID": 0,
    "Name": "Colorado"
  },
  {
    "Abbr": "CT",
    "CountryID": 0,
    "ID": 0,
    "Name": "Connecticut"
  },
  {
    "Abbr": "DE",
    "CountryID": 0,
    "ID": 0,
    "Name": "Delaware"
  },
  {
    "Abbr": "DC",
    "CountryID": 0,
    "ID": 0,
    "Name": "District of Columbia"
  },
  {
    "Abbr": "FM",
    "CountryID": 0,
    "ID": 0,
    "Name": "Federated States of Micronesia"
  },
  {
    "Abbr": "FL",
    "CountryID": 0,
    "ID": 0,
    "Name": "Florida"
  },
  {
    "Abbr": "GA",
    "CountryID": 0,
    "ID": 0,
    "Name": "Georgia"
  },
  {
    "Abbr": "GU",
    "CountryID": 0,
    "ID": 0,
    "Name": "Guam"
  },
  {
    "Abbr": "HI",
    "CountryID": 0,
    "ID": 0,
    "Name": "Hawaii"
  },
  {
    "Abbr": "ID",
    "CountryID": 0,
    "ID": 0,
    "Name": "Idaho"
  },
  {
    "Abbr": "IL",
    "CountryID": 0,
    "ID": 0,
    "Name": "Illinois"
  },
  {
    "Abbr": "IN",
    "CountryID": 0,
    "ID": 0,
    "Name": "Indiana"
  },
  {
    "Abbr": "IA",
    "CountryID": 0,
    "ID": 0,
    "Name": "Iowa"
  },
  {
    "Abbr": "KS",
    "CountryID": 0,
    "ID": 0,
    "Name": "Kansas"
  },
  {
    "Abbr": "KY",
    "CountryID": 0,
    "ID": 0,
    "Name": "Kentucky"
  },
  {
    "Abbr": "LA",
    "CountryID": 0,
    "ID": 0,
    "Name": "Louisiana"
  },
  {
    "Abbr": "ME",
    "CountryID": 0,
    "ID": 0,
    "Name": "Maine"
  },
  {
    "Abbr": "MH",
    "CountryID": 0,
    "ID": 0,
    "Name": "Marshall Islands"
  },
  {
    "Abbr": "MD",
    "CountryID": 0,
    "ID": 0,
    "Name": "Maryland"
  },
  {
    "Abbr": "MA",
    "CountryID": 0,
    "ID": 0,
    "Name": "Massachusetts"
  },
  {
    "Abbr": "MI",
    "CountryID": 0,
    "ID": 0,
    "Name": "Michigan"
  },
  {
    "Abbr": "MN",
    "CountryID": 0,
    "ID": 0,
    "Name": "Minnesota"
  },
  {
    "Abbr": "MS",
    "CountryID": 0,
    "ID": 0,
    "Name": "Mississippi"
  },
  {
    "Abbr": "MO",
    "CountryID": 0,
    "ID": 0,
    "Name": "Missouri"
  },
  {
    "Abbr": "MT",
    "CountryID": 0,
    "ID": 0,
    "Name": "Montana"
  },
  {
    "Abbr": "NE",
    "CountryID": 0,
    "ID": 0,
    "Name": "Nebraska"
  },
  {
    "Abbr": "NV",
    "CountryID": 0,
    "ID": 0,
    "Name": "Nevada"
  },
  {
    "Abbr": "NH",
    "CountryID": 0,
    "ID": 0,
    "Name": "New Hampshire"
  },
  {
    "Abbr": "NJ",
    "CountryID": 0,
    "ID": 0,
    "Name": "New Jersey"
  },
  {
    "Abbr": "NM",
    "CountryID": 0,
    "ID": 0,
    "Name": "New Mexico"
  },
  {
    "Abbr": "NY",
    "CountryID": 0,
    "ID": 0,
    "Name": "New York"
  },
  {
    "Abbr": "NC",
    "CountryID": 0,
    "ID": 0,
    "Name": "North Carolina"
  },
  {
    "Abbr": "ND",
    "CountryID": 0,
    "ID": 0,
    "Name": "North Dakota"
  },
  {
    "Abbr": "MP",
    "CountryID": 0,
    "ID": 0,
    "Name": "Northern Mariana Islands"
  },
  {
    "Abbr": "OH",
    "CountryID": 0,
    "ID": 0,
    "Name": "Ohio"
  },
  {
    "Abbr": "OK",
    "CountryID": 0,
    "ID": 0,
    "Name": "Oklahoma"
  },
  {
    "Abbr": "OR",
    "CountryID": 0,
    "ID": 0,
    "Name": "Oregon"
  },
  {
    "Abbr": "PW",
    "CountryID": 0,
    "ID": 0,
    "Name": "Palau"
  },
  {
    "Abbr": "PA",
    "CountryID": 0,
    "ID": 0,
    "Name": "Pennsylvania"
  },
  {
    "Abbr": "PR",
    "CountryID": 0,
    "ID": 0,
    "Name": "Puerto Rico"
  },
  {
    "Abbr": "RI",
    "CountryID": 0,
    "ID": 0,
    "Name": "Rhode Island"
  },
  {
    "Abbr": "SC",
    "CountryID": 0,
    "ID": 0,
    "Name": "South Carolina"
  },
  {
    "Abbr": "SD",
    "CountryID": 0,
    "ID": 0,
    "Name": "South Dakota"
  },
  {
    "Abbr": "TN",
    "CountryID": 0,
    "ID": 0,
    "Name": "Tennessee"
  },
  {
    "Abbr": "TX",
    "CountryID": 0,
    "ID": 0,
    "Name": "Texas"
  },
  {
    "Abbr": "UT",
    "CountryID": 0,
    "ID": 0,
    "Name": "Utah"
  },
  {
    "Abbr": "VT",
    "CountryID": 0,
    "ID": 0,
    "Name": "Vermont"
  },
  {
    "Abbr": "VI",
    "CountryID": 0,
    "ID": 0,
    "Name": "Virgin Islands"
  },
  {
    "Abbr": "VA",
    "CountryID": 0,
    "ID": 0,
    "Name": "Virginia"
  },
  {
    "Abbr": "WA",
    "CountryID": 0,
    "ID": 0,
    "Name": "Washington"
  },
  {
    "Abbr": "WV",
    "CountryID": 0,
    "ID": 0,
    "Name": "West Virginia"
  },
  {
    "Abbr": "WI",
    "CountryID": 0,
    "ID": 0,
    "Name": "Wisconsin"
  },
  {
    "Abbr": "WY",
    "CountryID": 0,
    "ID": 0,
    "Name": "Wyoming"
  },
  {
    "Abbr": "SX",
    "CountryID": 0,
    "ID": 0,
    "Name": "St. Croix"
  },
  {
    "Abbr": "SJ",
    "CountryID": 0,
    "ID": 0,
    "Name": "St. John"
  },
  {
    "Abbr": "ST",
    "CountryID": 0,
    "ID": 0,
    "Name": "St. Thomas"
  }
]
Suggest Edits

GetCountryList

This method will return a list of countries in which the client has locations. A location count for each country will be included.

Return Value: RestCountrySum

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetCountryList

Query Params

ClientId
int32
required
ApiKey
string
required
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get countries with locations
$response = $bullseye->getCountryList();
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "Code": "US",
    "Id": 1,
    "Locations": 4513,
    "Name": "United States",
    "Pos": 1
  },
  {
    "Code": "CA",
    "Id": 2,
    "Locations": 110,
    "Name": "Canada",
    "Pos": 2
  },
  {
    "Code": "GB",
    "Id": 88,
    "Locations": 106,
    "Name": "United Kingdom",
    "Pos": 3
  },
  {
    "Code": "AR",
    "Id": 10,
    "Locations": 8,
    "Name": "Argentina",
    "Pos": 4
  },
  {
    "Code": "AU",
    "Id": 13,
    "Locations": 39,
    "Name": "Australia",
    "Pos": 4
  },
  {
    "Code": "AT",
    "Id": 14,
    "Locations": 2,
    "Name": "Austria",
    "Pos": 4
  },
  {
    "Code": "BS",
    "Id": 17,
    "Locations": 1,
    "Name": "Bahamas",
    "Pos": 4
  },
  {
    "Code": "BH",
    "Id": 18,
    "Locations": 2,
    "Name": "Bahrain",
    "Pos": 4
  },
  {
    "Code": "BY",
    "Id": 21,
    "Locations": 1,
    "Name": "Belarus",
    "Pos": 4
  },
  {
    "Code": "BE",
    "Id": 22,
    "Locations": 4,
    "Name": "Belgium",
    "Pos": 4
  },
  {
    "Code": "BM",
    "Id": 25,
    "Locations": 1,
    "Name": "Bermuda",
    "Pos": 4
  },
  {
    "Code": "BR",
    "Id": 32,
    "Locations": 6,
    "Name": "Brazil",
    "Pos": 4
  },
  {
    "Code": "BG",
    "Id": 35,
    "Locations": 4,
    "Name": "Bulgaria",
    "Pos": 4
  },
  {
    "Code": "CL",
    "Id": 47,
    "Locations": 2,
    "Name": "Chile",
    "Pos": 4
  },
  {
    "Code": "CN",
    "Id": 48,
    "Locations": 4,
    "Name": "China",
    "Pos": 4
  },
  {
    "Code": "CO",
    "Id": 51,
    "Locations": 1,
    "Name": "Colombia",
    "Pos": 4
  },
  {
    "Code": "CR",
    "Id": 55,
    "Locations": 3,
    "Name": "Costa Rica",
    "Pos": 4
  },
  {
    "Code": "CZ",
    "Id": 60,
    "Locations": 1,
    "Name": "Czech Republic",
    "Pos": 4
  },
  {
    "Code": "DO",
    "Id": 64,
    "Locations": 2,
    "Name": "Dominican Republic",
    "Pos": 4
  },
  {
    "Code": "EG",
    "Id": 67,
    "Locations": 6,
    "Name": "Egypt",
    "Pos": 4
  },
  {
    "Code": "FR",
    "Id": 78,
    "Locations": 11,
    "Name": "France",
    "Pos": 4
  },
  {
    "Code": "DE",
    "Id": 85,
    "Locations": 4,
    "Name": "Germany",
    "Pos": 4
  },
  {
    "Code": "GH",
    "Id": 86,
    "Locations": 2,
    "Name": "Ghana",
    "Pos": 4
  },
  {
    "Code": "GR",
    "Id": 89,
    "Locations": 4,
    "Name": "Greece",
    "Pos": 4
  },
  {
    "Code": "GT",
    "Id": 94,
    "Locations": 1,
    "Name": "Guatemala",
    "Pos": 4
  },
  {
    "Code": "HK",
    "Id": 101,
    "Locations": 2,
    "Name": "Hong Kong",
    "Pos": 4
  },
  {
    "Code": "HU",
    "Id": 102,
    "Locations": 1,
    "Name": "Hungary",
    "Pos": 4
  },
  {
    "Code": "IN",
    "Id": 104,
    "Locations": 24,
    "Name": "India",
    "Pos": 4
  },
  {
    "Code": "ID",
    "Id": 105,
    "Locations": 3,
    "Name": "Indonesia",
    "Pos": 4
  },
  {
    "Code": "IR",
    "Id": 271,
    "Locations": 1,
    "Name": "Iran",
    "Pos": 4
  },
  {
    "Code": "IE",
    "Id": 106,
    "Locations": 5,
    "Name": "Ireland",
    "Pos": 4
  },
  {
    "Code": "IL",
    "Id": 107,
    "Locations": 3,
    "Name": "Israel",
    "Pos": 4
  },
  {
    "Code": "IT",
    "Id": 108,
    "Locations": 5,
    "Name": "Italy",
    "Pos": 4
  },
  {
    "Code": "JM",
    "Id": 109,
    "Locations": 5,
    "Name": "Jamaica",
    "Pos": 4
  },
  {
    "Code": "JP",
    "Id": 110,
    "Locations": 6,
    "Name": "Japan",
    "Pos": 4
  },
  {
    "Code": "JO",
    "Id": 111,
    "Locations": 1,
    "Name": "Jordan",
    "Pos": 4
  },
  {
    "Code": "LT",
    "Id": 125,
    "Locations": 1,
    "Name": "Lithuania",
    "Pos": 4
  },
  {
    "Code": "MW",
    "Id": 131,
    "Locations": 1,
    "Name": "Malawi",
    "Pos": 4
  },
  {
    "Code": "MY",
    "Id": 132,
    "Locations": 6,
    "Name": "Malaysia",
    "Pos": 4
  },
  {
    "Code": "MV",
    "Id": 133,
    "Locations": 1,
    "Name": "Maldives",
    "Pos": 4
  },
  {
    "Code": "MX",
    "Id": 141,
    "Locations": 4,
    "Name": "Mexico",
    "Pos": 4
  },
  {
    "Code": "NP",
    "Id": 152,
    "Locations": 1,
    "Name": "Nepal",
    "Pos": 4
  },
  {
    "Code": "NL",
    "Id": 153,
    "Locations": 6,
    "Name": "Netherlands",
    "Pos": 4
  },
  {
    "Code": "NZ",
    "Id": 157,
    "Locations": 9,
    "Name": "New Zealand",
    "Pos": 4
  },
  {
    "Code": "NG",
    "Id": 160,
    "Locations": 6,
    "Name": "Nigeria",
    "Pos": 4
  },
  {
    "Code": "NO",
    "Id": 166,
    "Locations": 1,
    "Name": "Norway",
    "Pos": 4
  },
  {
    "Code": "PK",
    "Id": 168,
    "Locations": 1,
    "Name": "Pakistan",
    "Pos": 4
  },
  {
    "Code": "PH",
    "Id": 174,
    "Locations": 6,
    "Name": "Philippines",
    "Pos": 4
  },
  {
    "Code": "PL",
    "Id": 176,
    "Locations": 4,
    "Name": "Poland",
    "Pos": 4
  },
  {
    "Code": "PT",
    "Id": 178,
    "Locations": 3,
    "Name": "Portugal",
    "Pos": 4
  },
  {
    "Code": "RO",
    "Id": 182,
    "Locations": 3,
    "Name": "Romania",
    "Pos": 4
  },
  {
    "Code": "RU",
    "Id": 184,
    "Locations": 3,
    "Name": "Russian Federation",
    "Pos": 4
  },
  {
    "Code": "SA",
    "Id": 194,
    "Locations": 2,
    "Name": "Saudi Arabia",
    "Pos": 4
  },
  {
    "Code": "RS",
    "Id": 272,
    "Locations": 1,
    "Name": "Serbia",
    "Pos": 4
  },
  {
    "Code": "SG",
    "Id": 199,
    "Locations": 25,
    "Name": "Singapore",
    "Pos": 4
  },
  {
    "Code": "ZA",
    "Id": 204,
    "Locations": 7,
    "Name": "South Africa",
    "Pos": 4
  },
  {
    "Code": "ES",
    "Id": 207,
    "Locations": 11,
    "Name": "Spain",
    "Pos": 4
  },
  {
    "Code": "LK",
    "Id": 208,
    "Locations": 1,
    "Name": "Sri Lanka",
    "Pos": 4
  },
  {
    "Code": "SE",
    "Id": 226,
    "Locations": 2,
    "Name": "Sweden",
    "Pos": 4
  },
  {
    "Code": "CH",
    "Id": 227,
    "Locations": 1,
    "Name": "Switzerland",
    "Pos": 4
  },
  {
    "Code": "TW",
    "Id": 230,
    "Locations": 2,
    "Name": "Taiwan",
    "Pos": 4
  },
  {
    "Code": "TH",
    "Id": 233,
    "Locations": 4,
    "Name": "Thailand",
    "Pos": 4
  },
  {
    "Code": "TT",
    "Id": 239,
    "Locations": 1,
    "Name": "Trinidad and Tobago",
    "Pos": 4
  },
  {
    "Code": "TR",
    "Id": 242,
    "Locations": 3,
    "Name": "Turkey",
    "Pos": 4
  },
  {
    "Code": "UA",
    "Id": 247,
    "Locations": 1,
    "Name": "Ukraine",
    "Pos": 4
  },
  {
    "Code": "AE",
    "Id": 249,
    "Locations": 2,
    "Name": "United Arab Emirates",
    "Pos": 4
  },
  {
    "Code": "VI",
    "Id": 261,
    "Locations": 1,
    "Name": "US Virgin Islands",
    "Pos": 4
  },
  {
    "Code": "VE",
    "Id": 257,
    "Locations": 1,
    "Name": "Venezuela",
    "Pos": 4
  }
]
Suggest Edits

GetCountriesContainedInTerritories

This method will return a list of countries which exist within the client's international territories. Unlike GetCountryList(), location count and pos are not populated; they are just set to zero.

Return Value: RestCountrySum

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetCountriesContainedInTerritories

Query Params

ClientId
int32
required
ApiKey
string
required
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get countries with locations
$response = $bullseye->getCountriesContainedInTerritories();
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "Code": "AR",
    "Id": 10,
    "Locations": 0,
    "Name": "Argentina",
    "Pos": 0
  },
  {
    "Code": "BO",
    "Id": 27,
    "Locations": 0,
    "Name": "Bolivia",
    "Pos": 0
  },
  {
    "Code": "BR",
    "Id": 32,
    "Locations": 0,
    "Name": "Brazil",
    "Pos": 0
  },
  {
    "Code": "CO",
    "Id": 51,
    "Locations": 0,
    "Name": "Colombia",
    "Pos": 0
  },
  {
    "Code": "EC",
    "Id": 66,
    "Locations": 0,
    "Name": "Ecuador",
    "Pos": 0
  }
]
Suggest Edits

GetCityList

This method will return a list of cities within a given country in which the client has locations. A count will be included.

Return Value: RestCitySum

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetCityList

Query Params

ClientId
int32
required
ApiKey
string
required
CountryId
int32
required
StateAbbr
string

If you call this method for the US, you must also specify a state. If you are calling it for any other country, you cannot specify a state.

If you call this method for the US, you must also specify a state. If you are calling it for any other country, you cannot specify a state.

Note

For this method to work, you must be storing cities in the individual city field, and not as part of a free-form international address.

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get cities
$country = 1;
$state = "TX";
$response = $bullseye->getCityList($country, $state);
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "Locations": 1,
    "Name": "aberdeen",
    "RegionId": 35
  },
  {
    "Locations": 1,
    "Name": "Absecon",
    "RegionId": 35
  },
  {
    "Locations": 2,
    "Name": "Allentown",
    "RegionId": 35
  },
  {
    "Locations": 1,
    "Name": "Alpha",
    "RegionId": 35
  },
  {
    "Locations": 1,
    "Name": "Asbury Park",
    "RegionId": 35
  },
  {
    "Locations": 1,
    "Name": "Audubon",
    "RegionId": 35
  },
  {
    "Locations": 1,
    "Name": "Avenel",
    "RegionId": 35
  }
  ]
Suggest Edits

GetCatList

This method will return a list of categories and location counts, given the input criteria.

Return Value: RestCatSum

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetCatList

Query Params

ClientId
int32
required
ApiKey
string
required
CountryId
int32
required
State
string

For the US, city name cannot be specified without also specifying state. State can only be used if state/province is stored in the designated field in our system, and not as part of a free-form international address.

City
string

For the US, city name cannot be specified without also specifying state.

Note that, since one location can be assigned to multiple categories, the counts will not add up to the total number of locations.

Country ID is required. For the US, city name cannot be specified without also specifying state.

For countries other than the US, state can only be used if state/province is stored in the designated field in our system, and not as part of a free-form international address.

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get categories
$country = 1;
$state = "TX";
$city = null;
$response = $bullseye->getCatList($country, $state, $city);
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "CategoryId": 1412,
    "CategoryName": "Bass Guitar",
    "Locations": 1
  },
  {
    "CategoryId": 1421,
    "CategoryName": "Ear Training",
    "Locations": 1
  },
  {
    "CategoryId": 1425,
    "CategoryName": "Guitar",
    "Locations": 2
  },
  {
    "CategoryId": 1429,
    "CategoryName": "Keyboard",
    "Locations": 1
  },
  {
    "CategoryId": 1437,
    "CategoryName": "Piano",
    "Locations": 3
  },
  {
    "CategoryId": 1438,
    "CategoryName": "Recorder",
    "Locations": 1
  },
  {
    "CategoryId": 1441,
    "CategoryName": "Theory",
    "Locations": 1
  },
  {
    "CategoryId": 1446,
    "CategoryName": "Ukelele",
    "Locations": 1
  },
  {
    "CategoryId": 1447,
    "CategoryName": "Viola",
    "Locations": 2
  },
  {
    "CategoryId": 1449,
    "CategoryName": "Voice",
    "Locations": 3
  },
  {
    "CategoryId": 6358,
    "CategoryName": "Grand Piano",
    "Locations": 3
  },
  {
    "CategoryId": 6359,
    "CategoryName": "Electric Piano",
    "Locations": 3
  }
]
Suggest Edits

GetAttributeOptions

This method will return the list of options for a given attribute.

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetAttributeOptions

Query Params

ClientId
int32
required
ApiKey
string
required
AttributeId
int32
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get attribute options
$attributeId = null;
$response = $bullseye->getAttributeOptions($attributeId);
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "AttributeId": 262,
    "OptionId": 220,
    "OptionName": "All Levels"
  },
  {
    "AttributeId": 262,
    "OptionId": 221,
    "OptionName": "Beginner"
  },
  {
    "AttributeId": 262,
    "OptionId": 222,
    "OptionName": "Intermediate"
  },
  {
    "AttributeId": 262,
    "OptionId": 223,
    "OptionName": "Advanced"
  },
  {
    "AttributeId": 262,
    "OptionId": 224,
    "OptionName": "Professional"
  }
]
Suggest Edits

GetAttributes

This method will return the full list of attribute names and ID's for a given client.

Return Value: RestAttribute

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetAttributes

Query Params

ClientId
int32
required
ApiKey
string
required
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get attributes
$response = $bullseye->getAttributes();
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

  {
    "AttributeDisplayText": null,
    "AttributeId": 226,
    "AttributeName": "My Rates",
    "AttributeValue": null
  },
  {
    "AttributeDisplayText": null,
    "AttributeId": 227,
    "AttributeName": "Music Classes/Programs",
    "AttributeValue": null
  },
  {
    "AttributeDisplayText": null,
    "AttributeId": 228,
    "AttributeName": "Recitals Held",
    "AttributeValue": null
  }
]
Suggest Edits

GetPostalCode

This method retrieves information for a US zip code or Canadian postal code.

Return Value: RestPostalCode

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetPostalCode

Query Params

ClientId
int32
required
ApiKey
string
required
CountryId
int32
required

Use Country ID = 1 for US, 2 for Canada

PostalCode
string

If the given postal code is not in our database, this method will return null. If it is in our database, it will return information from the first match found for that code.

If the given postal code is not in our database, this method will return null.

If it is in our database, it will return information from the first match found for that code.

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get postal code information
$countryId = 1;
$postalCode = '10098';
$response = $bullseye->getPostalCode($countryId, $postalCode);
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

{
  "City": "Somerset",
  "County": "Somerset",
  "Latitude": 40.49934,
  "Longitude": -74.52138,
  "PostalCode": "08873",
  "State": "NJ"
}
Suggest Edits

GetSearchLog

This method retrieves a list of searches for a given date range.

Return Value: RestSearchLogList

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetSearchLog

Query Params

ClientId
int32
required
ApiKey
string
required
startDate
string
required

'yyyymmdd' format

endDate
string
required

'yyyymmdd' format

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to search for logs
$startDate = '20170301';
$endDate = '20170331';
$response = $bullseye->getSearchLog($startDate, $endDate);
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

{
  "ResultList": [
    {
      "City": "Mountain View",
      "Country": "United States",
      "DateCreated": "/Date(1484078846250-0500)/",
      "DomainName": "",
      "IPAddress": "72.14.199.158",
      "Keyword": null,
      "NumResults": 50,
      "PostalCode": null,
      "SearchSource": null,
      "State": "CA"
    },
    {
      "City": null,
      "Country": "United States",
      "DateCreated": "/Date(1484079104843-0500)/",
      "DomainName": "",
      "IPAddress": "199.199.1.108",
      "Keyword": null,
      "NumResults": 50,
      "PostalCode": "08876",
      "SearchSource": null,
      "State": null
    },
    {
      "City": null,
      "Country": "United States",
      "DateCreated": "/Date(1484079285147-0500)/",
      "DomainName": "",
      "IPAddress": "199.199.1.108",
      "Keyword": null,
      "NumResults": 50,
      "PostalCode": "08876",
      "SearchSource": null,
      "State": null
    },
    {
      "City": "Buffalo",
      "Country": "United States",
      "DateCreated": "/Date(1484078862423-0500)/",
      "DomainName": "",
      "IPAddress": "199.199.1.117",
      "Keyword": null,
      "NumResults": 18,
      "PostalCode": null,
      "SearchSource": null,
      "State": "MN"
    }
  ],
  "TotalResults": 4
}
Suggest Edits

GetSearchResponseLog

This method retrieves a list of search response metrics for a given date range.

Return Value: RestSearchResponseLogList

 
gethttps://ws.bullseyelocations.com/Restsearch.svc/GetSearchResponseLog

Query Params

ClientId
int32
required
ApiKey
string
required
startDate
string
required

'yyyymmdd' format

endDate
string
required

'yyyymmdd' format

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to search for logs
$startDate = '20160301';
$endDate = '20170331';
$response = $bullseye->getSearchResponseLog($startDate, $endDate);
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

{
  "ResultList": [
    {
      "DateCreated": "/Date(1484078846487-0500)/",
      "DirectionsClicked": false,
      "EmailClicked": false,
      "LocationID": 2448955,
      "LocationMapClicked": false,
      "LocationName": "Thompson Studios",
      "LocationResultsClicked": false,
      "URLClicked": false,
      "Viewed": true
    },
    {
      "DateCreated": "/Date(1484078846440-0500)/",
      "DirectionsClicked": false,
      "EmailClicked": false,
      "LocationID": 2450039,
      "LocationMapClicked": false,
      "LocationName": "Ken Brown",
      "LocationResultsClicked": false,
      "URLClicked": false,
      "Viewed": true
    },
    {
      "DateCreated": "/Date(1484078846533-0500)/",
      "DirectionsClicked": false,
      "EmailClicked": false,
      "LocationID": 2450763,
      "LocationMapClicked": false,
      "LocationName": "Kirby's Music Studio",
      "LocationResultsClicked": false,
      "URLClicked": false,
      "Viewed": true
    },
    {
      "DateCreated": "/Date(1484078846297-0500)/",
      "DirectionsClicked": false,
      "EmailClicked": false,
      "LocationID": 2452494,
      "LocationMapClicked": false,
      "LocationName": "Michele  Sharik",
      "LocationResultsClicked": false,
      "URLClicked": false,
      "Viewed": true
    }
    ],
  "TotalResults": 4
}
Suggest Edits

GetCategoryTree

This method retrieves categories in their nested configuration.

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetCategoryTree

Query Params

ClientId
int32
required
ApiKey
string
required
LanguageID
string

The category names can be returned in a different language utilizing either the LanguageID or ISO LanguageCode

LanguageCode
string

The category names can be returned in a different language utilizing either the LanguageID or ISO LanguageCode

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get category tree
$languageId = null;
$languageCode = null;
$response = $bullseye->getCategoryTree($languageId, $languageCode);
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "Data": "",
    "ID": 1407,
    "Name": "all instruments-FR",
    "SubCategories": null,
    "ThirdPartyID": ""
  },
   {
        "Data": "02",
        "ID": 5974,
        "Name": "Large Guitars",
        "SubCategories": [
          {
            "Data": "021",
            "ID": 5975,
            "Name": "Very Large Guitars",
            "SubCategories": [
              {
                "Data": "022",
                "ID": 5976,
                "Name": "Super Gigantic Guitars",
                "SubCategories": [
                  {
                    "Data": "023",
                    "ID": 7903,
                    "Name": "Super Gigantic Guitars2",
                    "SubCategories": null,
                    "ThirdPartyID": "23"
                  }
                ],
                "ThirdPartyID": "22"
              }
            ],
            "ThirdPartyID": "21"
          }
        ],
        "ThirdPartyID": "2"
      }
    ],
    "ThirdPartyID": "1"
  },
{
    "Data": "",
    "ID": 1449,
    "Name": "Voice",
    "SubCategories": null,
    "ThirdPartyID": ""
  }
]
Suggest Edits

GetCompanyNames

This method returns all CompanyName records associated with the specified account.

Return Value: RestCompanyName

 
gethttp://ws.bullseyelocations.com/RestSearch.svc/GetCompanyNames

Query Params

ClientID
int32
required
APIKey
string
required
CategoryID
int32

Returns all CompanyName records associated with Locations which have that Category.

Name
string

Does a partial match against all CompanyName records and returns those that contain the inputted Name.

MaximumToReturn
int32

Caps the number of CompanyName records that are returned.

No code samples available
A binary file was returned

You couldn't be authenticated

[
    {
        "ClientID": 267,
        "ID": 101,
        "Name": "Test",
        "ThirdPartyID": null
    }
]
Suggest Edits

GetLocationsByCompany

This method returns locations based on the associated company data.

 
gethttp://ws.bullseyelocations.com/RestSearch.svc/GetLocationsByCompany

Query Params

ClientID
int32
required
APIKey
string
required
CompanyID
string
CompanyName
string
EmailDomain
string
ThirdPartyID
string

At least one CompanyID, CompanyName, EmailDomain and ThirdPartyID must be specified in the call.

No code samples available
A binary file was returned

You couldn't be authenticated

{
    "DistanceIsMetric": false,
    "FindNearestSearch": false,
    "ResultList": [
        {
            "Address1": "123 test st",
            "Address2": null,
            "Address3": null,
            "Address4": "NJ",
            "Attributes": [],
            "BusinessHours": "",
            "CategoryIds": "7957",
            "CategoryNames": "Brand1",
            "City": "somerset",
            "ContactName": null,
            "ContactPosition": null,
            "ContactURL": null,
            "CountryCode": "US",
            "Coupons": [],
            "DailyHoursList": [],
            "Distance": 0,
            "EmailAddress": "test@email.com",
            "Events": [],
            "FaceBookPageId": null,
            "FaxNumber": null,
            "GeoCodeStatusId": 1,
            "Id": 4975002,
            "ImageFileUrl": null,
            "InternetLocation": false,
            "IsLeadManager": true,
            "IsStoreLocator": true,
            "LMServiceID": true,
            "Latitude": 40.49934,
            "LocationTypeIconURL": null,
            "LocationTypeName": "Exclusive",
            "Longitude": -74.52138,
            "MobileNumber": null,
            "Name": "test",
            "PhoneNumber": null,
            "PostCode": "08873",
            "State": "NJ",
            "ThirdPartyId": null,
            "TimeZone": null,
            "URL": null
        }
    ],
    "SearchReqLogId": 0,
    "TotalResults": 1
}
Suggest Edits

GetTerritories

This method returns a list of all territories for an account.

 
gethttp://ws.bullseyelocations.com/RestSearch.svc/GetTerritories

Query Params

ClientID
int32
required
APIKey
string
required
No code samples available
A binary file was returned

You couldn't be authenticated

[
    {
        "ClientID": 6983,
        "Country": "United States",
        "CountryID": 1,
        "ID": 7907,
        "Name": "US - Territory",
        "Type": "United States",
        "TypeID": 1
    },
    {
        "ClientID": 6983,
        "Country": "Canada",
        "CountryID": 2,
        "ID": 7908,
        "Name": "Canada - Territory",
        "Type": "Canada",
        "TypeID": 2
    },
    {
        "ClientID": 6983,
        "Country": null,
        "CountryID": null,
        "ID": 7909,
        "Name": "Brazil - Territory",
        "Type": "International",
        "TypeID": 3
    },
    {
        "ClientID": 6983,
        "Country": "Germany",
        "CountryID": 85,
        "ID": 7910,
        "Name": "Germany - Territory",
        "Type": "Germany",
        "TypeID": 5
    },
    {
        "ClientID": 6983,
        "Country": "Switzerland",
        "CountryID": 227,
        "ID": 7911,
        "Name": "Switzerland - Territory",
        "Type": "Switzerland",
        "TypeID": 6
    },
    {
        "ClientID": 6983,
        "Country": "Austria",
        "CountryID": 14,
        "ID": 7912,
        "Name": "Austria - Territory",
        "Type": "Austria",
        "TypeID": 7
    }
]
Suggest Edits

GetLocationsByTerritory

This method returns a list of locations based on the associated territory.

Return Value: RestSearchResults

 
gethttp://ws.bullseyelocations.com/RestSearch.svc/GetLocationsByTerritory

Query Params

ClientID
int32
required
APIKey
string
required
TerritoryID
int32
No code samples available
A binary file was returned

You couldn't be authenticated

{
    "DistanceIsMetric": false,
    "FindNearestSearch": false,
    "ResultList": [
        {
            "Address1": null,
            "Address2": null,
            "Address3": null,
            "Address4": null,
            "Attributes": [],
            "BusinessHours": "",
            "CategoryIds": "",
            "CategoryNames": "",
            "City": "Somerset",
            "ContactName": null,
            "ContactPosition": null,
            "ContactURL": null,
            "CountryCode": "US",
            "Coupons": [],
            "DailyHoursList": [],
            "Distance": 0,
            "EmailAddress": null,
            "Events": [],
            "FaceBookPageId": null,
            "FaxNumber": null,
            "GeoCodeStatusId": 1,
            "Id": 5179649,
            "ImageFileUrl": null,
            "InternetLocation": false,
            "IsLeadManager": false,
            "IsStoreLocator": true,
            "LMServiceID": false,
            "Latitude": 40.49934,
            "LocationTypeIconURL": null,
            "LocationTypeName": "Standard",
            "Longitude": -74.52138,
            "MobileNumber": null,
            "Name": "Test Location",
            "PhoneNumber": null,
            "PostCode": "08873",
            "State": "NJ",
            "ThirdPartyId": null,
            "TimeZone": null,
            "URL": null
        }
    ],
    "SearchReqLogId": 0,
    "TotalResults": 1
}
Suggest Edits

GetCountryData

This method returns country data based on the country name, alternate name or code.

 
gethttp://ws.bullseyelocations.com/RestSearch.svc/GetCountryData

Query Params

ClientID
int32
required
APIKey
string
required
AlternateNameOrCode
string
required
No code samples available
A binary file was returned

You couldn't be authenticated

{
    "AlternateNamesAndCodes": "USA,United States,United States of America,America",
    "Code": "US",
    "HasPostalCodes": true,
    "HasRegion1": true,
    "HasRegion2": true,
    "ID": 1,
    "ISO3Code": "USA",
    "IsPostalCodeRequired": true,
    "IsRegion1Required": true,
    "IsRegion2Required": false,
    "Latitude": 37.09024,
    "LocationSearchStyle": 1,
    "Longitude": -95.712891,
    "Name": "United States",
    "PostalCodeTerm": "Zip Code",
    "Region1Term": "State",
    "Region2Term": "County"
}
Suggest Edits

HolidayHours Object

 

This object provides Holiday Hours data associated with a location. The data is from the current date forward: historical Holiday Hours are not provided.

Type
Name
Description

Int

ID

Bullseye internal ID.

Int

LocationID

ID of the Location containing the Holiday Hours.

Nullable Int

HolidayCountryID

The Holiday Country record that these Holiday Hours are associated with.

String

HolidayName

Name of the Holiday, if applicable.

DateTime

HolidayDate

Date for this particular set of hours.

DateTime

OpeningDateAndTime

Contains the opening time for this particular date. If the Location is closed, the time is 00:00:00.

DateTime

ClosingDateAndTime

Contains the closing time for this particular date. If the Location is closed, the time is 00:00:00.

Boolean

Closed

Indicates the Location is closed on that date.

String

Name

A value to be used in place of the Holiday Name.

Suggest Edits

RestCountry Object

 

This object provides the ID, abbreviation and name for a Country in Bullseye.

Type
Name
Description

Int

ID

Bullseye internal country ID

String

Code

The country abbreviation.

String

Name

The generally accepted country name.

Suggest Edits

RestTimeZone Object

 

This object provides the ID and associated data for a TimeZone in Bullseye.

Type
Name
Description

Int

ID

Bullseye internal timezone ID

String

Name

The name of the timezone.

Double

GMTOffset

The number of hours this timezone is offset from Greenwich Mean Time (GMT).

String

Description

Text incorporating the name and GMTOffset for the timezone.

Suggest Edits

LocationJson Object

 

This object is returned from the GetLocation method, and is used as input for the AddLocation and UpdateLocation methods. It represents a location as used in several of the LocationService calls.

(This object is similar, but not identical, to the LocationResult object used in the search service.)

Note that the geocode-related fields (latitude, longitude, DateLastGeoCoded, and GeoCodeStatusId) will be returned on a lookup, but cannot be set on an insert or update.

Type (max length)
Name
Description

Int

Id

Bullseye location ID

String (255)

Name

The name of the location

Bool

Active

Whether the location is active or not

Int

MemberId

Bullseye member ID

(There is currently no way to retrieve detail member info via a web service call.)

String (255)

URL

The location’s website URL

Int

CountryId

The location’s numeric country ID

String

CountryName

The location’s country name (not used here)

String (255)

Address1

First line of Address

String (255)

Address2

Second line of Address

String (255)

Address3

Third line of Address

String (255)

Address4

Fourth line of Address

String (255)

City

The location’s city

Int

StateId

The location’s numeric state ID

String

StateAbbr

The location’s state abbreviation (not used)

String (50)

PostCode

The location’s postal code (zip code in US)

String (2000)

InternationalAddress

For locations outside the US, Canada, and the UK, contains the full address for the location.

NOTE that we are phasing out this field. For new locations, you should fill out the individual address fields.

String (50)

PhoneNumber

The location’s phone number

String (50)

FaxNumber

The location’s fax number

String (255)

ContactName

The location’s contact’s name

String (255)

ContactPosition

The location’s contact’s position

Bool

InternetLocation

Whether or not the location is an internet location

LocationImages

Collection of relative URLs to the location’s uploaded images

LocationSocialMedia

Object representing Location Social Media links

LocationSEO

Object representing Location SEO properties

RestHolidayHours[]

HolidayHours

An array of Holiday Hours associate with this location, from the current day going forward. (Currently not available.)

Int

LocationTypeId

The location’s type ID
(TODO: no REST call to get types.)

String

LocationTypeName

The location’s type name (not used)

String

ThirdPartyId

The location’s third party ID

Double

Distance

The distance of the location from the search input (in miles)

DateTime

DateCreated

Date record was created

DateTime

DateModified

Date record was last modified

DateTime

DateDeleted

Date record was deleted (should always be null; the web service will not return deleted records)

LocationCategory[]

Categories

An array of categories related to this location

LocationAttributes[]

Attributes

An array of attributes related to this location

LocationService1[]

Services

An array representing the services associated with this location (Lead Manager and/or Store Locator)

LocationTerritory[]

Territories

An array of territories related to this location

LocationBusinessHours[]

BusinessHours

An object representing the business hours for this location

Int

ResponsivenessId

Numeric responsiveness ID. (see table of values below)

String

ResponsivenessName

(currently blank)

Int

ClientId

Your client ID

Int

RepId

ID of assigned rep.

Detailed rep info can be retrieved via the Lookup.GetReps() call.
(TODO: no REST call for this.)

String

RepFullName

(currently blank)

String

UserName

Bullseye member user name

String

EmailAddress

(blank)

Decimal

Latitude

Location latitude

Decimal

Longitude

Location longitude

Int

GeoCodeStatusId

Indicates whether or not this location has been geocoded, and at what level. (0=none, 1=zip code level, 2=street address level)

DateTime

DateLastGeoCoded

The date on which this location was most recently geocoded.

String

BusinessHoursFmtd

Business hours, in a formatted string. (cannot be set)

String

FacebookPageId

(added 11/20/2012) - used to associate a Facebook page with a single location

Responsiveness ID values

Id
Name

1

Very Slow

2

Moderately Slow

3

About Average

4

Moderately Fast

5

Very Fast

Suggest Edits

RestLocationImage Object

 

This object provides images associated with a location to be used on a location landing page.

Type
Name
Description

Int

ID

Bullseye internal ID

Int

LocationID

Location ID

String

ImageFileUrl

Location landing page Image URL

Suggest Edits

RestLocationSocialMedia Object

 

This object provides Social Media links associated with a location

Type
Name
Description

Int

ID

Bullseye internal ID

Int

LocationID

Location ID

String

GooglePlusURL

Location Google Plus URL

TwitterURL

String

LinkedInURL

Location LinkedIn URL

String

PinterestURL

Location Pinterest URL

String

YelpURL

Location Yelp URL

String

InstagramURL

Location Instagram URL

Suggest Edits

RestLocationSEO Object

 

This object provides SEO properties associated with a location

Type
Name
Description

Int

ID

Bullseye internal ID

Int

LocationID

Location ID

String

SEOTitle

Location landing page meta title tag

String

MetaDescription

Location landing page meta description tag

Suggest Edits

LocRslt Object

 

Several calls use this class to pass back a location ID and/or error information.

Type
Name
Description

Int

locationId

Bullseye internal location ID

String

errorMsg

Error message. Empty if successful.

Suggest Edits

GetHolidayHours

This method retrieves holiday hours data for a location given a Bullseye LocationId or a client-supplied ThirdPartyId. Two optional parameters, FromDate and ToDate, can narrow the results. If neither are supplied, all holiday hours data, both historical and future, will be returned.

Return Value: HolidayHours

 
gethttps://ws.bullseyelocations.com/RestLocation.svc/GetHolidayHours

Query Params

ClientId
int32
required
ApiKey
string
required
LocationId
int32

The LocationId refers to the Bullseye Location ID created by Bullseye for a location. Either this or the ThirdPartyId must be supplied.

ThirdPartyId
int32

The ThirdPartyId refers to a client-supplied Third Party ID for a location. Either this or the LocationId must be supplied.

FromDate
string

FromDate is a string containing a date value in standard date format. If this is supplied, only Holiday Hours that are on or after this date will be returned.

ToDate
string

ToDate is a string containing a date value in standard date format. If this is supplied, only Holiday Hours that are on or before this date will be returned.

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get the hours
$locationId = '4885827';
$location = $bullseye->getHolidayHours([
  'LocationId' => $locationId,
  //'ThirdPartyId' => $locationId,
  'FromDate' => '2017-03-20',
  //'ToDate' => $locationId,
]);
//4. Check location
if(false !== $location)
  print_r($location);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "Closed":true,
    "ClosingDateAndTime":"\/Date(1479963600000-0500)\/",
    "HolidayCountryID":14,
    "HolidayDate":"\/Date(1479963600000-0500)\/",
    "HolidayName":null,
    "ID":1,
    "LocationID":4952134,
    "Name":null,
    "OpeningDateAndTime":"\/Date(1479963600000-0500)\/"
  },
  {
    "Closed":false,
    "ClosingDateAndTime":"\/Date(1480129200000-0500)\/",
    "HolidayCountryID":null,
    "HolidayDate":"\/Date(1480050000000-0500)\/",
    "HolidayName":null,
    "ID":2,
    "LocationID":4952134,
    "Name":"Black Friday",
    "OpeningDateAndTime":"\/Date(1480068000000-0500)\/"
  },
  {
    "Closed":false,
    "ClosingDateAndTime":"\/Date(1482606000000-0500)\/",
    "HolidayCountryID":null,
    "HolidayDate":"\/Date(1482555600000-0500)\/",
    "HolidayName":null,
    "ID":3,
    "LocationID":4952134,
    "Name":"Christmas Eve",
    "OpeningDateAndTime":"\/Date(1482573600000-0500)\/"
  },
  {
    "Closed":true,
    "ClosingDateAndTime":"\/Date(1482642000000-0500)\/",
    "HolidayCountryID":15,
    "HolidayDate":"\/Date(1482642000000-0500)\/",
    "HolidayName":null,
    "ID":4,
    "LocationID":4952134,
    "Name":null,
    "OpeningDateAndTime":"\/Date(1482642000000-0500)\/"
  },
  {
    "Closed":true,
    "ClosingDateAndTime":"\/Date(1514178000000-0500)\/",
    "HolidayCountryID":31,
    "HolidayDate":"\/Date(1514178000000-0500)\/",
    "HolidayName":null,
    "ID":5,
    "LocationID":4952134,
    "Name":"Christmas Day",
    "OpeningDateAndTime":"\/Date(1514178000000-0500)\/"
  },
  {
    "Closed":false,
    "ClosingDateAndTime":"\/Date(1479092400000-0500)\/",
    "HolidayCountryID":null,
    "HolidayDate":"\/Date(1479013200000-0500)\/",
    "HolidayName":null,
    "ID":6,
    "LocationID":4952134,
    "Name":"Pre-Veterans Day",
    "OpeningDateAndTime":"\/Date(1479038400000-0500)\/"
  },
  {
    "Closed":false,
    "ClosingDateAndTime":"\/Date(1479157200000-0500)\/",
    "HolidayCountryID":13,
    "HolidayDate":"\/Date(1479099600000-0500)\/",
    "HolidayName":null,
    "ID":7,
    "LocationID":4952134,
    "Name":null,
    "OpeningDateAndTime":"\/Date(1479124800000-0500)\/"
  }
]
Suggest Edits

GetAllCountries

This method will return the full list of valid countries currently in Bullseye.

Return Value: RestCountry

 
gethttps://ws.bullseyelocations.com/RestLocation.svc/GetAllCountries

Query Params

ClientId
int32
ApiKey
string
required

clientID is not required

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get the countries
$countries = $bullseye->getAllCountries();
//4. Check countries
if($countries)
  print_r($countries);
else{
  //if there was an error
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "Code": "US",
    "ID": 1,
    "Name": "United States"
  },
  {
    "Code": "CA",
    "ID": 2,
    "Name": "Canada"
  },
  {
    "Code": "GB",
    "ID": 88,
    "Name": "United Kingdom"
  },
  {
    "Code": "AF",
    "ID": 274,
    "Name": "Afghanistan"
  },
  {
    "Code": "AX",
    "ID": 276,
    "Name": "Åland Islands"
  },
  {
    "Code": "AL",
    "ID": 3,
    "Name": "Albania"
  },
  {
    "Code": "DZ",
    "ID": 4,
    "Name": "Algeria"
  },
  {
    "Code": "AS",
    "ID": 5,
    "Name": "American Samoa"
  },
  {
    "Code": "AD",
    "ID": 6,
    "Name": "Andorra"
  },
  {
    "Code": "AO",
    "ID": 7,
    "Name": "Angola"
  },
  {
    "Code": "AI",
    "ID": 8,
    "Name": "Anguilla"
  },
  {
    "Code": "AQ",
    "ID": 275,
    "Name": "Antarctica"
  },
  {
    "Code": "AG",
    "ID": 9,
    "Name": "Antigua and Barbuda"
  },
  {
    "Code": "AR",
    "ID": 10,
    "Name": "Argentina"
  },
  {
    "Code": "AM",
    "ID": 11,
    "Name": "Armenia"
  },
  {
    "Code": "AW",
    "ID": 12,
    "Name": "Aruba"
  },
  {
    "Code": "AC",
    "ID": 273,
    "Name": "Ascension Island"
  },
  {
    "Code": "AU",
    "ID": 13,
    "Name": "Australia"
  },
  {
    "Code": "AT",
    "ID": 14,
    "Name": "Austria"
  },
  {
    "Code": "AZ",
    "ID": 15,
    "Name": "Azerbaijan"
  },
  {
    "Code": "AP",
    "ID": 16,
    "Name": "Azores"
  },
  {
    "Code": "BS",
    "ID": 17,
    "Name": "Bahamas"
  },
  {
    "Code": "BH",
    "ID": 18,
    "Name": "Bahrain"
  },
  {
    "Code": "BD",
    "ID": 19,
    "Name": "Bangladesh"
  },
  {
    "Code": "BB",
    "ID": 20,
    "Name": "Barbados"
  },
  {
    "Code": "BY",
    "ID": 21,
    "Name": "Belarus"
  },
  {
    "Code": "BE",
    "ID": 22,
    "Name": "Belgium"
  },
  {
    "Code": "BZ",
    "ID": 23,
    "Name": "Belize"
  },
  {
    "Code": "BJ",
    "ID": 24,
    "Name": "Benin"
  },
  {
    "Code": "BM",
    "ID": 25,
    "Name": "Bermuda"
  },
  {
    "Code": "BT",
    "ID": 26,
    "Name": "Bhutan"
  },
  {
    "Code": "BO",
    "ID": 27,
    "Name": "Bolivia"
  },
  {
    "Code": "BL",
    "ID": 28,
    "Name": "Bonaire"
  },
  {
    "Code": "BA",
    "ID": 29,
    "Name": "Bosnia and Herzegovina"
  },
  {
    "Code": "BW",
    "ID": 30,
    "Name": "Botswana"
  },
  {
    "Code": "BV",
    "ID": 31,
    "Name": "Bouvet Island"
  },
  {
    "Code": "BR",
    "ID": 32,
    "Name": "Brazil"
  },
  {
    "Code": "IO",
    "ID": 33,
    "Name": "British Indian Ocean Territory"
  },
  {
    "Code": "VG",
    "ID": 260,
    "Name": "British Virgin Islands"
  },
  {
    "Code": "BN",
    "ID": 34,
    "Name": "Brunei Darussalam"
  },
  {
    "Code": "BG",
    "ID": 35,
    "Name": "Bulgaria"
  },
  {
    "Code": "BF",
    "ID": 36,
    "Name": "Burkina Faso"
  },
  {
    "Code": "BI",
    "ID": 37,
    "Name": "Burundi"
  },
  {
    "Code": "KH",
    "ID": 38,
    "Name": "Cambodia"
  },
  {
    "Code": "CM",
    "ID": 39,
    "Name": "Cameroon"
  },
  {
    "Code": "IC",
    "ID": 41,
    "Name": "Canary Islands"
  },
  {
    "Code": "CV",
    "ID": 42,
    "Name": "Cape Verde"
  },
  {
    "Code": "BQ",
    "ID": 286,
    "Name": "Caribbean Netherlands"
  },
  {
    "Code": "KY",
    "ID": 43,
    "Name": "Cayman Islands"
  },
  {
    "Code": "CF",
    "ID": 44,
    "Name": "Central African Republic"
  },
  {
    "Code": "TD",
    "ID": 45,
    "Name": "Chad"
  },
  {
    "Code": "CL",
    "ID": 47,
    "Name": "Chile"
  },
  {
    "Code": "CN",
    "ID": 48,
    "Name": "China"
  },
  {
    "Code": "CX",
    "ID": 49,
    "Name": "Christmas Island"
  },
  {
    "Code": "CC",
    "ID": 50,
    "Name": "Cocos (Keeling) Islands"
  },
  {
    "Code": "CO",
    "ID": 51,
    "Name": "Colombia"
  },
  {
    "Code": "KM",
    "ID": 52,
    "Name": "Comoros"
  },
  {
    "Code": "CG",
    "ID": 284,
    "Name": "Congo"
  },
  {
    "Code": "CK",
    "ID": 54,
    "Name": "Cook Islands"
  },
  {
    "Code": "CR",
    "ID": 55,
    "Name": "Costa Rica"
  },
  {
    "Code": "HR",
    "ID": 57,
    "Name": "Croatia"
  },
  {
    "Code": "CU",
    "ID": 277,
    "Name": "Cuba"
  },
  {
    "Code": "CW",
    "ID": 58,
    "Name": "Curacao"
  },
  {
    "Code": "CY",
    "ID": 59,
    "Name": "Cyprus"
  },
  {
    "Code": "CZ",
    "ID": 60,
    "Name": "Czech Republic"
  },
  {
    "Code": "CD",
    "ID": 53,
    "Name": "Democratic Republic of the Congo"
  },
  {
    "Code": "DK",
    "ID": 61,
    "Name": "Denmark"
  },
  {
    "Code": "DJ",
    "ID": 62,
    "Name": "Djibouti"
  },
  {
    "Code": "DM",
    "ID": 63,
    "Name": "Dominica"
  },
  {
    "Code": "DO",
    "ID": 64,
    "Name": "Dominican Republic"
  },
  {
    "Code": "TP",
    "ID": 65,
    "Name": "East Timor"
  },
  {
    "Code": "EC",
    "ID": 66,
    "Name": "Ecuador"
  },
  {
    "Code": "EG",
    "ID": 67,
    "Name": "Egypt"
  },
  {
    "Code": "SV",
    "ID": 68,
    "Name": "El Salvador"
  },
  {
    "Code": "GQ",
    "ID": 70,
    "Name": "Equatorial Guinea"
  },
  {
    "Code": "ER",
    "ID": 71,
    "Name": "Eritrea"
  },
  {
    "Code": "EE",
    "ID": 72,
    "Name": "Estonia"
  },
  {
    "Code": "ET",
    "ID": 73,
    "Name": "Ethiopia"
  },
  {
    "Code": "FO",
    "ID": 74,
    "Name": "Faeroe Islands"
  },
  {
    "Code": "FK",
    "ID": 75,
    "Name": "Falkland Islands"
  },
  {
    "Code": "FJ",
    "ID": 76,
    "Name": "Fiji"
  },
  {
    "Code": "FI",
    "ID": 77,
    "Name": "Finland"
  },
  {
    "Code": "FR",
    "ID": 78,
    "Name": "France"
  },
  {
    "Code": "GF",
    "ID": 79,
    "Name": "French Guiana"
  },
  {
    "Code": "PF",
    "ID": 80,
    "Name": "French Polynesia"
  },
  {
    "Code": "TF",
    "ID": 81,
    "Name": "French Southern Territories"
  },
  {
    "Code": "GA",
    "ID": 82,
    "Name": "Gabon"
  },
  {
    "Code": "GM",
    "ID": 83,
    "Name": "Gambia"
  },
  {
    "Code": "GE",
    "ID": 84,
    "Name": "Georgia"
  },
  {
    "Code": "DE",
    "ID": 85,
    "Name": "Germany"
  },
  {
    "Code": "GH",
    "ID": 86,
    "Name": "Ghana"
  },
  {
    "Code": "GI",
    "ID": 87,
    "Name": "Gibraltar"
  },
  {
    "Code": "GR",
    "ID": 89,
    "Name": "Greece"
  },
  {
    "Code": "GL",
    "ID": 90,
    "Name": "Greenland"
  },
  {
    "Code": "GD",
    "ID": 91,
    "Name": "Grenada"
  },
  {
    "Code": "GP",
    "ID": 92,
    "Name": "Guadeloupe"
  },
  {
    "Code": "GU",
    "ID": 93,
    "Name": "Guam"
  },
  {
    "Code": "GT",
    "ID": 94,
    "Name": "Guatemala"
  },
  {
    "Code": "GG",
    "ID": 279,
    "Name": "Guernsey"
  },
  {
    "Code": "GN",
    "ID": 95,
    "Name": "Guinea"
  },
  {
    "Code": "GW",
    "ID": 96,
    "Name": "Guinea-Bissau"
  },
  {
    "Code": "GY",
    "ID": 97,
    "Name": "Guyana"
  },
  {
    "Code": "HT",
    "ID": 98,
    "Name": "Haiti"
  },
  {
    "Code": "HM",
    "ID": 99,
    "Name": "Heard Island and McDonald Islands"
  },
  {
    "Code": "HN",
    "ID": 100,
    "Name": "Honduras"
  },
  {
    "Code": "HK",
    "ID": 101,
    "Name": "Hong Kong"
  },
  {
    "Code": "HU",
    "ID": 102,
    "Name": "Hungary"
  },
  {
    "Code": "IS",
    "ID": 103,
    "Name": "Iceland"
  },
  {
    "Code": "IN",
    "ID": 104,
    "Name": "India"
  },
  {
    "Code": "ID",
    "ID": 105,
    "Name": "Indonesia"
  },
  {
    "Code": "IR",
    "ID": 271,
    "Name": "Iran"
  },
  {
    "Code": "IQ",
    "ID": 281,
    "Name": "Iraq"
  },
  {
    "Code": "IE",
    "ID": 106,
    "Name": "Ireland"
  },
  {
    "Code": "IM",
    "ID": 280,
    "Name": "Isle of Man"
  },
  {
    "Code": "IL",
    "ID": 107,
    "Name": "Israel"
  },
  {
    "Code": "IT",
    "ID": 108,
    "Name": "Italy"
  },
  {
    "Code": "CI",
    "ID": 56,
    "Name": "Ivory Coast"
  },
  {
    "Code": "JM",
    "ID": 109,
    "Name": "Jamaica"
  },
  {
    "Code": "JP",
    "ID": 110,
    "Name": "Japan"
  },
  {
    "Code": "JE",
    "ID": 282,
    "Name": "Jersey"
  },
  {
    "Code": "JO",
    "ID": 111,
    "Name": "Jordan"
  },
  {
    "Code": "KZ",
    "ID": 112,
    "Name": "Kazakhstan"
  },
  {
    "Code": "KE",
    "ID": 113,
    "Name": "Kenya"
  },
  {
    "Code": "KI",
    "ID": 114,
    "Name": "Kiribati"
  },
  {
    "Code": "KO",
    "ID": 115,
    "Name": "Kosrae"
  },
  {
    "Code": "KW",
    "ID": 116,
    "Name": "Kuwait"
  },
  {
    "Code": "KG",
    "ID": 117,
    "Name": "Kyrgyzstan"
  },
  {
    "Code": "LA",
    "ID": 118,
    "Name": "Laos"
  },
  {
    "Code": "LV",
    "ID": 119,
    "Name": "Latvia"
  },
  {
    "Code": "LB",
    "ID": 120,
    "Name": "Lebanon"
  },
  {
    "Code": "LS",
    "ID": 121,
    "Name": "Lesotho"
  },
  {
    "Code": "LR",
    "ID": 122,
    "Name": "Liberia"
  },
  {
    "Code": "LY",
    "ID": 123,
    "Name": "Libya"
  },
  {
    "Code": "LI",
    "ID": 124,
    "Name": "Liechtenstein"
  },
  {
    "Code": "LT",
    "ID": 125,
    "Name": "Lithuania"
  },
  {
    "Code": "LU",
    "ID": 126,
    "Name": "Luxembourg"
  },
  {
    "Code": "MO",
    "ID": 127,
    "Name": "Macau"
  },
  {
    "Code": "MK",
    "ID": 128,
    "Name": "Macedonia"
  },
  {
    "Code": "MG",
    "ID": 129,
    "Name": "Madagascar"
  },
  {
    "Code": "MW",
    "ID": 131,
    "Name": "Malawi"
  },
  {
    "Code": "MY",
    "ID": 132,
    "Name": "Malaysia"
  },
  {
    "Code": "MV",
    "ID": 133,
    "Name": "Maldives"
  },
  {
    "Code": "ML",
    "ID": 134,
    "Name": "Mali"
  },
  {
    "Code": "MT",
    "ID": 135,
    "Name": "Malta"
  },
  {
    "Code": "MH",
    "ID": 136,
    "Name": "Marshall Islands"
  },
  {
    "Code": "MQ",
    "ID": 137,
    "Name": "Martinique"
  },
  {
    "Code": "MR",
    "ID": 138,
    "Name": "Mauritania"
  },
  {
    "Code": "MU",
    "ID": 139,
    "Name": "Mauritius"
  },
  {
    "Code": "YT",
    "ID": 140,
    "Name": "Mayotte"
  },
  {
    "Code": "MX",
    "ID": 141,
    "Name": "Mexico"
  },
  {
    "Code": "FM",
    "ID": 142,
    "Name": "Micronesia"
  },
  {
    "Code": "MD",
    "ID": 143,
    "Name": "Moldova"
  },
  {
    "Code": "MC",
    "ID": 144,
    "Name": "Monaco"
  },
  {
    "Code": "MN",
    "ID": 145,
    "Name": "Mongolia"
  },
  {
    "Code": "ME",
    "ID": 285,
    "Name": "Montenegro"
  },
  {
    "Code": "MS",
    "ID": 146,
    "Name": "Montserrat"
  },
  {
    "Code": "MA",
    "ID": 147,
    "Name": "Morocco"
  },
  {
    "Code": "MZ",
    "ID": 148,
    "Name": "Mozambique"
  },
  {
    "Code": "MM",
    "ID": 149,
    "Name": "Myanmar"
  },
  {
    "Code": "NA",
    "ID": 150,
    "Name": "Namibia"
  },
  {
    "Code": "NR",
    "ID": 151,
    "Name": "Nauru"
  },
  {
    "Code": "NP",
    "ID": 152,
    "Name": "Nepal"
  },
  {
    "Code": "NL",
    "ID": 153,
    "Name": "Netherlands"
  },
  {
    "Code": "NC",
    "ID": 156,
    "Name": "New Caledonia"
  },
  {
    "Code": "NZ",
    "ID": 157,
    "Name": "New Zealand"
  },
  {
    "Code": "NI",
    "ID": 158,
    "Name": "Nicaragua"
  },
  {
    "Code": "NE",
    "ID": 159,
    "Name": "Niger"
  },
  {
    "Code": "NG",
    "ID": 160,
    "Name": "Nigeria"
  },
  {
    "Code": "NU",
    "ID": 161,
    "Name": "Niue"
  },
  {
    "Code": "NF",
    "ID": 162,
    "Name": "Norfolk Island"
  },
  {
    "Code": "KP",
    "ID": 163,
    "Name": "North Korea"
  },
  {
    "Code": "MP",
    "ID": 165,
    "Name": "Northern Mariana Islands"
  },
  {
    "Code": "NO",
    "ID": 166,
    "Name": "Norway"
  },
  {
    "Code": "OM",
    "ID": 167,
    "Name": "Oman"
  },
  {
    "Code": "PK",
    "ID": 168,
    "Name": "Pakistan"
  },
  {
    "Code": "PW",
    "ID": 169,
    "Name": "Palau"
  },
  {
    "Code": "PS",
    "ID": 283,
    "Name": "Palestinian Territory"
  },
  {
    "Code": "PA",
    "ID": 170,
    "Name": "Panama"
  },
  {
    "Code": "PG",
    "ID": 171,
    "Name": "Papua New Guinea"
  },
  {
    "Code": "PY",
    "ID": 172,
    "Name": "Paraguay"
  },
  {
    "Code": "PE",
    "ID": 173,
    "Name": "Peru"
  },
  {
    "Code": "PH",
    "ID": 174,
    "Name": "Philippines"
  },
  {
    "Code": "PN",
    "ID": 175,
    "Name": "Pitcairn"
  },
  {
    "Code": "PL",
    "ID": 176,
    "Name": "Poland"
  },
  {
    "Code": "PO",
    "ID": 177,
    "Name": "Ponape"
  },
  {
    "Code": "PT",
    "ID": 178,
    "Name": "Portugal"
  },
  {
    "Code": "PR",
    "ID": 179,
    "Name": "Puerto Rico"
  },
  {
    "Code": "QA",
    "ID": 180,
    "Name": "Qatar"
  },
  {
    "Code": "RE",
    "ID": 181,
    "Name": "Reunion"
  },
  {
    "Code": "RO",
    "ID": 182,
    "Name": "Romania"
  },
  {
    "Code": "RT",
    "ID": 183,
    "Name": "Rota"
  },
  {
    "Code": "RU",
    "ID": 184,
    "Name": "Russian Federation"
  },
  {
    "Code": "RW",
    "ID": 185,
    "Name": "Rwanda"
  },
  {
    "Code": "KN",
    "ID": 187,
    "Name": "Saint Kitts and Nevis"
  },
  {
    "Code": "LC",
    "ID": 188,
    "Name": "Saint Lucia"
  },
  {
    "Code": "VC",
    "ID": 189,
    "Name": "Saint Vincent and the Grenadines"
  },
  {
    "Code": "SP",
    "ID": 190,
    "Name": "Saipan"
  },
  {
    "Code": "WS",
    "ID": 191,
    "Name": "Samoa"
  },
  {
    "Code": "SM",
    "ID": 192,
    "Name": "San Marino"
  },
  {
    "Code": "ST",
    "ID": 193,
    "Name": "Sao Tome and Principe"
  },
  {
    "Code": "SA",
    "ID": 194,
    "Name": "Saudi Arabia"
  },
  {
    "Code": "SN",
    "ID": 196,
    "Name": "Senegal"
  },
  {
    "Code": "RS",
    "ID": 272,
    "Name": "Serbia"
  },
  {
    "Code": "SC",
    "ID": 197,
    "Name": "Seychelles"
  },
  {
    "Code": "SL",
    "ID": 198,
    "Name": "Sierra Leone"
  },
  {
    "Code": "SG",
    "ID": 199,
    "Name": "Singapore"
  },
  {
    "Code": "SK",
    "ID": 200,
    "Name": "Slovak Republic"
  },
  {
    "Code": "SI",
    "ID": 201,
    "Name": "Slovenia"
  },
  {
    "Code": "SB",
    "ID": 202,
    "Name": "Solomon Islands"
  },
  {
    "Code": "SO",
    "ID": 203,
    "Name": "Somalia"
  },
  {
    "Code": "ZA",
    "ID": 204,
    "Name": "South Africa"
  },
  {
    "Code": "GS",
    "ID": 205,
    "Name": "South Georgia and South Sandwich Islands."
  },
  {
    "Code": "KR",
    "ID": 206,
    "Name": "South Korea"
  },
  {
    "Code": "SS",
    "ID": 186,
    "Name": "South Sudan"
  },
  {
    "Code": "ES",
    "ID": 207,
    "Name": "Spain"
  },
  {
    "Code": "LK",
    "ID": 208,
    "Name": "Sri Lanka"
  },
  {
    "Code": "NT",
    "ID": 209,
    "Name": "St. Barthelemy"
  },
  {
    "Code": "SW",
    "ID": 210,
    "Name": "St. Christopher"
  },
  {
    "Code": "EU",
    "ID": 212,
    "Name": "St. Eustatius"
  },
  {
    "Code": "SH",
    "ID": 213,
    "Name": "St. Helena"
  },
  {
    "Code": "SX",
    "ID": 217,
    "Name": "St. Maarten"
  },
  {
    "Code": "MF",
    "ID": 218,
    "Name": "St. Martin"
  },
  {
    "Code": "PM",
    "ID": 219,
    "Name": "St. Pierre and Miquelon"
  },
  {
    "Code": "SD",
    "ID": 222,
    "Name": "Sudan"
  },
  {
    "Code": "SR",
    "ID": 223,
    "Name": "Suriname"
  },
  {
    "Code": "SJ",
    "ID": 224,
    "Name": "Svalbard and Jan Mayen Islands"
  },
  {
    "Code": "SZ",
    "ID": 225,
    "Name": "Swaziland"
  },
  {
    "Code": "SE",
    "ID": 226,
    "Name": "Sweden"
  },
  {
    "Code": "CH",
    "ID": 227,
    "Name": "Switzerland"
  },
  {
    "Code": "SY",
    "ID": 228,
    "Name": "Syria"
  },
  {
    "Code": "TA",
    "ID": 229,
    "Name": "Tahiti"
  },
  {
    "Code": "TW",
    "ID": 230,
    "Name": "Taiwan"
  },
  {
    "Code": "TJ",
    "ID": 231,
    "Name": "Tajikistan"
  },
  {
    "Code": "TZ",
    "ID": 232,
    "Name": "Tanzania"
  },
  {
    "Code": "TH",
    "ID": 233,
    "Name": "Thailand"
  },
  {
    "Code": "TI",
    "ID": 234,
    "Name": "Tinian"
  },
  {
    "Code": "TG",
    "ID": 235,
    "Name": "Togo"
  },
  {
    "Code": "TK",
    "ID": 236,
    "Name": "Tokelau"
  },
  {
    "Code": "TO",
    "ID": 237,
    "Name": "Tonga"
  },
  {
    "Code": "TL",
    "ID": 238,
    "Name": "Tortola"
  },
  {
    "Code": "TT",
    "ID": 239,
    "Name": "Trinidad and Tobago"
  },
  {
    "Code": "TU",
    "ID": 240,
    "Name": "Truk"
  },
  {
    "Code": "TN",
    "ID": 241,
    "Name": "Tunisia"
  },
  {
    "Code": "TR",
    "ID": 242,
    "Name": "Turkey"
  },
  {
    "Code": "TM",
    "ID": 243,
    "Name": "Turkmenistan"
  },
  {
    "Code": "TC",
    "ID": 244,
    "Name": "Turks and Caicos Islands"
  },
  {
    "Code": "TV",
    "ID": 245,
    "Name": "Tuvalu"
  },
  {
    "Code": "UG",
    "ID": 246,
    "Name": "Uganda"
  },
  {
    "Code": "UA",
    "ID": 247,
    "Name": "Ukraine"
  },
  {
    "Code": "UI",
    "ID": 248,
    "Name": "Union Island"
  },
  {
    "Code": "AE",
    "ID": 249,
    "Name": "United Arab Emirates"
  },
  {
    "Code": "UY",
    "ID": 251,
    "Name": "Uruguay"
  },
  {
    "Code": "UM",
    "ID": 252,
    "Name": "US Minor Outlying Islands"
  },
  {
    "Code": "VI",
    "ID": 261,
    "Name": "US Virgin Islands"
  },
  {
    "Code": "SU",
    "ID": 253,
    "Name": "USSR (former)"
  },
  {
    "Code": "UZ",
    "ID": 254,
    "Name": "Uzbekistan"
  },
  {
    "Code": "VU",
    "ID": 255,
    "Name": "Vanuatu"
  },
  {
    "Code": "VA",
    "ID": 256,
    "Name": "Vatican City State"
  },
  {
    "Code": "VE",
    "ID": 257,
    "Name": "Venezuela"
  },
  {
    "Code": "VN",
    "ID": 258,
    "Name": "Vietnam"
  },
  {
    "Code": "VR",
    "ID": 259,
    "Name": "Virgin Gorda"
  },
  {
    "Code": "WF",
    "ID": 263,
    "Name": "Wallis and Futuna Islands"
  },
  {
    "Code": "EH",
    "ID": 278,
    "Name": "Western Sahara"
  },
  {
    "Code": "YA",
    "ID": 265,
    "Name": "Yap"
  },
  {
    "Code": "YE",
    "ID": 266,
    "Name": "Yemen"
  },
  {
    "Code": "YU",
    "ID": 267,
    "Name": "Yugoslavia"
  },
  {
    "Code": "ZM",
    "ID": 269,
    "Name": "Zambia"
  },
  {
    "Code": "ZW",
    "ID": 270,
    "Name": "Zimbabwe"
  }
]
Suggest Edits

GetTimeZones

This method will return the full list of all timezones currently in Bullseye.

Return Value: RestTimeZone

 
gethttps://ws.bullseyelocations.com/RestLocation.svc/GetTimeZones

Query Params

ClientId
int32
required
ApiKey
string
required
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get time zones
$location = $bullseye->getTimeZones();
//4. Check location
if(false !== $location)
  print_r($location);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "Description": "(GMT-12:00) International Date Line West",
    "GMTOffset": -12,
    "ID": 1,
    "Name": "International Date Line West"
  },
  {
    "Description": "(GMT-11:00) Midway Island, Samoa",
    "GMTOffset": -11,
    "ID": 2,
    "Name": "Midway Island, Samoa"
  },
  {
    "Description": "(GMT-10:00) Hawaii",
    "GMTOffset": -10,
    "ID": 3,
    "Name": "Hawaii"
  },
  {
    "Description": "(GMT-09:00) Alaska",
    "GMTOffset": -9,
    "ID": 4,
    "Name": "Alaska"
  },
  {
    "Description": "(GMT-08:00) Pacific Time (US & Canada)",
    "GMTOffset": -8,
    "ID": 5,
    "Name": "Pacific Time (US & Canada)"
  },
  {
    "Description": "(GMT-08:00) Tijuana, Baja California",
    "GMTOffset": -8,
    "ID": 6,
    "Name": "Tijuana, Baja California"
  },
  {
    "Description": "(GMT-07:00) Arizona",
    "GMTOffset": -7,
    "ID": 7,
    "Name": "Arizona"
  },
  {
    "Description": "(GMT-07:00) Chihuahua, La Paz, Mazatlan - New",
    "GMTOffset": -7,
    "ID": 8,
    "Name": "Chihuahua, La Paz, Mazatlan - New"
  },
  {
    "Description": "(GMT-07:00) Chihuahua, La Paz, Mazatlan - Old",
    "GMTOffset": -7,
    "ID": 9,
    "Name": "Chihuahua, La Paz, Mazatlan - Old"
  },
  {
    "Description": "(GMT-07:00) Mountain Time (US & Canada)",
    "GMTOffset": -7,
    "ID": 10,
    "Name": "Mountain Time (US & Canada)"
  },
  {
    "Description": "(GMT-06:00) Central America",
    "GMTOffset": -6,
    "ID": 11,
    "Name": "Central America"
  },
  {
    "Description": "(GMT-06:00) Central Time (US & Canada)",
    "GMTOffset": -6,
    "ID": 12,
    "Name": "Central Time (US & Canada)"
  },
  {
    "Description": "(GMT-06:00) Guadalajara, Mexico City, Monterrey",
    "GMTOffset": -6,
    "ID": 13,
    "Name": "Guadalajara, Mexico City, Monterrey"
  },
  {
    "Description": "(GMT-06:00) Guadalajara, Mexico City, Monterrey",
    "GMTOffset": -6,
    "ID": 14,
    "Name": "Guadalajara, Mexico City, Monterrey"
  },
  {
    "Description": "(GMT-06:00) Saskatchewan",
    "GMTOffset": -6,
    "ID": 15,
    "Name": "Saskatchewan"
  },
  {
    "Description": "(GMT-05:00) Bogota, Lima, Quito, Rio Branco",
    "GMTOffset": -5,
    "ID": 16,
    "Name": "Bogota, Lima, Quito, Rio Branco"
  },
  {
    "Description": "(GMT-05:00) Eastern Time (US & Canada)",
    "GMTOffset": -5,
    "ID": 17,
    "Name": "Eastern Time (US & Canada)"
  },
  {
    "Description": "(GMT-05:00) Indiana (East)",
    "GMTOffset": -5,
    "ID": 18,
    "Name": "Indiana (East)"
  },
  {
    "Description": "(GMT-04:00) Atlantic Time (Canada)",
    "GMTOffset": -4,
    "ID": 19,
    "Name": "Atlantic Time (Canada)"
  },
  {
    "Description": "(GMT-04:00) Caracas, La Paz",
    "GMTOffset": -4,
    "ID": 20,
    "Name": "Caracas, La Paz"
  },
  {
    "Description": "(GMT-04:00) Manaus",
    "GMTOffset": -4,
    "ID": 21,
    "Name": "Manaus"
  },
  {
    "Description": "(GMT-04:00) Santiago",
    "GMTOffset": -4,
    "ID": 22,
    "Name": "Santiago"
  },
  {
    "Description": "(GMT-03:30) Newfoundland",
    "GMTOffset": -3.5,
    "ID": 23,
    "Name": "Newfoundland"
  },
  {
    "Description": "(GMT-03:00) Brasilia",
    "GMTOffset": -3,
    "ID": 24,
    "Name": "Brasilia"
  },
  {
    "Description": "(GMT-03:00) Buenos Aires, Georgetown",
    "GMTOffset": -3,
    "ID": 25,
    "Name": "Buenos Aires, Georgetown"
  },
  {
    "Description": "(GMT-03:00) Greenland",
    "GMTOffset": -3,
    "ID": 26,
    "Name": "Greenland"
  },
  {
    "Description": "(GMT-03:00) Montevideo",
    "GMTOffset": -3,
    "ID": 27,
    "Name": "Montevideo"
  },
  {
    "Description": "(GMT-02:00) Mid-Atlantic",
    "GMTOffset": -2,
    "ID": 28,
    "Name": "Mid-Atlantic"
  },
  {
    "Description": "(GMT-01:00) Azores",
    "GMTOffset": -1,
    "ID": 29,
    "Name": "Azores"
  },
  {
    "Description": "(GMT-01:00) Cape Verde Is.",
    "GMTOffset": -1,
    "ID": 30,
    "Name": "Cape Verde Is."
  },
  {
    "Description": "(GMT) Casablanca, Monrovia, Reykjavik",
    "GMTOffset": 0,
    "ID": 31,
    "Name": "Casablanca, Monrovia, Reykjavik"
  },
  {
    "Description": "(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London",
    "GMTOffset": 0,
    "ID": 32,
    "Name": "Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London"
  },
  {
    "Description": "(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",
    "GMTOffset": 1,
    "ID": 33,
    "Name": "Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna"
  },
  {
    "Description": "(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague",
    "GMTOffset": 1,
    "ID": 34,
    "Name": "Belgrade, Bratislava, Budapest, Ljubljana, Prague"
  },
  {
    "Description": "(GMT+01:00) Brussels, Copenhagen, Madrid, Paris",
    "GMTOffset": 1,
    "ID": 35,
    "Name": "Brussels, Copenhagen, Madrid, Paris"
  },
  {
    "Description": "(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb",
    "GMTOffset": 1,
    "ID": 36,
    "Name": "Sarajevo, Skopje, Warsaw, Zagreb"
  },
  {
    "Description": "(GMT+01:00) West Central Africa",
    "GMTOffset": 1,
    "ID": 37,
    "Name": "West Central Africa"
  },
  {
    "Description": "(GMT+02:00) Amman",
    "GMTOffset": 2,
    "ID": 38,
    "Name": "Amman"
  },
  {
    "Description": "(GMT+02:00) Athens, Bucharest, Istanbul",
    "GMTOffset": 2,
    "ID": 39,
    "Name": "Athens, Bucharest, Istanbul"
  },
  {
    "Description": "(GMT+02:00) Beirut",
    "GMTOffset": 2,
    "ID": 40,
    "Name": "Beirut"
  },
  {
    "Description": "(GMT+02:00) Cairo",
    "GMTOffset": 2,
    "ID": 41,
    "Name": "Cairo"
  },
  {
    "Description": "(GMT+02:00) Harare, Pretoria",
    "GMTOffset": 2,
    "ID": 42,
    "Name": "Harare, Pretoria"
  },
  {
    "Description": "(GMT+02:00) Helsinki, Kjiv, Riga, Sofia, Talinn, Vilnius",
    "GMTOffset": 2,
    "ID": 43,
    "Name": "Helsinki, Kjiv, Riga, Sofia, Talinn, Vilnius"
  },
  {
    "Description": "(GMT+02:00) Jerusalem",
    "GMTOffset": 2,
    "ID": 44,
    "Name": "Jerusalem"
  },
  {
    "Description": "(GMT+02:00) Minsk",
    "GMTOffset": 2,
    "ID": 45,
    "Name": "Minsk"
  },
  {
    "Description": "(GMT+02:00) Windhoek",
    "GMTOffset": 2,
    "ID": 46,
    "Name": "Windhoek"
  },
  {
    "Description": "(GMT+03:00) Baghdad",
    "GMTOffset": 3,
    "ID": 47,
    "Name": "Baghdad"
  },
  {
    "Description": "(GMT+03:00) Kuwait, Riyadh",
    "GMTOffset": 3,
    "ID": 48,
    "Name": "Kuwait, Riyadh"
  },
  {
    "Description": "(GMT+03:00) Moscow, St. Petersburg, Volgograd",
    "GMTOffset": 3,
    "ID": 49,
    "Name": "Moscow, St. Petersburg, Volgograd"
  },
  {
    "Description": "(GMT+03:00) Nairobi",
    "GMTOffset": 3,
    "ID": 50,
    "Name": "Nairobi"
  },
  {
    "Description": "(GMT+03:00) Tbilisi",
    "GMTOffset": 3,
    "ID": 51,
    "Name": "Tbilisi"
  },
  {
    "Description": "(GMT+03:30) Tehran",
    "GMTOffset": 3.5,
    "ID": 52,
    "Name": "Tehran"
  },
  {
    "Description": "(GMT+04:00) Abu Dhabi, Muscat",
    "GMTOffset": 4,
    "ID": 53,
    "Name": "Abu Dhabi, Muscat"
  },
  {
    "Description": "(GMT+04:00) Baku",
    "GMTOffset": 4,
    "ID": 54,
    "Name": "Baku"
  },
  {
    "Description": "(GMT+04:00) Caucasus Standard Time",
    "GMTOffset": 4,
    "ID": 55,
    "Name": "Caucasus Standard Time"
  },
  {
    "Description": "(GMT+04:00) Yerevan",
    "GMTOffset": 4,
    "ID": 56,
    "Name": "Yerevan"
  },
  {
    "Description": "(GMT+04:30) Kabul",
    "GMTOffset": 4.5,
    "ID": 57,
    "Name": "Kabul"
  },
  {
    "Description": "(GMT+05:00) Ekaterinburg",
    "GMTOffset": 5,
    "ID": 58,
    "Name": "Ekaterinburg"
  },
  {
    "Description": "(GMT+05:00) Islamabad, Karachi, Tashkent",
    "GMTOffset": 5,
    "ID": 59,
    "Name": "Islamabad, Karachi, Tashkent"
  },
  {
    "Description": "(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi",
    "GMTOffset": 5.5,
    "ID": 60,
    "Name": "Chennai, Kolkata, Mumbai, New Delhi"
  },
  {
    "Description": "(GMT+05:30) Sri Jayawardenepure",
    "GMTOffset": 5.5,
    "ID": 61,
    "Name": "Sri Jayawardenepure"
  },
  {
    "Description": "(GMT+05:45) Kathmandu",
    "GMTOffset": 5.75,
    "ID": 62,
    "Name": "Kathmandu"
  },
  {
    "Description": "(GMT+06:00) Almaty, Novosibirsk",
    "GMTOffset": 6,
    "ID": 63,
    "Name": "Almaty, Novosibirsk"
  },
  {
    "Description": "(GMT+06:00) Astana, Dhaka",
    "GMTOffset": 6,
    "ID": 64,
    "Name": "Astana, Dhaka"
  },
  {
    "Description": "(GMT+06:30) Yangon (Rangoon)",
    "GMTOffset": 6.5,
    "ID": 65,
    "Name": "Yangon (Rangoon)"
  },
  {
    "Description": "(GMT+07:00) Bangkok, Hanoi, Jakarta",
    "GMTOffset": 7,
    "ID": 66,
    "Name": "Bangkok, Hanoi, Jakarta"
  },
  {
    "Description": "(GMT+07:00) Krasnoyarsk",
    "GMTOffset": 7,
    "ID": 67,
    "Name": "Krasnoyarsk"
  },
  {
    "Description": "(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi",
    "GMTOffset": 8,
    "ID": 68,
    "Name": "Beijing, Chongqing, Hong Kong, Urumqi"
  },
  {
    "Description": "(GMT+08:00) Irkutsk, Ulaan Bataar",
    "GMTOffset": 8,
    "ID": 69,
    "Name": "Irkutsk, Ulaan Bataar"
  },
  {
    "Description": "(GMT+08:00) Kuala Lumpur, Singapore",
    "GMTOffset": 8,
    "ID": 70,
    "Name": "Kuala Lumpur, Singapore"
  },
  {
    "Description": "(GMT+08:00) Perth",
    "GMTOffset": 8,
    "ID": 71,
    "Name": "Perth"
  },
  {
    "Description": "(GMT+08:00) Taipei",
    "GMTOffset": 8,
    "ID": 72,
    "Name": "Taipei"
  },
  {
    "Description": "(GMT+09:00) Osaka, Sapporo, Tokyo",
    "GMTOffset": 9,
    "ID": 73,
    "Name": "Osaka, Sapporo, Tokyo"
  },
  {
    "Description": "(GMT+09:00) Seoul",
    "GMTOffset": 9,
    "ID": 74,
    "Name": "Seoul"
  },
  {
    "Description": "(GMT+09:00) Yakutsk",
    "GMTOffset": 9,
    "ID": 75,
    "Name": "Yakutsk"
  },
  {
    "Description": "(GMT+09:30) Adelaide",
    "GMTOffset": 9.5,
    "ID": 76,
    "Name": "Adelaide"
  },
  {
    "Description": "(GMT+09:30) Darwin",
    "GMTOffset": 9.5,
    "ID": 77,
    "Name": "Darwin"
  },
  {
    "Description": "(GMT+10:00) Brisbane",
    "GMTOffset": 10,
    "ID": 78,
    "Name": "Brisbane"
  },
  {
    "Description": "(GMT+10:00) Canberra, Melbourne, Sydney",
    "GMTOffset": 10,
    "ID": 79,
    "Name": "Canberra, Melbourne, Sydney"
  },
  {
    "Description": "(GMT+10:00) Guam, Port Moresby",
    "GMTOffset": 10,
    "ID": 80,
    "Name": "Guam, Port Moresby"
  },
  {
    "Description": "(GMT+10:00) Hobart",
    "GMTOffset": 10,
    "ID": 81,
    "Name": "Hobart"
  },
  {
    "Description": "(GMT+10:00) Vladivostok",
    "GMTOffset": 10,
    "ID": 82,
    "Name": "Vladivostok"
  },
  {
    "Description": "(GMT+11:00) Magadan, Solomon Is., New Caledonia",
    "GMTOffset": 11,
    "ID": 83,
    "Name": "Magadan, Solomon Is., New Caledonia"
  },
  {
    "Description": "(GMT+12:00) Auchland, Wellington",
    "GMTOffset": 12,
    "ID": 84,
    "Name": "Auchland, Wellington"
  },
  {
    "Description": "(GMT+13:00) Fiji, Kamchatka, Marshall Is.",
    "GMTOffset": 13,
    "ID": 85,
    "Name": "Fiji, Kamchatka, Marshall Is."
  },
  {
    "Description": "(GMT+13:00) Nuku'alofa",
    "GMTOffset": 13,
    "ID": 86,
    "Name": "Nuku'alofa"
  }
]
Suggest Edits

GetLocation

This method retrieves information for a location, given a Bullseye location ID, or a third-party ID.

Return Value: LocationJson

 
gethttps://ws.bullseyelocations.com/RestLocation.svc/GetLocation

Query Params

ClientId
int32
required
ApiKey
string
required
LocationId
int32

Required if ThirdPartyId is not provided (Only one should be specified)

ThirdPartyId
string

Required if LocationId is not provided (Only one should be specified)

Notes:

In lieu of providing the Client Id and Api Key, a call may be made to AuthenticateClient with those credentials, and the resultant security token added to the Request Header under the key "ClientToken"

Condition
HTTP status code
Description

If both LocationId and ThirdPartyId are missing

400

Bad Request

If both LocationId and ThirdPartyId are present

400

Bad Request

If the location cannot be found

404

Not Found

An unexpected exception

500

Internal server error

//Json date returned from the API contains a 4 hour offset time
// offset needs to be included when converting a date to ASP.Net DateTime
private DateTime ConvertJsonStringToDateTime(string jsonTime)
        {
            if (!string.IsNullOrEmpty(jsonTime))
            {
                string milis = jsonTime;
                string sign = milis.IndexOf("+") > -1 ? "+" : "-";
                string hours = milis.Substring(milis.IndexOf(sign));
                milis = milis.Substring(0, milis.IndexOf(sign));
                return new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(Convert.ToInt64(milis)).AddHours(Convert.ToInt64(hours) / 100);
            }
 
            return DateTime.Now;
        }
 
//usage
 var time1 = ConvertJsonStringToDateTime("1442926800000-0400");
 var time2 = ConvertJsonStringToDateTime("1442955600000-0400");
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
$bullseye->debug(true);
//3. Call method to get the location
$locationId = '4885827';
$location = $bullseye->getLocation($locationId);
//4. Check location
if($location)
  print_r($location);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

{
  "Active": true,
  "Address1": "Little Heath,Barley Lane",
  "Address2": "Essex",
  "Address3": null,
  "Address4": null,
  "Attributes": [
    {
      "AttributeId": 226,
      "AttributeName": "My Rates",
      "AttributeTypeID": 1,
      "BoolValue": null,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058923,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": null,
      "OptionName": null,
      "TextValue": "30",
      "LinkValue": null
    },
    {
      "AttributeId": 238,
      "AttributeName": "Teaching Location",
      "AttributeTypeID": 1,
      "BoolValue": null,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058924,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": null,
      "OptionName": null,
      "TextValue": "Home",
      "LinkValue": null
    },
    {
      "AttributeId": 241,
      "AttributeName": "Years Teaching",
      "AttributeTypeID": 3,
      "BoolValue": null,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058925,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": 10,
      "OptionID": null,
      "OptionName": null,
      "TextValue": null,
      "LinkValue": null
    },
    {
      "AttributeId": 248,
      "AttributeName": "References Available?",
      "AttributeTypeID": 4,
      "BoolValue": false,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058926,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": null,
      "OptionName": null,
      "TextValue": null,
      "LinkValue": null
    },
    {
      "AttributeId": 232,
      "AttributeName": "In-Home Lessons?",
      "AttributeTypeID": 4,
      "BoolValue": false,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058927,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": null,
      "OptionName": null,
      "TextValue": null,
      "LinkValue": null
    },
    {
      "AttributeId": 249,
      "AttributeName": "MTNA Certified?",
      "AttributeTypeID": 4,
      "BoolValue": false,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058928,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": null,
      "OptionName": null,
      "TextValue": null,
      "LinkValue": null
    },
    {
      "AttributeId": 251,
      "AttributeName": "Newsletter?",
      "AttributeTypeID": 4,
      "BoolValue": false,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058929,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": null,
      "OptionName": null,
      "TextValue": null,
      "LinkValue": null
    },
    {
      "AttributeId": 261,
      "AttributeName": "Styles Taught",
      "AttributeTypeID": 7,
      "BoolValue": null,
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4058930,
      "LocationId": 4886269,
      "MemoValue": null,
      "NumericValue": null,
      "OptionID": 209,
      "OptionName": "All Styles",
      "TextValue": null,
      "LinkValue": null
    }
  ],
  "BusinessHours": {
    "DateCreated": "/Date(1462448937963-0400)/",
    "DateDeleted": null,
    "DateLastModified": "/Date(1463046616583-0400)/",
    "FridayClose": null,
    "FridayOpen": null,
    "Id": 4886269,
    "LocationID": 4886269,
    "MondayClose": null,
    "MondayOpen": null,
    "SaturdayClose": null,
    "SaturdayOpen": null,
    "SundayClose": null,
    "SundayOpen": null,
    "ThursdayClose": null,
    "ThursdayOpen": null,
    "TimeZoneID": 5,
    "TimeZoneName": null,
    "TuesdayClose": null,
    "TuesdayOpen": null,
    "WednesdayClose": null,
    "WednesdayOpen": null,
    "Display24HourFormat": false
  },
  "BusinessHoursFmtd": null,
  "Categories": [],
  "City": "Essex",
  "ClientId": 267,
  "ContactName": "Contact name 3rd pty",
  "ContactPosition": "Daram",
  "ContactURL": null,
  "CountryId": 1,
  "CountryName": "United States",
  "Coupons": [],
  "DailyHoursList": null,
  "DateCreated": "/Date(1462448937917-0400)/",
  "DateDeleted": null,
  "DateLastGeoCoded": "/Date(1462448937887-0400)/",
  "DateLastModified": "/Date(1463046616567-0400)/",
  "EmailAddress": "test@gmail.com",
  "Events": [],
  "FacebookPageId": null,
  "FaxNumber": null,
  "GeoCodeStatusId": 1,
  "Id": 4886269,
  "ImageFileUrl": null,
  "InternationalAddress": null,
  "InternetLocation": false,
  "LMServiceID": true,
  "Latitude": 40.49934,
  "LocationTypeId": 656,
  "LocationTypeName": "Standard",
  "Longitude": -74.52138,
  "MemberId": null,
  "MobileNumber": null,
  "Name": "LOC name 3rd pty",
  "Password": null,
  "PhoneNumber": null,
  "PostCode": "08873",
  "RepFullName": null,
  "RepId": 139,
  "ResponsivenessId": 5,
  "ResponsivenessName": null,
  "RestAttributes": null,
  "RestHolidayHours": [],
  "RestLocationImage": [],
  "RestLocationSEO": null,
  "RestLocationSocialMedia": {
    "DateCreated": "/Date(-62135578800000-0500)/",
    "DateLastModified": "/Date(-62135578800000-0500)/",
    "FacebookURL": null,
    "GooglePlusURL": "",
    "ID": 2364,
    "LinkedInURL": "",
    "LocationID": 4886269,
    "PinterestURL": "",
    "TwitterURL": "",
    "YelpURL": ""
  },
  "RestLocationSocialMediaLinks": {
    "DateCreated": "/Date(-62135578800000-0500)/",
    "DateLastModified": "/Date(-62135578800000-0500)/",
    "FacebookURL": null,
    "GooglePlusURL": "",
    "ID": 2364,
    "LinkedInURL": "",
    "LocationID": 4886269,
    "PinterestURL": "",
    "TwitterURL": "",
    "YelpURL": ""
  },
  "Services": [
    {
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4421545,
      "LocationID": 4886269,
      "LocationName": null,
      "ServiceID": 1,
      "ServiceName": "Lead Manager"
    },
    {
      "DateCreated": "/Date(1463046616567-0400)/",
      "DateDeleted": null,
      "DateLastModified": "/Date(1463046616567-0400)/",
      "Id": 4421546,
      "LocationID": 4886269,
      "LocationName": null,
      "ServiceID": 2,
      "ServiceName": "Store Locator"
    }
  ],
  "StateAbbr": "NJ",
  "StateId": 35,
  "Territories": [],
  "ThirdPartyId": "TRDPID",
  "URL": null,
  "UserName": null
}
Suggest Edits

AddLocation

This method allows you to create a new location.

You can create an associated LocationAdmin user for this location by specifying both UserName and Password on the location record.

Return Value: LocRslt

 
posthttps://ws.bullseyelocations.com/RestLocation.svc/AddLocation

Query Params

ClientId
int32
required
ApiKey
string
required
myLoc
object

Notes:

  • In lieu of providing the Client Id and Api Key, a call may be made to AuthenticateClient in the Lead web service with those credentials, and the resultant security token added to the Request Header under the key "ClientToken".
  • Location Name is required.
  • Active flag cannot be null and should be set to true in most cases.
  • Internet location cannot be null and should be set to false in most cases.
  • Country ID is required. (The country ID for US is 1; Canada is 2. For other countries, see the GetAllCountries() call.)
  • State ID is required for US and Canada. For convenience, you can specify StateAbbr (e.g. “NJ”) instead of the StateId (which is our numeric ID.)
  • ClientId, if specified in the location, will be overwritten with the id of the currently-authenticated client.
  • A “Services” array can be passed in, and must contain one record for each service that applies to this location. The only field that needs to be set on the LocationService record is the ServiceID. The two existing services are Lead Manager (Service ID 1) and Store Locator (Service ID 2).
  • An “Attributes” array can be passed in. AttributeId must be specified, and must correspond to a valid attribute ID for this client. Use GetAttributes() to retrieve a list of valid attributes. One of TextValue, NumericValue, MemoValue, BoolValue, or OptionID must be specified, corresponding to the data type for the specified attribute.
  • A “Categories” array can be passed in. The CategoryId must be set on each record, to a valid category ID for this client. (Specifying third-party category ID’s is not supported.)
  • If you do not use sub-categories, this is straightforward. Just specify the categories you want assigned to this location.
  • If you do use sub-categories, please note that, if you select a sub-category, then all ancestor categories will also be selected automatically when the location is saved. For instance, if you have a category “Meat” with sub-categories “Bacon” and “Turkey”, selecting bacon will automatically select meat. Selecting meat, on the other hand, will not automatically select bacon and turkey.
  • You can retrieve a list of valid categories via the GetCategories() method, and you can retrieve your category tree via the GetCategoryTree() method.
  • A “Territories” array can be passed in. The TerritoryId field must be set on each record, to a valid territory ID for this client. You can retrieve a list of valid territories via the GetTerritories() method.
  • A “BusinessHours” object can be passed in. You should specify a valid time zone ID. You can get a list of time zones via the GetTimeZones() method. For each of the Open and Closed fields, you need to pass in a valid DateTime value, but the date portion is ignored. If a location is closed on a given day, pass in NULL for both Open and Close values.
  • A “RestLocationSocialMedia” object can be passed in. This can be used to identify social media ID's for services such as Facebook, Yelp, Twitter, Google Plus, Pinterest and Yelp.
  • A "RestLocationSEO" object can be passed in, which allows an SEO title and meta description to be provided for the location.
  • A "RestLocationImage" object can be passed in, which is an array of image URL's that will be used on the landing page for the location.

Exception conditions:
This call, and other POST calls, will set the location ID in the LocRslt structure to a negative number on failure. Here are the values related to this method:

-1: invalid credentials (API key and/or client ID)
-2: validation failure (see errorMsg for details)
-3: client has reached maximum # of allowable locations for license type
-5: exception while creating user (see errorMsg for details)

Note that, if an error occurs while deserializing the JSON location object, the system is not capable of passing back a well-formatted error. In this case, you will get a 400 error code and a detailed “request error” from the .Net JSON deserializer.

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to add the location
$locationData = array(
  "Active" => true,
  "Address1" => "3 Executive Dr",
  "Address2" => null,
  "Address3" => null,
  "Address4" => null,
  "Attributes" => array(),
  "BusinessHours" => null,
  "Categories" => array(
    array("CategoryId" => 127),
    array("CategoryId" => 128)
  ),
  "City" => "Somerset",
  //"ClientId" => $clientId, //added automatically by library
  "ContactName" => "Carlos Test",
  "ContactPosition" => null,
  "CountryId" => 1,
  "EmailAddress" => "john.doe@example.com",
  "FacebookPageId" => "10153101584008606",
  "FaxNumber" => null,
  "Id" => null,		// must be null on insert.
  "InternetLocation" => false,
  "Latitude" => 42.151439,
  "LocationTypeId" => null,	// leave null to set to dflt (std)
  "Longitude" => -120.493879,
  "MobileNumber" => null,
  "Name" => "Rest Sample Test Location",
  "PhoneNumber" => "123-456-7890",
  "PostCode" => "08873",
  "RestLocationImage" => array(
    array("ImageFileUrl" => "http://identity.rutgers.edu/sites/identity/files/RU_Shield_th.gif"),
    array("ImageFileUrl" => "http://identity.rutgers.edu/sites/identity/files/spirit_mark_pg.gif")
  ),
  "RestLocationSEO" => array( 
    "SEOTitle" => "Rest Sample Test Location", 
    "MetaDescription" => "A Sample Location for providing a code example for adding a location to Bullseye." 
  ),
  "RestLocationSocialMedia" => array( 
    "PinterestURL" => "rutgersu",
    "TwitterURL" => "RutgersU"
  ),
  "Services" => array(
    array(
      "ServiceID" => 1,
      "ServiceName" => "Lead Manager"
    ),
    array( 
      "ServiceID" => 2,
      "ServiceName" => "Store Locator"
    )
  ),
  "StateId" => 35,
  "Territories" => array(
    array("TerritoryId" => 706)
  ),
  "ThirdPartyId" => null, //"ABC",
  "URL" => null,
  // should create a LocationAdmin user:
  "UserName" => "testuser@test123.com",
  "Password" => "password123"
);
$response = $bullseye->addLocation($locationData);
//4. Check response
if($response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

Try the API to see results
Suggest Edits

UpdateLocation

This method allows you to update an existing location.

Return Value: LocRslt

 
posthttps://ws.bullseyelocations.com/RestLocation.svc/UpdateLocation

Query Params

ClientId
int32
required
ApiKey
string
required
myLoc
object

You should always “get” a location before updating it; do NOT try to construct a location object from scratch for the purposes of updating an existing location.

Notes:

  • In lieu of providing the Client Id and Api Key, a call may be made to AuthenticateClient in the Lead web service with those credentials, and the resultant security token added to the Request Header under the key "ClientToken".
  • Value.Id must be set to a valid Bullseye location ID, or ThirdPartyId must be set to a valid third-party ID.
  • Value.Id is checked first, so it is possible to update a third-party ID by specifying the Bullseye ID as the retrieval key.
  • Attributes, Services, Categories, Territories, BusinessHours, RestLocationImage, RestLocationSEO and RestLocationSocialMedia objects may be specified. They will replace the existing values for the location, so be sure to completely specify them. If you leave any of these objects as null, the existing data will be wiped for that object. See the AddLocation() method for further notes on these objects.
  • User information cannot be updated through UpdateLocation
  • The best way to update a location is to first call GetLocation(), then modify any values you need to change, then call UpdateLocation(). If you try to construct the Location object from scratch, you risk wiping out some existing fields.

Exception conditions:
This call, and other POST calls, will set the location ID in the LocRslt structure to a negative number on failure. Here are the values related to this method:

-1: invalid credentials (API key and/or client ID)
-2: you did not specify either Id or ThirdPartyId on the location you passed into this method.
-3: no matching location was found (based on the Id or ThirdPartyId you passed in).
-4: validation failure (see errorMsg for details)
-5: exception while creating user (see errorMsg for details)

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Get location data
$locationId = '4952137';
$location = $bullseye->getLocation($locationId);
//4. Check location
if($location){
  //5. Call method to update the location
  $newLocationData = array(
    "Address3" => "This is just a test",
    "RestLocationImage" => array(
      array("ImageFileUrl" => "http://identity.rutgers.edu/sites/identity/files/RU_Shield_th.gif"),
      //array("ImageFileUrl" => "http://identity.rutgers.edu/sites/identity/files/spirit_mark_pg.gif")
    ),
    "RestLocationSocialMedia" => array( 
      "TwitterURL" => "carlostest"
    ),
  );
  $response = $bullseye->updateLocation($locationId, array_merge($location, $newLocationData));
  //6. Check response
  if($response)
    print_r($response);
  else{
    //if response is invalid
    print_r($bullseye->getLastError());
  }
}
A binary file was returned

You couldn't be authenticated

{
  "UpdateLocationResult": {
    "errorMsg": "",
    "locationId": 2447932
  }
}
Suggest Edits

DeleteLocations

This method allows you to delete multiple locations by ID.

You must pass in an array of integers, representing the location IDs that you wish to delete.

The result locationId parameter will contain the total number of locations deleted, if successful.

This process will also delete related members (users) and roles.

Return Value: LocRslt

 
posthttps://ws.bullseyelocations.com/RestLocation.svc/DeleteLocations

Query Params

ClientId
int32
required
ApiKey
string
required
ids
array of integers

A maximum of 1000 ids may be passed in a single call.

Notes:

  • In lieu of providing the Client Id and Api Key, a call may be made to AuthenticateClient in the Lead web service with those credentials, and the resultant security token added to the Request Header under the key "ClientToken".

Exception conditions:
This call, and other POST calls, will set the location ID in the LocRslt structure to a negative number on failure. Here are the values related to this method:

-1: invalid credentials (API key and/or client ID)
-2: too many ids passed in. (A maximum of 1000 deletes can be processed in a single call, though it is not recommended that you do that many at once.)
-3: one or more of the ID values is invalid.
-4: one or more of the ID values was not found in the database.
-5: one or more of the ID values belongs to another client.
Note that any of these exception conditions will reject ALL submitted deletes.

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to delete the location
$locationId = '4952137';
$response = $bullseye->deleteLocation($locationId);
//4. Check response
if($response)
  print_r($response);
else{
  //if response is invalid
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

{
  "DeleteLocationsResult": {
    "errorMsg": "",
    "locationId": 1
  }
}
Suggest Edits

LeadRslt Object

 

This object is used to pass back information about a newly-added lead.

Type
Name
Description

Int

leadId

Bullseye internal lead ID

String

errorMsg

Error message. Empty if successful.

Int

locationIds

Bullseye ids for locations to which this lead was assigned.

String

thirdPartyIds

Third-party ids for locations.

Suggest Edits

LeadJson Object

 

This object is used as input for the AddLead method. It represents a Bullseye Lead.

Type (Max length)
Name
Description

Int

Id

Bullseye lead ID

String (63)

FirstName

First Name

String (63)

LastName

Last Name

String (255)

CompanyName

Company Name

String (255)

EmailAddress

E-Mail Address

String (255)

Address1

First line of Address

String (255)

Address2

Second line of Address

String (255)

Address3

Third line of Address

String (255)

Address4

Fourth line of Address

String (63)

City

The lead’s city

String

StateAbbr

The lead’s state abbreviation

String (50)

PostalCode

The lead’s postal code (zip code in US)

Int

CountryId

The lead’s numeric Bullseye country ID

String

CountryCode

The 2-alpha ISO code for the country.

String (2000)

InternationalAddress

For leads outside the US, Canada, and the UK, contains the full address for the lead. NOTE that we are phasing out this field

String (50)

PhoneNumber

The lead’s phone number

String(2000)

Comments

optional comments

Int

PriorityID

Priority code (see table below for values)

Int

LeadSourceID

Lead source ID

Categories

An array of categories related to this lead

Attributes

An array of attributes related to this lead

Lead Priority Values

Id
Name

1

Lowest

2

Low

3

Medium

4

High

5

Urgent

Suggest Edits

LeadCategory Object

 

Represents an assignment of a category to a lead

Type
Name
Description

Int

CategoryID

Bullseye category ID

Suggest Edits

LeadAttribute Object

 

Represents a lead attribute and its value.

Type
Name
Description

int

AttributeID

Bullseye attribute ID

string

TextValue

The value for a text attribute.

int

NumericValue

The value for a numeric attribute.

boolean

BoolValue

The value for a yes/no attribute.

int

OptionID

The ID for a drop-down or radio group attribute.

Suggest Edits

AddLead

This method allows you to add a new lead to Bullseye, optionally routing the lead and sending standard notification emails.

The lead record is specified via the NewLead parameter. If EmailLead is true, a thank-you email will be sent to the new lead. If EmailDealers is true, notification emails will be sent to the dealer(s) to whom the lead is routed. If DoNotRoute is true, the lead will be left as unassigned. If a value is specified for LocationId, the lead will be routed to that location only. All boolean parameters default to false if not specified.

Return Value: LeadRslt

 
posthttps://ws.bullseyelocations.com/RestLead.svc/AddLead

Query Params

ClientId
int32
required
ApiKey
string
required
EmailLead
boolean

If EmailLead is true, a thank-you email will be sent to the new lead. Defaults to false if not specified.

EmailDealers
boolean

If EmailDealers is true, notification emails will be sent to the dealer(s) to whom the lead is routed.Defaults to false if not specified.

DoNotRoute
boolean

If DoNotRoute is true, the lead will be left as unassigned. Defaults to false if not specified.

LocationId
int32

If a value is specified for LocationId, the lead will be routed to that location only.

NewLead
object

Notes:

  • In lieu of providing the Client Id and Api Key, a call may be made to AuthenticateClient with those credentials, and the resultant security token added to the Request Header under the key "ClientToken".
  • On the NewLead record, E-mail address is required.
  • CountryID or CountryCode is required. (The country ID for US is 1; Canada is 2.)
  • StateAbbr is required for US and Canada. Specify standard 2-character US state code or Canadian province code.
  • PostalCode: for US, can be specified as 5-digit code or 5+4. (If specified as 5+4, only the 5-digit code is saved; the rest is ignored.)
  • PriorityID: must be a valid priority ID. See LeadRslt class for valid values.
  • LeadSourceID: must be a valid lead source ID for this client. See GetLeadSources() for valid values.
  • A "Categories" array can be passed in. The CategoryId must be set on each record, to a valid category ID for this client. (Specifying third-party category ID’s is not supported.)
  • An "Attributes" array can be used to specify one or more attributes. Only text, numeric, yes/no, and option attributes are supported.

Exception conditions:
This call will set the lead ID in the LeadRslt structure to a negative number on failure. Here are the values related to this method:

-1: invalid credentials (API key and/or client ID) or client does not subscribe to Lead Manager.
-2: validation failure (see errorMsg for details)
-3: exception caught while adding lead. (see errorMsg for details)
Note that, if an error occurs while deserializing the JSON lead object, the system is not capable of passing back a well-formatted error. In this case, you will get a 400 error code and a detailed “request error” from the .Net JSON deserializer.

Lead Priority Values

Id
Name

1

Lowest

2

Low

3

Medium

4

High

5

Urgent

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to add lead
$leadData = array(
  //'LocationId' => '4885827',
  'NewLead' => array(
    'FirstName' => 'Carlos',
    'LastName' => 'Test',
    //'CompanyName' => '',
    'EmailAddress' => 'carlos.guzman@webilop.com',
    //'Address1' => '',
    'City' => 'Somerset',
    'StateAbbr' => 'NJ',
    'PostalCode' => '08873',
    'CountryId' => 1,
    //'PhoneNumber' => '',
    'PriorityID' => 3,
    'LeadSourceID' => 5788,
    'Categories' => array(
      array(
        'CategoryID' => 7704
      )
    ),
    'Attributes' => array(
    ),
  )
);
$response = $bullseye->addLead($leadData);
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

Try the API to see results
Suggest Edits

GetLeadSources

This method will return the full list of lead sources for a given client.

 
gethttps://ws.bullseyelocations.com/RestLead.svc/GetLeadSources

Query Params

ClientId
int32
required
ApiKey
string
required

In lieu of providing the Client Id and Api Key, a call may be made to AuthenticateClient with those credentials, and the resultant security token added to the Request Header under the key "ClientToken".

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get lead sources
$response = $bullseye->getLeadSources();
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "Key": 320,
    "Value": "Web"
  },
  {
    "Key": 5830,
    "Value": "Landing Page 1"
  }
]
Suggest Edits

AuthenticateClient

The AuthenticateClient method takes the Client ID and API Key, autheticates it against the system, and returns an authentication token in the response header under the key "ClientToken". The authentication token is also returned as the string return value of the method.

 
gethttps://ws.bullseyelocations.com/RestLead.svc/AuthenticateClient

Query Params

ClientId
int32
required
ApiKey
string
required
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get lead sources
$response = $bullseye->authenticateClient();
//4. Check response
if(false !== $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

"c97310f1-74fe-4af9-b094-82bb7c4dfa20"
Suggest Edits

Lead Polling

This method returns a list of Lead matching the inputted criteria. Client Authentication must be called

prior and the authentication token included in the HTTP header under the key "ClientToken".

 
gethttps://ws.bullseyelocations.com/RestLead.svc/GetLeads

Query Params

CreatedAfter
string

Used to filter based on the Lead creation date.

CreatedBefore
string

Used to filter based on the Lead creation date.

ModifiedAfter
string

Will filter based on the Last Modified date.

Assigned
string

Filters Leads based on whether they have been assigned to a Location or not. If not supplied, no filtering will be done. If set to True, only Leads that have been assigned to Locations will be returned. If set to False, only Leads that have not been assigned will be returned.

Status
string

Used to filter based on the corresponding fields for the Lead.

StatusChangedAfter
string

Will filter based on whether the Status for a Lead was modified after the supplied date.

Source
string

Used to filter based on the corresponding fields for the Lead.

Priority
string

Used to filter based on the corresponding fields for the Lead.

HasThirdPartyID
string

Filters based on whether a Lead has a ThirdPartyID assigned to it or not. If not supplied, it's ignored. If set to True, only Leads with a ThirdPartyID will be returned. False, Leads without a ThirdPartyID.

Headers

ClientToken
string
required
curl --request GET \
  --url https://ws.bullseyelocations.com/RestLead.svc/GetLeads \
  --header 'clienttoken: ClientToken'
var request = require("request");

var options = { method: 'GET',
  url: 'https://ws.bullseyelocations.com/RestLead.svc/GetLeads',
  headers: { clienttoken: 'ClientToken' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://ws.bullseyelocations.com/RestLead.svc/GetLeads")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["clienttoken"] = 'ClientToken'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://ws.bullseyelocations.com/RestLead.svc/GetLeads");
xhr.setRequestHeader("clienttoken", "ClientToken");

xhr.send(data);
import requests

url = "https://ws.bullseyelocations.com/RestLead.svc/GetLeads"

headers = {'clienttoken': 'ClientToken'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "Address1": "123 test st",
    "Address2": "",
    "Address3": "",
    "Address4": "",
    "City": "test",
    "ClientId": 267,
    "Comments": "",
    "CompanyName": "test",
    "CountryId": 1,
    "CountryName": "United States",
    "DateCreated": "/Date(1491223824840-0400)/",
    "DateDeleted": null,
    "DateLastModified": "/Date(1491223824840-0400)/",
    "EmailAddress": "test@test.com",
    "FirstName": "test",
    "FormID": null,
    "Id": 83966,
    "InternationalAddress": null,
    "LastName": "test1",
    "LeadSourceID": 320,
    "LeadType": null,
    "LeadTypeID": null,
    "PhoneNumber": "",
    "PostalCode": "32003",
    "PriorityID": 4,
    "PriorityName": "High",
    "SourceName": "Web",
    "StateAbbr": "FL",
    "StateId": 12,
    "ThirdPartyID": null,
    "LocationID": 2448339,
    "StatusID": 2,
    "StatusName": "Followed Up"
  },
  {
    "Address1": "3121 US Hwy 22 East",
    "Address2": "",
    "Address3": "",
    "Address4": "",
    "City": "Branchburg",
    "ClientId": 267,
    "Comments": "Here are some exciting comments!",
    "CompanyName": "Rest Test Lead",
    "CountryId": 1,
    "CountryName": "United States",
    "DateCreated": "/Date(1490708970760-0400)/",
    "DateDeleted": null,
    "DateLastModified": "/Date(1490708970760-0400)/",
    "EmailAddress": "john.doe@example.com",
    "FirstName": "John",
    "FormID": null,
    "Id": 83952,
    "InternationalAddress": null,
    "LastName": "Doe",
    "LeadSourceID": 320,
    "LeadType": null,
    "LeadTypeID": null,
    "PhoneNumber": "123-456-7890",
    "PostalCode": "08873",
    "PriorityID": 3,
    "PriorityName": "Medium",
    "SourceName": "Web",
    "StateAbbr": "NJ",
    "StateId": 35,
    "ThirdPartyID": null,
    "LocationID": 2448339,
    "StatusID": 1,
    "StatusName": "Referred"
  },
  {
    "Address1": "3121 US Hwy 22 East",
    "Address2": "",
    "Address3": "",
    "Address4": "",
    "City": "Branchburg",
    "ClientId": 267,
    "Comments": "Here are some exciting comments!",
    "CompanyName": "Rest Test Lead",
    "CountryId": 1,
    "CountryName": "United States",
    "DateCreated": "/Date(1490708970760-0400)/",
    "DateDeleted": null,
    "DateLastModified": "/Date(1490708970760-0400)/",
    "EmailAddress": "john.doe@example.com",
    "FirstName": "John",
    "FormID": null,
    "Id": 83952,
    "InternationalAddress": null,
    "LastName": "Doe",
    "LeadSourceID": 320,
    "LeadType": null,
    "LeadTypeID": null,
    "PhoneNumber": "123-456-7890",
    "PostalCode": "08873",
    "PriorityID": 3,
    "PriorityName": "Medium",
    "SourceName": "Web",
    "StateAbbr": "NJ",
    "StateId": 35,
    "ThirdPartyID": null,
    "LocationID": 3708247,
    "StatusID": 1,
    "StatusName": "Referred"
  },
  {
    "Address1": "3121 US Hwy 22 East",
    "Address2": "",
    "Address3": "",
    "Address4": "",
    "City": "Branchburg",
    "ClientId": 267,
    "Comments": "Here are some exciting comments!",
    "CompanyName": "Rest Test Lead",
    "CountryId": 1,
    "CountryName": "United States",
    "DateCreated": "/Date(1490708970760-0400)/",
    "DateDeleted": null,
    "DateLastModified": "/Date(1490708970760-0400)/",
    "EmailAddress": "john.doe@example.com",
    "FirstName": "John",
    "FormID": null,
    "Id": 83952,
    "InternationalAddress": null,
    "LastName": "Doe",
    "LeadSourceID": 320,
    "LeadType": null,
    "LeadTypeID": null,
    "PhoneNumber": "123-456-7890",
    "PostalCode": "08873",
    "PriorityID": 3,
    "PriorityName": "Medium",
    "SourceName": "Web",
    "StateAbbr": "NJ",
    "StateId": 35,
    "ThirdPartyID": null,
    "LocationID": 4798353,
    "StatusID": 1,
    "StatusName": "Referred"
  }
]
Suggest Edits

RestEventSearchResults Object

 

This is returned by the EventSearch() call.

Type
Name
Description

Int

TotalResults

Total # of results for the search.
A negative value in this field indicates an error condition.

ResultList

The subset of results requested, given StartIndex and PageSize.

String

ErrorMessage

The message passed back if an error occurs.

Suggest Edits

RestEventJson Object

 

Represents an event along with its associated locations.

Type
Name
Description

Int

EventId

Bullseye event ID

String

EventTitle

The title of an event

String

EventImageURL

Relative URL of an uploaded image

String

EventDescription

Description of an event

String

OrganizerName

Name of event organaizer

String

OrganizerDescription

Description of an event organizer

DateTime

StartDate

Date when event starts

Nullable DateTime

EndDate

Date when event ends

TimeSpan

StartTime

Time when event starts

Nullable TimeSpan

EndTime

Time when event ends

String

RegistrationURL

URL to register for the event

String

FacebookURL

URL for the event Facebook account

String

TwitterURL

URL for the event Twitter account

String

ThirdPartyID

Third-party ID assigned by the account.

String

ContactEmailAddress

Boolean

Registration

Flag indicating that participants need to register for the event.

EventLocations

List of locations where the event is being held.

Suggest Edits

EventSearch

This method will return a list of events given the search criteria. This call wraps the returned list in a structure that includes the total number of results.

Return Value: RestEventSearchResults

 
gethttps://ws.bullseyelocations.com/RestEventSearch.svc/EventSearch

Query Params

ClientID
int32
required
ApiKey
string
required
PostalCode
string

Required if you specify city and state

City
string

Required if you specify postal code and state

State
string

2-alpha state code. Required if you specify city and postal code

CountryID
int32
required

set to 1 for US and 2 for Canada.

Latitude
string

Required if you specify Longitude. If you specify a latitude/longitude pair, a radius search will be performed.

Longitude
string

Required if you specify Longitude. If you specify a latitude/longitude pair, a radius search will be performed.

CategoryIds
string

You can specify a comma-delimited list of categories, to limit your search to those categories.

Radius
int32
required

Specify Radius in miles. Retrieves all events that fall within the distance defined by the Radius parameter. For the US and the UK, the value of the Radius parameter is interpreted in miles; in all other countries it is considered kilometers. A starting point needs to be defined through a combination of the City, State, PostalCode, Latitude and Longitude parameters.

StartIndex
int32
required

Results should be retrieved one page at a time. To retrieve the first 25 results, specify StartIndex = 0 and PageSize = 25. To retrieve the next 25 results, specify StartIndex=25, PageSize=25.

PageSize
int32
required

Results should be retrieved one page at a time. To retrieve the first 25 results, specify StartIndex = 0 and PageSize = 25. To retrieve the next 25 results, specify StartIndex=25, PageSize=25.

StartDate
string

StartDate and EndDate allow you to filter the returned events by date range. Either one or the other or both may be specified.

EndDate
string

StartDate and EndDate allow you to filter the returned events by date range. Either one or the other or both may be specified.

SearchTypeOverride
int32
CountryScope
string

Used to access all events regardless of what country they are in.

MatchAllCategories
boolean

This parameter is automatically set to false, but when overridden to true will require that any result be assigned to all categories passed in.

FindNearestForNoResults
boolean

Setting this parameter to "True" will return the single nearest result regardless of the specified radius.

Summary:
This method will return a list of events given the search criteria. This call wraps the returned list in a structure that includes the total number of results.

Specify postal code, city and state (2-alpha state code), or latitude/longitude (degrees). If you specify alatitude/longitude pair, a radius search will be performed. If you specify postal code or city/state, your configured search type will be used.

You can specify a comma-delimited list of categories, to limit your search to those categories.

Specify Radius in miles.

StartDate and EndDate allow you to filter the returned events by date range. Either one or the other or both may be specified.

Results should be retrieved one page at a time. To retrieve the first 25 results, specify StartIndex = 0 and PageSize = 25. To retrieve the next 25 results, specify StartIndex=25, PageSize=25.

CountryID should be set to 1 for US and 2 for Canada. For other country ID's, you can check the result of the GetCountryList method.

The optional parameter SearchTypeOverride can be used to change the inherent search type for a particular country. The inherent Search Type refers to the Search Rules configured for a country on the Bullseye admin site. For example, if the search type for Australia is set to Radius Search, setting the SearchTypeOverride to the value for Country Search will result in all Australian events being returned. The defined search types are:

Radius: 1 - Retrieves all eventsthat fall within the distance defined by the Radius parameter. For the US and the UK, the value of the Radius parameter is interpreted in miles; in all other countries it is considered kilometers. A starting point needs to be defined through a combination of the City, State, PostalCode, Latitude and Longitude parameters.
Country: 4 - Retrieves all eventsthat fall within the country defined by the CountryId parameter.
An example of when to use the SearchTypeOverride parameter is if no results are returned for a country configured for Radius Search. The fallback for that situation would be to have a second call with SearchTypeOverride set to Country that would return all locations for that country.

The optional parameter CountryScope is used to access all events regardless of what country they are in.The locations can be filtered by Category if that parameter have been provided.

For search requests which require events to match all of the categories input, the MatchAllCategories optional parameter can be used. This parameter is automatically set to false, but when overridden to true will require that any result be assigned to all categories passed in.

	var mydata = {
	  ClientID: 999,
	  ApiKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
	  //PostalCode: "08876",
	  City: "Somerset", State: "NJ", CountryID: 1,
	  //Latitude: 40.54374, Longitude: -74.66004,
	  StartDate: "08/01/2016", EndDate: "09/01/2016",
	  //SearchTypeOverride: 1, CountryScope: "All", MaxResults: 25, 
	  //MatchAllCategories: true,
	  CategoryIds: "1,2,3",
	  Radius: 5,
	  StartIndex: 0, PageSize: 25
	};
	$.ajax( {
	  url: "http://ws.bullseyelocations.com/RestEventSearch.svc/EventSearch",
	  data: mydata,
	  type: "GET",
	  processData: true,
	  timeout: 10000,
	  dataType: "json",
	  success:
		function(data, status, xhr) {
			console.log(data);
			console.log(status);
			$("div#results").text(data.TotalResults + 
			  " total results. " + 
			  data.ResultList.length + 
			  " elements returned in ResultList.");
		} ,
	  error:
		function(xhr, status, ex) {
			console.log("ERROR: "+status);
		}
	} );
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to search events
$args = array(
  'City' => 'Somerset',
  'State' => 'NJ',
  'CountryID' => 1,
  'Radius' => 30,
  'CategoryIds' => "1,2,3",
);
$response = $bullseye->eventSearch($args);
//4. Check response
if(false != $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

{
  "ErrorMessage": null,
  "ResultList": [
    {
      "ContactEmailAddress": "",
      "Distance": 24,
      "EndDate": "/Date(1491969600000-0400)/",
      "EndTime": "PT13H",
      "EventDescription": "test",
      "EventId": 3432,
      "EventImageURL": "~/Resources/267/topgolf-tripadvisor.png",
      "EventLocations": [
        {
          "Active": null,
          "Address1": "554 E. Hill Rd",
          "Address2": null,
          "Address3": null,
          "Address4": null,
          "Attributes": null,
          "BusinessHours": null,
          "BusinessHoursFmtd": null,
          "Categories": null,
          "City": "Califon",
          "ClientId": null,
          "ContactName": null,
          "ContactPosition": null,
          "ContactURL": null,
          "CountryId": null,
          "CountryName": null,
          "Coupons": null,
          "DailyHoursList": null,
          "DateCreated": null,
          "DateDeleted": null,
          "DateLastGeoCoded": null,
          "DateLastModified": null,
          "EmailAddress": null,
          "Events": null,
          "FacebookPageId": null,
          "FaxNumber": null,
          "GeoCodeStatusId": 2,
          "Id": 3706083,
          "ImageFileUrl": null,
          "InternationalAddress": null,
          "InternetLocation": null,
          "LMServiceID": false,
          "Latitude": 40.720184,
          "LocationTypeIconURL": null,
          "LocationTypeId": null,
          "LocationTypeName": null,
          "Longitude": -74.8857,
          "MemberId": null,
          "MobileNumber": null,
          "Name": "Joshua Rich",
          "Password": null,
          "PhoneNumber": null,
          "PostCode": "07830",
          "RepFullName": null,
          "RepId": null,
          "ResponsivenessId": null,
          "ResponsivenessName": null,
          "RestAttributes": null,
          "RestHolidayHours": null,
          "RestLocationImage": [
            {
              "DateCreated": "/Date(1446576536327-0500)/",
              "DateLastModified": "/Date(1446576536327-0500)/",
              "ID": 83,
              "ImageFileUrl": "~/Resources/267/3706083/music_store_pos.jpg",
              "LocationID": 0
            },
            {
              "DateCreated": "/Date(1446576536327-0500)/",
              "DateLastModified": "/Date(1446576536327-0500)/",
              "ID": 84,
              "ImageFileUrl": "~/Resources/267/3706083/Showroom.jpg",
              "LocationID": 0
            },
            {
              "DateCreated": "/Date(1446576536327-0500)/",
              "DateLastModified": "/Date(1446576536327-0500)/",
              "ID": 85,
              "ImageFileUrl": "~/Resources/267/3706083/store_front.jpg",
              "LocationID": 0
            }
          ],
          "RestLocationSEO": {
            "DateCreated": "/Date(1446576229857-0500)/",
            "DateLastModified": "/Date(1446576229857-0500)/",
            "ID": 6,
            "LocationID": 0,
            "MetaDescription": "Joshua's excellent page. ",
            "SEOTitle": "Joshua Page"
          },
          "RestLocationSocialMedia": {
            "DateCreated": "/Date(1410903443600-0400)/",
            "DateLastModified": "/Date(1488319844927-0500)/",
            "FacebookURL": null,
            "GooglePlusURL": "",
            "ID": 19,
            "LinkedInURL": "",
            "LocationID": 0,
            "PinterestURL": "",
            "TwitterURL": "BllsyeLocations",
            "YelpURL": ""
          },
          "RestLocationSocialMediaLinks": {
            "DateCreated": "/Date(1410903443600-0400)/",
            "DateLastModified": "/Date(1488319844927-0500)/",
            "FacebookURL": null,
            "GooglePlusURL": "",
            "ID": 19,
            "LinkedInURL": "",
            "LocationID": 0,
            "PinterestURL": "",
            "TwitterURL": "BllsyeLocations",
            "YelpURL": ""
          },
          "Services": null,
          "StateAbbr": "NJ",
          "StateId": null,
          "Territories": null,
          "ThirdPartyId": null,
          "URL": null,
          "UserName": null
        }
      ],
      "EventTitle": "Big Demo Event",
      "FacebookURL": "bullseyestorelocator",
      "LocationId": 0,
      "OrganizerDescription": "test",
      "OrganizerName": "Joshua",
      "Registration": true,
      "RegistrationURL": "http://www.google.com",
      "StartDate": "/Date(1491969600000-0400)/",
      "StartTime": "PT9H30M",
      "ThirdPartyID": "",
      "TwitterURL": "bulls3y"
    }
  ],
  "TotalResults": 1
}
Suggest Edits

GetCategories

This method will return a list of RestCategory objects which will contain all the categories that have been defined for events for a given client.

Return Value: RestCategory

 
gethttps://ws.bullseyelocations.com/RestSearch.svc/GetCategories

Query Params

ClientId
int32
required
ApiKey
string
required
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get event categories
$response = $bullseye->getEventCategories();
//4. Check response
if(false != $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

[
  {
    "CategoryData": "",
    "CategoryId": 1407,
    "CategoryName": "All Instruments",
    "Depth": 0,
    "Lineage": "|",
    "ParentCategoryId": null,
    "ThirdPartyId": ""
  },
  {
    "CategoryData": "",
    "CategoryId": 1408,
    "CategoryName": "Accordion",
    "Depth": 0,
    "Lineage": "|",
    "ParentCategoryId": null,
    "ThirdPartyId": ""
  },
  {
    "CategoryData": "",
    "CategoryId": 1409,
    "CategoryName": "Autoharp",
    "Depth": 0,
    "Lineage": "|",
    "ParentCategoryId": null,
    "ThirdPartyId": ""
  }
  ]
Suggest Edits

UserResult

 

Several calls use this class to pass back a member ID and/or error information.

Type
Name
Description

Int

memberId

Bullseye internal member ID

String

errorMsg

Error message. Empty if successful.

Suggest Edits

RestMember Object

 

Represents a user in our system.

Type
Name
Description

Int

Id

Bullseye internal member ID

String

UserName

User name (e-mail address)

String

Password

User password

String

RoleName

User role

Int (nullable)

RelatedId

Bullseye ID for related field (e.g. location id)

Suggest Edits

ChangePassword

This method allows you to change a user’s password.

Return Value: UserResult

 
posthttps://ws.bullseyelocations.com/RestUser.svc/ChangePassword

Query Params

ClientId
int32
required
ApiKey
string
required
userName
string
newPassword
string

Exception conditions:
Here are the member ID values related to this method:

-1: invalid credentials (API key and/or client ID)
-2: missing field (username or password)
-3: cannot find user
-5: exception while performing operation (see errorMsg for details)

$myUrl = "http://ws.bullseyelocations.com/RestUser.svc/ChangePassword";
 
	$myData = json_encode(array(
		'ClientId' => 999,
		'ApiKey' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
		'userName' => 'user@client.com',
		'newPassword' => 'thisIsMyNewPassword'
		));
// remainder of example is similar to CreateUser.
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to change password
$response = $bullseye->changePassword('test@test.com', '1234567');
//4. Check response
if(false != $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

Try the API to see results
Suggest Edits

ChangeActiveStatus

This method allows you to set a user to inactive status, or back from inactive to active.

Return Value: UserResult

 
posthttps://ws.bullseyelocations.com/RestUser.svc/ChangeActiveStatus

Query Params

ClientId
int32
required
ApiKey
string
required
userName
string
required
activeStatus
boolean

Exception conditions:
Here are the member ID values related to this method:

-1: invalid credentials (API key and/or client ID)
-2: missing field (username)
-3: cannot find user
-5: exception while performing operation (see errorMsg for details)

$myUrl = "http://ws.bullseyelocations.com/RestUser.svc/ChangeActiveStatus";
 
	$myData = json_encode(array(
		'ClientId' => 999,
		'ApiKey' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
		'oldUserName' => 'user@client.com',
		'activeStatus' => 'false'
		));
// remainder of example is similar to CreateUser.
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to change active status
$response = $bullseye->changeActiveStatus('test@test.com', true);
//4. Check response
if(false != $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

Try the API to see results
Suggest Edits

GetUser

This method retrieves user information, given a user name or member ID.

Return Value: RestMember

 
gethttps://ws.bullseyelocations.com/RestUser.svc/GetUser

Query Params

ClientId
int32
required
ApiKey
string
required
memberKey
string

Exception conditions:

  • If the member key is missing, the call will return HTTP status code 400, bad request.
  • If the user cannot be found, or if you attempt to retrieve a user for a client ID other than your own, the call will return HTTP status code 404, not found.
  • An unexpected exception will return HTTP status code 500, internal server error.
<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to get user
$memberKey = 65964;
$response = $bullseye->getUser($memberKey);
//4. Check response
if(false != $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

Try the API to see results
Suggest Edits

CreateUser

This method allows you to create a new user, assign that user to a role, and set the appropriate related ID field.

Return Value: UserResult

 
posthttps://ws.bullseyelocations.com/RestUser.svc/CreateUser

Query Params

ClientId
int32
required
ApiKey
string
required
newUserName
string
newPassword
string
newUserRole
string
relatedId
int32

Note that you can create a location user with this call, but not a location admin user. You need to create a location admin user either while you are first adding the location, or, after the fact, through a location update call.

Exception conditions:
This call, and the other POST calls, will set the member ID in the UserResult structure to a negative number on failure. Here are the values related to this method:

-1: invalid credentials (API key and/or client ID)
-2: missing field (username, password, or role)
-3: related ID missing or invalid
-4: invalid role
-5: exception while creating user (see errorMsg for details)

<?php
//1. Include Bullseye library
require_once '../../Bullseye.php';
//2. Create Bullseye object
$clientId = 5786;
$searchKey = null; //'cf623cdf-1090-43ba-8b0f-9fa67fcf9d57';
$adminKey = 'aa4c7e55-9d0b-4a97-b62e-c95efec4285e';
$useStagingServer = true;
$bullseye = new Bullseye\Bullseye($clientId, $searchKey, $adminKey, $useStagingServer);
//2.1 activate debug mode
//$bullseye->debug(true);
//3. Call method to create user
$username = "test-user";
$password = "123456";
$role = "dealeruser";
$relatedId = 12345;
$response = $bullseye->createUser($username, $password, $role, $relatedId);
//4. Check response
if(false != $response)
  print_r($response);
else{
  //if location was not found
  print_r($bullseye->getLastError());
}
A binary file was returned

You couldn't be authenticated

Try the API to see results