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/urls

Prev Next

GENERAL INFORMATION

Purpose

This endpoint is used for sharing product images by sending us the URL where we can download the image. If you prefer sending an image using a base64 format, you can also use the following endpoint POST /Images

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 portal, the users giving the users a visual representation of the products they are working with. This makes this a highly recommended dataset to send.

Common pitfalls

Do not use a randomly generated uuid for the imageId field, as you need this to also be able to be able to update the image.

When you use this endpoint, we go to the URL you are supplying, to download the image. A common pitfall is sending us a URL that can only be approached from an internal network.

Another thing to double check is to make sure the itemId/colorId are consistent with the ones you are sending 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, because historical sales 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

  5. Make sure that the URL you are sending is publicly available, because we go to the URL to download the image from an IP address anywhere in the Azure Public IP range, which makes white listing our IP impossible.

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:

{
  "images": 
  [
    {
      "imageId": "fcf2c6a6-1cc5-43b1-bd2d-b616f8b2acb8",
      "itemId": "100001",
      "colorId": "10",
      "type": 0,
      "url": "https://www.image.com/image.jpeg"
    }
  ]
}

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 colorId of the item/style/SKU 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

Unknown = 99

No, but read best practices about this

url

The URL of the image where we can download the image (needs to be publically accessable)

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