/
Images

Images

 

 

GET {url}/localtrac/image/{businessUuid}

GET {url}/localtrac/image/{businessUuid}

This route will return the list of images from business gallery

Request

Headers

Authorization

<token> obtained during the Authentication

Accept

application/json

Response (200) - Success

Headers

Content-Type

application/json

Body

 

[ { "uuid": "4ed14c73-311c-4907-95b8-4735fd313e2c", "url": "https:\/\/klapida.net\/localtracImages\/superfolder\/superimage.png", "thumbnail": "https:\/\/thumbnails.com\/localtracImages\/superThumbnails\/thumbnail.png", "mime": "image\/png", "originalFilename": "Screenshot (16).png", "createdAt": "2020-11-02 15:27:49" }, <...> ]

uuid

LOCALTRAC unique identifier (uuid) of the location. This is the uuid you should use for any further request associated with the image.

url

Url to original image

thumbnail

Url to resized image (95x95 thumbnail).

mime

Image mime type

originalFilename

Original filename of the uploaded image

createdAt

Timestamp

 

 

Response (403) - Forbidden access

Headers

Content-Type

application/json

Body

 

{ "message": "You do not have the required permission to obtain this resource: business({businessUuid})" }

 

 

POST {url}/localtrac/image

POST {url}/localtrac/image

This route will upload new image to business gallery

Request

Headers

Authorization

<token> obtained during the Authentication

Accept

application/json

Mulitpart Form (Example)

description (optional)

Description of the image. May be used within some apiservices.

image

The image (file) you want to upload

location_uuid ( optional )

Uuid of location to automatically assign new image. If this field is present, image_category_uuid should be present too.

image_category_uuid ( optional )

Uuid of the category of the image (Google logo, Facebook picture, etc…)

location_image_uuid ( optional )

Uuid of the location image to be updated with uploaded image. If this field is present, there should be no location_uuid and image_category_uuid.

business_uuid

Uuid of the business

 

 

Response (200) - Success

Headers

Content-Type

application/json

Body

 

{ "imageUuid": "79d2c975-0d24-4680-b290-c0afe336112b", "url": "https:\/\/klapida.net\/localtracImages\/superfolder\/superimage.png", "thumbnail": "https:\/\/thumbnails.com\/localtracImages\/superThumbnails\/thumbnail.png", "locationImageUuid": "58fd9418-8643-4a11-b3fd-936dda3dc954", "error": "You cannot assign multiple images to image category: 4701308f-ccfb-4946-9706-e53e94acf1e7" }

uuid

LOCALTRAC unique identifier (uuid) of the store locator image.

url

Url to original image

thumbnail

Url to resized image (95x95 thumbnail).

locationImageUuid

Uuid of created locationImage. This field appears in the result only if new location image was created (and there was no error).

error

Possible error message. For example, you tried to assign an image to a category, who allows only one image. You won’t get “locationImageUuid” field, but you will get an error. But your image will still be uploaded, so you can use imageUuid for further operations.

 

 

Response(400) - Validation Error

This scenario happens if you sent any content who fails the minimum validation process. For instance, failing to provide required fields will lead to the following result

Headers

Content-Type

application/json

Body

 

 

Response (403) - Forbidden access

This scenario happens if you sent non-existing business_uuid

Content-Type

application/json

Body

 

 

 

DELETE {url}/localtrac/image/{imageUuid}

DELETE {url}/localtrac/image/{imageUuid}

This route will delete image from business gallery. Keep in mind, if that image was associated to some locations, it won’t be deleted for locations. It will be deleted just from the business gallery (you won’t be able to assign it to locations anymore).

Request

Headers

Authorization

<token> obtained during the Authentication

Accept

application/json

 

 

Response (200) - Success

Headers

Content-Type

application/json

Body

 

 

Response (403) - Forbidden access

This scenario happens if you sent non-existing image_uuid

Content-Type

application/json

Body

 

 

 

GET {url}/localtrac/imageCategories

GET {url}/localtrac/imageCategories

This route will return the list possible image categories

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 imageCategory. This is the uuid you should use for any further request associated with the imageCategory.

name

Category name of the apiservice

description

Boolean field, showing if this category supports image description (if it can be shown somewhere).

apiserviceSlug

Slug of the apiservice. “Null” in this field, means this category is a “default fallback” for every non-automated directory.

height

Recommended height

width

Recommended width

singular

Boolean field, showing if this category supports multiple images. (if true - only one image can be assigned to it).

 

 

 

 

GET {url}/localtrac/locationImage/{locationUuid}

GET {url}/localtrac/locationImage/{locationUuid}

This route will return the list of images assigned to the 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 image. This is the uuid you should use for any further request associated with the image.

url

Url to original image

thumbnail

Url to resized image (95x95 thumbnail).

mime

Image mime type

description

Image description

imageCategory

Uuid of the image category

uploaded

Boolean field, showing if the image was upoaded to the apiservice (according th image category).

createdAt

Timestamp

 

 

Response (403) - Forbidden access

This scenario happens if you sent non-existing location_uuid

Headers

Content-Type

application/json

Body

 

 

 

PUT {url}/localtrac/locationImage/{locationUuid}

PUT {url}/localtrac/locationImage/{locationUuid}

This route will associate an image with the image category for this location,

Request

Headers

Authorization

<token> obtained during the Authentication

Accept

application/json

Body (Example)

image_uuid

LOCALTRAC unique identifier (uuid) of the image. This is the uuid you should use for any further request associated with the image.

location_uuid

LOCALTRAC unique identifier (uuid) of the location. This is the uuid you should use for any further request associated with the location.

image_category_uuid

LOCALTRAC unique identifier (uuid) of the imageCategory. This is the uuid you should use for any further request associated with the imageCategory.

description

Image description

 

 

Response (200) - Success

Headers

Content-Type

application/json

Body

 

uuid

LOCALTRAC unique identifier (uuid) of the locationImage. This is the uuid you should use for any further request associated with the locationImage.

url

Url to original image

thumbnail

Url to resized image (95x95 thumbnail).

 

 

Response(400) - Validation Error

This scenario happens if you sent any content who fails the minimum validation process. For instance, failing to provide required fields will lead to the following result

Headers

Content-Type

application/json

Body

 

 

Response (403) - Forbidden access

This scenario happens if you sent non-existing location_uuid

Headers

Content-Type

application/json

Body

 

 

 

POST {url}/localtrac/locationImage

POST {url}/localtrac/locationImage

This route will update existing locationImage

Request

Headers

Authorization

<token> obtained during the Authentication

Accept

application/json

Body (Example)

image_uuid

LOCALTRAC unique identifier (uuid) of the image. This is the uuid you should use for any further request associated with the image.

location_uuid

LOCALTRAC unique identifier (uuid) of the location. This is the uuid you should use for any further request associated with the location.

description

Image description

 

 

Response (200) - Success

Headers

Content-Type

application/json

Body

uuid

LOCALTRAC unique identifier (uuid) of the locationImage. This is the uuid you should use for any further request associated with the locationImage.

url

Url to original image

thumbnail

Url to resized image (95x95 thumbnail).

 

Response(400) - Validation Error

This scenario happens if you sent any content who fails the minimum validation process. For instance, failing to provide required fields will lead to the following result

Headers

Content-Type

application/json

Body

 

Response (403) - Forbidden access

This scenario happens if you sent non-existing image_uuid

Headers

Content-Type

application/json

Body

 

 

 

 

DELETE {url}/localtrac/locationImage/{locationImageUuid}

DELETE {url}/localtrac/locationImage/{locationImageUuid}

This route will delete image for this location. Keep in mind, that image won’t be deleted from the business gallery (you will be able to assign it to locations again).

Request

Headers

Authorization

<token> obtained during the Authentication

Accept

application/json

 

 

Response (200) - Success

Headers

Content-Type

application/json

Body

 

 

Response (403) - Forbidden access

This scenario happens if you sent non-existing locationImageUuid

Content-Type

application/json

Body

 

 

 

Related content

Locations
More like this
Succursales (Locations)
Succursales (Locations)
More like this
Authentication
Authentication
More like this
Store Locator
More like this
Localisateur de succursale
Localisateur de succursale
More like this