REST API Implementation Photo Import

This source is used to import implementation photos into Quant as a single image file.

This source is used to import implementation photos of fixtures into Quant. The input is a single image file. 
Every import adds a new photo to the fixture. Existing photos are not overwritten. Photos imported via the API have no author. The imported photo is displayed in Quant Web (in the Implementation Photos, Recent Photos, and Store Photos sections) and in Quant Desktop.

Use the Automatic Tasks section to create and set up an import. Once created, the task list will have the ID that you pass in the request URL.

Automatic Tasks

  • Settings

Before using the API, you must edit the following attributes in the Settings tab:

  • Check the Enabled attribute to enable the task.
  • In the Users with API Access Permission, select one or more users with the Robot role who will have permission to run the task.
  • Attributes
Attribute
Description
Type
Enabled
Specifies whether the user can access this resource.
yes/no
Title
Custom name of the automated task.
text
Description
Custom description of the automatic task function.
formatted text
Notes
Notes.
long text
Users with API Access Permission
Users with the Robot role who are authorized to run the task.
list of users
Delay in Seconds before Retrying
The number of seconds the client should wait before retrying the import in case of a long queue of requests to the server.
whole number

Settings

  • Request
Parameter
Value
URL
/v1/import/implementation-photo/{task_id}
Debug
?debug=true added to the URL will also display a warning in the response. Without it, only errors are listed.
Header
Content-Type: application/octet-stream
Header

Authorization: Bearer  <TOKEN>

TOKEN is obtained by / authenticate (see Login).

Method
POST
Body

Binary content of the image. Only one image can be sent in a request.

  • URL Parameters
Parameter
Description
Type
Required
StoreOid
OID of the store in Quant.
  number  yes
ComponentId
UUID of the fixture.
  string  yes
categoryOid
OID of the category. 
  number  conditional

When to use categoryOid:
Required: If the planogram is divided into multiple categories, you must include categoryOid to specify the category.
Do not include: If the planogram has only one category, do not send categoryOid in the request.

  • Status Codes
Status
Význam
200 OK
The photo was imported.
400 Bad Request
Incorrect request, for example a missing or invalid parameter, a missing categoryOid, or a missing image.
401 Unauthorized
The authorization token is invalid, or the user who is logged on with the token does not have permission to use the API.
404 Not Found
The store or the fixture with the specified ID was not found.
  • Latest Logs

In Quant, in addition to task settings, you can also view records of individual imports, including statistics, errors, and warnings.

We can view the details of a specific record by selecting it and clicking the Download Files button.
Download Files
  • Request (example)

curl -X POST --location “https://[YOUR_COMPANY].iquant.eu/v1/import/implementati{{TaskIDImportImplPhoto}}?debug=true&storeOid=169&componentId=123e4567-e89b-12d3-a456-426614174000&categoryOid=742&debug” 
-H “Authorization: Bearer ywJqq25pXO6oaCPqgEAiTioBVwM8Ih2kOwzzd3eWK3R2oDSA5n” 
-H “Content-Type: application/octet-stream” 
--data-binary “@photo.jpg”

  • Response 

{ "Status": "SUCCESS" }