Welcome to Wayfair’s Realtime 3D Model API

The purpose of the 3D API is to provide external developers access to the Wayfair production grade models stored as realtime 3D assets. End users are able to call API to get models and product information.

The API allows for three levels of access:

  1. Anonymous users (access to a few models to get your feet wet)
  2. Registered users (access to over 100 models for further experimentation)
  3. Enterprise users (access to a much larger list of 30k+ models)

Anonymous users

The easiest way to try out our realtime 3D model api is to use the limited version of the endpoint (https://api.wayfair.com/v1/3dapi/models_demo) which can be accessed directly from your web browser without the need to register.

The returned data will be a JSON array with objects like the following:

{
        "sku": "ZIPC4121",
        "product_name": "Liam Barrel Chair",
        "product_description": "A traditional design gets a contemporary update in this streamlined barrel chair. Founded on a manufactured wood frame, this barrel chair features a curved back, rolled arms, and plastic round tapered legs. Enveloped in polyester upholstery in a cowhide print, this chair’s high-density foam cushioning provides comfort and support. Made in the USA, this chair measures 32\" H x 30.5\" W x 27.5\" D overall, has a 17\" seat height, and a 250 lbs. weight capacity.",
        "product_page_url": "https://www.wayfair.com/furniture/pdp/zipcode-design-liam-barrel-chair-w000365291.html",
        "class_name": "Accent Chairs",
        "sale_price": 177.99,
        "thumbnail_image_url": "https://secure.img1.wfcdn.com/lf/43/hash/2664/59803713/1/custom_image.jpg",
        "model": {
            "dimensions_inches": {
                "x": 34.29,
                "y": 27.86,
                "z": 32.46
            },
            "glb": "http://img.wfrcdn.com/docresources/37311/108/1089869.glb",
            "obj": "http://img.wfrcdn.com/docresources/37311/101/1014484.zip"
        }
}

This will return a very small list of product and model information with the following fields.

The product object

 

Downloaded glb assets can be viewed in a viewer like https://sandbox.babylonjs.com/

Downloaded zip files will contain the obj assets along with their textures.

Registered users

By registering you can have access to an expanded list of around 200 or so models.

You can register by making a post request to https://api.wayfair.com/v1/3dapi/sign_up?email=name@domain.com (replaced with your real email).

Since this is a post request you will not be able to run it directly in a web browser, and will require something like Postman (https://www.getpostman.com/downloads/) to perform.

This in turn will send you an email with a randomly generated password that you will not be able to change.

Endpoint for registered users

The endpoint for registered users is https://api.wayfair.com/v1/3dapi/models.

To retrieve data you need to first select basic auth in Postman and then enter the email address you used to register and the password from the email.

The endpoint will then return data in the same format as the one from the anonymous endpoint seen above.

In addition the end point for registered users will also support the following parameters.

Params

Enterprise users

For access to our expanded list of 3D realtime models please contact next3dapi@wayfair.com for further information.

Additional Examples

Node

var https = require('https');

var options = {
  'method': 'GET',
  'hostname': 'api.wayfair.com',
  'path': '/v1/3dapi/models',
  'headers': {
    'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36'
  }
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();

cURL

curl --location --request GET "api.wayfair.com/v1/3dapi/models" \
  --header "User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36"

jQuery

var settings = {
  "url": "https://api.wayfair.com/v1/3dapi/models",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "User-Agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Ruby

require "uri"
require "net/http"

url = URI("https://api.wayfair.com/v1/3dapi/models")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["User-Agent"] = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36"

response = https.request(request)
puts response.read_body

Python

import requests
url = 'https://api.wayfair.com/v1/3dapi/models'
payload = {}
headers = {
  'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36'
}
response = requests.request('GET', url, headers = headers, data = payload, allow_redirects=False, timeout=undefined, allow_redirects=false)
print(response.text)

PHP

import requests
url = 'https://api.wayfair.com/v1/3dapi/models'
payload = {}
headers = {
  'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36'
}
response = requests.request('GET', url, headers = headers, data = payload, allow_redirects=False, timeout=undefined, allow_redirects=false)
print(response.text)

Go

package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.wayfair.com/v1/3dapi/models"
  method := "GET"

  client := &http.Client {
    CheckRedirect: func(req *http.Request, via []*http.Request) error {
      return http.ErrUseLastResponse
    },
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
  }
  req.Header.Add("User-Agent", "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36")

  res, err := client.Do(req)
  defer res.Body.Close()
  body, err := ioutil.ReadAll(res.Body)

  fmt.Println(string(body))
}

Example Response

[
  {
    "sku": "ZIPC4121",
    "product_name": "Liam Barrel Chair",
    "product_description": "<i>Mooove</i> on over to make room for your new favorite accent chair! This American-made design brings a little down-home flair to any seating arrangement, combining a cowhide pattern with a classic silhouette to create a piece that pairs well with both contemporary and rustic ensembles. Founded atop four tapered legs, its manufactured wood frame is wrapped in polyester blend fabric that’s easy to keep pristine. Measuring 32'' H x 30.5'' W x 27.5'' D.",
    "product_page_url": "https://www.wayfair.com/furniture/pdp/zipcode-design-liam-barrel-chair-zipc4121.html",
    "class_name": "Accent Chairs",
    "sale_price": 172.99,
    "thumbnail_image_url": "https://secure.img1.wfcdn.com/lf/43/hash/2664/59803713/1/custom_image.jpg",
    "model": {
      "dimensions_inches": {
        "x": 34.29,
        "y": 27.86,
        "z": 32.46
      },
      "glb": "http://img.wfrcdn.com/docresources/37311/108/1089869.glb",
      "obj": "http://img.wfrcdn.com/docresources/37311/101/1014484.zip"
    }
  }
]

Public Demos

Hello WebVR demo
iOS Hello AR demo
Android Hello AR demo
Python code for processing OBJ zip files in batch

(You will need to update these to reference the new API location -see below)

Changes from previous versions of the API

Please note that the endpoint of the API has moved from https://www.wayfair.com/3dapi/models to https://api.wayfair.com/v1/3dapi/models.

Furthermore these endpoints have been deprecated:

  1. http://www.wayfair.com/v/api/three_d_model/product_information
  2. https://www.wayfair.com/v/api/three_d_model/models

This will means that you will no longer be able to retrieve product information independent of the models or retrieve models in any format except glb and obj formatted models. Please also note that Wayfair has stopped the generation of new obj formatted models, and will focus on the generation of glb formatted models in the future.

In addition the class_id filter capabilities are not part of the new endpoint as that used to belong to the product information endpoint so this means to filter for particular types of products you would now need to download the entire dataset, and then filter the JSON locally.