Fashwell API Documentation

The TestDocs Developer Hub

Welcome to the TestDocs developer hub. You'll find comprehensive guides and documentation to help you start working with TestDocs as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Introduction

 

Welcome to Fashwell's API documentation

At Fashwell, we provide API access to our visual search solutions. We're glad you're here and hope you'll find the documentation helpful.

Contact us if you have any questions, feedback or would like to test the API.

Authentication

 

When making a request to the Fashwell API you will need to send your static token and customer name for authentication. We'll provide you with the credentials during initial setup.

Contact us to receive test API credentials.

get products

Search products in image, return product SKUs for visually similar products.

 
posthttps://api.fashwell.com/visual/v1/customer/search
curl --request POST \
  --url https://api.fashwell.com/visual/v1/customer/search \
  --header 'authorization: Authorization'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.fashwell.com/visual/v1/customer/search',
  headers: { authorization: 'Authorization' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fashwell.com/visual/v1/customer/search")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Authorization'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.fashwell.com/visual/v1/customer/search");
xhr.setRequestHeader("authorization", "Authorization");

xhr.send(data);
import requests

url = "https://api.fashwell.com/visual/v1/customer/search"

headers = {'authorization': 'Authorization'}

response = requests.request("POST", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "category": "female/shoes",
  "products": [
    {
      "sku": "aa4652f1000"
    },
    {
      "sku": "bb1147-2000"
    },
    {
      "sku": "cc9578x3000"
    }
  ],
  "query_id": "fcc858ca7b7011e892970a580a0c2fcb",
  "revision": 11392
}

Path Params

customer
string
required

customer name

Query Params

version
string

Form Data

image
file
required

image to be processed

enduser_id
string

unique id to identify the user for this request

gender
string

enforces gender for the products on the image (default: auto detection)

Headers

Authorization
string
required

Token {API_TOKEN}

Response

List of product SKUs

dataobject

response data object

data.productsarray
data.categoriesstring

category of the products

Bad request

Missing or incorrect Authorization token

Similar Product Recommendations

 

Similar Product Recommendations takes a product feed SKU as input and returns the SKU's of the visually most similar products in your product feed.

similar products

Return similar product skus for a given sku.

 
gethttps://api.fashwell.com/similar/v1/customer/sku
curl --request GET \
  --url https://api.fashwell.com/similar/v1/customer/sku \
  --header 'authorization: Authorization'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fashwell.com/similar/v1/customer/sku',
  headers: { authorization: 'Authorization' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fashwell.com/similar/v1/customer/sku")

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

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Authorization'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fashwell.com/similar/v1/customer/sku");
xhr.setRequestHeader("authorization", "Authorization");

xhr.send(data);
import requests

url = "https://api.fashwell.com/similar/v1/customer/sku"

headers = {'authorization': 'Authorization'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "similar": [
    {
      "sku": "abc123"
    }
  ]
}

Path Params

customer
string
required

customer name

sku
path
required

product sku

Query Params

version
string

Headers

Authorization
string
required

Token {API_TOKEN}

Response

List of product SKUs

Bad request

Missing or incorrect Authorization token

Outfit Recommendation

 

The Outfit Recommendation API takes a product SKU from your product feed as input, and returns all the SKU of all products that "fashionably" match this product, according to the styles in your product feed.

look

Get a complete look for a given product sku

 
gethttps://api.fashwell.com/stlook/v1/customer/sku
curl --request GET \
  --url https://api.fashwell.com/stlook/v1/customer/sku \
  --header 'authorization: Token {API_TOKEN}'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fashwell.com/stlook/v1/customer/sku',
  headers: { authorization: 'Token {API_TOKEN}' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fashwell.com/stlook/v1/customer/sku")

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

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Token {API_TOKEN}'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fashwell.com/stlook/v1/customer/sku");
xhr.setRequestHeader("authorization", "Token {API_TOKEN}");

xhr.send(data);
import requests

url = "https://api.fashwell.com/stlook/v1/customer/sku"

headers = {'authorization': 'Token {API_TOKEN}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "query_id": "aaa24c267b6f11e8b9410a580a0c2fcb",
  "categories": [
    {
      "products": [
        {
          "sku": "abc123-0011"
        }
      ]
    }
  ],
  "revision": "00a22"
}

Path Params

customer
string
required

product sku

sku
string
required

Product sku

Query Params

version
string

Headers

Authorization
string
required

Token {API_TOKEN}

Response

List of categories to complete the outfit with similar products per category.

dataobject

response data object

data.categoriesarray

Missing or incorrect Authorization token

Product sku not found

Product Tagging

 

Automatic Product Tagging reads in your product feed, processes the images and returns finely grained attributes for each product detected in the images.

get attributes

Returns image and product level attributes

 
posthttps://api.fashwell.com/attributes/v1/customer/
curl --request POST \
  --url https://api.fashwell.com/attributes/v1/customer/ \
  --header 'authorization: Authorization'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.fashwell.com/attributes/v1/customer/',
  headers: { authorization: 'Authorization' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fashwell.com/attributes/v1/customer/")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Authorization'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.fashwell.com/attributes/v1/customer/");
xhr.setRequestHeader("authorization", "Authorization");

xhr.send(data);
import requests

url = "https://api.fashwell.com/attributes/v1/customer/"

headers = {'authorization': 'Authorization'}

response = requests.request("POST", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "image_attributes": [
    {
      "label": "female/shoes",
      "tags": [
        {
          "label": "model_front"
        }
      ]
    }
  ],
  "product_attributes": [
    {
      "category": "shoes",
      "attributes": [
        {
          "label": "color",
          "tags": [
            {
              "label": "model_front"
            }
          ]
        }
      ]
    }
  ],
  "query_id": "fcc858ca7b7011e892970a580a0c2fcb",
  "revision": 11392
}

Path Params

customer
string
required

customer name

Query Params

version
string

Form Data

image
file

image to be processed

enduser_id
string

unique id to identify the user for this request

Headers

Authorization
string
required

Token {API_TOKEN}

Response

success.

Bad request

Missing or incorrect Authorization token

Status Codes

 

The following status codes apply across API's.

HTTP Status Code
Description

200

Good Request.

400

Bad Request
Exact error description is provided.

Client error, possible reasons:
Image is too small,
Image is too large,
Image type is not supported,
Image is invalid,
Image could not be downloaded (url)

401

Unauthorized
The requester is not authorized to access the resource.

Client error, possible reason:
Authorization Header not set correctly

403

Forbidden
The request was formatted correctly but the server is refusing to supply the requested resource.

Client error, possible reasons:
User not allowed to upload via url

413

Request entity too large
The request is larger than what the server is able to process.

Client error, possible reasons::
Image is too large (too many bytes)

500

Internal server error
A generic status for an error in the server itself.

FAQ

 

Why is my token denied permission?

Check your token is prepended with “Token “. If you are still have issues contact Fashwell.

What is an SKU and how do you handle variations?

SKU stands for “Stock Keeping Unit”. It is the unique identification for each product in your product feed. Products in different colours should have a different SKU, but products in the same color and different sizes should have the same SKU. SKUs need to be unique for visible similar products.

How do I test the API’s?

Contact Fashwell to receive test credentials. You can then test the API’s in this documentation.

How are the responses sorted?

Responses are sorted by confidence in visual similarity. The most visually similar (or identical) match will be in the first position.

For Visual Search what are optimal criteria for user uploaded image size and type?

The best results are seen when images are at least 1000 x 1000px, using jpeg or png format.

How do you handle out of stock products?

All API’s automatically replace out of stock products with the next most visually similar product in the product feed.

How do you ensure the products you return are always up to date?

Providing Fashwell with a live connection to your product feed will ensure the responses we send are always up to date with your feed. Pre-scheduled updates can also be arranged.

For Similar product Recommendation, which product is chosen as the query product from an image?

The Similar Product Recommendation API requires an SKU as a parameter, not an image. Responses will be in relation to the SKU of the product that is sent.

Where are your servers located?

Europe.