Structure of an asset

The Required and optional fields for your assets

Required data

an asset element has the following minimal structure (More complete store example)

JSON
        {
    "storeId": "unique identifier",
    "name": "Store Name",
    "location": {
        "lat": 43.600,
        "lng": 3.883
    }
}

    

storeId, name and location are mandatory, everything else is optional.

The storeId field must be a unique identifier for your store. And match the following regexp [A-Za-z0-9]+

Optional data

types

types : an array of string

JSON
        {
    "types": ["book_store", "library"]
}

    

tags

tags: an array of string

JSON
        {
    "tags": ["science", "comics"]
}

    

address

address

JSON
        {
    "address": {
        "lines": ["Road name", "Another line of address"],
        "countryCode": "FR",
        "city": "Paris",
        "zipcode": "75000"
    }
}

    

contact

contact might contain website, phone and email values.

JSON
        {
    "contact": {
        "website": "website url",
        "phone": "phone number",
        "email": "contact email"
    }
}

    

openingHours

In this example the store will be open between 8:30am and 19:30pm every day except sunday (7) where it’ll be closed. The december 24th 2015 the store will be open from 9:00am to 18:00pm and the december 25th 2015 the store will be closed.

For more details concerning Open Hours see the dedicated page Opening Hours.

JSON
        {
    "openingHours": {
        "timezone": "Europe/Paris",
        "usual": {
            "7": [],
            "default": [{"start": "08:30", "end": "19:30"}]
        },
        "special": {
        "2015-12-24": [{"start": "09:00", "end": "18:00"}],
                    "2015-12-25": []}
    }
}

    

userProperties

userProperties might contain additional user-defined data.

localizedNames

You can define alternate names for your assets. These localized names are useful for multi-language integrations. Combined with our Autocomplete API endpoint you can let your users find your store in their native language.

JSON
        {
"localizedNames": {
      "ar": "مركز فيليتزي التجاري",
      "fr": "Centre Commercial Velizy",
      "it": "Centro Commerciale Velizy",
      "gb": "Velizy Shopping Center",
      "id": "Pusat Perbelanjaan Velizy",
      "ko": "밸리지 쇼핑센터",
      "sv": "Vélizy, galleria",
      "th": "ศูนย์สรรพสินค้า Velizy Shopping Center",
      "tr": "Velizy Alışveriş Merkezi"
    }
}

    
Was this helpful?