Upload image

This API allows you to upload an image for Visual Search.

Endpoints

  • Production: https://pathways.dxpapi.com/api/v2/widgets/visual/upload/{widget_id}
  • Staging: https://pathways-staging.dxpapi.com/api/v2/widgets/visual/upload/{widget_id}

Response Example

🚧

The request payload should not exceed 2 MB.

The response provides you with the image_id value.

image_id can be used to make multiple subsequent queries for widget responses (with different parameters/filters and objects) without the need to re-upload the image.

{
    "response": {
       "image_id": "3d4b4331763c31b39da02704d48e890f90c36ef6b4835eface4820a3e1127987"
    },
    "metadata": {
        "widget": {
            "id": "79opvm5j",
            "name": "preview",
            "description": "preview",
            "type": "visual_search",
            "rid": "680d0382-7297-4db7-9df7-61522b4612c7"
        },
        "query": {
            "image_id": "3d4b4331763c31b39da02704d48e890f90c36ef6b4835eface4820a3e1127987"
        }
    }
}
Path Params
string
required
Defaults to 1jwy7eg9

The ID of the widget, which can be found in the Widget Configurator in the Dashboard.

The example value shown here, 1jwy7eg9, is included for your convenience to send a request with Try It.

Query Params
int32
required
Defaults to 6276

Your site's numerical Bloomreach account ID.

Your Bloomreach representative gives your site's account ID to you before or during your integration kickoff meeting.
The example value shown here, 6276, is included for your convenience to send a request with Try It.

string
required
Defaults to bloomreach_devdocs

Your site domain's ID, which is provided by Bloomreach. This ID is for the domain that you want to receive your Bloomreach API requests.

This parameter identifies the specific site version when one account ID hosts multiple site versions with unique characteristics, such as language versions.
The example value shown here, bloomreach_devdocs, is included for your convenience to send a request with Try It.

string

The unique key shared during the integration phase. This is used to authenticate your API call.

Headers
string
required
Defaults to form-data; name="image"; filename="filename.jpg"

This specifies the form field as "image" and the suggested filename of the image being uploaded.
Example syntax: Content-Disposition: form-data; name="image"; filename="filename.jpg"

string
required
Defaults to image/jpeg

This header specifies the media type (image) and format. We accept all image formats - jpg, png, jpeg, webp.
Example syntax: Content-Type: image/jpeg

Language
Response
Click Try It! to start a request and see the response here!

© Bloomreach, Inc. All rights reserved.