Skip to main content

Index Your Data

Once your images and data files are uploaded to the system, and indexing or import process must be run before Image Search can be used.

Importing a Data File

Before you start the import process, you must first authenticate and obtain an access token.

Replace company-xyz with your customer subdomain, and client_id and client_secret values.

Get Token - Sample Request
curl -L -X POST 'https://api-company-xyz.evolvestorefront.com/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-d 'client_id=xxxxxxxxxxxxxxxxxxxxxxxxxx' \
-d 'client_secret=xxxxxxxxxxxxxxxxxxxxxxxxxx'
Get Token - Sample Response
{
"access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
"expires_in": 3600,
"token_type": "Bearer"
}

Call the /image-search/import POST API, replacing company-xyz with your customer subdomain, and the Bearer token and csvFile values.

Start Import Job - Sample Request
curl -L 'https://api-company-xyz.evolvestorefront.com/image-search/import' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxx' \
-d '{ "csvFile": "data/products.csv" }'
Start Import Job - Sample Response
{
"jobId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"csvFile": "data/products.csv"
}

Note the jobId value in the response.

View Results of an Import Job

To view the status and results of an import job, trigger the /image-search/import GET API, replacing the jobId and the Bearer token values.

Get Import - Sample Request
curl -L 'https://api-company-xyz.evolvestorefront.com/image-search/import?jobId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxx'
Get Import - Sample Response
{
"startTime": "2025-01-01 12:10:01 UTC",
"endTime": "2025-01-01 12:10:05 UTC",
"invokedCount": 87.0,
"lineCount": 87.0,
"csvFile": "data/products.csv",
"failedMap": {
"14178": [
"livingroom/furniture/furniturekit4_600.png"
]
},
"jobId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

API Reference