Difference between revisions of "Clients"
(→The Extra Object) |
(→DElete a Client) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 81: | Line 81: | ||
|optional | |optional | ||
|The business fax number. | |The business fax number. | ||
+ | |||
|- | |- | ||
|phoneAlt | |phoneAlt | ||
Line 87: | Line 88: | ||
|optional | |optional | ||
|The business additional phone number. | |The business additional phone number. | ||
+ | |||
+ | |- | ||
+ | |phoneMobile | ||
+ | |string | ||
+ | |32 | ||
+ | |optional | ||
+ | |The business mobile phone number. | ||
+ | |||
|- | |- | ||
|website | |website | ||
Line 93: | Line 102: | ||
|optional | |optional | ||
|The business website. | |The business website. | ||
+ | |||
+ | |- | ||
+ | |urlYoutube | ||
+ | |string | ||
+ | |64 | ||
+ | |optional | ||
+ | |The url to Youtube Channel. | ||
+ | |||
+ | |- | ||
+ | |urlInstagram | ||
+ | |string | ||
+ | |64 | ||
+ | |optional | ||
+ | |The url to Instagram account. | ||
+ | |||
+ | |- | ||
+ | |urlYelp | ||
+ | |string | ||
+ | |64 | ||
+ | |optional | ||
+ | |The url to Yelp listing. | ||
+ | |||
|- | |- | ||
|years | |years | ||
Line 271: | Line 302: | ||
|string | |string | ||
| | | | ||
− | | | + | |optional |
|The client location latitude. | |The client location latitude. | ||
|- | |- | ||
Line 277: | Line 308: | ||
|string | |string | ||
| | | | ||
− | | | + | |optional |
|The client location longitude. | |The client location longitude. | ||
|- | |- | ||
Line 881: | Line 912: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | == | + | == Delete a Client == |
− | + | Deletes a client and subsequently disables any active products associated with the client. | |
− | + | === API Endpoint === | |
− | === API Endpoint === | ||
<syntaxhighlight lang="html"> | <syntaxhighlight lang="html"> | ||
− | http://p.lssdev.com/legacyclients/{client_id} | + | http://p.lssdev.com/legacyclients/{client_id} |
</syntaxhighlight> | </syntaxhighlight> | ||
=== Example Request === | === Example Request === | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
− | + | DELETE /legacyclients/3201926 HTTP/1.1 | |
Host: p.lssdev.com | Host: p.lssdev.com | ||
x-api-token: YOUR_API_KEY | x-api-token: YOUR_API_KEY | ||
Line 903: | Line 933: | ||
"success": true, | "success": true, | ||
"error": null, | "error": null, | ||
− | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | == Getting SSO Url == | |
− | == | + | This endpoint retrieves an SSL-secured URL for any client in a partner dashboard that can be view report/progress information without logging in. |
− | This endpoint | ||
=== API Endpoint === | === API Endpoint === | ||
<syntaxhighlight lang="html"> | <syntaxhighlight lang="html"> | ||
− | http://p.lssdev.com/legacyclients/{client_id}/ | + | http://p.lssdev.com/legacyclients/{client_id}/sso |
</syntaxhighlight> | </syntaxhighlight> | ||
=== Example Request === | === Example Request === | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
− | GET /legacyclients/3201926/ | + | GET /legacyclients/3201926/sso HTTP/1.1 |
Host: p.lssdev.com | Host: p.lssdev.com | ||
x-api-token: YOUR_API_KEY | x-api-token: YOUR_API_KEY | ||
Line 930: | Line 958: | ||
"success": true, | "success": true, | ||
"error": null, | "error": null, | ||
− | "data": "https:// | + | "data": "https://mysite.advicelocal.com/?page=site/clients/monthly-progress&client_id=3201926&lss_token=c1c55a63" |
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | == | + | == Getting Permanent Client Url == |
− | + | This endpoint retrieves an SSL-secured URL for any client in a partner dashboard that can be view report/progress information without logging in and is permanent and does not expire | |
+ | |||
=== API Endpoint === | === API Endpoint === | ||
<syntaxhighlight lang="html"> | <syntaxhighlight lang="html"> | ||
− | http://p.lssdev.com/legacyclients | + | http://p.lssdev.com/legacyclients/{client_id}/url |
</syntaxhighlight> | </syntaxhighlight> | ||
=== Example Request === | === Example Request === | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
− | GET /legacyclients HTTP/1.1 | + | GET /legacyclients/3201926/url HTTP/1.1 |
Host: p.lssdev.com | Host: p.lssdev.com | ||
x-api-token: YOUR_API_KEY | x-api-token: YOUR_API_KEY | ||
Content-Type: application/json | Content-Type: application/json | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | === Example Request with Parameters === | + | |
− | See Parameters list below. | + | === Example Response === |
− | <syntaxhighlight lang="php"> | + | <syntaxhighlight lang="json"> |
− | GET /legacyclients?limit=30 HTTP/1.1 | + | { |
− | Host: p.lssdev.com | + | "status": 200, |
− | x-api-token: YOUR_API_KEY | + | "success": true, |
− | Content-Type: application/json | + | "error": null, |
− | Cache-Control: no-cache | + | "data": "https://mysite.advicelocal.com/?page=site/clients/monthly-progress&client_id=3201926&client_token=c1c55a63" |
− | </syntaxhighlight> | + | } |
− | + | </syntaxhighlight> | |
− | === Example Response === | + | |
− | <syntaxhighlight lang="json"> | + | == Generate Report PDF == |
− | { | + | This endpoint will generate a PDF for the baseline or progress report for a specified location. Keep in mind that the reports can take up to 120 seconds to refresh/render. |
− | "status": 200, | + | |
− | "success": true, | + | === API Endpoint === |
− | "error": null, | + | <syntaxhighlight lang="html"> |
− | "data": [ | + | http://p.lssdev.com/legacyclients/{client_id}/pdf |
+ | </syntaxhighlight> | ||
+ | |||
+ | === Example Request === | ||
+ | <syntaxhighlight lang="php"> | ||
+ | GET /legacyclients/3201926/pdf HTTP/1.1 | ||
+ | Host: p.lssdev.com | ||
+ | x-api-token: YOUR_API_KEY | ||
+ | Content-Type: application/json | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Example Response === | ||
+ | <syntaxhighlight lang="json"> | ||
+ | { | ||
+ | "status": 200, | ||
+ | "success": true, | ||
+ | "error": null, | ||
+ | "data": "https://s3.amazonaws.com/p.assets.lssdev.com/pdfreports/276ce0cd2bc56b39f29de5f33a05d825.pdf" | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==Get all Clients== | ||
+ | Returns a list of your clients. | ||
+ | === API Endpoint === | ||
+ | <syntaxhighlight lang="html"> | ||
+ | http://p.lssdev.com/legacyclients | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Example Request === | ||
+ | <syntaxhighlight lang="php"> | ||
+ | GET /legacyclients HTTP/1.1 | ||
+ | Host: p.lssdev.com | ||
+ | x-api-token: YOUR_API_KEY | ||
+ | Content-Type: application/json | ||
+ | </syntaxhighlight> | ||
+ | === Example Request with Parameters === | ||
+ | See Parameters list below. | ||
+ | <syntaxhighlight lang="php"> | ||
+ | GET /legacyclients?limit=30 HTTP/1.1 | ||
+ | Host: p.lssdev.com | ||
+ | x-api-token: YOUR_API_KEY | ||
+ | Content-Type: application/json | ||
+ | Cache-Control: no-cache | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Example Response === | ||
+ | <syntaxhighlight lang="json"> | ||
+ | { | ||
+ | "status": 200, | ||
+ | "success": true, | ||
+ | "error": null, | ||
+ | "data": [ | ||
+ | { | ||
+ | "partner": 7, | ||
+ | "gmb_token": null, | ||
+ | "id": 12345, | ||
+ | "suite": null, | ||
+ | "deleted": "true", | ||
+ | "LAT": 0, | ||
+ | "LON": 0, | ||
+ | "status": "Paused", | ||
+ | "country": "US", | ||
+ | "orders": 0, | ||
+ | "extra": "", | ||
+ | "name": "", | ||
+ | "owner": "", | ||
+ | "partnerUsername": "dev@lssdev.com", | ||
+ | "street": "2060 Broadway St", | ||
+ | "hours": "", | ||
+ | "city": "Boulder", | ||
+ | "state": "CO", | ||
+ | "zipcode": "80302", | ||
+ | "phone": "(303) 444-8840", | ||
+ | "phoneAlt": "", | ||
+ | "fax": "", | ||
+ | "website": "http://www.danday.com/?cmpid=loc3", | ||
+ | "email": "", | ||
+ | "facebook": "", | ||
+ | "twitter": "", | ||
+ | "linkedin": "", | ||
+ | "years": "", | ||
+ | "description": "", | ||
+ | "payment": "", | ||
+ | "services": "", | ||
+ | "license": "", | ||
+ | "keyword1": "", | ||
+ | "keyword2": "", | ||
+ | "keyword3": "", | ||
+ | "keyword4": "", | ||
+ | "keyword5": "", | ||
+ | "keyword1_location": null, | ||
+ | "keyword2_location": null, | ||
+ | "keyword3_location": null, | ||
+ | "keyword4_location": null, | ||
+ | "keyword5_location": null, | ||
+ | "notes": "", | ||
+ | "hide": "false", | ||
+ | "isInactive": true, | ||
+ | "createdAt": "2014-03-25T11:24:15.000Z", | ||
+ | "deletedAt": "2015-02-17T17:48:43.000Z", | ||
+ | "inactiveAt": null, | ||
+ | "custom1": "", | ||
+ | "custom2": "", | ||
+ | "custom3": "", | ||
+ | "custom4": "", | ||
+ | "custom5": "", | ||
+ | "publicKey": "cb7e1c2ca63629c169f5937be15066c6", | ||
+ | "tokenGoogle": null, | ||
+ | "categoryGoogle": "" | ||
+ | }, | ||
{ | { | ||
"partner": 7, | "partner": 7, | ||
"gmb_token": null, | "gmb_token": null, | ||
− | "id": | + | "id": 67890, |
"suite": null, | "suite": null, | ||
"deleted": "true", | "deleted": "true", | ||
Line 977: | Line 1,115: | ||
"orders": 0, | "orders": 0, | ||
"extra": "", | "extra": "", | ||
− | "name": "", | + | "name": "Crosswind Advisors", |
− | "owner": "", | + | "owner": "Kurt Wanner", |
"partnerUsername": "dev@lssdev.com", | "partnerUsername": "dev@lssdev.com", | ||
− | "street": " | + | "street": "19125 N Creek Pkwy, Suite 120", |
"hours": "", | "hours": "", | ||
− | "city": " | + | "city": "Bothell", |
− | "state": " | + | "state": "WA", |
− | "zipcode": " | + | "zipcode": "098011", |
− | "phone": "( | + | "phone": "(425) 349-2527", |
"phoneAlt": "", | "phoneAlt": "", | ||
− | "fax": "", | + | "fax": "(425) 645-7870", |
− | "website": " | + | "website": "www.crosswindadvisors.com", |
− | "email": "", | + | "email": "kurt@crosswindadvisors.com", |
"facebook": "", | "facebook": "", | ||
"twitter": "", | "twitter": "", | ||
Line 1,011: | Line 1,149: | ||
"hide": "false", | "hide": "false", | ||
"isInactive": true, | "isInactive": true, | ||
− | "createdAt": "2014- | + | "createdAt": "2014-04-21T18:44:29.000Z", |
"deletedAt": "2015-02-17T17:48:43.000Z", | "deletedAt": "2015-02-17T17:48:43.000Z", | ||
"inactiveAt": null, | "inactiveAt": null, | ||
Line 1,019: | Line 1,157: | ||
"custom4": "", | "custom4": "", | ||
"custom5": "", | "custom5": "", | ||
− | "publicKey": " | + | "publicKey": "f114082b24a58fd061f9f96b277a40f5", |
"tokenGoogle": null, | "tokenGoogle": null, | ||
"categoryGoogle": "" | "categoryGoogle": "" | ||
}, | }, | ||
− | { | + | {...}, |
− | + | {...} | |
− | + | ], | |
− | + | "total": 20 | |
− | + | } | |
− | + | </syntaxhighlight> | |
− | + | === Parameters === | |
− | + | {| class="wikitable" | |
− | + | ! scope="col"| Parameter | |
− | + | ! scope="col"| Value | |
− | + | ! scope="col"| Description | |
− | + | ! scope="col"| Parameter Type | |
− | + | ! scope="col"| Data Type | |
− | + | |- | |
− | + | |where | |
− | + | |(empty) | |
− | + | |JSON encode WHERE criteria objects. Example: where={"name":{"contains":"theodore"}} | |
− | + | |query | |
− | + | |string | |
− | + | |- | |
− | + | |limit | |
− | + | |20 | |
− | + | |The maximum number of records to send back. Example: limit=100 | |
− | + | |query | |
− | + | |integer | |
− | + | |- | |
− | + | |skip | |
− | + | |0 | |
− | + | |The number of records to skip. Example: skip=30 | |
− | + | |query | |
− | + | |integer | |
− | + | |- | |
− | + | |sort | |
− | + | |id ASC | |
− | + | |The sort order. Example: sort=lastName%20ASC | |
− | + | |query | |
− | + | |string | |
− | + | |- | |
− | + | |callback | |
− | + | |(empty) | |
− | + | |If specified, a JSONP response will be sent (instead of JSON). This is the name of a client-side javascript function to call, to which results will be passed as the first (and only) argument. Example: ?callback=my_JSONP_data_receiver_fn | |
− | + | |query | |
− | + | |string | |
− | + | |- | |
− | + | |businessName | |
− | + | |(empty) | |
− | + | | | |
− | + | |query | |
− | + | |string | |
− | + | |- | |
− | + | |city | |
− | + | |(empty) | |
− | + | | | |
− | + | |query | |
− | + | |string | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | |street1 |
|(empty) | |(empty) | ||
− | | | + | | |
|query | |query | ||
|string | |string | ||
|- | |- | ||
− | | | + | |street2 |
− | | | + | |(empty) |
− | | | + | | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|query | |query | ||
|string | |string | ||
|- | |- | ||
− | | | + | |state |
|(empty) | |(empty) | ||
− | | | + | | |
|query | |query | ||
|string | |string | ||
|- | |- | ||
− | | | + | |postal |
|(empty) | |(empty) | ||
| | | | ||
Line 1,131: | Line 1,241: | ||
|string | |string | ||
|- | |- | ||
− | | | + | |country |
− | |( | + | |US (default), GB, CA, AU, DE, or NZ |
| | | | ||
|query | |query | ||
|string | |string | ||
|- | |- | ||
− | | | + | |website |
|(empty) | |(empty) | ||
| | | | ||
Line 1,143: | Line 1,253: | ||
|string | |string | ||
|- | |- | ||
− | | | + | |hours |
|(empty) | |(empty) | ||
| | | | ||
Line 1,149: | Line 1,259: | ||
|string | |string | ||
|- | |- | ||
− | + | |description | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |description | ||
|(empty) | |(empty) | ||
| | | | ||
Line 1,664: | Line 1,744: | ||
== Health Care Vertical Information == | == Health Care Vertical Information == | ||
The information needed to submit to a verticals package is within the "extra" json property of the client. When updating this property, be sure to APPEND any additional properties to the object before saving, otherwise you will lose information related to other features such as Google Business. | The information needed to submit to a verticals package is within the "extra" json property of the client. When updating this property, be sure to APPEND any additional properties to the object before saving, otherwise you will lose information related to other features such as Google Business. | ||
+ | |||
+ | <syntaxhighlight lang="php"> | ||
POST /legacyclients/3201926 HTTP/1.1 | POST /legacyclients/3201926 HTTP/1.1 | ||
Line 1,676: | Line 1,758: | ||
"updateAt": 1718040420413, | "updateAt": 1718040420413, | ||
"data": { | "data": { | ||
− | "conditions_treated": " | + | "conditions_treated": "we treat these issues", |
− | "insurance_accepted": " | + | "insurance_accepted": "our providers", |
"license_number": "License", | "license_number": "License", | ||
"procedures_performed": "Performed", | "procedures_performed": "Performed", | ||
Line 1,693: | Line 1,775: | ||
} | } | ||
} | } | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | == Legal Vertical Information == | ||
+ | The information needed to submit to a verticals package is within the "extra" json property of the client. When updating this property, be sure to APPEND any additional properties to the object before saving, otherwise you will lose information related to other features such as Google Business. | ||
+ | |||
+ | <syntaxhighlight lang="php"> | ||
+ | |||
+ | POST /legacyclients/3201926 HTTP/1.1 | ||
+ | Host: p.lssdev.com | ||
+ | x-api-token: YOUR_API_KEY | ||
+ | Content-Type: application/json | ||
+ | |||
+ | { | ||
+ | "extra": { | ||
+ | "verticals": { | ||
+ | "4136": { | ||
+ | "updateAt": 1718059904266, | ||
+ | "data": { | ||
+ | "state_licensed_in": "Texas", | ||
+ | "specific_practices": "legal", | ||
+ | "year_license_received": "2002" | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </syntaxhighlight> | ||
== Voice Data Specs == | == Voice Data Specs == |
Latest revision as of 08:03, 17 October 2024
Contents
- 1 The Client Object
- 2 Create a Client
- 3 Get a Client
- 4 Delete a Client
- 5 Getting SSO Url
- 6 Getting Permanent Client Url
- 7 Generate Report PDF
- 8 Get all Clients
- 9 Update a Client
- 10 Client Images
- 11 The Extra Object
- 11.1 Example Stored Data
- 11.2 Health Care Vertical Information
- 11.3 Legal Vertical Information
- 11.4 Voice Data Specs
- 11.5 Extra GMB props
The Client Object
The client object represents a business entity. The API allows you to create, update, and delete your clients. You can upload images and order products with a client object.
IMPORTANT - We only support printable ASCII. All unicode characters will be stripped out.
Attribute | Type | Length | Required | Description | |
---|---|---|---|---|---|
id | integer | Unique identifier for the object. | |||
name | string | 128 | required | The busniess name. | |
street | string | 128 | required | The business street. | |
suite | string | 32 | optional | The business suite. | |
city | string | 128 | required | The business city. | |
state | string | 64 | required | The business state. | |
zipcode | string | 32 | required | The business zipcode. | |
country | string | 128 | optional | The business country. | |
owner | string | 128 | optional | The business owner's name. | |
string | 128 | optional | The business email address. | ||
phone | string | 32 | required | The business phone number. | |
fax | string | 32 | optional | The business fax number. | |
phoneAlt | string | 32 | optional | The business additional phone number. | |
phoneMobile | string | 32 | optional | The business mobile phone number. | |
website | string | 255 | optional | The business website. | |
urlYoutube | string | 64 | optional | The url to Youtube Channel. | |
urlInstagram | string | 64 | optional | The url to Instagram account. | |
urlYelp | string | 64 | optional | The url to Yelp listing. | |
years | integer | 4 | optional | Number of years in business. | |
license | string | 64 | optional | The business license. | |
payment | string | 255 | optional | Payment types accepted by the business. | |
services | string | 255 | optional | Services offered by the business. | |
description | string | arbitrary | required | The business description. | |
hoursObject | json | arbitrary | optional | The business hours in structured format. See "Field Restrictions" below. | |
hoursSpecialObject | json | arbitrary | optional | The business special hours in structured format. See "Field Restrictions" below. | |
keyword1 | string | 64 | optional | The business keyword 1. | |
keyword2 | string | 64 | optional | The business keyword 2. | |
keyword3 | string | 64 | optional | The business keyword 3. | |
keyword4 | string | 64 | optional | The business keyword 4. | |
keyword5 | string | 64 | optional | The business keyword 5. | |
keyword1_location | string | 128 | optional | The business keyword1 location. | |
keyword2_location | string | 128 | optional | The business keyword2 location. | |
keyword3_location | string | 128 | optional | The business keyword3 location. | |
keyword4_location | string | 128 | optional | The business keyword4 location. | |
keyword5_location | string | 128 | optional | The business keyword5 location. | |
string | 255 | optional | The business facebook url. | ||
string | 255 | optional | The business twitter url. | ||
string | 255 | optional | The business linkedIn url. | ||
notes | string | arbitrary | optional | Internal notes about the business. | |
custom1 | string | 64 | optional | The custom1 is a internal field and replaces fkc1 in API Version 1. | |
custom2 | string | 64 | optional | The custom2 is a internal field and replaces fkc2 in API Version 1. | |
custom3 | string | 64 | optional | The custom3 is a internal field and replaces fkc3 in API Version 1. | |
custom4 | string | 64 | optional | The custom4 is a internal field and replaces fkc4 in API Version 1. | |
custom5 | string | 64 | optional | The custom5 is a internal field and replaces fkc5 in API Version 1. | |
extra | json | optional | Additional internal fields. Anything more than five custom fields (custom1, custom2, custom3, custom4, and custom5) can be saved in a json string. E.g. {"brands":"test","products":"test"}} | ||
categoryGoogle | string | 255 | optional | The category a client belong to. Only one category is allowed per client. List of categories: https://github.com/adviceinteractivegroup/taxonomy/blob/master/taxonomy.csv | |
hide | boolean | optional | Hide the client's address. | ||
LAT | string | optional | The client location latitude. | ||
LON | string | optional | The client location longitude. | ||
status | string | readonly | The client status (Active, Inactive, Paused, or Widget Lead). | ||
isInactive | boolean | readonly | Flag indicating whether the client is inactive. | ||
deleted | boolean | readonly | Flag indicating whether the client is deleted. | ||
partner | integer | readonly | Unique identifier for Advice Local partner. The partner can manages one or more clients. | ||
partnerUsername | string | readonly | The partner username is used to log into Advice Local Dashboard. | ||
publicKey | string | readonly | |||
gmb_token | string | readonly | |||
tokenGoogle | json | readonly | |||
createdAt | timestamp | readonly | Time at which the object was created. | ||
inactiveAt | timestamp | readonly | Time at which the object was inactive. | ||
deletedAt | timestamp | readonly | Time at which the object was deleted. | ||
transactionId | string | readonly | |||
gmb_account | string | readonly | GMB account ID, if it's set in conjunction with gmb_location the client/location is sync with a GMB location | ||
gmb_location | string | readonly | GMB account ID, if it's set in conjunction with gmb_account the client/location is sync with a GMB location |
Create a Client
Creates a new client object.
API Endpoint
http://p.lssdev.com/legacyclients
Field Restrictions
IMPORTANT - We only support printable ASCII. All unicode characters will be stripped out.
state
Please use the folowing codes for US states:
Name | Code |
---|---|
Alabama | AL |
Alaska | AK |
Arizona | AZ |
Arkansas | AR |
California | CA |
Colorado | CO |
Connecticut | CT |
Delaware | DE |
District Of Columbia | DC |
Florida | FL |
Georgia | GA |
Hawaii | HI |
Idaho | ID |
Illinois | IL |
Indiana | IN |
Iowa | IA |
Kansas | KS |
Kentucky | KY |
Louisiana | LA |
Maine | ME |
Maryland | MD |
Massachusetts | MA |
Michigan | MI |
Minnesota | MN |
Mississippi | MS |
Missouri | MO |
Montana | MT |
Nebraska | NE |
Nevada | NV |
New Hampshire | NH |
New Jersey | NJ |
New Mexico | NM |
New York | NY |
North Carolina | NC |
North Dakota | ND |
Ohio | OH |
Oklahoma | OK |
Oregon | OR |
Pennsylvania | PA |
Rhode Island | RI |
South Carolina | SC |
South Dakota | SD |
Tennessee | TN |
Texas | TX |
Utah | UT |
Vermont | VT |
Virginia | VA |
Washington | WA |
West Virginia | WV |
Wisconsin | WI |
Wyoming | WY |
Please use the folowing codes for CA provinces:
Name | Code |
---|---|
Alberta | AB |
British Columbia | BC |
Manitoba | MB |
New Brunswick | NB |
Newfoundland and Labrador | NL |
Northwest Territories | NT |
Nova Scotia | NS |
Nunavut | NU |
Ontario | ON |
Prince Edward Island | PE |
Quebec | QC |
Saskatchewan | SK |
Yukon | YT |
hours
[DEPRECATED] The time periods that this client is open for business. Client hours is in open format.
Monday 7:30am-4:30pm, Tuesday 7:30am-4:30pm, Wednesday 9:00am-6:00pm, Thursday 7:30am-4:30pm, Friday 7:30am-4:30pm, Saturday 12:15pm-1:30pm, Sunday Closed
hoursObject
The time periods that this client is open for business. Each open day can consist of one or several periods, as well as to be open 24 hours for said date.
Each period is a JSON object with the following structure:
{
"openDay": "",
"openTime": "",
"closeDay": "",
"closeTime": "",
}
In the following period, the client is open Monday from 9am to 5pm:
{
"openDay": "MONDAY",
"openTime": "09:00",
"closeDay": "MONDAY",
"closeTime": "17:00",
}
In the following period, the client is open 24 hours on Monday :
{
"openDay": "MONDAY",
"openTime": "00:00",
"closeDay": "MONDAY",
"closeTime": "23:59",
}
Client hoursObject must be submitted as a JSON object consisting in an array of periods. Here is the general format required:
{
"periods": [
{
"openDay": "MONDAY",
"openTime": "08:00",
"closeDay": "MONDAY",
"closeTime": "19:00",
},
{...},
{...},
]
}
In the following example, the client is open during these periods:
1. Monday from 8am to 7pm.
2. Tuesday from 8 am to 12pm and then again from 2pm to 7pm.
3. Wednesday is open 24 hours.
4. Thursday from 8am to 12pm and then again from 2pm to 10pm.
5. Friday from 8am to 10pm.
{
"periods": [
{
"openDay": "MONDAY",
"openTime": "08:00",
"closeDay": "MONDAY",
"closeTime": "19:00"
},
{
"openDay": "TUESDAY",
"openTime": "08:00",
"closeDay": "TUESDAY",
"closeTime": "12:00"
},
{
"openDay": "TUESDAY",
"openTime": "14:00",
"closeDay": "TUESDAY",
"closeTime": "19:00"
},
{
"openDay": "WEDNESDAY",
"openTime": "00:00",
"closeDay": "WEDNESDAY",
"closeTime": "00:00"
},
{
"openDay": "THURSDAY",
"openTime": "08:00",
"closeDay": "THURSDAY",
"closeTime": "12:00"
},
{
"openDay": "THURSDAY",
"openTime": "14:00",
"closeDay": "THURSDAY",
"closeTime": "22:00"
},
{
"openDay": "FRIDAY",
"openTime": "08:00",
"closeDay": "FRIDAY",
"closeTime": "22:00"
}
]
}
Take into consideration periods shouldn't overlap between each other.
Some directories don't support more than one period by day, in this case, the system will take the earliest open time and the latest close time, for example the following format...
{
"periods": [
{
"openDay": "MONDAY",
"openTime": "08:00",
"closeDay": "MONDAY",
"closeTime": "12:00",
},
{
"openDay": "MONDAY",
"openTime": "13:00",
"closeDay": "MONDAY",
"closeTime": "19:00",
}
]
}
will be submitted to directories that don't support split hours like this...
{
"periods": [
{
"openDay": "MONDAY",
"openTime": "08:00",
"closeDay": "MONDAY",
"closeTime": "19:00",
}
]
}
hoursSpecialObject
The time periods that differ from the client normal business hours. Client hoursSpecialObject must be submitted as a JSON object. Here is the format required for the JSON object.
{
"specialHourPeriods": [
{
"startDate": {
"year": 2015,
"month": 11,
"day": 23
},
"openTime": 08:00,
"endDate": {
"year": 2015,
"month": 11,
"day": 23
},
"closeTime": 18:00
},
{...},
{...},
]
}
categoryGoogle
Client can only have one category. You can get the category at https://github.com/adviceinteractivegroup/taxonomy/blob/master/taxonomy.csv. Look for the part after "gcid:" in the taxonomy.csv file, so if it is "gcid:resturants", then you need to send in "resturants".
Example Request
POST /legacyclients HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
name=Gina+Pizza&street=3142+W+Balboa+Blvd&city=Newport+Beach&state=CA&zipcode=92663&phone=(949)+723-4462&categoryGoogle=resturants
Example Response
{
"status": 200,
"success": true,
"error": null,
"data": {
"status": "Inactive",
"country": "US",
"id": 3201926,
"name": "Gina Pizza",
"partnerUsername": "dev@lssdev.com",
"street": "3142 W Balboa Blvd",
"city": "Newport Beach",
"state": "CA",
"zipcode": "92663",
"phone": "(949) 723-4462",
"hide": "false",
"createdAt": "2017-12-12T23:59:44.077Z",
"publicKey": "e343f4531abf70d03706727af93006c8",
"partner": 7
}
}
Get a Client
Retrieves the details of an existing client. You need to supply the unique client identifier.
API Endpoint
http://p.lssdev.com/legacyclients/{client_id}
Example Request
GET /legacyclients/3201926 HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json
Example Response
{
"status": 200,
"success": true,
"error": null,
"data": {
"partner": 7,
"gmb_token": null,
"id": 3201926,
"suite": null,
"deleted": "false",
"LAT": null,
"LON": null,
"status": "Inactive",
"country": "US",
"orders": 0,
"extra": "",
"name": "Gina's Pizza",
"owner": "",
"partnerUsername": "dev@lssdev.com",
"street": "3142 W Balboa Blvd",
"hours": "",
"city": "Newport Beach",
"state": "CA",
"zipcode": "92663",
"phone": "(949) 723-4462",
"phoneAlt": null,
"fax": "",
"website": "",
"email": "",
"facebook": "",
"twitter": "",
"linkedin": "",
"years": "",
"description": "",
"payment": "",
"services": "",
"license": "",
"keyword1": "",
"keyword2": "",
"keyword3": "",
"keyword4": "",
"keyword5": "",
"keyword1_location": null,
"keyword2_location": null,
"keyword3_location": null,
"keyword4_location": null,
"keyword5_location": null,
"notes": "",
"hide": "false",
"isInactive": false,
"createdAt": "2017-12-12T23:59:44.000Z",
"deletedAt": null,
"inactiveAt": null,
"custom1": "",
"custom2": "",
"custom3": "",
"custom4": "",
"custom5": "",
"publicKey": "e343f4531abf70d03706727af93006c8",
"tokenGoogle": null,
"categoryGoogle": null,
"transactionId": "4cd877f9-d339-4ee4-8de6-d4dd168f017c"
}
}
Delete a Client
Deletes a client and subsequently disables any active products associated with the client.
API Endpoint
http://p.lssdev.com/legacyclients/{client_id}
Example Request
DELETE /legacyclients/3201926 HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json
Example Response
{
"status": 200,
"success": true,
"error": null,
}
Getting SSO Url
This endpoint retrieves an SSL-secured URL for any client in a partner dashboard that can be view report/progress information without logging in.
API Endpoint
http://p.lssdev.com/legacyclients/{client_id}/sso
Example Request
GET /legacyclients/3201926/sso HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json
Example Response
{
"status": 200,
"success": true,
"error": null,
"data": "https://mysite.advicelocal.com/?page=site/clients/monthly-progress&client_id=3201926&lss_token=c1c55a63"
}
Getting Permanent Client Url
This endpoint retrieves an SSL-secured URL for any client in a partner dashboard that can be view report/progress information without logging in and is permanent and does not expire
API Endpoint
http://p.lssdev.com/legacyclients/{client_id}/url
Example Request
GET /legacyclients/3201926/url HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json
Example Response
{
"status": 200,
"success": true,
"error": null,
"data": "https://mysite.advicelocal.com/?page=site/clients/monthly-progress&client_id=3201926&client_token=c1c55a63"
}
Generate Report PDF
This endpoint will generate a PDF for the baseline or progress report for a specified location. Keep in mind that the reports can take up to 120 seconds to refresh/render.
API Endpoint
http://p.lssdev.com/legacyclients/{client_id}/pdf
Example Request
GET /legacyclients/3201926/pdf HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json
Example Response
{
"status": 200,
"success": true,
"error": null,
"data": "https://s3.amazonaws.com/p.assets.lssdev.com/pdfreports/276ce0cd2bc56b39f29de5f33a05d825.pdf"
}
Get all Clients
Returns a list of your clients.
API Endpoint
http://p.lssdev.com/legacyclients
Example Request
GET /legacyclients HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json
Example Request with Parameters
See Parameters list below.
GET /legacyclients?limit=30 HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json
Cache-Control: no-cache
Example Response
{
"status": 200,
"success": true,
"error": null,
"data": [
{
"partner": 7,
"gmb_token": null,
"id": 12345,
"suite": null,
"deleted": "true",
"LAT": 0,
"LON": 0,
"status": "Paused",
"country": "US",
"orders": 0,
"extra": "",
"name": "",
"owner": "",
"partnerUsername": "dev@lssdev.com",
"street": "2060 Broadway St",
"hours": "",
"city": "Boulder",
"state": "CO",
"zipcode": "80302",
"phone": "(303) 444-8840",
"phoneAlt": "",
"fax": "",
"website": "http://www.danday.com/?cmpid=loc3",
"email": "",
"facebook": "",
"twitter": "",
"linkedin": "",
"years": "",
"description": "",
"payment": "",
"services": "",
"license": "",
"keyword1": "",
"keyword2": "",
"keyword3": "",
"keyword4": "",
"keyword5": "",
"keyword1_location": null,
"keyword2_location": null,
"keyword3_location": null,
"keyword4_location": null,
"keyword5_location": null,
"notes": "",
"hide": "false",
"isInactive": true,
"createdAt": "2014-03-25T11:24:15.000Z",
"deletedAt": "2015-02-17T17:48:43.000Z",
"inactiveAt": null,
"custom1": "",
"custom2": "",
"custom3": "",
"custom4": "",
"custom5": "",
"publicKey": "cb7e1c2ca63629c169f5937be15066c6",
"tokenGoogle": null,
"categoryGoogle": ""
},
{
"partner": 7,
"gmb_token": null,
"id": 67890,
"suite": null,
"deleted": "true",
"LAT": 0,
"LON": 0,
"status": "Paused",
"country": "US",
"orders": 0,
"extra": "",
"name": "Crosswind Advisors",
"owner": "Kurt Wanner",
"partnerUsername": "dev@lssdev.com",
"street": "19125 N Creek Pkwy, Suite 120",
"hours": "",
"city": "Bothell",
"state": "WA",
"zipcode": "098011",
"phone": "(425) 349-2527",
"phoneAlt": "",
"fax": "(425) 645-7870",
"website": "www.crosswindadvisors.com",
"email": "kurt@crosswindadvisors.com",
"facebook": "",
"twitter": "",
"linkedin": "",
"years": "",
"description": "",
"payment": "",
"services": "",
"license": "",
"keyword1": "",
"keyword2": "",
"keyword3": "",
"keyword4": "",
"keyword5": "",
"keyword1_location": null,
"keyword2_location": null,
"keyword3_location": null,
"keyword4_location": null,
"keyword5_location": null,
"notes": "",
"hide": "false",
"isInactive": true,
"createdAt": "2014-04-21T18:44:29.000Z",
"deletedAt": "2015-02-17T17:48:43.000Z",
"inactiveAt": null,
"custom1": "",
"custom2": "",
"custom3": "",
"custom4": "",
"custom5": "",
"publicKey": "f114082b24a58fd061f9f96b277a40f5",
"tokenGoogle": null,
"categoryGoogle": ""
},
{...},
{...}
],
"total": 20
}
Parameters
Parameter | Value | Description | Parameter Type | Data Type |
---|---|---|---|---|
where | (empty) | JSON encode WHERE criteria objects. Example: where={"name":{"contains":"theodore"}} | query | string |
limit | 20 | The maximum number of records to send back. Example: limit=100 | query | integer |
skip | 0 | The number of records to skip. Example: skip=30 | query | integer |
sort | id ASC | The sort order. Example: sort=lastName%20ASC | query | string |
callback | (empty) | If specified, a JSONP response will be sent (instead of JSON). This is the name of a client-side javascript function to call, to which results will be passed as the first (and only) argument. Example: ?callback=my_JSONP_data_receiver_fn | query | string |
businessName | (empty) | query | string | |
city | (empty) | query | string | |
street1 | (empty) | query | string | |
street2 | (empty) | query | string | |
state | (empty) | query | string | |
postal | (empty) | query | string | |
country | US (default), GB, CA, AU, DE, or NZ | query | string | |
website | (empty) | query | string | |
hours | (empty) | query | string | |
description | (empty) | query | string | |
hide | true or false | query | boolean | |
phone | (empty) | query | string | |
fax | (empty) | query | string | |
(empty) | query | string | ||
owner | (empty) | query | string | |
isInactive | true or false | query | boolean | |
deleted | true or false | query | boolean | |
clientId | (empty) | query | long | |
legacyClient | (empty) | query | string | |
LAT | (empty) | query | undefined | |
LON | (empty) | query | undefined | |
agency | (empty) | query | string | |
category | (empty) | query | string | |
categories | (empty) | query | string | |
keywords | (empty) | query | Array[string] | |
socials | (empty) | query | Array[string] | |
competitors | (empty) | query | Array[string] | |
reportingLists | (empty) | query | Array[string] | |
links | (empty) | query | Array[string] | |
submissions | (empty) | query | string | |
custom1 | (empty) | query | string | |
custom2 | (empty) | query | string | |
custom3 | (empty) | query | string | |
custom4 | (empty) | query | string | |
custom5 | (empty) | query | string | |
status | (empty) | query | string | |
tokenGoogle | (empty) | query | string | |
id | (empty) | query | string | |
createdAt | (empty) | query | date-time | |
updatedAt | (empty) | query | date-time |
Update a Client
Updates the specified client. This endpoint accepts the same parameters as the [Add a Client] endpoint. Any parameters not provided will be left unchanged.
API Endpoint
http://p.lssdev.com/legacyclients/{client_id}
Example Request
POST /legacyclients/3201926 HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
name=Gina's+Pizza&street=3142+W+Balboa+Blvd&city=Newport+Beach&state=CA&zipcode=92663&phone=(949)+723-4462
Example Response
{
"status": 200,
"success": true,
"error": null,
"data": {
"id": 3201926,
"suite": null,
"deleted": "false",
"LAT": null,
"LON": null,
"status": "Inactive",
"country": "US",
"orders": 0,
"extra": "",
"name": "Gina's Pizza",
"owner": "",
"partnerUsername": "dev@lssdev.com",
"street": "3142 W Balboa Blvd",
"hours": "",
"city": "Newport Beach",
"state": "CA",
"zipcode": "92663",
"phone": "(949) 723-4462",
"phoneAlt": null,
"fax": "",
"website": "",
"email": "",
"facebook": "",
"twitter": "",
"linkedin": "",
"years": "",
"description": "",
"payment": "",
"services": "",
"license": "",
"keyword1": "",
"keyword2": "",
"keyword3": "",
"keyword4": "",
"keyword5": "",
"keyword1_location": null,
"keyword2_location": null,
"keyword3_location": null,
"keyword4_location": null,
"keyword5_location": null,
"notes": "",
"hide": "false",
"isInactive": false,
"createdAt": "2017-12-12T23:59:44.000Z",
"deletedAt": null,
"inactiveAt": null,
"custom1": "",
"custom2": "",
"custom3": "",
"custom4": "",
"custom5": "",
"publicKey": "e343f4531abf70d03706727af93006c8",
"tokenGoogle": null,
"categoryGoogle": null,
"partner": 7,
"gmb_token": null
}
}
Client Images
Upload images for the specified client.
Add an Image
This endpoint will upload images to the "Gallery Images" section of the Dashboard. Image name will be automatically saved as "gallery_image_1", "gallery_image_2", "gallery_image_3", "gallery_image_4", and "gallery_image_5".
API Endpoint
http://p.lssdev.com/legacyclientimages/{client_id}
Example Request
POST /legacyclientimages/3201926 HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="image"; filename="test-image.png"
Content-Type: image/png
------WebKitFormBoundary7MA4YWxkTrZu0gW--
Example Response
{
"status": 200,
"success": true,
"error": null,
"data": [
{
"imageArray": "test-image.png",
"imageObject": "{}",
"client": 3201926
}
]
}
Add an Image with a Tag
This endpoint will upload images to the "Client Images" of the Dashboard. These images are for Business Logo, Google Cover Image, Facebook Cover Image, and Twitter Cover Image. Image name will be saved as "logo" for Business Logo, "google" for Google Cover Image, "facebook" for Facebook Cover Image, and "twiiter" for Twitter Cover Image.
API Endpoint
http://p.lssdev.com/legacyclientimages/{client_id}/{tag}
Replace {tag} with:
1. "logo" for Business Logo
2. "facebook_cover" for Facebook Cover Image
3. "google_cover" for Google Cover Image
4. "twitter_cover" for Twitter Cover Image
Example Request
POST /legacyclientimages/3201926/logo HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="image"; filename="advice-interactive-group-logo.png"
Content-Type: image/png
------WebKitFormBoundary7MA4YWxkTrZu0gW--
Example Response
{
"status": 200,
"success": true,
"error": null,
"data": [
{
"imageArray": "test-image.png|mckinney-local-seo-company.jpg",
"imageObject": "{\"logo\":\"advice-interactive-group-logo.png\"}",
"client": 3201926
}
]
}
Get all Images
Returns a list of the client images.
API Endpoint
http://p.lssdev.com/legacyclientimages/{client_id}
Example Request
GET /legacyclientimages/3201926 HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json
Example Response
{
"status": 200,
"success": true,
"error": null,
"data": {
"logo": {
"original": "https://s3.amazonaws.com/p.assets.lssdev.com/client_images/3/7/6/2/a/3201926/advice-interactive-group-logo.png",
"thumbnail": "https://s3.amazonaws.com/p.assets.lssdev.com/client_images/3/7/6/2/a/3201926/thumb_advice-interactive-group-logo.png"
},
"facebook": {
"original": "https://s3.amazonaws.com/p.assets.lssdev.com/client_images/3/7/6/2/a/3201926/58072_116591211739965_4216445_n.jpg",
"thumbnail": "https://s3.amazonaws.com/p.assets.lssdev.com/client_images/3/7/6/2/a/3201926/thumb_58072_116591211739965_4216445_n.jpg"
},
"gallery_image_1": {
"original": "https://s3.amazonaws.com/p.assets.lssdev.com/client_images/3/7/6/2/a/3201926/test-image.png",
"thumbnail": "https://s3.amazonaws.com/p.assets.lssdev.com/client_images/3/7/6/2/a/3201926/thumb_test-image.png"
},
"gallery_image_2": {
"original": "https://s3.amazonaws.com/p.assets.lssdev.com/client_images/3/7/6/2/a/3201926/mckinney-local-seo-company.jpg",
"thumbnail": "https://s3.amazonaws.com/p.assets.lssdev.com/client_images/3/7/6/2/a/3201926/thumb_mckinney-local-seo-company.jpg"
}
}
}
Delete an Image
Delete the client images.
API Endpoint
http://p.lssdev.com/legacyclientimages/{client_id}/{image_name}
Replace {image_name} with the returned [Get all Images] name.
Example Request
DELETE /legacyclientimages/3201926/gallery_image_2 HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json
Example Response
{
"status": 200,
"success": true,
"error": null,
"data": [
{
"imageArray": "test-image.png",
"imageObject": "{\"logo\":\"advice-interactive-group-logo.png\",\"facebook\":\"58072_116591211739965_4216445_n.jpg\"}",
"client": 3201926
}
]
}
The Extra Object
The “extra” filed is a JSON object. There are several properties stored there. Make sure you read and append/update the correct property name.
For the questions we have the JSON+LD format in an array used like this example:
Example Stored Data
"extra": {
"property1": ...,
"property2": ...,
"voiceTemplates": [
"healthcare"
],
"voiceQuestions": [
{
"@type": "Question",
"acceptedAnswer": {
"@type": "Answer",
"text": "Monday"
},
"name": "What is your busiest day of the week?"
},
{
"@type": "Question",
"acceptedAnswer": {
"@type": "Answer",
"text": "hello"
},
"name": "Welcome message to people first interacting with the application?"
},
{
"@type": "Question",
"acceptedAnswer": {
"@type": "Answer",
"text": "yes"
},
"name": "Do you have handicapped parking?"
},
{
"@type": "Question",
"acceptedAnswer": {
"@type": "Answer",
"text": "any"
},
"name": "What insurance do you accept?"
}
]
}
Health Care Vertical Information
The information needed to submit to a verticals package is within the "extra" json property of the client. When updating this property, be sure to APPEND any additional properties to the object before saving, otherwise you will lose information related to other features such as Google Business.
POST /legacyclients/3201926 HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json
{
"extra": {
"verticals": {
"4130": {
"updateAt": 1718040420413,
"data": {
"conditions_treated": "we treat these issues",
"insurance_accepted": "our providers",
"license_number": "License",
"procedures_performed": "Performed",
"language": "Languages",
"accepting_new_patients": "yes",
"states_where_licensed": "State",
"undergraduate_school": "Undergraduate",
"medical_school": "School",
"residency": "Residency",
"npi": "ID",
"dea": "DEA"
}
}
}
}
}
Legal Vertical Information
The information needed to submit to a verticals package is within the "extra" json property of the client. When updating this property, be sure to APPEND any additional properties to the object before saving, otherwise you will lose information related to other features such as Google Business.
POST /legacyclients/3201926 HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json
{
"extra": {
"verticals": {
"4136": {
"updateAt": 1718059904266,
"data": {
"state_licensed_in": "Texas",
"specific_practices": "legal",
"year_license_received": "2002"
}
}
}
}
}
Voice Data Specs
It contains 2 required properties inside the extra object:
- the voice templates
- and the voice questions
The voice Template property
It's an array that can contain several values. It must include the title of the section you are filling out answers. Please consider that for industry questions, only one industry should be applied. All the possible values in the array (all templates applied) are the following:
"voiceTemplates": [
"brick",
"services",
"events",
"financial",
"healthcare",
"home",
"legal",
"restaurants"
]
Type Definition
The "voiceQuestions" property is an array of Questions, the type definition for this object is the following:
{
"@type": "Question",
"name": string,
"acceptedAnswer": {
"@type": "Answer",
"text": string
}
}
Since this is compliant with JSON+LD formatting please do not add more properties for this object to prevent not proper validation when used to show this properties to voice platforms and allow them to be read properly.
voice questions
We accept these following questions in the “name”: string property. Please use the exact string specified here to allow proper mapping of properties. Follow the guidelines in this type definition to include set values when required. If the property Autogenerated is present, you don't need to specify an answer for that question since those are automatically pulled from available data.
Questions strings Available
General Questions
[
{
"text": "What is Unique about your business?",
"answerFormType": TEXT
},
{
"text": "What products do you offer?",
"answerFormType": TEXT
},
{
"text": "What services do you offer?",
"answerFormType": answerType.values.TEXT
},
{
"text": "What are your hours?",
"answerFormType": TEXT,
autogeneratedFromData: true
},
{
"text": "What is your business address?",
"answerFormType": TEXT,
autogeneratedFromData: true
},
{
"text": "What payments do you accept?",
"answerFormType": TEXT,
autogeneratedFromData: true
},
{
"text": "What is the phone number to a business?",
"answerFormType": TEXT,
autogeneratedFromData: true
},
{
"text": "How many Clients have you served?",
"answerFormType": TEXT
},
{
"text": "What is your busiest day of the week?",
"answerFormType": COMBO,
answerFormData: [
{ label: "Sunday", value: "Sunday" },
{ label: "Monday", value: "Monday" },
{ label: "Tuesday", value: "Tuesday" },
{ label: "Wednesday", value: "Wednesday" },
{ label: "Thursday", value: "Thursday" },
{ label: "Friday", value: "Friday" },
{ label: "Saturday", value: "Saturday" }
]
},
{
"text": "What is your price range for most services?",
"answerFormType": COMBO,
answerFormData: [
{ label: "$", value: "$" },
{ label: "$$", value: "$$" },
{ label: "$$$", value: "$$$" },
{ label: "$$$$", value: "$$$$" }
]
},
{
"text": "What holidays are you opened for?",
"answerFormType": TEXT
},
{
"text": "How many employees work with your company?",
"answerFormType": TEXT
},
{
"text": "Do you have any Deal/Coupons/Offers available?",
"answerFormType": TEXT
},
{
"text": "What accreditations does your business have?",
"answerFormType": TEXT
},
{
"text": "Do you offer military discounts?",
"answerFormType": TEXT
},
{
"text": "Do you accept reservations/appointments?",
"answerFormType": TEXT
}
]
Services
[
{
"text": "Is there a service fee to come to my location?",
"answerFormType": TEXT
},
{
"text": "Can I get a quote on the phone?",
"answerFormType": TEXT
},
{
"text": "Do you give in-home estimates?",
"answerFormType": TEXT
}
]
Events
[
{
"text": "When is your next event?",
"answerFormType": TEXT
},
{
"text": "Do you have events at your establishment?",
"answerFormType": TEXT
},
{
"text": "Do you have virtual events?",
"answerFormType": TEXT
},
{
"text": "Is there a cover charge for your events?",
"answerFormType": TEXT
}
]
Brick and Mortar
[
{
"text": "Is your building handicapped accessible?",
"answerFormType": TEXT
},
{
"text": "Do you have a wheelchair accessible restroom?",
"answerFormType": TEXT
},
{
"text": "Do you have handicapped parking?",
"answerFormType": TEXT
},
{
"text": "Do you have wheelchair-accessible seating?",
"answerFormType": TEXT
},
{
"text": "Is your establishment kid-friendly?",
"answerFormType": TEXT
},
{
"text": "Do you have booster seats available?",
"answerFormType": TEXT
},
{
"text": "Do you have TVs for guests to watch?",
"answerFormType": TEXT
},
{
"text": "Do you have events at your location?",
"answerFormType": TEXT
},
{
"text": "Do you have parking available?",
"answerFormType": TEXT
},
{
"text": "How long can I stay at a meter?",
"answerFormType": TEXT
},
{
"text": "Do you have a valet service?",
"answerFormType": TEXT
},
{
"text": "What does parking cost?",
"answerFormType": TEXT
},
{
"text": "Is your business pet friendly?",
"answerFormType": TEXT
},
{
"text": "Do you offer free wi-fi?",
"answerFormType": TEXT
},
{
"text": "Is there a unisex restroom?",
"answerFormType": TEXT
},
{
"text": "Do you have outside patio or rooftop seating",
"answerFormType": TEXT
}
]
Industry: Financial
[
{
"text": "Do you offer investment advice?",
"answerFormType": TEXT
},
{
"text": "Is there an atm at this location?",
"answerFormType": TEXT
},
{
"text": "Do you have safety deposit boxes here?",
"answerFormType": TEXT
}
]
Industry: Healthcare
[
{
"text": "What insurance do you accept?",
"answerFormType": TEXT
},
{
"text": "Are you taking new patients?",
"answerFormType": TEXT
}
]
Industry: Home Services
[
{
"text": "Do you have to be licensed to perform your work?",
"answerFormType": TEXT
},
{
"text": "What is the normal wait time for a home visit?",
"answerFormType": TEXT
}
]
Industry: Legal
[
{
"text": "Do you give a free consultation?",
"answerFormType": TEXT
},
{
"text": "What area/s of law do you practice?",
"answerFormType": TEXT
}
]
Industry: Restaurants
[
{
"text": "Do you offer gluten-free or vegan choices?",
"answerFormType": TEXT
},
{
"text": "Do you have a kids menu?",
"answerFormType": TEXT
},
{
"text": "Is there a bar at this location?",
"answerFormType": TEXT
},
{
"text": "Do you have an outside patio?",
"answerFormType": TEXT
},
{
"text": "Do you have a happy hour? If so, what days and time?",
"answerFormType": TEXT
},
{
"text": "Do you offer take out?",
"answerFormType": TEXT
},
{
"text": "Do you have a private room for events?",
"answerFormType": TEXT
},
{
"text": "Do you have booster seats available",
"answerFormType": TEXT
},
{
"text": "Can I place a food order for delivery?",
"answerFormType": TEXT
},
{
"text": "Is your business pet friendly?",
"answerFormType": TEXT
},
{
"text": "Are you a family-friendly restaurant?",
"answerFormType": TEXT
},
{
"text": "Do you have live music?",
"answerFormType": TEXT
},
{
"text": "Do you serve cocktails?",
"answerFormType": TEXT
},
{
"text": "Do you have a private room for private parties?",
"answerFormType": TEXT
}
]
Extra GMB props
Another of the additional properties the extra object can have is this one.
Example Stored Data
"extra": {
"gmbData": {
"primaryCategory": {
"displayName": "Barber Shop",
"categoryId": "gcid:barber_shop"
},
"secondaryCategories": [
{
"displayName": "Salad Shop",
"categoryId": "gcid:salad_shop"
},
{
"displayName": "Hair Extension Technician",
"categoryId": "gcid:hair_extension_technician"
}
],
"specialHoursPeriods": [
{
"startDate": "2020-07-13",
"endDate": "2020-07-15",
"isClosed": true
}
]
}
}
properties
The additional properties in this object are the following:
- primaryCategory : using GMB categories or GCID
- secondaryCategories : using GMB categories or GCID
- products : is not yet documented in GMB API but we tried to follow as much as possible the post API model
- specialHoursPeriods : holidays periods
- gmbShortName : open string
- appointmentLink : URL formatted string
- languages : Array of string, don't need formatting.
- servicesArea : Array of string, don't need formatting, they could be zipcodes or city names.
- servicesOffered : Array of string, don't need formatting.
- specialties : Array of string, don't need formatting.
- associations : Array of string, don't need formatting.
- brands : Array of string, don't need formatting.
- tollFreeNumber : number
- callTrackingNumber: number
Example for simple properties Data
"extra": {
"gmbData": {
"gmbShortName": "a short name",
"appointmentLink": "http://link.com",
"languages": ["English", "Spanish"],
"servicesArea": ["78050", "Dallas"],
"servicesOffered": ["service 1", "service 2"],
"specialties": ["specialty 1", "specialty 2"],
"associations": ["association 1", "association 2"],
"brands": ["brand 1", "brand 2"],
"tollFreeNumber": 5555555555,
"callTrackingNumber": 5555555555,
}
}
Category type
class Category {
categoryId: string;
displayName: string;
}
The category ID should follow the GCIDs from Google. String category ID formatting has a suffix "gcid:"
gcid:clothing_sore
This model should be used for the primary category. and the secondary categories is and array of this object model.
Products type
The products property is an array of the product type, as specified bellow:
Example object
"products": [
{
"callToAction": {
"actionType": "LEARN_MORE",
"url": "http://link.com"
},
"name": "name",
"category": "category name",
"summary": "long description",
"price": 100,
"priceRange": "100-150"
}
]
Product type
class Product {
name: string;
category: string; // added, not in google spec
price?: number; // added, not in google spec
priceRange?: string; // added, not in google spec
languageCode?: string;
summary: string;
callToAction?: CallToAction;
show?: boolean;
constructor() {
this.callToAction = new CallToAction();
}
}
CallToAction type
class CallToAction {
actionType: ActionType;
url?: string;
constructor() {
this.actionType = ActionType.unspecified;
}
}
ActionType Enum
enum ActionType {
unspecified = 'ACTION_TYPE_UNSPECIFIED',
book = 'BOOK',
order = 'ORDER',
shop = 'SHOP',
more = 'LEARN_MORE',
signup = 'SIGN_UP',
getOffer = 'GET_OFFER', // deprecated by google but still in use
call = 'CALL'
}
specialHoursPeriods type
The specialHoursPeriods property is an array of the specialHoursPeriod type, as specified bellow:
specialHoursPeriod type
class SpecialHoursPeriod {
startDate: Date; // format as a string "DD-MM-YYY" in numbers
openTime: string;
endDate: Date; // format as a string "DD-MM-YYY" in numbers
closeTime: string;
isClosed: boolean;
}
Example object
"specialHoursPeriods": [
{
"startDate": "2020-07-07",
"endDate": "2020-07-14",
"isClosed": true
},
{
"startDate": "2020-07-13",
"endDate": "2020-07-13",
"isClosed": false,
"openTime": "12:15 am",
"closeTime": "12:45 am"
}
]