BETA VERSION
Sommaire |
---|
POST {url}/localtrac/store-locator/registerWebhook | |||
---|---|---|---|
This route register the webhook URL of client’s site. Each time, location has some update (except update via api by user with ROLE_STORE_LOCATOR), LOCALTRAC will send POST request to provided URL, sending “secret” parameter equals md5(“webhookSalt”). LOCALTRAC doesn’t send changed fields or the list of changed locations. It’s just a signal that some location(s) was updated. You may use GET “store-locator/locations” route and compare “lastUpdated” to know what location was updated. | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Body (Example) | |||
| |||
businessUuid | Uuid of the business to register webhook. Store locator should be enabled for this business. | ||
webhookUrl | URL on clients server/website to be called when location is updated. | ||
webhookSalt | Random string that would be md5 encoded and passed with POST as “secret” parameter. | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response(400) - Validation ErrorThis scenario happens if you sent any content who fails the minimum validation process. For instance, failing to provide businessUuid will lead to the following result | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing businessUuid (or Store Localtor is not enabled for this business). | |||
Content-Type | application/json | ||
Body | |||
|
GET {url}/localtrac/store-locator/locations/{businessUuid} | |||
---|---|---|---|
This route will return the list locations for provided business, including all information about location. | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
data | Array of locations | ||
data[0].uuid | LOCALTRAC unique identifier (uuid) of the location. This is the uuid you should use for any further request associated with the location. | ||
data[0].active | Boolean value representing the status of the location, true for active and false for inactive. When a location is set as inactive, it is not monitored within any directories. | ||
data[0].lastUpdated | Timestamp of the last update on any location’s field | ||
data[0].urls | An associative array for websites and social media URLs. Supported keys:
| ||
data[0].payments | An associative array of payment methods. The value is a Boolean, true when payment method is accepted or false when it’s not. Supported keys:
| ||
data[0].name | Array of all the location name translations. Each row of the sub array is an associative value of <language> : <name>. Keep in mind, this route returns “store locator name” if it’s not empty. If it’s empty, it returns general “name” of location. | ||
data[0].description | Array of all the location descriptions. Each row of the sub array is an associative value of <language> : <description>. | ||
data[0].communication | An associative array for the location contact information. Supported keys:
| ||
data[0].storeCode | External id given by the client when the location was created or when imported in LOCALTRAC from a directory. | ||
data[0].locale | Locale of the location. (specified upon creation and used with different directories). | ||
data[0].address | Array containing the full address. Keep in mind, this route returns “store locator address line 1/2” if it’s not empty. If it’s empty, it returns general “address” of location. | ||
data[0].storeLocator | An associative array for the location store locator related information. Supported keys:
| ||
data[0].schedules | Array of the location’s regular opening hours. | ||
data[0].scheduleExceptions | Array of the location’s schedule exceptions | ||
data[0].averageRating | Average Google rating for the current year for this location. | ||
Response (403) - Forbidden access | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
|
GET {url}/localtrac/store-locator/businessTags/{businessUuid} | |||
---|---|---|---|
This route will return the list of Store Locator tags, associated to business | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
uuid | LOCALTRAC unique identifier (uuid) of the tag. This is the uuid you should use for any further request to update tag. | ||
translations | An array of translations of the name of the tag. For the moment only “en” and “fr” languages are supported. Languages are optional (tag can have only one language). | ||
translations.en | English translation of the name | ||
translations.fr | French translation of the name | ||
slug | An array of slug for the translations of the name of the tag. (automatically generated on insert/update of the tag). | ||
slug.en | Slug for English translation | ||
slug.fr | Slug for French translation | ||
Response (403) - Forbidden access | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
|
POST {url}/localtrac/store-locator/businessTags/{businessUuid} | |||
---|---|---|---|
This route will set the list of Store Locator tags, associated to business. (It will clear all the previous data and save the provided list) | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Body (Example) | |||
| |||
tags | Array of tags to save | ||
tags[0].uuid (optional) | Uuid of the tag, received from GET route. If provided, tag will be updated (translations will change, uuid stays the same). | ||
tags[0].translations | Array of translations of the tag. Only “en” and “fr” are supported now. | ||
tags[0].translations.en (optional) | English translation of the name | ||
tags[0].translations.fr (optional) | French translation of the name | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response(400) - Validation ErrorThis scenario happens if you sent any content who fails the minimum validation process. For instance, failing to provide translations will lead to the following result | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing uuid of the tag | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing businessUuid | |||
Content-Type | application/json | ||
Body | |||
|
POST {url}/localtrac/store-locator/businessTags/{businessUuid}/add | |||
---|---|---|---|
This route will add tag to business and associate it to location (if provided). | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Body (Example) | |||
| |||
locationUuid (optional) | Uuid of location. Newly created tag will be associated to provided location. | ||
translations | Array of translations of the tag. Only “en” and “fr” are supported now. | ||
translations.en (optional) | English translation of the name | ||
translations.fr (optional) | French translation of the name | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
uuid | LOCALTRAC unique identifier (uuid) of the tag. This is the uuid you should use for any further request to update tag or associate it to locations. | ||
Response(400) - Validation ErrorThis scenario happens if you sent any content who fails the minimum validation process. For instance, failing to provide translations will lead to the following result | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing businessUuid or locationUuid | |||
Content-Type | application/json | ||
Body | |||
|
GET {url}/localtrac/store-locator/locationTags/{locationUuid} | |||
---|---|---|---|
This route will return the list of Store Locator tags, associated to location | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
uuid | LOCALTRAC unique identifier (uuid) of the tag. This is the uuid you should use for any further request to update tag. | ||
translations | An array of translations of the name of the tag. For the moment only “en” and “fr” languages are supported. Languages are optional (tag can have only one language). | ||
translations.en | English translation of the name | ||
translations.fr | French translation of the name | ||
slug | An array of slug for the translations of the name of the tag. (automatically generated on insert/update of the tag). | ||
slug.en | Slug for English translation | ||
slug.fr | Slug for French translation | ||
Response (403) - Forbidden access | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
|
POST {url}/localtrac/store-locator/locationTags/{locationUuid} | |||
---|---|---|---|
This route will set the list of Store Locator tags, associated to location. (It will clear all the previous data and save the provided list) | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Body (Example) | |||
| |||
tags | Array of tags to associate to location | ||
tags[0].uuid | Uuid of the tag, to associate. | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response(400) - Validation ErrorThis scenario happens if you sent any content who fails the minimum validation process. For instance, typo in parameter name will lead to the following result | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing uuid of the tag | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing locationUuid | |||
Content-Type | application/json | ||
Body | |||
|
GET {url}/localtrac/store-locator/businessCategories/{businessUuid} | |||
---|---|---|---|
This route will return the list of Store Locator categories, associated to business | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
uuid | LOCALTRAC unique identifier (uuid) of the category. This is the uuid you should use for any further request to update category. | ||
translations | An array of translations of the name of the category. For the moment only “en” and “fr” languages are supported. Languages are optional (category can have only one language). | ||
translations.en | English translation of the name | ||
translations.fr | French translation of the name | ||
slug | An array of slug for the translations of the name of the category. (automatically generated on insert/update of the category). | ||
slug.en | Slug for English translation | ||
Slug for French translation | |||
Response (403) - Forbidden access | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
|
POST {url}/localtrac/store-locator/businessCategories/{businessUuid} | |||
---|---|---|---|
This route will set the list of Store Locator categories, associated to business. (It will clear all the previous data and save the provided list) | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Body (Example) | |||
| |||
categories | Array of categories to save | ||
categories[0].uuid (optional) | Uuid of the category, received from GET route. If provided, category will be updated (translations will change, uuid stays the same). | ||
categories[0].translations | Array of translations of the category. Only “en” and “fr” are supported now. | ||
categories[0].translations.en (optional) | English translation of the name | ||
categories[0].translations.fr (optional) | French translation of the name | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response(400) - Validation ErrorThis scenario happens if you sent any content who fails the minimum validation process. For instance, failing to provide translations will lead to the following result | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing uuid of the category | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing businessUuid | |||
Content-Type | application/json | ||
Body | |||
|
POST {url}/localtrac/store-locator/businessCategories/{businessUuid}/add | |||
---|---|---|---|
This route will add category to business and associate it to location (if provided). | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Body (Example) | |||
| |||
locationUuid (optional) | Uuid of location. Newly created category will be associated to provided location. | ||
translations | Array of translations of the categories. Only “en” and “fr” are supported now. | ||
translations.en (optional) | English translation of the name | ||
translations.fr (optional) | French translation of the name | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
uuid | LOCALTRAC unique identifier (uuid) of the category. This is the uuid you should use for any further request to update category or associate it to locations. | ||
Response(400) - Validation ErrorThis scenario happens if you sent any content who fails the minimum validation process. For instance, failing to provide translations will lead to the following result | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing businessUuid or locationUuid | |||
Content-Type | application/json | ||
Body | |||
|
GET {url}/localtrac/store-locator/locationCategories/{locationUuid} | |||
---|---|---|---|
This route will return the list of Store Locator categories, associated to location | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
uuid | LOCALTRAC unique identifier (uuid) of the category. This is the uuid you should use for any further request to update category or associate it to locations. | ||
translations | An array of translations of the name of the category. For the moment only “en” and “fr” languages are supported. Languages are optional (category can have only one language). | ||
translations.en | English translation of the name | ||
translations.fr | French translation of the name | ||
slug | An array of slug for the translations of the name of the category. (automatically generated on insert/update of the category). | ||
slug.en | Slug for English translation | ||
slug.fr | Slug for French translation | ||
Response (403) - Forbidden access | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
|
POST {url}/localtrac/store-locator/locationCategories/{locationUuid} | |||
---|---|---|---|
This route will set the list of Store Locator categories, associated to location. (It will clear all the previous data and save the provided list) | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Body (Example) | |||
| |||
categories | Array of categories associate to location | ||
categories[0].uuid | Uuid of the category, to associate. | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response(400) - Validation ErrorThis scenario happens if you sent any content who fails the minimum validation process. For instance, typo in parameter name will lead to the following result | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing uuid of the category | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing locationUuid | |||
Content-Type | application/json | ||
Body | |||
|
GET {url}/localtrac/store-locator/image/{locationUuid} | |||
---|---|---|---|
This route will return the list of Store Locator images, associated to location | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
uuid | LOCALTRAC unique identifier (uuid) of the store locator image for this location. | ||
url | Url to original image | ||
thumbnail | Url to resized image (95x95 thumbnail). | ||
mime | Image mime type | ||
description | Image description | ||
createdAt | Timestamp | ||
Response (403) - Forbidden access | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
|
PUT {url}/localtrac/store-locator/image | |||
---|---|---|---|
This route will assign an image to location as store locator image | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Body (Example) | |||
| |||
image_uuid | Uuid of image | ||
location_uuid | Uuid of location | ||
description | Image description | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
uuid | LOCALTRAC unique identifier (uuid) of the store locator image. | ||
url | Url to original image | ||
thumbnail | Url to resized image (95x95 thumbnail). | ||
Response(400) - Validation ErrorThis scenario happens if you sent any content who fails the minimum validation process. For instance, typo in parameter name will lead to the following result | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing image_uuid | |||
Content-Type | application/json | ||
Body | |||
|
DELETE {url}/localtrac/store-locator/image/{imageUuid} | |||
---|---|---|---|
This route will delete store locator image. | |||
Request | |||
Headers | |||
Authorization | <token> obtained during the Authentication | ||
Accept | application/json | ||
Response (200) - Success | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Response (403) - Forbidden accessThis scenario happens if you sent non-existing imageUuid | |||
Content-Type | application/json | ||
Body | |||
|