Catalog

Every catalog call is a method on SSActivewear. Build one as described in Authentication first.

Identifiers

Wherever a method takes identifiers, pass one identifier or a list of them. Strings and integers both work, and the SDK takes care of the comma separated lists and URL encoding S&S expects:

ss.get_products("B00760004")
ss.get_products([81480, "B00760004", "00821780008137"])
ss.get_products(styles="bella + canvas 3001cvc")

Styles can be identified by style ID, part number (the first five digits of a sku), or brand and style name together, such as "Gildan 5000".

Products

get_products() returns a Product per sku. Each product has its pricing and its stock in each warehouse. Filter by sku (ID, sku, GTIN, or your own sku) or by style, and optionally limit the warehouses reported:

products = ss.get_products(styles="Gildan 5000", warehouses=["IL", "KS"])
for product in products:
    print(product.sku, product.color_name, product.size_name, product.customer_price)
    for warehouse in product.warehouses:
        print("  ", warehouse.warehouse_abbr, warehouse.qty)

Prices and weights are Decimal. Images are paths relative to https://www.ssactivewear.com/.

Inventory

When you only need stock levels, get_inventory() takes the same filters and returns far less data:

for item in ss.get_inventory(part_numbers="00760"):
    print(item.sku, sum(warehouse.qty for warehouse in item.warehouses))

Styles

styles = ss.get_styles("Gildan 2000")
styles = ss.get_styles(search="hooded sweatshirt")
styles = ss.get_styles(style_ids=[39, 40])

category_ids parses a style’s comma separated category list.

Categories, brands, and specs

categories = ss.get_categories()
brands = ss.get_brands([31, 35])
specs = ss.get_specs(styles="Gildan 5000")

Each method returns everything when called without filters.