Snaphack Services

General notes

Here is the collection of services for the basic, non-ML, Snaphack demo.

Base services provide the following functionality:

  • The ability to upload a photo (JPEG only) for color processing
  • The ability to look up products in the catalog based on category and chosen color(s).

There is also the ability to select a company to use while interacting with the set of services. This allows for dynamic selection of a product catalog. There is also a default company assigned server-side in the event that the front-end client doesn’t send a value.

To allow for dynamic company selection, the following services exit:

  • The ability to get a list of available companies, along with some configuration data.
  • The ability to get configuration data for a given company.

To make the website demo function, there are additional services to provide:

  • The ability to poll the server for the data from the last photo upload
  • The ability to poll the server for the data from the last product selection

The Postman Collection and Environment Data is also available.

API detail

Core Photo/Product Services

These services provide the base functionality for the Snaphack demo.

The company to use can be configurated by sending an appropriate company “slug” in the company query parameter. If the value isn’t provided, or isn’t valid, a server-side configured default will be used.

Photo Upload

This is a POST request to upload a new photo for color processing (and later other aesthetics).

The server expects the POST body to either be the raw bytes of the JPEG, or a JPEG encoded in a data URI.

The company to associate the photo upload request with is indicated by the company query parameter. This isn’t used by the actual photo processing code, but helps with later being able to display the most recently uploaded photo for a given company in the demo/debug web interface. Correct values can be retrieved from the companies endpoint.

Response documentation:

  • nonce - this is a value that can be used as an id of sorts for this upload. It is a dynamic value that changes on each upload, and is mainly used when polling the server for changes using the photo-last endpoint.
  • company - this is the value of the company parameter that was actually used. If a valid company query parameter was provided in the request, then the values will match. Otherwise, this indicates which company was actually used when storing the photo information.
  • uploaded_file - This is a full URL to the photo that was just uploaded. This is mainly stored/provided for debugging information and utilized by the demo website.
  • image_width - the full width of the image that was uploaded, in pixels.
  • image_height - the full height of the image that was uploaded, in pixels.
  • colors - an array of color objects representing the top 6 colors in the uploaded image.
  • palette_colors - an array of color objects representing the reduced-palette equivalents of the colors in the colors array.
  • complementary_colors - an array of color objects representing the complementary color for each color in the colors array.

The “color object” that is in each color array is simply an object with the key hex, whose value is a RGB hex value for the color proceeded by a # character. Originally, the API design called for additional properties in this object, but those were removed.

curl -X POST "https://api.snaphack.website/api/v1/photo?company=ashleyfurniturehomestore"
POST /api/v1/photo?company=ashleyfurniturehomestore HTTP/1.1
Host: api.snaphack.website
Status200
content-typeapplication/json
dateTue, 05 Jun 2018 16:36:20 GMT
referrer-policyno-referrer
servernginx
status200
strict-transport-securitymax-age=31536000; includeSubdomains; preload
x-content-type-optionsnosniff
x-frame-optionsSAMEORIGIN
x-xss-protection1; mode=block
{
    "nonce": "photo-5b16bc022d0e4",
    "company": "ashleyfurniturehomestore",
    "uploaded_file": "https://api.snaphack.website/uploaded_files/1528216578080635_raw_post.jpg",
    "image_width": 2048,
    "image_height": 1536,
    "colors": [
        {
            "hex": "#FF957B"
        },
        {
            "hex": "#FEFF77"
        },
        {
            "hex": "#698696"
        },
        {
            "hex": "#370000"
        },
        {
            "hex": "#29211E"
        },
        {
            "hex": "#FFC87E"
        }
    ],
    "palette_colors": [
        {
            "hex": "#FF7777"
        },
        {
            "hex": "#FFFF77"
        },
        {
            "hex": "#7777FF"
        },
        {
            "hex": "#330000"
        },
        {
            "hex": "#333333"
        },
        {
            "hex": "#FFBB77"
        }
    ],
    "complementary_colors": [
        {
            "hex": "#7BE5FF"
        },
        {
            "hex": "#7877FF"
        },
        {
            "hex": "#967869"
        },
        {
            "hex": "#003637"
        },
        {
            "hex": "#1E2529"
        },
        {
            "hex": "#7EB4FF"
        }
    ]
}
Status200
content-typeapplication/json
dateTue, 05 Jun 2018 16:50:56 GMT
referrer-policyno-referrer
servernginx
status200
strict-transport-securitymax-age=31536000; includeSubdomains; preload
x-content-type-optionsnosniff
x-frame-optionsSAMEORIGIN
x-xss-protection1; mode=block
{
    "nonce": "photo-5b16bf703d9e9",
    "company": "ashleyfurniturehomestore",
    "uploaded_file": "https://api.snaphack.website/uploaded_files/1528217456241059_raw_post.jpg",
    "image_width": 224,
    "image_height": 224,
    "colors": [
        {
            "hex": "#A92C1A"
        },
        {
            "hex": "#A76B22"
        },
        {
            "hex": "#37B1E4"
        },
        {
            "hex": "#C501AD"
        },
        {
            "hex": "#DDA13F"
        },
        {
            "hex": "#0B3DEC"
        }
    ],
    "palette_colors": [
        {
            "hex": "#BB0000"
        },
        {
            "hex": "#BB7733"
        },
        {
            "hex": "#00BBFF"
        },
        {
            "hex": "#BB00BB"
        },
        {
            "hex": "#FFBB33"
        },
        {
            "hex": "#0033FF"
        }
    ],
    "complementary_colors": [
        {
            "hex": "#1997A9"
        },
        {
            "hex": "#215DA7"
        },
        {
            "hex": "#E46936"
        },
        {
            "hex": "#00C518"
        },
        {
            "hex": "#3E7ADD"
        },
        {
            "hex": "#ECBA0A"
        }
    ]
}

Product Request

This is a GET request to fetch products from the catalog for the given company. One or more producttypes[] should be provided to indicate which product categories to use, and one or more colors[] should be provided to indicate which colors should be used for matching. Correct product types can be retrieved from the companies endpoint. The given colors (in hex format) can be from the full RGB range, and will be reduced to the reduced-color pallete.

The company to associate the photo upload request with is indicated by the company query parameter. This isn’t used by the actual photo processing code, but helps with later being able to display the most recently uploaded photo for a given company in the demo/debug web interface. Correct values can be retrieved from the companies endpoint.

Response documentation:

  • nonce - this is a value that can be used as an id of sorts for this request. It is a dynamic value that changes on each request, and is mainly used when polling the server for changes using the products-last endpoint.
  • company - this is the value of the company parameter that was actually used. If a valid company query parameter was provided in the request, then the values will match. Otherwise, this indicates which company was actually used when storing the photo information.
  • product_types - This is an array of the product types that were provided in the producttypes[] query parameter(s).
  • products - This is an array of “product objects” for the matching products.

The “product object” has the following properties:

  • title - the title of the product
  • image - a full URL for the thumbnail of the product
  • url - a full URL to the product page for the product on the company’s website
  • price - the price of the product (as a formatted string), but without the $ dollar sign.
  • colors - array of color objects representing the top 6 colors in the product image.
  • palette_colors - array of hex string representing the reduced-color palette value from the colors in the product image. I’m pretty sure this was a mistake that they aren’t the full color objects.

The “color object” that is in each color array is simply an object with the key hex, whose value is a RGB hex value for the color proceeded by a # character. Originally, the API design called for additional properties in this object, but those were removed.

curl -X GET "https://api.snaphack.website/api/v1/products?company=ashleyfurniturehomestore&producttypes[]=Chair&producttypes[]=Pillow&colors[]=%23FF7777&colors[]=%23FFFF77"
GET /api/v1/products?company=ashleyfurniturehomestore&producttypes[]=Chair&producttypes[]=Pillow&colors[]=%23FF7777&colors[]=%23FFFF77 HTTP/1.1
Host: api.snaphack.website
Status200
content-typeapplication/json
dateTue, 05 Jun 2018 16:52:22 GMT
referrer-policyno-referrer
servernginx
status200
strict-transport-securitymax-age=31536000; includeSubdomains; preload
x-content-type-optionsnosniff
x-frame-optionsSAMEORIGIN
x-xss-protection1; mode=block
{
    "nonce": "products-5b16bfc62fc6d",
    "company": "ashleyfurniturehomestore",
    "product_types": [
        "Chair",
        "Pillow"
    ],
    "colors": [
        "#FF7777",
        "#FFFF77"
    ],
    "palette_colors": [
        "#FF7777",
        "#FFFF77"
    ],
    "products": [
        {
            "title": "Home Accents Indoor-Outdoor Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001174-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-indoor-outdoor-pillow/a60001174/",
            "price": "43.99",
            "colors": [
                {
                    "hex": "#BF5E27"
                },
                {
                    "hex": "#A21710"
                },
                {
                    "hex": "#794702"
                },
                {
                    "hex": "#4A0100"
                },
                {
                    "hex": "#BF9048"
                },
                {
                    "hex": "#DD847E"
                }
            ],
            "palette_colors": [
                "#BB7733",
                "#BB0000",
                "#773300",
                "#330000",
                "#BB7700",
                "#FF7777"
            ]
        },
        {
            "title": "Home Accents Indoor-Outdoor Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001140-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-indoor-outdoor-pillow/a60001140/",
            "price": "54.99",
            "colors": [
                {
                    "hex": "#F4C54F"
                },
                {
                    "hex": "#001360"
                },
                {
                    "hex": "#C88705"
                },
                {
                    "hex": "#A6530D"
                },
                {
                    "hex": "#84730B"
                },
                {
                    "hex": "#F4FB5D"
                }
            ],
            "palette_colors": [
                "#FFBB33",
                "#000077",
                "#BB7700",
                "#BB3300",
                "#777700",
                "#FFFF77"
            ]
        },
        {
            "title": "Home Accents Indoor-Outdoor Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001130-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-indoor-outdoor-pillow/a60001130/",
            "price": "54.99",
            "colors": [
                {
                    "hex": "#20243D"
                },
                {
                    "hex": "#BA2E1D"
                },
                {
                    "hex": "#6C0000"
                },
                {
                    "hex": "#F15C62"
                },
                {
                    "hex": "#E7DECF"
                },
                {
                    "hex": "#942653"
                }
            ],
            "palette_colors": [
                "#000033",
                "#BB0000",
                "#770000",
                "#FF7777",
                "#BBBBBB",
                "#770033"
            ]
        },
        {
            "title": "Home Accents Indoor-Outdoor Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001175-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-indoor-outdoor-pillow/a60001175/",
            "price": "49.99",
            "colors": [
                {
                    "hex": "#C85620"
                },
                {
                    "hex": "#9D0000"
                },
                {
                    "hex": "#CF8721"
                },
                {
                    "hex": "#F47481"
                },
                {
                    "hex": "#7F5815"
                },
                {
                    "hex": "#0E3602"
                }
            ],
            "palette_colors": [
                "#BB3300",
                "#BB0000",
                "#BB7700",
                "#FF7777",
                "#773300",
                "#003300"
            ]
        },
        {
            "title": "Home Accents Indoor-Outdoor Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001157-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-indoor-outdoor-pillow/a60001157/",
            "price": "54.00",
            "colors": [
                {
                    "hex": "#C12822"
                },
                {
                    "hex": "#730000"
                },
                {
                    "hex": "#D2842F"
                },
                {
                    "hex": "#DE6B6E"
                },
                {
                    "hex": "#2C0000"
                },
                {
                    "hex": "#E0C129"
                }
            ],
            "palette_colors": [
                "#BB3333",
                "#770000",
                "#BB7733",
                "#FF7777",
                "#330000",
                "#BBBB00"
            ]
        },
        {
            "title": "Home Accents Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001779-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-pillow/a60001779/",
            "price": "40.00",
            "colors": [
                {
                    "hex": "#6C0000"
                },
                {
                    "hex": "#CC0000"
                },
                {
                    "hex": "#925A1F"
                },
                {
                    "hex": "#9CA240"
                },
                {
                    "hex": "#F35762"
                },
                {
                    "hex": "#FDFCF8"
                }
            ],
            "palette_colors": [
                "#770000",
                "#BB0000",
                "#BB7733",
                "#BBBB33",
                "#FF7777",
                "#BBBBBB"
            ]
        },
        {
            "title": "Home Accents Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001767-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-pillow/a60001767/",
            "price": "40.00",
            "colors": [
                {
                    "hex": "#C12D2D"
                },
                {
                    "hex": "#760000"
                },
                {
                    "hex": "#C7AE86"
                },
                {
                    "hex": "#F27D90"
                },
                {
                    "hex": "#FDF8F4"
                },
                {
                    "hex": "#A2794D"
                }
            ],
            "palette_colors": [
                "#BB3333",
                "#770000",
                "#BBBB77",
                "#FF7777",
                "#BBBBBB",
                "#BB7733"
            ]
        },
        {
            "title": "Zackery Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000521-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/zackery-pillow/a1000521p/",
            "price": "8.49",
            "colors": [
                {
                    "hex": "#C55551"
                },
                {
                    "hex": "#8E0000"
                },
                {
                    "hex": "#AC8775"
                },
                {
                    "hex": "#F5909E"
                },
                {
                    "hex": "#BCBB9D"
                },
                {
                    "hex": "#7C5341"
                }
            ],
            "palette_colors": [
                "#BB3333",
                "#770000",
                "#BB7777",
                "#FF7777",
                "#BBBB77",
                "#773333"
            ]
        },
        {
            "title": "Simsboro Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000518-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/simsboro-pillow/a1000518p/",
            "price": "8.99",
            "colors": [
                {
                    "hex": "#B44C49"
                },
                {
                    "hex": "#830000"
                },
                {
                    "hex": "#FF6565"
                },
                {
                    "hex": "#FFB3B9"
                },
                {
                    "hex": "#2C411A"
                },
                {
                    "hex": "#3A0E0F"
                }
            ],
            "palette_colors": [
                "#BB3333",
                "#770000",
                "#FF7777",
                "#FFBBBB",
                "#003300",
                "#330000"
            ]
        },
        {
            "title": "Killeen Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000468-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/killeen-pillow/a1000468p/",
            "price": "27.49",
            "colors": [
                {
                    "hex": "#000000"
                },
                {
                    "hex": "#94875D"
                },
                {
                    "hex": "#615733"
                },
                {
                    "hex": "#EBE680"
                },
                {
                    "hex": "#03002A"
                },
                {
                    "hex": "#472813"
                }
            ],
            "palette_colors": [
                null,
                "#777733",
                "#777733",
                "#FFFF77",
                "#000033",
                "#773300"
            ]
        },
        {
            "title": "Amiela Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000462-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/amiela-pillow/a1000462p/",
            "price": "29.99",
            "colors": [
                {
                    "hex": "#730F19"
                },
                {
                    "hex": "#A75F46"
                },
                {
                    "hex": "#CF873F"
                },
                {
                    "hex": "#2A0000"
                },
                {
                    "hex": "#EC8A87"
                },
                {
                    "hex": "#FFDB86"
                }
            ],
            "palette_colors": [
                "#770000",
                "#BB3333",
                "#BB7733",
                "#330000",
                "#FF7777",
                "#FFBB33"
            ]
        },
        {
            "title": "Roxanne Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000788-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/roxanne-pillow/a1000788p/",
            "price": "23.99",
            "colors": [
                {
                    "hex": "#A87732"
                },
                {
                    "hex": "#713D16"
                },
                {
                    "hex": "#DEAB38"
                },
                {
                    "hex": "#3D030F"
                },
                {
                    "hex": "#ECE755"
                },
                {
                    "hex": "#F5DEB4"
                }
            ],
            "palette_colors": [
                "#BB7733",
                "#773300",
                "#FFBB33",
                "#330000",
                "#FFFF77",
                "#FFFFBB"
            ]
        },
        {
            "title": "Piercetown Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000402-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/piercetown-pillow/a1000402p/",
            "price": "27.49",
            "colors": [
                {
                    "hex": "#6C0C17"
                },
                {
                    "hex": "#F23D4C"
                },
                {
                    "hex": "#250000"
                },
                {
                    "hex": "#FFD3DD"
                },
                {
                    "hex": "#E9889B"
                },
                {
                    "hex": "#995059"
                }
            ],
            "palette_colors": [
                "#770000",
                "#FF0033",
                "#330000",
                "#FFBBBB",
                "#FF7777",
                "#773333"
            ]
        },
        {
            "title": "Cankton Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000533-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/cankton-pillow/a1000533p/",
            "price": "9.99",
            "colors": [
                {
                    "hex": "#AA0000"
                },
                {
                    "hex": "#ED412D"
                },
                {
                    "hex": "#550000"
                },
                {
                    "hex": "#C31E5A"
                },
                {
                    "hex": "#E48D46"
                },
                {
                    "hex": "#FF7F8E"
                }
            ],
            "palette_colors": [
                "#BB0000",
                "#FF3333",
                "#770000",
                "#BB3377",
                "#FF7700",
                "#FF7777"
            ]
        }
    ]
}
Status200
content-typeapplication/json
dateTue, 05 Jun 2018 16:55:59 GMT
referrer-policyno-referrer
servernginx
status200
strict-transport-securitymax-age=31536000; includeSubdomains; preload
x-content-type-optionsnosniff
x-frame-optionsSAMEORIGIN
x-xss-protection1; mode=block
{
    "nonce": "products-5b16c09f86ee1",
    "company": "ashleyfurniturehomestore",
    "product_types": [
        "Decor"
    ],
    "colors": [
        "#FF7777"
    ],
    "palette_colors": [
        "#FF7777"
    ],
    "products": [
        {
            "title": "Ogin Wall Art",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A8000182-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/ogin-wall-art/a8000182/",
            "price": "179.99",
            "colors": [
                {
                    "hex": "#C4A47E"
                },
                {
                    "hex": "#813A02"
                },
                {
                    "hex": "#F6745C"
                },
                {
                    "hex": "#946C52"
                },
                {
                    "hex": "#F9D05E"
                },
                {
                    "hex": "#6D5C14"
                }
            ],
            "palette_colors": [
                "#FFBB77",
                "#773300",
                "#FF7777",
                "#BB7733",
                "#FFBB33",
                "#777733"
            ]
        }
    ]
}

Multi-Company Services

These services allow for a multi-company experience. An app can pull down a list of available companies, with the intent of providing an interface for runtime selection.

The app can also pull down configuration data for a simply company, with the intent of providing a more “production-like” build that is tied to a single company, but with dynamic data.

Company List

This is a GET request to fetch the list of companies that are available to be used at this time, as well as some configuration data for company.

Response documentation:

  • data - an array of “company information” objects.

The “company information object” has the following properties:

  • name - the name of the company
  • slug - the “URL slug” for the company. This is the value that should be sent in the company query parameter to the other endpoints.
  • logo - a full URL for the logo of the company
  • push-notification - an object containing values to be used when displaying the local push notification after the user first navigates to a product page
    • text - the text to display in the push notification
    • url - the URL to open after the user interacts with the push notification
  • product-types - array of “product type” objects representing the available product categories for this company.

The “product type object” has the following properties:

  • name - the name of the product category
  • slug - the “URL slug” for the product category. This is the value that should be sent in the producttypes[] query parameter to the products endpoint.
  • image - a full URL for a representative image of the product category
curl -X GET "https://api.snaphack.website/api/v1/companies"
GET /api/v1/companies HTTP/1.1
Host: api.snaphack.website
Status200
content-typeapplication/json
dateTue, 05 Jun 2018 16:52:46 GMT
referrer-policyno-referrer
servernginx
status200
strict-transport-securitymax-age=31536000; includeSubdomains; preload
x-content-type-optionsnosniff
x-frame-optionsSAMEORIGIN
x-xss-protection1; mode=block
{
    "data": [
        {
            "name": "Ashley Furniture HomeStore",
            "slug": "ashleyfurniturehomestore",
            "logo": "https://www.ashleyfurniturehomestore.com/on/demandware.static/Sites-Ashley-US-Site/-/default/dw4bb9ce4d/images/ahs-logo.svg",
            "push-notification": {
                "text": "Special financing is available by opening a Ashley Advantage credit card today.",
                "url": "https://www.ashleyfurniturehomestore.com/financing/"
            },
            "product-types": [
                {
                    "name": "Chair",
                    "slug": "Chair",
                    "image": null
                },
                {
                    "name": "Couch",
                    "slug": "Couch",
                    "image": null
                },
                {
                    "name": "Decor",
                    "slug": "Decor",
                    "image": null
                },
                {
                    "name": "Lighting",
                    "slug": "Lighting",
                    "image": null
                },
                {
                    "name": "Pillow",
                    "slug": "Pillow",
                    "image": null
                },
                {
                    "name": "Rug",
                    "slug": "Rug",
                    "image": null
                }
            ]
        },
        {
            "name": "DICK\u0027S Sporting Goods",
            "slug": "dickssportinggoods",
            "logo": "https://s3.amazonaws.com/placewisesitecontent/images/api/stores/2137023591.svg",
            "push-notification": {
                "text": "Special financing is available by opening a DICK\u0027s credit card today.",
                "url": "https://dicks.creditapply.mobi/"
            },
            "product-types": [
                {
                    "name": "Men\u0027s Shirts \u0026 Tops",
                    "slug": "mens-shirts",
                    "image": "https://s7d2.scene7.com/is/image/dkscdn/16NIKMLGND20SSTXXAPT_Charcoal_Hth_Matesilv_is/?$DSG_ProductCard$"
                },
                {
                    "name": "Women\u0027s Shirts \u0026 Tops",
                    "slug": "womens-shirts",
                    "image": "https://s7d2.scene7.com/is/image/dkscdn/17CA2WCLKYHLTNKXXAPT_Caviar_is/?$DSG_ProductCard$"
                },
                {
                    "name": "Men\u0027s Hoodies \u0026 Sweatshirts",
                    "slug": "mens-sweatshirts",
                    "image": "https://s7d2.scene7.com/is/image/dkscdn/16NIKMNSWHDPFLCCLNFT_Obsidianheather_White_is/?$DSG_ProductCard$"
                },
                {
                    "name": "Women\u0027s Hoodies \u0026 Sweatshirts",
                    "slug": "womens-sweatshirts",
                    "image": "https://s7d2.scene7.com/is/image/dkscdn/17NIKWRLLYHLFZPXXAPT_Particle_Rose_is/?$DSG_ProductCard$"
                },
                {
                    "name": "Men\u0027s Socks",
                    "slug": "mens-socks",
                    "image": "https://s7d2.scene7.com/is/image/dkscdn/15RBKURBKLLSPRTLCAPA_Berry_is/?$DSG_ProductCard$"
                },
                {
                    "name": "Women\u0027s Socks",
                    "slug": "womens-socks",
                    "image": "https://s7d2.scene7.com/is/image/dkscdn/17FNSWFSWCZYMRLSTAPA_Black_Grey_is/?$DSG_ProductCard$"
                },
                {
                    "name": "Men\u0027s Athletic \u0026 Sneakers",
                    "slug": "mens-sneakers",
                    "image": "https://www.dickssportinggoods.com/f/mens-athletic-shoes"
                },
                {
                    "name": "Women\u0027s Athletic \u0026 Sneakers",
                    "slug": "womens-sneakers",
                    "image": "https://s7d2.scene7.com/is/image/dkscdn/17NWBWCRZDCNXXXXXRNN_Black_White_is/?$DSG_ProductCard$"
                }
            ]
        },
        {
            "name": "Couch Potato",
            "slug": "generic",
            "logo": "https://api.snaphack.website/companies/couchpotato/logo.jpg",
            "push-notification": {
                "text": "Special financing is available by opening a Couch Potato credit card today.",
                "url": "https://www.mysynchrony.com/mysyf/home/index.html?intcmp=na-pagena-csp-data_reason-internal\u0026resolvetemplatefordevice=true"
            },
            "product-types": [
                {
                    "name": "Chair",
                    "slug": "Chair",
                    "image": null
                },
                {
                    "name": "Couch",
                    "slug": "Couch",
                    "image": null
                },
                {
                    "name": "Decor",
                    "slug": "Decor",
                    "image": null
                },
                {
                    "name": "Lighting",
                    "slug": "Lighting",
                    "image": null
                },
                {
                    "name": "Pillow",
                    "slug": "Pillow",
                    "image": null
                },
                {
                    "name": "Rug",
                    "slug": "Rug",
                    "image": null
                }
            ]
        },
        {
            "name": "Rooms To Go",
            "slug": "roomstogo",
            "logo": "https://www.roomstogo.com/static/img/svg/rtg_logo.svg",
            "push-notification": {
                "text": "Special financing is available by opening a Rooms To Go credit card today.",
                "url": "https://www.roomstogo.com/view/creditOptions.jsp"
            },
            "product-types": [
                {
                    "name": "Chair",
                    "slug": "Chair",
                    "image": null
                },
                {
                    "name": "Couch",
                    "slug": "Couch",
                    "image": null
                },
                {
                    "name": "Decor",
                    "slug": "Decor",
                    "image": null
                },
                {
                    "name": "Lighting",
                    "slug": "Lighting",
                    "image": null
                },
                {
                    "name": "Pillow",
                    "slug": "Pillow",
                    "image": null
                },
                {
                    "name": "Rug",
                    "slug": "Rug",
                    "image": null
                }
            ]
        }
    ]
}

Company - Ashley Furniture

This is a GET request to fetch the configuration data for “Ashley Furniture”. The last “directory” in the URL request is the slug for the requested company, in this case ashleyfurniturehomestore.

Response documentation:

  • data - the “company information” object for the company.

The “company information object” has the following properties:

  • name - the name of the company
  • slug - the “URL slug” for the company. This is the value that should be sent in the company query parameter to the other endpoints.
  • logo - a full URL for the logo of the company
  • push-notification - an object containing values to be used when displaying the local push notification after the user first navigates to a product page
    • text - the text to display in the push notification
    • url - the URL to open after the user interacts with the push notification
  • product-types - array of “product type” objects representing the available product categories for this company.

The “product type object” has the following properties:

  • name - the name of the product category
  • slug - the “URL slug” for the product category. This is the value that should be sent in the producttypes[] query parameter to the products endpoint.
  • image - a full URL for a representative image of the product category
curl -X GET "https://api.snaphack.website/api/v1/companies/ashleyfurniturehomestore"
GET /api/v1/companies/ashleyfurniturehomestore HTTP/1.1
Host: api.snaphack.website
Status200
content-typeapplication/json
dateTue, 05 Jun 2018 16:53:00 GMT
referrer-policyno-referrer
servernginx
status200
strict-transport-securitymax-age=31536000; includeSubdomains; preload
x-content-type-optionsnosniff
x-frame-optionsSAMEORIGIN
x-xss-protection1; mode=block
{
    "data": {
        "name": "Ashley Furniture HomeStore",
        "slug": "ashleyfurniturehomestore",
        "logo": "https://www.ashleyfurniturehomestore.com/on/demandware.static/Sites-Ashley-US-Site/-/default/dw4bb9ce4d/images/ahs-logo.svg",
        "push-notification": {
            "text": "Special financing is available by opening a Ashley Advantage credit card today.",
            "url": "https://www.ashleyfurniturehomestore.com/financing/"
        },
        "product-types": [
            {
                "name": "Chair",
                "slug": "Chair",
                "image": null
            },
            {
                "name": "Couch",
                "slug": "Couch",
                "image": null
            },
            {
                "name": "Decor",
                "slug": "Decor",
                "image": null
            },
            {
                "name": "Lighting",
                "slug": "Lighting",
                "image": null
            },
            {
                "name": "Pillow",
                "slug": "Pillow",
                "image": null
            },
            {
                "name": "Rug",
                "slug": "Rug",
                "image": null
            }
        ]
    }
}

Company - Environment Variable

This is a GET request to fetch the configuration data for a given company, based on a Postman environment variable. The last “directory” in the URL request is the slug for the requested company, in this case pulling from ashleyfurniturehomestore.

Response documentation:

  • data - the “company information” object for the company.

The “company information object” has the following properties:

  • name - the name of the company
  • slug - the “URL slug” for the company. This is the value that should be sent in the company query parameter to the other endpoints.
  • logo - a full URL for the logo of the company
  • push-notification - an object containing values to be used when displaying the local push notification after the user first navigates to a product page
    • text - the text to display in the push notification
    • url - the URL to open after the user interacts with the push notification
  • product-types - array of “product type” objects representing the available product categories for this company.

The “product type object” has the following properties:

  • name - the name of the product category
  • slug - the “URL slug” for the product category. This is the value that should be sent in the producttypes[] query parameter to the products endpoint.
  • image - a full URL for a representative image of the product category
curl -X GET "https://api.snaphack.website/api/v1/companies/ashleyfurniturehomestore"
GET /api/v1/companies/ashleyfurniturehomestore HTTP/1.1
Host: api.snaphack.website
Status200
content-typeapplication/json
dateTue, 05 Jun 2018 16:53:22 GMT
referrer-policyno-referrer
servernginx
status200
strict-transport-securitymax-age=31536000; includeSubdomains; preload
x-content-type-optionsnosniff
x-frame-optionsSAMEORIGIN
x-xss-protection1; mode=block
{
    "data": {
        "name": "Ashley Furniture HomeStore",
        "slug": "ashleyfurniturehomestore",
        "logo": "https://www.ashleyfurniturehomestore.com/on/demandware.static/Sites-Ashley-US-Site/-/default/dw4bb9ce4d/images/ahs-logo.svg",
        "push-notification": {
            "text": "Special financing is available by opening a Ashley Advantage credit card today.",
            "url": "https://www.ashleyfurniturehomestore.com/financing/"
        },
        "product-types": [
            {
                "name": "Chair",
                "slug": "Chair",
                "image": null
            },
            {
                "name": "Couch",
                "slug": "Couch",
                "image": null
            },
            {
                "name": "Decor",
                "slug": "Decor",
                "image": null
            },
            {
                "name": "Lighting",
                "slug": "Lighting",
                "image": null
            },
            {
                "name": "Pillow",
                "slug": "Pillow",
                "image": null
            },
            {
                "name": "Rug",
                "slug": "Rug",
                "image": null
            }
        ]
    }
}

Services to Aid Webserver Demo

There is a demo/debugging website setup at https://api.snaphack.website that shows the last photo uploaded, and the last products returned.

If you add the query parameter dev to the URL, you can upload a new image by double-clicking on the thumbnail for the last uploaded photo. You can also click on the “Most Common Colors” to change the color selection, and click on the “Product Types” to change the product category selection. In dev mode, the reduced color palette is also displayed, which is used for product filtering. This allows you to determine why a product was returned.

These additional services were created to enable this experience and would not be needed in a production environment.

Last Photo Information

This is the last response returned from the photo endpoint for upload a new photo for color processing (and later other aesthetics).

The company to associate the photo upload request with is indicated by the company query parameter. This isn’t used by the actual photo processing code, but helps with later being able to display the most recently uploaded photo for a given company in the demo/debug web interface. Correct values can be retrieved from the companies endpoint.

Response documentation:

  • nonce - this is a value that can be used as an id of sorts for this upload. It is a dynamic value that changes on each upload, and is mainly used when polling the server for changes using the photo-last endpoint.
  • company - this is the value of the company parameter that was actually used. If a valid company query parameter was provided in the request, then the values will match. Otherwise, this indicates which company was actually used when storing the photo information.
  • uploaded_file - This is a full URL to the photo that was just uploaded. This is mainly stored/provided for debugging information and utilized by the demo website.
  • image_width - the full width of the image that was uploaded, in pixels.
  • image_height - the full height of the image that was uploaded, in pixels.
  • colors - an array of color objects representing the top 6 colors in the uploaded image.
  • palette_colors - an array of color objects representing the reduced-palette equivalents of the colors in the colors array.
  • complementary_colors - an array of color objects representing the complementary color for each color in the colors array.

The “color object” that is in each color array is simply an object with the key hex, whose value is a RGB hex value for the color proceeded by a # character. Originally, the API design called for additional properties in this object, but those were removed.

curl -X GET "https://api.snaphack.website/api/v1/photo-last?company=ashleyfurniturehomestore"
GET /api/v1/photo-last?company=ashleyfurniturehomestore HTTP/1.1
Host: api.snaphack.website
Status200
content-typeapplication/json
dateTue, 05 Jun 2018 16:53:57 GMT
referrer-policyno-referrer
servernginx
status200
strict-transport-securitymax-age=31536000; includeSubdomains; preload
x-content-type-optionsnosniff
x-frame-optionsSAMEORIGIN
x-xss-protection1; mode=block
{
    "nonce": "photo-5b16bf703d9e9",
    "company": "ashleyfurniturehomestore",
    "uploaded_file": "https://api.snaphack.website/uploaded_files/1528217456241059_raw_post.jpg",
    "image_width": 224,
    "image_height": 224,
    "colors": [
        {
            "hex": "#A92C1A"
        },
        {
            "hex": "#A76B22"
        },
        {
            "hex": "#37B1E4"
        },
        {
            "hex": "#C501AD"
        },
        {
            "hex": "#DDA13F"
        },
        {
            "hex": "#0B3DEC"
        }
    ],
    "palette_colors": [
        {
            "hex": "#BB0000"
        },
        {
            "hex": "#BB7733"
        },
        {
            "hex": "#00BBFF"
        },
        {
            "hex": "#BB00BB"
        },
        {
            "hex": "#FFBB33"
        },
        {
            "hex": "#0033FF"
        }
    ],
    "complementary_colors": [
        {
            "hex": "#1997A9"
        },
        {
            "hex": "#215DA7"
        },
        {
            "hex": "#E46936"
        },
        {
            "hex": "#00C518"
        },
        {
            "hex": "#3E7ADD"
        },
        {
            "hex": "#ECBA0A"
        }
    ]
}

Last Products Information

This is a GET request return the response to the last request to fetch products from the catalog for the given company using the products endpoint.

The company to associate the photo upload request with is indicated by the company query parameter. This isn’t used by the actual photo processing code, but helps with later being able to display the most recently uploaded photo for a given company in the demo/debug web interface. Correct values can be retrieved from the companies endpoint.

Response documentation:

  • nonce - this is a value that can be used as an id of sorts for this request. It is a dynamic value that changes on each request, and is mainly used when polling the server for changes using the products-last endpoint.
  • company - this is the value of the company parameter that was actually used. If a valid company query parameter was provided in the request, then the values will match. Otherwise, this indicates which company was actually used when storing the photo information.
  • product_types - This is an array of the product types that were provided in the producttypes[] query parameter(s).
  • products - This is an array of “product objects” for the matching products.

The “product object” has the following properties:

  • title - the title of the product
  • image - a full URL for the thumbnail of the product
  • url - a full URL to the product page for the product on the company’s website
  • price - the price of the product (as a formatted string), but without the $ dollar sign.
  • colors - array of color objects representing the top 6 colors in the product image.
  • palette_colors - array of hex string representing the reduced-color palette value from the colors in the product image. I’m pretty sure this was a mistake that they aren’t the full color objects.

The “color object” that is in each color array is simply an object with the key hex, whose value is a RGB hex value for the color proceeded by a # character. Originally, the API design called for additional properties in this object, but those were removed.

curl -X GET "https://api.snaphack.website/api/v1/products-last?company=ashleyfurniturehomestore"
GET /api/v1/products-last?company=ashleyfurniturehomestore HTTP/1.1
Host: api.snaphack.website
Status200
content-typeapplication/json
dateTue, 05 Jun 2018 16:54:10 GMT
referrer-policyno-referrer
servernginx
status200
strict-transport-securitymax-age=31536000; includeSubdomains; preload
x-content-type-optionsnosniff
x-frame-optionsSAMEORIGIN
x-xss-protection1; mode=block
{
    "nonce": "products-5b16bfc62fc6d",
    "company": "ashleyfurniturehomestore",
    "product_types": [
        "Chair",
        "Pillow"
    ],
    "colors": [
        "#FF7777",
        "#FFFF77"
    ],
    "palette_colors": [
        "#FF7777",
        "#FFFF77"
    ],
    "products": [
        {
            "title": "Home Accents Indoor-Outdoor Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001174-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-indoor-outdoor-pillow/a60001174/",
            "price": "43.99",
            "colors": [
                {
                    "hex": "#BF5E27"
                },
                {
                    "hex": "#A21710"
                },
                {
                    "hex": "#794702"
                },
                {
                    "hex": "#4A0100"
                },
                {
                    "hex": "#BF9048"
                },
                {
                    "hex": "#DD847E"
                }
            ],
            "palette_colors": [
                "#BB7733",
                "#BB0000",
                "#773300",
                "#330000",
                "#BB7700",
                "#FF7777"
            ]
        },
        {
            "title": "Home Accents Indoor-Outdoor Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001140-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-indoor-outdoor-pillow/a60001140/",
            "price": "54.99",
            "colors": [
                {
                    "hex": "#F4C54F"
                },
                {
                    "hex": "#001360"
                },
                {
                    "hex": "#C88705"
                },
                {
                    "hex": "#A6530D"
                },
                {
                    "hex": "#84730B"
                },
                {
                    "hex": "#F4FB5D"
                }
            ],
            "palette_colors": [
                "#FFBB33",
                "#000077",
                "#BB7700",
                "#BB3300",
                "#777700",
                "#FFFF77"
            ]
        },
        {
            "title": "Home Accents Indoor-Outdoor Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001130-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-indoor-outdoor-pillow/a60001130/",
            "price": "54.99",
            "colors": [
                {
                    "hex": "#20243D"
                },
                {
                    "hex": "#BA2E1D"
                },
                {
                    "hex": "#6C0000"
                },
                {
                    "hex": "#F15C62"
                },
                {
                    "hex": "#E7DECF"
                },
                {
                    "hex": "#942653"
                }
            ],
            "palette_colors": [
                "#000033",
                "#BB0000",
                "#770000",
                "#FF7777",
                "#BBBBBB",
                "#770033"
            ]
        },
        {
            "title": "Home Accents Indoor-Outdoor Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001175-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-indoor-outdoor-pillow/a60001175/",
            "price": "49.99",
            "colors": [
                {
                    "hex": "#C85620"
                },
                {
                    "hex": "#9D0000"
                },
                {
                    "hex": "#CF8721"
                },
                {
                    "hex": "#F47481"
                },
                {
                    "hex": "#7F5815"
                },
                {
                    "hex": "#0E3602"
                }
            ],
            "palette_colors": [
                "#BB3300",
                "#BB0000",
                "#BB7700",
                "#FF7777",
                "#773300",
                "#003300"
            ]
        },
        {
            "title": "Home Accents Indoor-Outdoor Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001157-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-indoor-outdoor-pillow/a60001157/",
            "price": "54.00",
            "colors": [
                {
                    "hex": "#C12822"
                },
                {
                    "hex": "#730000"
                },
                {
                    "hex": "#D2842F"
                },
                {
                    "hex": "#DE6B6E"
                },
                {
                    "hex": "#2C0000"
                },
                {
                    "hex": "#E0C129"
                }
            ],
            "palette_colors": [
                "#BB3333",
                "#770000",
                "#BB7733",
                "#FF7777",
                "#330000",
                "#BBBB00"
            ]
        },
        {
            "title": "Home Accents Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001779-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-pillow/a60001779/",
            "price": "40.00",
            "colors": [
                {
                    "hex": "#6C0000"
                },
                {
                    "hex": "#CC0000"
                },
                {
                    "hex": "#925A1F"
                },
                {
                    "hex": "#9CA240"
                },
                {
                    "hex": "#F35762"
                },
                {
                    "hex": "#FDFCF8"
                }
            ],
            "palette_colors": [
                "#770000",
                "#BB0000",
                "#BB7733",
                "#BBBB33",
                "#FF7777",
                "#BBBBBB"
            ]
        },
        {
            "title": "Home Accents Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A60001767-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/home-accents-pillow/a60001767/",
            "price": "40.00",
            "colors": [
                {
                    "hex": "#C12D2D"
                },
                {
                    "hex": "#760000"
                },
                {
                    "hex": "#C7AE86"
                },
                {
                    "hex": "#F27D90"
                },
                {
                    "hex": "#FDF8F4"
                },
                {
                    "hex": "#A2794D"
                }
            ],
            "palette_colors": [
                "#BB3333",
                "#770000",
                "#BBBB77",
                "#FF7777",
                "#BBBBBB",
                "#BB7733"
            ]
        },
        {
            "title": "Zackery Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000521-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/zackery-pillow/a1000521p/",
            "price": "8.49",
            "colors": [
                {
                    "hex": "#C55551"
                },
                {
                    "hex": "#8E0000"
                },
                {
                    "hex": "#AC8775"
                },
                {
                    "hex": "#F5909E"
                },
                {
                    "hex": "#BCBB9D"
                },
                {
                    "hex": "#7C5341"
                }
            ],
            "palette_colors": [
                "#BB3333",
                "#770000",
                "#BB7777",
                "#FF7777",
                "#BBBB77",
                "#773333"
            ]
        },
        {
            "title": "Simsboro Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000518-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/simsboro-pillow/a1000518p/",
            "price": "8.99",
            "colors": [
                {
                    "hex": "#B44C49"
                },
                {
                    "hex": "#830000"
                },
                {
                    "hex": "#FF6565"
                },
                {
                    "hex": "#FFB3B9"
                },
                {
                    "hex": "#2C411A"
                },
                {
                    "hex": "#3A0E0F"
                }
            ],
            "palette_colors": [
                "#BB3333",
                "#770000",
                "#FF7777",
                "#FFBBBB",
                "#003300",
                "#330000"
            ]
        },
        {
            "title": "Killeen Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000468-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/killeen-pillow/a1000468p/",
            "price": "27.49",
            "colors": [
                {
                    "hex": "#000000"
                },
                {
                    "hex": "#94875D"
                },
                {
                    "hex": "#615733"
                },
                {
                    "hex": "#EBE680"
                },
                {
                    "hex": "#03002A"
                },
                {
                    "hex": "#472813"
                }
            ],
            "palette_colors": [
                null,
                "#777733",
                "#777733",
                "#FFFF77",
                "#000033",
                "#773300"
            ]
        },
        {
            "title": "Amiela Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000462-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/amiela-pillow/a1000462p/",
            "price": "29.99",
            "colors": [
                {
                    "hex": "#730F19"
                },
                {
                    "hex": "#A75F46"
                },
                {
                    "hex": "#CF873F"
                },
                {
                    "hex": "#2A0000"
                },
                {
                    "hex": "#EC8A87"
                },
                {
                    "hex": "#FFDB86"
                }
            ],
            "palette_colors": [
                "#770000",
                "#BB3333",
                "#BB7733",
                "#330000",
                "#FF7777",
                "#FFBB33"
            ]
        },
        {
            "title": "Roxanne Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000788-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/roxanne-pillow/a1000788p/",
            "price": "23.99",
            "colors": [
                {
                    "hex": "#A87732"
                },
                {
                    "hex": "#713D16"
                },
                {
                    "hex": "#DEAB38"
                },
                {
                    "hex": "#3D030F"
                },
                {
                    "hex": "#ECE755"
                },
                {
                    "hex": "#F5DEB4"
                }
            ],
            "palette_colors": [
                "#BB7733",
                "#773300",
                "#FFBB33",
                "#330000",
                "#FFFF77",
                "#FFFFBB"
            ]
        },
        {
            "title": "Piercetown Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000402-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/piercetown-pillow/a1000402p/",
            "price": "27.49",
            "colors": [
                {
                    "hex": "#6C0C17"
                },
                {
                    "hex": "#F23D4C"
                },
                {
                    "hex": "#250000"
                },
                {
                    "hex": "#FFD3DD"
                },
                {
                    "hex": "#E9889B"
                },
                {
                    "hex": "#995059"
                }
            ],
            "palette_colors": [
                "#770000",
                "#FF0033",
                "#330000",
                "#FFBBBB",
                "#FF7777",
                "#773333"
            ]
        },
        {
            "title": "Cankton Pillow",
            "image": "https://ashleyfurniture.scene7.com/is/image/AshleyFurniture/A1000533-SW-P1-KO?$AFHS-Product-Grid-Small$",
            "url": "https://www.ashleyfurniturehomestore.com/p/cankton-pillow/a1000533p/",
            "price": "9.99",
            "colors": [
                {
                    "hex": "#AA0000"
                },
                {
                    "hex": "#ED412D"
                },
                {
                    "hex": "#550000"
                },
                {
                    "hex": "#C31E5A"
                },
                {
                    "hex": "#E48D46"
                },
                {
                    "hex": "#FF7F8E"
                }
            ],
            "palette_colors": [
                "#BB0000",
                "#FF3333",
                "#770000",
                "#BB3377",
                "#FF7700",
                "#FF7777"
            ]
        }
    ]
}