sanmar_sdk.promostandards.product_data ====================================== .. py:module:: sanmar_sdk.promostandards.product_data .. autoapi-nested-parse:: SanMar's PromoStandards Product Data service, version 2.0.0. Describes a style and every color and size of it, and lists which parts are closed out, changed or sellable. In PromoStandards terms a *product* is a SanMar style (``K500``) and a *part* is one style, color and size, identified by SanMar's unique key. Attributes ---------- .. autoapisummary:: sanmar_sdk.promostandards.product_data.COUNTRY sanmar_sdk.promostandards.product_data.LANGUAGE Classes ------- .. autoapisummary:: sanmar_sdk.promostandards.product_data.Color sanmar_sdk.promostandards.product_data.ApparelSize sanmar_sdk.promostandards.product_data.Dimension sanmar_sdk.promostandards.product_data.Packaging sanmar_sdk.promostandards.product_data.Specification sanmar_sdk.promostandards.product_data.ProductPart sanmar_sdk.promostandards.product_data.MarketingPoint sanmar_sdk.promostandards.product_data.Category sanmar_sdk.promostandards.product_data.RelatedProduct sanmar_sdk.promostandards.product_data.ProductPrice sanmar_sdk.promostandards.product_data.PriceGroup sanmar_sdk.promostandards.product_data.FobPoint sanmar_sdk.promostandards.product_data.Product sanmar_sdk.promostandards.product_data.PartReference sanmar_sdk.promostandards.product_data.ProductDataService Module Contents --------------- .. py:data:: COUNTRY :value: 'US' .. py:data:: LANGUAGE :value: 'en' .. py:class:: Color(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` One of a part's colors. .. py:attribute:: catalog_color :type: str :value: None The catalog (mainframe) color, which web services and orders expect. .. py:attribute:: color_name :type: str | None :value: None The full color name, for display only. .. py:attribute:: hex :type: str | None :value: None .. py:attribute:: approximate_pms :type: str | None :value: None The nearest Pantone color, such as ``BLACK C``. .. py:class:: ApparelSize(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A part's size. .. py:attribute:: apparel_style :type: str :value: None ``Unisex``, ``Mens``, ``Womens``, ``Youth``, ``MensTall`` and so on. .. py:attribute:: label_size :type: str :value: None ``XS`` through ``6XL``, ``OSFA``, or ``CUSTOM`` when :attr:`custom_size` holds it. .. py:attribute:: custom_size :type: str | None :value: None The size when it is not a standard label size, such as a pant size (``2732``). .. py:property:: size :type: str The size as SanMar prints it, which is the custom size where there is one. .. py:class:: Dimension(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A part's measurements. .. py:attribute:: dimension_uom :type: str :value: None .. py:attribute:: depth :type: decimal.Decimal .. py:attribute:: height :type: decimal.Decimal .. py:attribute:: width :type: decimal.Decimal .. py:attribute:: weight_uom :type: str :value: None .. py:attribute:: weight :type: decimal.Decimal .. py:class:: Packaging(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A way a part is packed: how many to a box, and how big and heavy the box is. .. py:attribute:: package_type :type: str :value: None .. py:attribute:: quantity :type: decimal.Decimal .. py:attribute:: description :type: str | None :value: None .. py:attribute:: default :type: bool :value: False .. py:attribute:: dimension_uom :type: str | None :value: None .. py:attribute:: depth :type: decimal.Decimal | None :value: None .. py:attribute:: height :type: decimal.Decimal | None :value: None .. py:attribute:: width :type: decimal.Decimal | None :value: None .. py:attribute:: weight_uom :type: str | None :value: None .. py:attribute:: weight :type: decimal.Decimal | None :value: None .. py:class:: Specification(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A measurement of a part, such as its chest or inseam. .. py:attribute:: specification_type :type: str :value: None .. py:attribute:: uom :type: str :value: None .. py:attribute:: value :type: str :value: None .. py:class:: ProductPart(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` One color and size of a style. .. py:attribute:: part_id :type: str :value: None SanMar's unique key for this style, color and size. .. py:attribute:: primary_color :type: Color | None :value: None .. py:attribute:: colors :type: list[Color] :value: None .. py:attribute:: descriptions :type: list[str] :value: None .. py:attribute:: apparel_size :type: ApparelSize | None :value: None .. py:attribute:: country_of_origin :type: str | None :value: None .. py:attribute:: primary_material :type: str | None :value: None .. py:attribute:: specifications :type: list[Specification] :value: None .. py:attribute:: dimension :type: Dimension | None :value: None .. py:attribute:: lead_time :type: int | None :value: None .. py:attribute:: gtin :type: str | None :value: None .. py:attribute:: rush_service :type: bool :value: None .. py:attribute:: packaging :type: list[Packaging] :value: None .. py:attribute:: shipping_packages :type: list[Packaging] :value: None How the part ships, as the case it comes in and how many pieces are in it. .. py:attribute:: effective_date :type: datetime.datetime | None :value: None .. py:attribute:: end_date :type: datetime.datetime | None :value: None .. py:attribute:: closeout :type: bool :value: None .. py:attribute:: caution :type: bool :value: None .. py:attribute:: caution_comment :type: str | None :value: None .. py:attribute:: on_demand :type: bool :value: None .. py:attribute:: hazmat :type: bool :value: None .. py:property:: catalog_color :type: str | None The part's catalog (mainframe) color, which web services and orders expect. .. py:class:: MarketingPoint(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A selling point from a product's description. .. py:attribute:: text :type: str :value: None .. py:attribute:: point_type :type: str | None :value: None .. py:class:: Category(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A category a product is listed under. .. py:attribute:: category :type: str .. py:attribute:: subcategory :type: str | None :value: None .. py:class:: RelatedProduct(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Another product SanMar relates to this one. .. py:attribute:: relation_type :type: str :value: None ``Companion Sell``, ``Substitute`` or ``Common Grouping``. .. py:attribute:: product_id :type: str :value: None .. py:attribute:: part_id :type: str | None :value: None .. py:class:: ProductPrice(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` One price break. .. py:attribute:: quantity_min :type: int :value: None .. py:attribute:: quantity_max :type: int | None :value: None .. py:attribute:: price :type: decimal.Decimal .. py:attribute:: discount_code :type: str | None :value: None .. py:class:: PriceGroup(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A named set of price breaks, such as ``MSRP``. .. py:attribute:: name :type: str :value: None .. py:attribute:: currency :type: str .. py:attribute:: description :type: str | None :value: None .. py:attribute:: prices :type: list[ProductPrice] :value: None .. py:class:: FobPoint(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A place SanMar ships from: one of its warehouses. .. py:attribute:: warehouse :type: sanmar_sdk.common.WarehouseNumber :value: None .. py:attribute:: city :type: str | None :value: None .. py:attribute:: state :type: str | None :value: None .. py:attribute:: postal_code :type: str | None :value: None .. py:attribute:: country :type: str | None :value: None .. py:attribute:: currencies :type: Annotated[list[str], pluck('currency')] :value: None The currencies SanMar prices in from here. Only the pricing service reports them. .. py:class:: Product(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A style, and every color and size of it. .. py:attribute:: product_id :type: str :value: None The style number, such as ``K500``. .. py:attribute:: name :type: str :value: None .. py:attribute:: descriptions :type: list[str] :value: None The description, one paragraph or bullet point to an entry. .. py:attribute:: brand :type: str | None :value: None .. py:attribute:: line_name :type: str | None :value: None .. py:attribute:: marketing_points :type: list[MarketingPoint] :value: None .. py:attribute:: keywords :type: Annotated[list[str], pluck('keyword')] :value: None .. py:attribute:: categories :type: list[Category] :value: None .. py:attribute:: related_products :type: list[RelatedProduct] :value: None .. py:attribute:: primary_image_url :type: str | None :value: None .. py:attribute:: price_groups :type: list[PriceGroup] :value: None .. py:attribute:: price_expires_date :type: datetime.datetime | None :value: None .. py:attribute:: parts :type: list[ProductPart] :value: None .. py:attribute:: fob_points :type: list[FobPoint] :value: None .. py:attribute:: export :type: bool | None :value: None .. py:attribute:: compliance_info_available :type: bool | None :value: None .. py:attribute:: unspsc_commodity_code :type: int | None :value: None .. py:attribute:: last_change_date :type: datetime.datetime | None :value: None .. py:attribute:: creation_date :type: datetime.datetime | None :value: None .. py:attribute:: effective_date :type: datetime.datetime | None :value: None .. py:attribute:: end_date :type: datetime.datetime | None :value: None .. py:attribute:: closeout :type: bool :value: None .. py:attribute:: caution :type: bool :value: None .. py:attribute:: caution_comment :type: str | None :value: None .. py:class:: PartReference(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A product, or one part of it, in a list of changed, closed-out or sellable items. .. py:attribute:: product_id :type: str :value: None .. py:attribute:: part_id :type: str | None :value: None .. py:class:: ProductDataService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk.promostandards._common.PromoStandardsService` SanMar's PromoStandards Product Data service. .. py:attribute:: endpoint .. py:attribute:: version :value: '2.0.0' The PromoStandards version SanMar implements, sent as ``wsVersion``. .. py:method:: get(product_id: str, *, part_id: str | None = None, catalog_color: str | None = None) -> Product Describe a style, optionally narrowed to one part or one catalog color. SanMar recommends asking for whole styles rather than one part at a time. .. py:method:: closeouts() -> list[PartReference] List every part SanMar has discontinued. .. py:method:: modified_since(since: datetime.datetime) -> list[PartReference] List every part that changed after a point in time. .. py:method:: sellable(product_id: str | None = None, *, part_id: str | None = None, is_sellable: bool = True) -> list[PartReference] List the parts SanMar sells, across the catalog or within one style. With ``is_sellable=False``, list the parts SanMar no longer sells instead.