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.

...

GET {url}/localtrac/store-locator/image/{locationUuid}

Cette route renvoit la liste des images de Store 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

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

Identifiant unique (uuid) de l'image de localisation de magasin pour cet emplacement.

url

URL de l'image originale

thumbnail

URL de l'image redimensionnée (vignette 95x95).

mimeImage

Type d’image (mime type)

description

Description de l’image

createdAt

Timestamp

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

...

PUT {url}/localtrac/store-locator/image

This route will assign an image to location as store locator imageCette route attribut une image à la succursale.

Requête

En-têtes

Authorization

<token> jeton obtenu lors de l'authentification

Accept

application/json

Body (Exemple)

Bloc de code
{
	"image_uuid": "{imageUuid}",
	"location_uuid": "{locationUuid}",
	"description": "xxx"
}

image_uuid

Uuid of Identifiant unique (Uuid) de l'image

location_uuidUuid of location

Identifiant unique (Uuid) de la succursale

descriptionImage description

Description de l’image

Réponse (200) - Succès

En-têtes

Content-Type

application/json

Body

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

uuidLOCALTRAC

Identifiant unique identifier (uuid) of the store locator image. de l'image de la succursale

urlUrl

to original imageURL de l'image d'origine

thumbnailUrl

to resized image (95x95 thumbnailURL de l'image redimensionnée (vignette 95x95).

Réponse (400) - Erreur de validation

This scenario happens if you sent any content who fails the minimum validation process. For instance, typo in parameter name 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, une faute de frappe dans le nom du paramètre 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": {
    "image_uuid": "This field is missing.",
    "ima1ge_uuid": "This field was not expected."
  }
}

Réponse (403) - Accès interdit

This scenario happens if you sent non-existing Ce scénario se produit si vous avez envoyé un image_uuid non existant

Content-Type

application/json

Body

Bloc de code
{
  "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 imageCette route supprimera l'image de localisation de magasin.

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
{
  "success": true
}

Réponse (403) - Accès interdit

This scenario happens if you sent non-existing imageUuidCe scénario se produit si vous avez envoyé une imageUuid non existante

Content-Type

application/json

Body

Bloc de code
{
  "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 Cette route renvoit la liste des champs Store Locator fields, associated to location. For the moment, only “externalId” is supported as a custom field, associés à la succursale. Pour le moment, seul «externalId» est pris en charge en tant que champ personnalisé.

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
{
  "externalId": "some_custom_external_id"
}

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

...