Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

...

POST {url}/localtrac/store-locator/businessCategories/{businessUuid}/add

Cette route ajoute une catégorie à 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)

Bloc de code
{
	"locationUuid": "{locationUuid}",
	"translations": {
      "en": "Hawaii",
      "fr": "Gaspésie Îles de la Madeleine"
		}
}

locationUuid (optional)

Identifiant unique (Uuid) de la succursale. La catégorie nouvellement créée sera associée à la succursale indiqué.

translations

Tableau de traductions des catégories. 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

Bloc de code
{
  "uuid": "df1cdf5c-f233-4b2c-b787-775db8f0d9e1"
}

uuid

Identifiant unique (uuid) de la catégorie. C'est l'uuid que vous devez utiliser pour toute autre demande de mise à jour de la catégorie ou de l'associer à des emplacements.

Réponse (400) - Erreur de validation

This scenario happens if you sent any content who fails the minimum validation process. For instance, failing to provide translations will lead to the following resultCe 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

Bloc de code
{
  "message": "Provided data contains error(s). See each entry in [errors]",
  "errors": {
    "translations": "This field is missing."
  }
}

Réponse (403) - Accès interdit

This scenario happens if you sent non-existing businessUuid or locationUuid

Ce scénario se produit si vous avez envoyé businessUuid ou locationUuid non existant

Content-Type

application/json

Body

Bloc de code
{
  "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 Cette route renverra la liste des catégories de Store Locator categories, associated to location, 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

Bloc de code
[
  {
    "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

Bloc de code
{
  "message": "You do not have the required permission to obtain this resource: location({locationUuid})"
}

...