sanmar_sdk.ftp.inventory¶
SanMar’s inventory files.
sanmar_dip.txtis refreshed hourly: one row per style, color, size and warehouse, with that warehouse’s stock (capped by SanMar) and the current piece, case and sale prices. SanMar recommends it over its inventory web services for anything more frequent than a live check at ordering time.sanmar_closeouts_dip.txthas the same layout.sanmar_activeproductsexport.txtis the older per-warehouse export, with fewer columns and no sale prices.
Both are pipe-delimited, with a header row.
Discontinued products stay in the file with a quantity of 0 while any size of that color
has at least 12 pieces left. SanMar suggests skipping rows whose discontinued_code is
S and whose quantity is 0, and checking again later: returned stock can bring them back.
Attributes¶
|
|
|
Classes¶
One style, color and size at one warehouse. |
Functions¶
Stream |
|
|
Stream |
Module Contents¶
- sanmar_sdk.ftp.inventory.WAREHOUSE_INVENTORY_COLUMNS = ('inventory_key', 'size_index', 'catalog_no', 'catalog_color', 'size', 'whse_no', 'quantity',...[source]¶
sanmar_dip.txt, as SanMar’s server writes it.The FTP Integration Guide v23.6 lists two more columns,
SALE_START_DATEandSALE_END_DATE, that the file does not have; its sale dates are the_datetimeones.
- sanmar_sdk.ftp.inventory.ACTIVE_PRODUCTS_COLUMNS = ('inventory_key', 'size_index', 'catalog_no', 'catalog_color', 'size', 'whse_no', 'quantity',...[source]¶
sanmar_activeproductsexport.txt, as SanMar’s server writes it.The guide says it ends by repeating the inventory key; the file ends with the unique key.
- class sanmar_sdk.ftp.inventory.WarehouseInventory(/, **data: Any)[source]¶
Bases:
sanmar_sdk.base.RecordOne style, color and size at one warehouse.
- warehouse: sanmar_sdk.common.WarehouseNumber = None[source]¶
- unique_key: str | None = None[source]¶
SanMar’s identifier for this style, color and size, and the PromoStandards part id.
- piece_weight: decimal.Decimal | None = None[source]¶
- piece_price: sanmar_sdk.base.Price = None[source]¶
- case_price: sanmar_sdk.base.Price = None[source]¶
- 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]¶
- sanmar_sdk.ftp.inventory.read_warehouse_inventory(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') collections.abc.Iterator[WarehouseInventory][source]¶
Stream
sanmar_dip.txt(orsanmar_closeouts_dip.txt), one row at a time.
- sanmar_sdk.ftp.inventory.read_active_products(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') collections.abc.Iterator[WarehouseInventory][source]¶
Stream
sanmar_activeproductsexport.txt, one row at a time.