sanmar_sdk.standard.products

SanMar’s own product information service.

Looks up products by style, optionally narrowed to a catalog color, a size, or both, and asks SanMar to write product files to the SFTP server. For frequent or whole-catalog pulls, SanMar recommends its product files (sanmar_sdk.ftp) over this service.

Attributes

Classes

ProductImages

Links to a product's images and documents.

ProductPrices

A product's list and sale prices.

ProductInfo

One style, color and size, as SanMar's product information service describes it.

FileRequest

SanMar's acknowledgement of a request for a product file.

ProductInfoService

SanMar's own product information service.

Module Contents

sanmar_sdk.standard.products.PRODUCT_INFORMATION_FOLDER = 'SanMarPDD/SanMarPI'[source]
class sanmar_sdk.standard.products.ProductImages(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

Links to a product’s images and documents.

product: str | None = None[source]
thumbnail: str | None = None[source]
color_product: str | None = None[source]
color_product_thumbnail: str | None = None[source]
color_square: str | None = None[source]
color_swatch: str | None = None[source]
front_model: str | None = None[source]
back_model: str | None = None[source]
side_model: str | None = None[source]
three_quarter_model: str | None = None[source]
front_flat: str | None = None[source]
back_flat: str | None = None[source]
spec_sheet: str | None = None[source]
class sanmar_sdk.standard.products.ProductPrices(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A product’s list and sale prices.

piece_price: sanmar_sdk.base.Price = None[source]

The price per piece for five pieces or fewer of one style and color.

case_price: sanmar_sdk.base.Price = None[source]

The price per piece when buying by the case.

piece_sale_price: sanmar_sdk.base.Price = None[source]
case_sale_price: sanmar_sdk.base.Price = None[source]
sale_start_date: sanmar_sdk.base.SanMarDate | None = None[source]
sale_end_date: sanmar_sdk.base.SanMarDate | None = None[source]
map_price: sanmar_sdk.base.Price = None[source]

The minimum advertised price.

price_code: str | None = None[source]

The suggested retail pricing code. A/P is 50%, B/Q 45%, C/R 40%, D/S 35%, E/T 30%.

price_text: str | None = None[source]

Which sizes the price applies to.

class sanmar_sdk.standard.products.ProductInfo(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

One style, color and size, as SanMar’s product information service describes it.

style: str = None[source]
catalog_color: str = None[source]

The catalog (mainframe) color, which web services and orders expect.

size: str = None[source]
unique_key: str = None[source]

SanMar’s identifier for this style, color and size, and the PromoStandards part id.

inventory_key: int = None[source]
size_index: int = None[source]
color_name: str | None = None[source]

The full color name, for display only.

title: str | None = None[source]
description: str | None = None[source]
brand: str | None = None[source]
category: str | None = None[source]
status: str | None = None[source]

Coming Soon, New, Active, Regular, or Discontinued.

available_sizes: str | None = None[source]
keywords: sanmar_sdk.base.CommaSeparated = None[source]
case_size: int | None = None[source]
piece_weight: decimal.Decimal | None = None[source]

Approximate weight per piece in pounds.

images: ProductImages = None[source]
prices: ProductPrices = None[source]
class sanmar_sdk.standard.products.FileRequest(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

SanMar’s acknowledgement of a request for a product file.

SanMar writes the file to its SFTP server about 20 minutes later. Brand and category file names end with the date SanMar wrote them, so they are matched by pattern; read one with sanmar_sdk.ftp.SanMarFTP.find() and product_information().

folder: str[source]
file_pattern: str[source]

The file’s name, or a shell-style pattern where SanMar dates it.

message: str | None = None[source]
class sanmar_sdk.standard.products.ProductInfoService(soap: SoapClient, credentials: Credentials)[source]

Bases: sanmar_sdk._soap.Service

SanMar’s own product information service.

get(style: str, *, catalog_color: str | None = None, size: str | None = None) → list[ProductInfo][source]

Look up a style, optionally narrowed to one catalog color, one size, or both.

Returns one entry per matching style, color and size. The color must be the catalog (mainframe) color.

get_many(queries: collections.abc.Sequence[sanmar_sdk.common.StyleQuery]) → list[ProductInfo][source]

Look up several styles in one call.

request_bulk_file() → FileRequest[source]

Ask SanMar to write a file of its whole catalog. SanMar allows this once a month.

request_delta_file() → FileRequest[source]

Ask SanMar to write a file of what changed since the last bulk or delta file.

SanMar allows this once a day. The next delta starts from this one, so calling it consumes the changes it reports.

request_brand_file(brand: str) → FileRequest[source]

Ask SanMar to write a file of one brand’s products, such as OGIO.

request_category_file(category: str) → FileRequest[source]

Ask SanMar to write a file of one category’s products, such as Caps.