ECL Documentation (1.0)

Download OpenAPI specification:Download

Item Formats

Depending on the type of list returned, the 'items' will be of varying formats. Examples:

Menu

{
  "name": "Chocolate Croissant",
  "cost": { ... },
  "description": "A tantalizing treat",
  "photo": {
    "url": "http://www.yext-static.com/cms/chocolate-croissant.jpg",
    "height": 250,
    "width": 250
  }
  "calories": {
    "type": "RANGE",
    "calorie": 300,
    "rangeTo": 350
  }
}

Bio


{
  "name": "Dr. Allan Sicignano",
  "description": "Dr. Allan Sicignano is at the forefront of modern chiropractor techniques...",
  "photo": {"url": "http://www.yext-static.com/cms/dr-allan-sicignano.jpg", "height": 250, "width": 250},
  "education": [
    "Bachelor of Science, Cambridge University",
    "USD Medical School"
  ],
  "certifications": [
    "Chiropractory United",
    "Verified Provider"
  ],
  "services": [
    "Spinal Decompression"
  ],
  "url": "http://www.superchiro.com"
}

Product or Service


{
  "name": "Black & Decker MOUSE Detail Sander with Dust Collection",
  "cost": { ... },
  "photos": [
    {"url": "http://www.yext-static.com/cms/detail-sander.jpg", "height": 250, "width": 250},
    {"url": "http://www.yext-static.com/cms/detail-sander2.jpg", "height": 250, "width": 250}
  ],
  "video": "http://www.youtube.com/watch?v=cGW0XKYeM6o",
  "url": "http://www.kmart.com/deal-of-the-day/dap-120000000279845"
}

Event


{
  "type": "Concert",
  "name": "Gaelic Storm",
  "starts": "2012-08-23T20:00-05",
  "ends": "2012-08-24T00:00-05",
  "description": "$20 tickets.  Doors at 8pm, show at 9pm.",
  "photos": [
    {"url": "http://www.yext-static.com/cms/detail-sander.jpg", "height": 250, "width": 250},
    {"url": "http://www.yext-static.com/cms/detail-sander2.jpg", "height": 250, "width": 250}
  ],
  "video": "http://www.youtube.com/watch?v=jtCEvGxZVIM",
  "url": "http://www.boweryballroom.com/event/125975"
}

Item Substructures

Certain item fields have their own data models, which are described below.

Photo


{
  "url": "http://www.yext-static.com/cms/detail-sander.jpg", "height": 250, "width": 250
}

Cost

The Cost structure is used in Menus and Products. The customer is able to specify four types of costs:

  1. PRICE: A simple price, optionally "per" something. (e.g., price = 9.00, unit = per pound)
  2. RANGE: A price range, optionally "per" something. (e.g., price = 9.00, rangeTo = 12.50, unit = each)
  3. NONE: No price specified.
  4. OTHER: Allows the user to enter text. (e.g., other = Call for price)

Seperately, the customer is able to specify options on the Cost. For example:

  1. A Pizza sold in 3 sizes:
    
    [{"Small", "9.00"}, {"Medium", "11.00"}, {"Large", "13.00"}]
    
  2. Extra toppings on a sandwich:
    
    [{"Bacon", "1.00"}, {"Avocado", "2.00"}]
    

Example Cost Substructure:


{
  "type": "PRICE",
  "price": "9.50",
  "unit": "Per Sandwich",
  "rangeTo": "",
  "other": "",
  "options": [
    {"name": "Bacon", "price": "1.00", "calorie": 150},
    {"name": "Avocado", "price": "2.00", "calorie": 60}
  ]
}

Calories

The Calories structure is used in Menus only. You are able to display calories in two ways:

  1. FIXED: A simple calorie count (e.g., calorie = 250)
  2. RANGE: A calorie count range (e.g., calorie = 250, rangeTo = 500)

Example Calorie Substructure:


{
  "type": "RANGE",
  "calorie": 250,
  "rangeTo": 500
}

Get List

Use Get List to retrieve Enhanced Content List (ECL) content in the following use cases:

  1. Fetch the HTML for a specific type of List.
  • Use listingId, template
  • Response will be rendered into a template and returned for direct display to the user
  1. Fetch the structured data (JSON) for a specific List
  • Use listingId, listId
  1. Fetch the structured data (JSON) for a specific type of List
  • Use listingId, type
  1. Fetch the structured data (JSON) for all Lists associated with a listing
  • Use listingId
query Parameters
pid
string

Publisher secure ID. This value will be provided to you.

listingId
string

Publisher listing ID

yextId
string

The Yext listing ID

listId
string

ECL ID (Yext-assigned)

type
string
Enum: "MENU" "PRODUCTS" "BIOS" "EVENTS"

Type of lists to return

template
string

This parameter specifies the template to use when rendering the List content. Yext will provide a list of your available templates. Yext configures each template with the type of data that it accepts -- for example, the template "mobile-menu" may be configured to render all Lists on a listing of type MENU.

  • If no template is specified, all List data will be rendered using a default template
  • Required if fetching HTML
format
string
Enum: "html" "json"

An alternative way to specify the desired content type of the response

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}