Clients

From Advice Local Wiki
Revision as of 07:01, 8 July 2020 by Jduran (talk | contribs) (Example Stored Data)
Jump to: navigation, search

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.
email 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.
website string 255 optional The business website.
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.
facebook string 255 optional The business facebook url.
twitter string 255 optional The business twitter url.
linkedin 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 readonly The client location latitude.
LON string readonly 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

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": "THURSDAY",
      "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"
    }
}

Get Client Summary

Retrieves the details of an existing client. Based on the reporting list for the dashboard, and the products configured, and the fulfillment provided, this endpoint will consolidate and reconcile data in a meaningful way as well as provide all the current client information. There is also an "overview" property that has the overall scores and aggregate summary scores.

API Endpoint

http://p.lssdev.com/legacyclients/{client_id}/summary

Example Request

GET /legacyclients/3201926/summary 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": {
        "client": {},
        "overview": {
            "baselineOverview": {
                "bingScore": 50,
                "directoriesScore": 22,
                "gmbScore": 0,
                "visibilityScore": 26,
                "yelpScore": 50,
                "voiceData": {
                    "alexa": "Ready, but has wrong information",
                    "bixby": "Ready",
                    "cortana": "Ready, but has wrong information",
                    "googleAsistant": "Not Ready",
                    "siri": "Ready",
                    "voiceSearchReadines": 60
                }
            },
            "monthlyOverview": {
                "bingScore": 50,
                "directoriesScore": 100,
                "gmbScore": 0,
                "visibilityScore": 77,
                "yelpScore": 50,
                "voiceData": {
                    "alexa": "Ready, but has wrong information",
                    "bixby": "Ready",
                    "cortana": "Ready, but has wrong information",
                    "googleAsistant": "Not Ready",
                    "siri": "Ready",
                    "voiceSearchReadines": 60
                }
            }
        },
        "products": [
            {
                "name": "chamberofcommerce",
                "scan": {
                    "url": "https://www.chamberofcommerce.com/self_storage",
                    "name": {
                        "value": "Self Service Storage",
                        "score": 100
                    },
                    "address": {
                        "value": "123 Test, Sacramento, CA, 90210",
                        "score": 100
                    },
                    "phone": {
                        "value": "5555555555",
                        "score": 100
                    },
                    "date": "2020-04-06T00:00:00.000Z"
                },
                "fulfillment": {
                    "url": "https://www.chamberofcommerce.com/self_storage",
                    "date": "2020-04-06T00:00:00.000Z",
                    "message": "Data sent to source, scraper data could be older"
                }
            },
            {
                "name": "sitecards",
                "scan": {
                    "url": "http://www.site.cards/self_storage",
                    "name": {
                        "value": "Self Service Storage",
                        "score": 100
                    },
                    "address": {
                        "value": "123 Test, Sacramento, CA, 90210",
                        "score": 100
                    },
                    "phone": {
                        "value": "5555555555",
                        "score": 100
                    },
                    "date": "2020-04-01T00:00:00.000Z"
                },
                "fulfillment": {
                    "url": "http://www.site.cards/self_storage",
                    "date": "2020-04-01T00:00:00.000Z",
                    "message": "Data sent to source, scraper data could be older"
                }
            },
            ...
        }
    }
}

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"
}

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
email (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?"
    }
  ]
}

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
      }
    ]
  }
}