Avertissement |
---|
VERSION BETA |
Info |
---|
Avertissement! Avertissement! Certaines des routes nécessiteront des autorisations supplémentaires. Si vous obtenez une réponse «Accès refusé» ou des réponses vides, contactez votre représentant! |
...
POST {url}/localtrac/store-locator/registerWebhook | |||
---|---|---|---|
Cet route enregistre l'URL du webhook du site du client. Chaque fois, l'emplacement est une mise à jour, LOCALTRAC enverra une requête POST à l'URL fournie, en envoyant le paramètre «secret» égal à md5 («webhookSalt»). LOCALTRAC n'envoie pas les champs modifiés ni la liste des emplacements modifiés. Il s'agit simplement d'un signal indiquant que certains emplacements ont été mis à jour. Vous pouvez utiliser la route GET «store-locator / locations» et comparer «lastUpdated» pour savoir quel emplacement a été mis à jour. | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Body ( ExampleExemple) | |||
| |||
businessUuid | Uuid de l’entreprise pour enregistrer le webhook. L’option localisateur de succursale doit etre activer pour l’entreprise. | ||
webhookUrl | URL sur le serveur / site web client à appeler lorsqun emplacement est mis à jour. | ||
webhookSalt | Chaîne aléatoire qui serait encodée en md5 et transmise avec POST comme paramètre «secret». | ||
Réponse (200) - Succès | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Réponse (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 resultErreur de validation | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Réponse (403) -Forbidden accessThis scenario happens if you sent non-existing businessUuid (or Store Localtor is not enabled for this businessAccès interditCe scénario se produit si vous avez envoyé un businessUuid non existant (ou si Store Localtor n'est pas activé pour cette entreprise). | |||
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. | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Réponse (200) - Succès | |||
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. | ||
Réponse (403) -Forbidden accessAccès interdit | |||
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 | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Réponse (200) - Succès | |||
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 | ||
Réponse (403) -Forbidden accessAccès interdit | |||
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) | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Body (ExampleExemple) | |||
| |||
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 | ||
Réponse (200) - Succès | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Réponse (400) -Validation ErrorErreur de validationThis 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 | |||
| |||
Réponse (403) -Forbidden accessAccès interditThis scenario happens if you sent non-existing uuid of the tag | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Réponse (403) -Forbidden accessAccès interditThis 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). | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Body (ExampleExemple) | |||
| |||
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 | ||
Réponse (200) - Succès | |||
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. | ||
Réponse (400) -Validation ErrorErreur de validationThis 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 | |||
| |||
Réponse (403) -Forbidden accessThis scenario happens if you sent non-existing businessUuid or locationUuidAccès interditCe scénario se produit si vous avez envoyé businessUuid ou locationUuid non existant | |||
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 | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Réponse (200) - Succès | |||
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 | ||
Réponse (403) -Forbidden accessAccès interdit | |||
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) | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Body (ExampleExemple) | |||
| |||
tags | Array of tags to associate to location | ||
tags[0].uuid | Uuid of the tag, to associate. | ||
Réponse (200) - Succès | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Réponse (400) -Validation ErrorErreur de validationThis 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 | |||
| |||
Réponse (403) -Forbidden accessAccès interditThis scenario happens if you sent non-existing uuid of the tag | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Réponse (403) -Forbidden accessAccès interditThis 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 | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Réponse (200) - Succès | |||
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 | |||
Réponse (403) -Forbidden accessAccès interdit | |||
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) | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Body (ExampleExemple) | |||
| |||
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 | ||
Réponse (200) - Succès | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Réponse (400) -Validation ErrorErreur de validationThis 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 | |||
| |||
Réponse (403) -Forbidden accessAccès interditThis scenario happens if you sent non-existing uuid of the category | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Réponse (403) -Forbidden accessAccès interditThis 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). | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Body (ExampleExemple) | |||
| |||
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 | ||
Réponse (200) - Succès | |||
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. | ||
Réponse (400) -Validation ErrorErreur de validationThis 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 | |||
| |||
Réponse (403) -Forbidden accessAccès interditThis 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 | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Réponse (200) - Succès | |||
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 | ||
Réponse (403) -Forbidden accessAccès interdit | |||
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) | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Body (ExampleExemple) | |||
| |||
categories | Array of categories associate to location | ||
categories[0].uuid | Uuid of the category, to associate. | ||
Réponse (200) - Succès | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Réponse (400) -Validation ErrorErreur de validationThis 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 | |||
| |||
Réponse (403) -Forbidden accessAccès interditThis scenario happens if you sent non-existing uuid of the category | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Réponse (403) -Forbidden accessAccès interditThis 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 | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Réponse (200) - Succès | |||
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 | ||
Réponse (403) -Forbidden accessAccès interdit | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
|
...
PUT {url}/localtrac/store-locator/image | |||
---|---|---|---|
This route will assign an image to location as store locator image | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Body (ExampleExemple) | |||
| |||
image_uuid | Uuid of image | ||
location_uuid | Uuid of location | ||
description | Image description | ||
Réponse (200) - Succès | |||
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). | ||
Réponse (400) -Validation ErrorErreur de validationThis 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 | |||
| |||
Réponse (403) -Forbidden accessAccès interditThis 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. | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Réponse (200) - Succès | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Réponse (403) -Forbidden accessAccès interditThis scenario happens if you sent non-existing imageUuid | |||
Content-Type | application/json | ||
Body | |||
|
...
GET {url}/localtrac/store-locator/{locationUuid}/fields | |||
---|---|---|---|
This route will return the list of Store Locator fields, associated to location. For the moment, only “externalId” is supported as a custom field. | |||
Requête | |||
Headers | |||
Authorization | <token> jeton obtenu lors de l'authentification | ||
Accept | application/json | ||
Réponse (200) - Succès | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
| |||
Réponse (403) -Forbidden accessAccès interdit | |||
Headers | |||
Content-Type | application/json | ||
Body | |||
|
...