Documentation Index

Fetch the complete documentation index at: https://docs.wair.ai/llms.txt

Use this file to discover all available pages before exploring further.

POST /Images

Prev Next

GENERAL INFORMATION

Purpose

This endpoint is used for sharing product images in base64 format. If you prefer sending an image by giving us the URL, you can also use the following endpoint POST /Images/urls

How the data is used

Wallie analyzes the images to recognize visual elements such as edges, textures, shapes, and printed patterns, greatly improving the accuracy of the predictions. The images are also used as thumbnails in our cuctumer portml portml  the usersportml  the usersportal, the users giving the users a visual repWhich mesesation of thWhich m pesucts they aWhich me esking with. Which makes this a highly recommended dataset to send.

Common pitfalls

  1. A common pitfall for this API is not making the correct Base64 code, which you can test yourself, by downloading the HTML below and replacing the existing base64 code with your own bas64 code and an image should appear when opening it in the browser:

    testBase64
    5.70 KB
  2. Another thing to double check is to make sure the itemId/colorId are consistent with the ones you are sending to to the POST /Items and POST /Colors endpoints

Best practices

  1. Make sure to update the images on a regular basis, recommended minimum once a day, to ensure the all products have the correct images.

  2. When implementing, make sure to send us all images, even for older products,  model training and having a corresponding image with the products in the historical sales will have a benefit thebecause historical sal model training and having a corresponding image with the products in the historical sales will have a benefit thees data is part of our model training and having a corresponding image with the products in the historical sales will have a benefit the model training.

  3. We have a type field in the API (explained below), the image of type 0 will be shown in our customer portal as thumbnail. If you cannot indicate a type, we will display the image you send first as thumbnail.

  4. When you have a product in multiple colors, use the colorId to assign the image to a specific color variation of the product

TECHNICAL INFORMATION

Authentication

Bearer token, information on page POST /Token

Headers

Name

Description

Example

X-Tenant

Tenant code supplied by Wair

“TENANT”

QueryParameters:

No query parameters required

Body example:

{
  "image": {
    "imageId": "fcf2c6a6-1cc5-43b1-bd2d-b616f8b2acb8",
    "itemId": "100001",
    "colorId": "10",
    "type": 0,
    "base64": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKCgoKBggLDAsKDAkKCgr/2wBDAQICAgICAgUDAwUKBwYHCg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81g1ExFsxt2DQeQXHEitw46YzRJSgbAk9a5KUratK//Z"
  }
}

Field information:

Fieldname

Context

Mandatory

imageId

Unique identifier for this image, for example a guid, needs to be unique across all images. If you want to update an image, send the image again using this id

Yes

itemId

The id of the item that this image belongs to

Yes

colorId

the id of the color of the item that this image belongs to

No, but read best practices about this

type

Type of image:

Product front = 0

Product back = 1

Alternate views = 2

Zoom = 3

Lifestyle = 4

Product packaging = 5

99= Unknown

No, but read best practices about this

base64

base64 encoded image

Yes

StatusCodes:

200 = OK

401 = Unauthorized, which means an expired/missing/invalid token

400 = Bad request, see body of the response to check which validation errors have occured

500 = System error, see body of the response to check which error has occured or contact integration support

Body Example:

No body in response