Skip to main content

Auto Tagging For Fashion

Selectika Autotagging API

Description

This is an api to fetch tags for products in the selectika catalog

Base URL

The base URL for all API requests is:

https://api.selectika.ai/v2

Authentication

The Authentication for the API is a basic param passed within the header or via query params:

  • Header: api_key: {api_key}
  • Query: {api_url}?api_key={api_key}

*The API key will be provided to you separately

Endpoints

GET /products{.(json|csv|xml)}?

Returns a list of all products and their tags in the requested format extention (default: json)

For specific category items, you can replace “products” with any Selectika category.
For example. all shirts in json format: /Shirts.json

Parameters

  • limit (optional): The maximum number of products to return. Default is 10. must be a positive number 1 – 50.
  • page (optional): The number of products to skip before starting to return results. Default is 1. Must be a positive number ≥= 1. if no products will be available for a specific page there an error payload will be returned.
  • updated_after (optional): A timestamp of when the item was updated after (format : YYYY-MM-DDTHH:mm:ss.sssZ) or elapsed dates value like: lastday / yesterday, lastweek, lastmonth, last3months / lastquarter, last6months / lasthalf, lastyear
  • updated_before (optional): A timestamp of when the item was updated before (format : YYYY-MM-DDTHH:mm:ss.sssZ) or elapsed dates value like: lastday / yesterday, lastweek, lastmonth, last3months / lastquarter, last6months / lasthalf, lastyear

Response

Returns a JSON object with the following properties:

  • totalCount: the total number of tagged products that apply to the criteria
  • products – an array of the products that are returned –
    • id: The unique identifier of the product on the retailer side.
    • title: The title of the product.
    • categoryName: The category of the product.
    • created_at: The timestamp for when the product record was created
    • tagging_last_updated_at: The timestamp for when the product tagging was updated
    • colors: An object array of colors found in the product images
    • features: All possible Selectika tags from the autotagging and their values
    • description: Selectika description based on the autotagging and their values

GET /products/{retailer_item_id}

Returns a specific product and its tags

Response

Returns a JSON object with the following properties:

  • id: The unique identifier of the product on the retailer side.
  • title: The title of the product.
  • categoryName: The category of the product.
  • created_at: The timestamp for when the product record was created
  • tagging_last_updated_at: The timestamp for when the product tagging was updated
  • colors: An object array of colors found in the product images
  • features: All possible Selectika tags from the autotagging and their values
  • description: Selectika description based on the autotagging and their values

If the product isn’t tagged, the API will return a 404 not found with a Json payload with the relevant message

Selectika Tags list and values :

https://docs.google.com/spreadsheets/d/1mQko_5Wwzn2OT2PbZMNNAkWI9jPEaiPHE_1wpVVNEE0/edit?usp=sharing

Example

Request:

GET /products?page=25&limit=10&updated_after=2023-10-20:06:37:17.623Z

Response:

{
    "totalCount": 9511,
    "products": [
      {
            "id": "1749689",
            "title": "Classic Maroon Blazer And Trouser",
            "categoryName": "Set Blazers Pants",
            "features": [
		{
                        "name": "Blazer Shape",
                        "value": "Double Breasted"
	        },
		{
		        "name": "Body Fit",
			"value": "Loose"
		},
		{
			"name": "Sleeve Length",
			"value": "Long"
		},
	        ...
	    ],
	    "colors": [
		{
                    "parent": "White",
                    "child": "White",
                    "percentage": 53,
                    "rgb": [
                        238,
                        238,
                        238
                    ]
                },
                {
                    "parent": "Purple",
                    "child": "Lilac",
                    "percentage": 46.90,
                    "rgb": [
                        187,
                        155,
                        192
                    ]
                },
		...
	    ],
            "tagging_last_updated_at": "2023-10-30T07:25:50.674Z",
            "created_at": "2023-08-26T05:09:24.389Z"
        },
...
    ]
}

Errors

This API uses the following error codes:

  • 400 Bad Request: The request was malformed or missing required parameters.
  • 401 Unauthorized: The API key provided was invalid or missing.
  • 404 Not Found: The requested resource was not found.
  • 500 Internal Server Error: An unexpected error occurred on the server.