sanmar_sdk.promostandards.inventory

SanMar’s PromoStandards Inventory service, version 2.0.0.

Reports stock for a style, narrowed to some of its sizes and catalog colors, or for up to 200 parts from any styles at once, which suits checking a whole cart in one call. SanMar does not implement getFilterValues, and caps each warehouse’s reported quantity at 3,000.

Attributes

Classes

FutureStock

Stock a warehouse expects to receive.

LocationStock

One part's stock at one warehouse.

PartStock

One part's stock across SanMar's warehouses.

InventoryService

SanMar's PromoStandards Inventory service.

Module Contents

sanmar_sdk.promostandards.inventory.MAX_PART_IDS = 200[source]
class sanmar_sdk.promostandards.inventory.FutureStock(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

Stock a warehouse expects to receive.

quantity: int = None[source]
available_on: datetime.datetime = None[source]
class sanmar_sdk.promostandards.inventory.LocationStock(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

One part’s stock at one warehouse.

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

Pieces available, up to SanMar’s cap of 3,000.

name: str | None = None[source]
postal_code: str | None = None[source]
country: str | None = None[source]
future: list[FutureStock] = None[source]
class sanmar_sdk.promostandards.inventory.PartStock(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

One part’s stock across SanMar’s warehouses.

part_id: str = None[source]

SanMar’s unique key for this style, color and size.

catalog_color: str | None = None[source]

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

size: str | None = None[source]
description: str | None = None[source]
quantity: int = None[source]

Pieces available across every warehouse.

main_part: bool = None[source]
manufactured_item: bool = None[source]
buy_to_order: bool = None[source]
replenishment_lead_time: int | None = None[source]
locations: list[LocationStock] = None[source]
last_modified: datetime.datetime | None = None[source]
class sanmar_sdk.promostandards.inventory.InventoryService(soap: SoapClient, credentials: Credentials)[source]

Bases: sanmar_sdk.promostandards._common.PromoStandardsService

SanMar’s PromoStandards Inventory service.

endpoint[source]
version = '2.0.0'[source]

The PromoStandards version SanMar implements, sent as wsVersion.

get(product_id: str, *, part_ids: collections.abc.Sequence[str] = (), sizes: collections.abc.Sequence[str] = (), catalog_colors: collections.abc.Sequence[str] = ()) → list[PartStock][source]

Report stock for a style, or for a set of parts.

With no filter, every part of the style is reported. sizes and catalog_colors narrow the style down. part_ids asks for up to 200 parts from any styles instead; SanMar still needs a valid style in product_id, but does not require the parts to belong to it.

Raises:
  • TypeError – If a filter is a single string rather than a list of them.

  • ValueError – If part_ids is combined with sizes or catalog_colors, or lists more than 200 parts.