POST update_metadata

Update the metadata for a list of images already present in your collection.

Resource URL

https://wineengine.tineye.com/<company>/rest/update_metadata/

Performance

The WineEngine API can perform one add, update or delete request at a time. Any extra requests submitted will be queued up for processing as slots become available.

Each request accepts maximum 10 filepaths.

Parameters

Filepath

Key

Description

filepath

A filepath under which the image file was added to the collection.

image_id (optional)

An ID under which the image file will be stored in the collection. Any string or integer can be used as image ID, up to 255 characters.

variety (optional)

The wine’s variety to be stored along with the image. This overwrites the variety extracted automatically from the wine label.

vintage (optional)

The wine’s vintage to be stored along with the image. This overwrites the vintage extracted automatically from the wine label.

color (optional)

The wine’s color to be stored along with the image. This overwrites the color extracted automatically from the wine label.

region (optional)

The wine’s region to be stored along with the image. This overwrites the region extracted automatically from the wine label.

country (optional)

The wine’s country to be stored along with the image. This overwrites the country extracted automatically from the wine label.

Filepaths

Key

Description

filepaths[0]

A filepath under which the first image file was added to the collection.

image_ids[0] (optional)

An ID under which the first image file will be stored in the collection.

varieties[0] (optional)

The wine’s variety to be stored along with the first image.

vintages[0] (optional)

The wine’s vintage to be stored along with the first image.

colors[0] (optional)

The wine’s color to be stored along with the first image.

regions[0] (optional)

The wine’s region to be stored along with the first image.

countries[0] (optional)

The wine’s country to be stored along with the first image.

filepaths[n] (optional)

A filepath under which the last image file was added to the collection.

image_ids[n] (optional)

An ID under which the last image file will be stored in the collection.

varieties[n] (optional)

The wine’s variety to be stored along with the last image.

vintages[n] (optional)

The wine’s vintage to be stored along with the last image.

colors[n] (optional)

The wine’s color to be stored along with the last image.

regions[n] (optional)

The wine’s region to be stored along with the last image.

countries[n] (optional)

The wine’s country to be stored along with the last image.

Request example

curl https://wineengine.tineye.com/<company>/rest/update_metadata/   \
     -F "filepath=path/folder/1.jpg"                                 \
     -F "image_id=dd8d-6dc8-bf3f"                                    \
     -F "variety=Chardonnay"                                         \
     -F "vintage=2024"

or

curl https://wineengine.tineye.com/<company>/rest/update_metadata/   \
     -F "filepaths[0]=path/folder/1.jpg"                             \
     -F "image_ids[0]=6558512785"                                    \
     -F "colors[0]=Red Wine"                                         \
     -F "regions[0]=Niagara"                                         \
     -F "countries[0]=Canada"                                        \
     -F "filepaths[1]=path/folder/2.jpg"                             \
     -F "image_ids[1]=9658451257"                                    \
     -F "colors[1]=White Wine"                                       \
     -F "regions[1]=Maipo Valley"                                    \
     -F "countries[1]=Chile"

Response examples

JSON

{
    "method": "update_metadata",
    "status": "ok",
    "error": [],
    "result": [],
    "stats": {
        "time_update": 6.01,
        "time_total": 6.56
    }
}

XML

<?xml version="1.0" encoding="utf-8"?>
<data>
    <method>update_metadata</method>
    <status>ok</status>
    <error/>
    <result/>
    <stats>
        <time_update>6.01</time_update>
        <time_total>6.56</time_total>
    </stats>
</data>