VERSION BETA
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 | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Body (Exemple) | |
{ "businessUuid":"{businessUuid}", "webhookUrl":"https://google.com.ua", "webhookSalt": "very_secure_string_to_be_md5_encoded" } | |
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 | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "success": true } | |
Réponse (400) - Erreur de validation | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "Provided data contains error(s). See each entry in [errors]", "errors": { "businessUuid": "This field is missing." } } | |
Réponse (403) - Accè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 | |
{ "message": "You do not have the required permission to alter this resource: business({businessUuid})" } |
GET {url}/localtrac/store-locator/locations/{businessUuid} | |
---|---|
This route will return the list locations for provided business, including all information about location. | |
Requête | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "data": { "89ba4184-d719-3d73-8040-bb88ca96b17a": { "uuid": "89ba4184-d719-3d73-8040-bb88ca96b17a", "active": true, "lastUpdated": "2020-09-11T22:17:42+00:00", "urls": { "website": "http:\/www.nicolas.biz\/Monahan%2C+Wilkinson+and+Cummings+%23569", "facebook": "https:\/\/www.facebook.com\/367317859940", "twitter": "https:\/\/twitter.com\/256463839911", "linkedin": "https:\/\/www.linkedin.com\/553707002725", "instagram": "https:\/\/www.instagram.com\/myloftssalonstudios\/544984617286", "googleMaps": "https:\/\/maps.google.com\/maps?cid=909164724356", "youtube": "https:\/\/www.youtube.com\/channel\/6873259932", "pinterest": "https:\/\/www.pinterest.ca\/piscinestrevi\/203962133720", "tripadvisor": "https:\/\/www.tripadvisor.ca\/75491159252" }, "payments": { "cash": true, "interact": true, "visa": true, "masterCard": true, "americanExpress": true, "payPass": true }, "name": { "en": "Monahan, Wilkinson and Cummings #569", "fr": "Publitech testing - Public Api122223213213" }, "description": { "en": "44444", "fr": "Description de l'entrepriseDescription de l'entrepriseDescription - Public 444444" }, "communication": { "contactEmail": "online@publitech.com", "primaryPhone": "+380 769-2511", "secondaryPhones": [ "", "" ], "fax": "1-846-209-7668" }, "storeCode": "DM5171R3IP8PZ1GK5RHSB742", "locale": "en-gb", "address": { "address1": "22 main street - Public Api", "address2": "", "city": "Lachine", "state": "40", "country": "CA", "zipcode": "12345", "lat": "-20.093785", "long": "-9.456042" }, "storeLocator": { "tags": [], "categories": [], "images": [] }, "schedules": { "sunday": [ { "start": "00:00", "end": "03:00" }, { "start": "11:00", "end": "24:00" } ], "monday": [ { "start": "00:00", "end": "03:00" }, { "start": "11:00", "end": "24:00" } ], "tuesday": [ { "start": "00:00", "end": "03:00" }, { "start": "11:00", "end": "24:00" } ], "wednesday": [ { "start": "00:00", "end": "03:00" }, { "start": "11:00", "end": "24:00" } ], "thursday": [ { "start": "00:00", "end": "03:00" }, { "start": "11:00", "end": "24:00" } ], "friday": [ { "start": "00:00", "end": "03:00" }, { "start": "11:00", "end": "24:00" } ], "saturday": [ { "start": "00:00", "end": "03:00" }, { "start": "11:00", "end": "24:00" } ] }, "scheduleExceptions": { "2021-07-29": [ { "start": "09:00", "end": "19:00" } ], "2021-08-08": [ { "start": "00:00", "end": "16:00" } ], "2021-09-09": [ { "start": "02:00", "end": "16:00" } ] }, "averageRating": 0 }, <...> } | |
data | Array liste des susccursales |
data[0].uuid | Identifiant unique (uuid) de la succursale dans LOCALTRAC. Il s'agit de l'uuid que vous devez utiliser pour toute autre demande nécessitant un <location_uuid> dans l'url. |
data[0].active | Valeur booléenne représentant l'état de l'emplacement, true pour active et false pour inactive. Lorsqu'un emplacement est défini comme inactif, il n'est surveillé dans aucun répertoire. |
data[0].lastUpdated | Timestamp de la dernière mise à jour sur le champ de n'importe quel emplacement |
data[0].urls | Un tableau contenant les sites Web et les URL de médias sociaux. Clés prises en charge:
|
data[0].payments | Un tableau contenant la liste des modes de paiement. La valeur est une valeur booléenne, true lorsque le mode de paiement est accepté ou false dans le cas contraire. Clés prises en charge:
|
data[0].name | Un tableau des traductions de noms de lieux. Chaque ligne du sous-tableau est une valeur associative de <language>: <name>. A Ce route renvoie par default le nom de la succursale inscrit dans la section store locator de la fiche de la succursale, si la valeur est vide «nom» général de l'emplacement sera retournée. |
data[0].description | Un tableau de toutes les descriptions d'emplacement. Chaque ligne du sous-tableau est une valeur associative de <language>: <description>. |
data[0].communication | Un tableau de toutes les informations de comtact. Clés prises en charge:
|
data[0].storeCode | Identifiant externe donné par le client lors de la création de l'emplacement ou lors de l'importation dans LOCALTRAC à partir d'un répertoire. |
data[0].locale | Langue de la succursale <locale>: description <description>. Nous prenons actuellement en charge que <locale> fr_CA et en_CA. |
data[0].address | Un tableau contenant l'adresse complète. Cette route renvoie "Adresse ligne 1 et 2" de la succursale provenant du store locator. S'il est vide, "adresse line 1 et 2" générale de l'emplacement. |
data[0].storeLocator | Un tableau des informations completentaire au localisateur de magasin d'emplacement. Clés prises en charge:
|
data[0].schedules | Un tableau des heures d'ouverture régulières de la succursale. |
data[0].scheduleExceptions | Un tableau des heures d’ouverture d'exceptions de la succursale. |
data[0].averageRating | Note moyenne Google pour l'année en cours pour cet emplacement. |
Réponse (403) - Accès interdit | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to obtain this resource: business({businessUuid})" } |
GET {url}/localtrac/store-locator/businessTags/{businessUuid} | |
---|---|
This route will return the list of Store Locator tags, associated to business | |
Requête | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
[ { "uuid": "44e8eb5d-f9fc-4f43-91cb-25c342e1639c", "translations": { "en": "Mregos EN estados trutos", "fr": "Mother of the french universe! Gaspésie– Îles-de-la-Madeleine" }, "slug": { "en": "mregos-en-estados-trutos", "fr": "mother-of-the-french-universe!-gaspesie--iles-de-la-madeleine" } }, <...> ] | |
uuid | Identifiant unique (uuid) de l’etiquette. Il s'agit de l'uuid que vous devez utiliser pour toute autre demande nécessitant la mise a jour d’un tag. |
translations | Un tableau de traductions du nom de la étiquette/tag. Pour le moment, seules les langues «en» et «fr» sont prises en charge. Les langues sont facultatives (la balise ne peut avoir qu'une seule langue). |
translations.en | Traduction anglaise de l’étiquette/tag. |
translations.fr | Traduction francaise de l'étiquette/tag. |
slug | Un tableau de slug pour les étiquettes/tags.. (généré automatiquement lors de l'insertion / mise à jour du tag). |
slug.en | Slug pour traduction anglaise de l’étiquette/tag. |
slug.fr | Slug pour la traduction francaise de l’étiquette/tag. |
Réponse (403) - Accès interdit | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to obtain this resource: business({businessUuid})" } |
POST {url}/localtrac/store-locator/businessTags/{businessUuid} | |
---|---|
Cet route définit la liste des balises Store Locator, associées à l'entreprise. (Cela effacera toutes les données précédentes et enregistrera la liste fournie) | |
Requête | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Body (Exemple) | |
{ "tags": [ { "uuid": "9618d518-e5e5-4c40-ada2-9237dbb10ada", "translations": { "en": "This tag will be updated (uuid stays the same)" } }, { "translations": { "en": "This tag will be created and will have two languages", "fr": "Mother of the french universe! Gaspésie– Îles-de-la-Madeleine" } } ] } | |
tags | Un tableau de étiquettes/tags a sauvegarder. |
tags[0].uuid (optional) | Uuid de l'étiquette/tag, reçu de la route GET. Si elle est fournie, la balise sera mise à jour (les traductions changeront, uuid restera le même). |
tags[0].translations | Un tableau de traductions de la l'étiquette/tag. Seuls «en» et «fr» sont désormais pris en charge. |
tags[0].translations.en (optional) | Slug pour traduction anglaise de l’étiquette/tag. |
tags[0].translations.fr (optional) | Slug pour traduction francaise de l’étiquette/tag. |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "success": true } | |
Réponse (400) - Erreur de validationCe scénario se produit si vous avez envoyé un contenu qui échoue au processus de validation minimum. Par exemple, ne pas fournir de traductions conduira au résultat suivant. | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "Provided data contains error(s). See each entry in [errors]", "errors": { "tags.0.translations": "This field is missing." } } | |
Réponse (403) - Accès interditCe scénario se produit si vous avez envoyé un uuid non existant de la balise. | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to alter this resource" } | |
Réponse (403) - Accès interditCe scénario se produit si vous avez envoyé businessUuid inexistant. | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to alter this resource: business({businessUuid})" } |
POST {url}/localtrac/store-locator/businessTags/{businessUuid}/add | |
---|---|
Cet itinéraire ajoutera une étiquette/tag à l'entreprise et l'associera à l'emplacement (si fourni). | |
Requête | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Body (Exemple) | |
{ "locationUuid": "{locationUuid}", "translations": { "en": "Hawaii", "fr": "Gaspésie Îles de la Madeleine" } } | |
locationUuid (optional) | Uuid de la succursale. L'étiquette/tag nouvellement créée sera associée à l'emplacement fourni. |
translations | Tableau de traductions de la balise. Seuls «en» et «fr» sont pris en charge. |
translations.en (optional) | Traduction anglaise du nom. |
translations.fr (optional) | Traduction francaise du nom. |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "uuid": "df1cdf5c-f233-4b2c-b787-775db8f0d9e1" } | |
uuid | Identifiant unique (uuid) de l’étiquette/tag dans LOCALTRAC. Il s'agit de l'uuid que vous devez utiliser pour toute autre demande de mise a jours des étiquettes/tags d’une succursale. |
Réponse (400) - Erreur de validationCe scénario se produit si vous avez envoyé un contenu qui échoue au processus de validation minimum. Par exemple, ne pas fournir de traductions conduira au résultat suivant. | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "Provided data contains error(s). See each entry in [errors]", "errors": { "translations": "This field is missing." } } | |
Réponse (403) - Accès interditCe scénario se produit si vous avez envoyé businessUuid ou locationUuid non existant | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to alter this resource: location({locationUuid})" } |
GET {url}/localtrac/store-locator/locationTags/{locationUuid} | |
---|---|
Cet itinéraire renverra la liste des étiquettes/tagsStore Locator, associées à l'emplacement. | |
Requête | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
[ { "uuid": "44e8eb5d-f9fc-4f43-91cb-25c342e1639c", "translations": { "en": "Mregos EN estados trutos", "fr": "Mother of the french universe! Gaspésie– Îles-de-la-Madeleine" }, "slug": { "en": "mregos-en-estados-trutos", "fr": "mother-of-the-french-universe!-gaspesie--iles-de-la-madeleine" } }, <...> ] | |
uuid | Uuid de la succursale. L'étiquette/tag nouvellement créée sera associée à l'emplacement fourni. |
translations | Un tableau de traductions des étiquettes/tags. Pour le moment, seules les langues «en» et «fr» sont prises en charge. Les langues sont facultatives (la balise ne peut avoir qu'une seule langue). |
translations.en | Traduction anglaise du nom. |
translations.fr | Traduction francaise du nom. |
slug | Un tableau de slug pour les traductions du nom des étiquettes/tags (généré automatiquement lors de l'insertion / mise à jour). |
slug.en | Slug pour traduction anglaise de l’étiquette/tag. |
slug.fr | Slug pour traduction francaise de l’étiquette/tag. |
Réponse (403) - Accès interdit | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to obtain this resource: location({locationUuid})" } |
POST {url}/localtrac/store-locator/locationTags/{locationUuid} | |
---|---|
Cet route définira la liste des balises Store Locator, associées à la succursale. (Cela effacera toutes les données précédentes et enregistrera la liste fournie) | |
Requête | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Body (Exemple) | |
{ "tags": [ { "uuid": "b38b8d6e-2f70-490a-89ba-431410d44016" }, <...> ] } | |
tags | Un tableau d’étiquette/tag à associer à la succursale. |
tags[0].uuid | Identifiant unique de l'étiquette/tag à associer. |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "success": true } | |
Réponse (400) - Erreur de validationCe scénario se produit si vous avez envoyé un contenu qui échoue au processus de validation minimum. Par exemple, une faute de frappe dans le nom du paramètre conduira au résultat suivant | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "Provided data contains error(s). See each entry in [errors]", "errors": { "tags.0.uuid": "This field is missing.", "tags.0.1uid": "This field was not expected." } } | |
Réponse (403) - Accès interditCe scénario se produit si vous avez envoyé un uuid d'étiquette/tag non existant | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to alter this resource" } | |
Réponse (403) - Accès interditCe scénario se produit si vous avez envoyé un identifiant unique de succursale non existant (locationUuid). | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to alter this resource: location({locationUuid})" } |
GET {url}/localtrac/store-locator/businessCategories/{businessUuid} | |
---|---|
Cette route renverra la liste des catégories de Store Locator, associées à l'entreprise. | |
Requête | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
[ { "uuid": "44e8eb5d-f9fc-4f43-91cb-25c342e1639c", "translations": { "en": "Mregos EN estados trutos", "fr": "Mother of the french universe! Gaspésie– Îles-de-la-Madeleine" }, "slug": { "en": "mregos-en-estados-trutos", "fr": "mother-of-the-french-universe!-gaspesie--iles-de-la-madeleine" } }, <...> ] | |
uuid | Identifiant unique de la catégorie (uuid) dans LOCALTRAC . C'est l'uuid que vous devez utiliser pour toute autre demande de mise à jour de la catégorie. |
translations | Un tableau de traductions du nom de la catégorie. Pour le moment, seules les langues «en» et «fr» sont prises en charge. Les langues sont facultatives (la catégorie ne peut avoir qu'une seule langue). |
translations.en | Traduction anglaise du nom de la catégorie. |
translations.fr | Traduction francaise du nom de la catégorie. |
slug | Un tableau de slug pour les traductions du nom de la catégorie. (généré automatiquement lors de l'insertion / mise à jour de la catégorie). |
slug.en | Slug pour la traduction anlaise de la catégorie. |
Slug pour la traduction francaise de la catégorie. | |
Réponse (403) - Accès interdit | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to obtain this resource: business({businessUuid})" } |
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 | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Body (Exemple) | |
{ "categories": [ { "uuid": "9618d518-e5e5-4c40-ada2-9237dbb10ada", "translations": { "en": "This category will be updated (uuid stays the same)" } }, { "translations": { "en": "This category will be created and will have two languages", "fr": "Mother of the french universe! Gaspésie– Îles-de-la-Madeleine" } } ] } | |
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 | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "success": true } | |
Réponse (400) - Erreur 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 | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "Provided data contains error(s). See each entry in [errors]", "errors": { "categories.0.translations": "This field is missing." } } | |
Réponse (403) - Accès interditThis scenario happens if you sent non-existing uuid of the category | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to alter this resource" } | |
Réponse (403) - Accès interditThis scenario happens if you sent non-existing businessUuid | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to alter this resource: business({businessUuid})" } |
POST {url}/localtrac/store-locator/businessCategories/{businessUuid}/add | |
---|---|
This route will add category to business and associate it to location (if provided). | |
Requête | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Body (Exemple) | |
{ "locationUuid": "{locationUuid}", "translations": { "en": "Hawaii", "fr": "Gaspésie Îles de la Madeleine" } } | |
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 | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "uuid": "df1cdf5c-f233-4b2c-b787-775db8f0d9e1" } | |
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) - Erreur 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 | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "Provided data contains error(s). See each entry in [errors]", "errors": { "translations": "This field is missing." } } | |
Réponse (403) - Accès interditThis scenario happens if you sent non-existing businessUuid or locationUuid | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to alter this resource: location({locationUuid})" } |
GET {url}/localtrac/store-locator/locationCategories/{locationUuid} | |
---|---|
This route will return the list of Store Locator categories, associated to location | |
Requête | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
[ { "uuid": "44e8eb5d-f9fc-4f43-91cb-25c342e1639c", "translations": { "en": "Mregos EN estados trutos", "fr": "Mother of the french universe! Gaspésie– Îles-de-la-Madeleine" }, "slug": { "en": "mregos-en-estados-trutos", "fr": "mother-of-the-french-universe!-gaspesie--iles-de-la-madeleine" } }, <...> ] | |
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) - Accès interdit | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to obtain this resource: location({locationUuid})" } |
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 | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Body (Exemple) | |
{ "categories": [ { "uuid": "b38b8d6e-2f70-490a-89ba-431410d44016" }, <...> ] } | |
categories | Array of categories associate to location |
categories[0].uuid | Uuid of the category, to associate. |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "success": true } | |
Réponse (400) - Erreur 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 | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "Provided data contains error(s). See each entry in [errors]", "errors": { "categories.0.uuid": "This field is missing.", "categories.0.1uid": "This field was not expected." } } | |
Réponse (403) - Accès interditThis scenario happens if you sent non-existing uuid of the category | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to alter this resource" } | |
Réponse (403) - Accès interditThis scenario happens if you sent non-existing locationUuid | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to alter this resource: location({locationUuid})" } |
GET {url}/localtrac/store-locator/image/{locationUuid} | |
---|---|
This route will return the list of Store Locator images, associated to location | |
Requête | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
[ { "uuid": "2c0330bc-3165-4778-bbe0-a1fdd0c5c743", "url": "https:\/\/images.google.com\/images\/branding\/googlelogo\/2x\/googlelogo_color_272x92dp.png", "thumbnail": "https:\/\/images.google.com\/images\/branding\/googlelogo\/2x\/googlelogo_color_272x92dp.png", "mime": "image\/png", "description": "", "createdAt": "2020-09-10 14:24:16" }, <...> ] | |
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) - Accès interdit | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to obtain this resource: location({locationUuid})" } |
PUT {url}/localtrac/store-locator/image | |
---|---|
This route will assign an image to location as store locator image | |
Requête | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Body (Exemple) | |
{ "image_uuid": "{imageUuid}", "location_uuid": "{locationUuid}", "description": "xxx" } | |
image_uuid | Uuid of image |
location_uuid | Uuid of location |
description | Image description |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "uuid": "763ef130-8b36-42ea-84a3-7d297cbc1fe6", "url": "https:\/\/images.google.com\/images\/branding\/googlelogo\/2x\/googlelogo_color_272x92dp.png", "thumbnail": "https:\/\/images.google.com\/images\/branding\/googlelogo\/2x\/googlelogo_color_272x92dp.png", } | |
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) - Erreur 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 | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "Provided data contains error(s). See each entry in [errors]", "errors": { "image_uuid": "This field is missing.", "ima1ge_uuid": "This field was not expected." } } | |
Réponse (403) - Accès interditThis scenario happens if you sent non-existing image_uuid | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to alter this resource: image({image_uuid})" } |
DELETE {url}/localtrac/store-locator/image/{imageUuid} | |
---|---|
This route will delete store locator image. | |
Requête | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "success": true } | |
Réponse (403) - Accès interditThis scenario happens if you sent non-existing imageUuid | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to delete this resource: storeLocatorImage({imageUuid})" } |
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 | |
En-têtes | |
Authorization | <token> jeton obtenu lors de l'authentification |
Accept | application/json |
Réponse (200) - Succès | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "externalId": "some_custom_external_id" } | |
Réponse (403) - Accès interdit | |
En-têtes | |
Content-Type | application/json |
Body | |
{ "message": "You do not have the required permission to obtain this resource: location({locationUuid})" } |