sanmar_sdk.standard.inventory

SanMar’s own inventory service.

Reports stock by warehouse for a style, optionally narrowed to a catalog color or a size. SanMar caps the quantity it reports per warehouse, and asks that this service be used for a handful of items at a time; for anything more frequent than a live check at ordering time, it recommends sanmar_dip.txt or the PromoStandards inventory service.

SanMar answers a lookup by style and color, style and size, or style alone with each size and warehouse named, but answers a lookup by style, color and size with bare numbers in an order it does not state. This service therefore never sends all three: given a color and a size, it asks for the color and keeps the matching size itself.

Classes

WarehouseStock

Stock of one style, color and size at one warehouse.

SkuStock

Stock of one style, color and size, warehouse by warehouse.

InventoryService

SanMar's own inventory service.

Module Contents

class sanmar_sdk.standard.inventory.WarehouseStock(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

Stock of one style, color and size at one warehouse.

warehouse: sanmar_sdk.common.WarehouseNumber = None[source]
quantity: int = None[source]

Stock at this warehouse, capped by SanMar.

name: str | None = None[source]
class sanmar_sdk.standard.inventory.SkuStock(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

Stock of one style, color and size, warehouse by warehouse.

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

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

size: str[source]
warehouses: sanmar_sdk.base.OneOrMany[WarehouseStock] = None[source]
property total: int[source]

Stock across every warehouse.

class sanmar_sdk.standard.inventory.InventoryService(soap: SoapClient, credentials: Credentials)[source]

Bases: sanmar_sdk._soap.Service

SanMar’s own inventory service.

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

Look up stock by warehouse for a style, one catalog color, one size, or both.

The color must be the catalog (mainframe) color, not the display name.

get_quantity(style: str, catalog_color: str, size: str, warehouse: sanmar_sdk.common.Warehouse | int) → int[source]

Look up the stock of one style, catalog color and size at one warehouse.