sanmar_sdk.promostandards ========================= .. py:module:: sanmar_sdk.promostandards .. autoapi-nested-parse:: SanMar's PromoStandards web services. Each is reached through ``sanmar.promostandards``, such as ``sanmar.promostandards.inventory``. They take the SanMar.com login but not the customer number, and identify a style as a *product* and one style, color and size as a *part*, whose id is SanMar's unique key. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/sanmar_sdk/promostandards/client/index /autoapi/sanmar_sdk/promostandards/inventory/index /autoapi/sanmar_sdk/promostandards/invoices/index /autoapi/sanmar_sdk/promostandards/media_content/index /autoapi/sanmar_sdk/promostandards/order_status/index /autoapi/sanmar_sdk/promostandards/pricing/index /autoapi/sanmar_sdk/promostandards/product_data/index /autoapi/sanmar_sdk/promostandards/purchase_orders/index /autoapi/sanmar_sdk/promostandards/shipment_notification/index Classes ------- .. autoapisummary:: sanmar_sdk.promostandards.PromoStandards sanmar_sdk.promostandards.FutureStock sanmar_sdk.promostandards.InventoryService sanmar_sdk.promostandards.LocationStock sanmar_sdk.promostandards.PartStock sanmar_sdk.promostandards.AccountInfo sanmar_sdk.promostandards.Invoice sanmar_sdk.promostandards.InvoiceLine sanmar_sdk.promostandards.InvoiceService sanmar_sdk.promostandards.Tax sanmar_sdk.promostandards.ClassType sanmar_sdk.promostandards.MediaClass sanmar_sdk.promostandards.MediaContentService sanmar_sdk.promostandards.MediaItem sanmar_sdk.promostandards.MediaType sanmar_sdk.promostandards.Contact sanmar_sdk.promostandards.ContactDetails sanmar_sdk.promostandards.Issue sanmar_sdk.promostandards.IssueDetail sanmar_sdk.promostandards.OrderStatus sanmar_sdk.promostandards.OrderStatusService sanmar_sdk.promostandards.SalesOrderStatus sanmar_sdk.promostandards.Status sanmar_sdk.promostandards.StatusLine sanmar_sdk.promostandards.PartPrice sanmar_sdk.promostandards.PriceBreak sanmar_sdk.promostandards.PriceType sanmar_sdk.promostandards.PricingService sanmar_sdk.promostandards.ApparelSize sanmar_sdk.promostandards.Category sanmar_sdk.promostandards.Color sanmar_sdk.promostandards.Dimension sanmar_sdk.promostandards.FobPoint sanmar_sdk.promostandards.MarketingPoint sanmar_sdk.promostandards.Packaging sanmar_sdk.promostandards.PartReference sanmar_sdk.promostandards.PriceGroup sanmar_sdk.promostandards.Product sanmar_sdk.promostandards.ProductDataService sanmar_sdk.promostandards.ProductPart sanmar_sdk.promostandards.ProductPrice sanmar_sdk.promostandards.RelatedProduct sanmar_sdk.promostandards.Specification sanmar_sdk.promostandards.PromoStandardsOrder sanmar_sdk.promostandards.PromoStandardsOrderLine sanmar_sdk.promostandards.PurchaseOrderService sanmar_sdk.promostandards.SalesOrderShipment sanmar_sdk.promostandards.ShipmentAddress sanmar_sdk.promostandards.ShipmentLocation sanmar_sdk.promostandards.ShipmentNotification sanmar_sdk.promostandards.ShipmentNotificationService sanmar_sdk.promostandards.ShipmentPackage sanmar_sdk.promostandards.ShippedItem Package Contents ---------------- .. py:class:: PromoStandards(soap: sanmar_sdk._soap.SoapClient, credentials: sanmar_sdk._soap.Credentials) SanMar's PromoStandards services, which take only the SanMar.com login. .. py:attribute:: product_data Product Data 2.0.0. .. py:attribute:: media_content Media Content 1.1.0. .. py:attribute:: inventory Inventory 2.0.0. .. py:attribute:: pricing Pricing and Configuration 1.0.0. .. py:attribute:: order_status Order Status 2.0.0. .. py:attribute:: shipment_notifications Order Shipment Notification 1.0.0. .. py:attribute:: invoices Invoice 1.0.0. .. py:attribute:: purchase_orders Purchase Order 1.0.0. .. py:class:: FutureStock(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Stock a warehouse expects to receive. .. py:attribute:: quantity :type: int :value: None .. py:attribute:: available_on :type: datetime.datetime :value: None .. py:class:: InventoryService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk.promostandards._common.PromoStandardsService` SanMar's PromoStandards Inventory 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_ids: collections.abc.Sequence[str] = (), sizes: collections.abc.Sequence[str] = (), catalog_colors: collections.abc.Sequence[str] = ()) -> list[PartStock] 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. :raises ValueError: If ``part_ids`` is combined with ``sizes`` or ``catalog_colors``, or lists more than 200 parts. .. py:class:: LocationStock(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` One part's stock at one warehouse. .. py:attribute:: warehouse :type: sanmar_sdk.common.WarehouseNumber :value: None .. py:attribute:: quantity :type: int :value: None Pieces available, up to SanMar's cap of 3,000. .. py:attribute:: name :type: str | None :value: None .. py:attribute:: postal_code :type: str | None :value: None .. py:attribute:: country :type: str | None :value: None .. py:attribute:: future :type: list[FutureStock] :value: None .. py:class:: PartStock(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` One part's stock across SanMar's warehouses. .. py:attribute:: part_id :type: str :value: None SanMar's unique key for this style, color and size. .. py:attribute:: catalog_color :type: str | None :value: None The catalog (mainframe) color, which web services and orders expect. .. py:attribute:: size :type: str | None :value: None .. py:attribute:: description :type: str | None :value: None .. py:attribute:: quantity :type: int :value: None Pieces available across every warehouse. .. py:attribute:: main_part :type: bool :value: None .. py:attribute:: manufactured_item :type: bool :value: None .. py:attribute:: buy_to_order :type: bool :value: None .. py:attribute:: replenishment_lead_time :type: int | None :value: None .. py:attribute:: locations :type: list[LocationStock] :value: None .. py:attribute:: last_modified :type: datetime.datetime | None :value: None .. py:class:: AccountInfo(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` The account and address an invoice is billed or sold to. .. py:attribute:: account_name :type: str | None :value: None .. py:attribute:: account_number :type: str | None :value: None .. py:attribute:: attention_to :type: str | None :value: None .. py:attribute:: address1 :type: str | None :value: None .. py:attribute:: address2 :type: str | None :value: None .. py:attribute:: address3 :type: str | None :value: None .. py:attribute:: city :type: str | None :value: None .. py:attribute:: region :type: str | None :value: None The state. .. py:attribute:: postal_code :type: str | None :value: None .. py:attribute:: country :type: str | None :value: None .. py:attribute:: email :type: str | None :value: None .. py:attribute:: phone :type: str | None :value: None .. py:class:: Invoice(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` An invoice or credit memo. .. py:attribute:: invoice_number :type: str :value: None .. py:attribute:: invoice_type :type: str :value: None Whether this is an invoice or a credit memo, as SanMar spells it. .. py:attribute:: invoice_date :type: datetime.date :value: None .. py:attribute:: payment_due_date :type: datetime.date :value: None .. py:attribute:: currency :type: str .. py:attribute:: sales_amount :type: decimal.Decimal :value: None .. py:attribute:: shipping_amount :type: decimal.Decimal :value: None .. py:attribute:: handling_amount :type: decimal.Decimal :value: None .. py:attribute:: tax_amount :type: decimal.Decimal :value: None .. py:attribute:: invoice_amount :type: decimal.Decimal :value: None .. py:attribute:: advance_payment_amount :type: decimal.Decimal :value: None .. py:attribute:: amount_due :type: decimal.Decimal :value: None .. py:attribute:: po_number :type: str | None :value: None .. py:attribute:: po_version :type: str | None :value: None .. py:attribute:: bill_to :type: AccountInfo | None :value: None .. py:attribute:: sold_to :type: AccountInfo | None :value: None .. py:attribute:: comments :type: str | None :value: None .. py:attribute:: payment_terms :type: str | None :value: None .. py:attribute:: fob :type: str | None :value: None .. py:attribute:: document_url :type: str | None :value: None .. py:attribute:: payment_url :type: str | None :value: None .. py:attribute:: lines :type: list[InvoiceLine] :value: None .. py:attribute:: sales_order_numbers :type: list[str] :value: None .. py:attribute:: taxes :type: list[Tax] :value: None .. py:class:: InvoiceLine(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` One line of an invoice. .. py:attribute:: invoice_quantity :type: decimal.Decimal :value: None .. py:attribute:: uom :type: str :value: None .. py:attribute:: description :type: str :value: None .. py:attribute:: unit_price :type: decimal.Decimal :value: None .. py:attribute:: extended_price :type: decimal.Decimal :value: None .. py:attribute:: line_number :type: decimal.Decimal | None :value: None .. py:attribute:: product_id :type: str | None :value: None The style. .. py:attribute:: part_id :type: str | None :value: None SanMar's unique key for the style, color and size. .. py:attribute:: charge_id :type: str | None :value: None .. py:attribute:: po_line_number :type: decimal.Decimal | None :value: None .. py:attribute:: ordered_quantity :type: decimal.Decimal | None :value: None .. py:attribute:: back_ordered_quantity :type: decimal.Decimal | None :value: None .. py:attribute:: discount_amount :type: decimal.Decimal | None :value: None .. py:attribute:: distributor_product_id :type: str | None :value: None .. py:attribute:: distributor_part_id :type: str | None :value: None .. py:class:: InvoiceService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk.promostandards._common.PromoStandardsService` SanMar's PromoStandards Invoice service. .. py:attribute:: endpoint .. py:attribute:: version :value: '1.0.0' The PromoStandards version SanMar implements, sent as ``wsVersion``. .. py:method:: by_purchase_order(po_number: str) -> list[Invoice] Find the invoices for a purchase order. .. py:method:: get(invoice_number: str) -> Invoice Find one invoice by its number. :raises ~sanmar_sdk.exceptions.NotFoundError: If SanMar has no such invoice. .. py:method:: by_date(invoice_date: datetime.date) -> list[Invoice] Find every invoice dated a given day. .. py:method:: available_since(since: datetime.datetime) -> list[Invoice] Find every invoice issued after a point in time. .. py:class:: Tax(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A tax charged on an invoice. .. py:attribute:: tax_type :type: str :value: None .. py:attribute:: jurisdiction :type: str :value: None .. py:attribute:: amount :type: decimal.Decimal :value: None .. py:class:: ClassType Bases: :py:obj:`enum.IntEnum` The image classes SanMar's guide lists. PromoStandards defines more. .. py:attribute:: SWATCH :value: 1004 .. py:attribute:: PRIMARY :value: 1006 .. py:attribute:: FRONT :value: 1007 .. py:attribute:: REAR :value: 1008 .. py:attribute:: HIGH_RESOLUTION :value: 2001 .. py:class:: MediaClass(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A classification of a piece of media, such as ``Front`` or ``Swatch``. .. py:attribute:: id :type: int :value: None .. py:attribute:: name :type: str :value: None .. py:class:: MediaContentService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk.promostandards._common.PromoStandardsService` SanMar's PromoStandards Media Content service. .. py:attribute:: endpoint .. py:attribute:: version :value: '1.1.0' The PromoStandards version SanMar implements, sent as ``wsVersion``. .. py:method:: get(product_id: str, *, media_type: MediaType = MediaType.IMAGE, part_id: str | None = None, class_type: ClassType | int | None = None) -> list[MediaItem] List a style's images or documents, optionally for one part or one class. .. py:class:: MediaItem(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` One image or document. .. py:attribute:: product_id :type: str :value: None .. py:attribute:: part_id :type: str | None :value: None .. py:attribute:: url :type: str .. py:attribute:: media_type :type: str :value: None .. py:attribute:: classes :type: list[MediaClass] :value: None .. py:attribute:: color :type: str | None :value: None The color shown, as SanMar names it on the image. .. py:attribute:: description :type: str | None :value: None .. py:attribute:: single_part :type: bool :value: None Whether the media shows exactly the one part it is listed under. .. py:attribute:: file_size :type: decimal.Decimal | None :value: None .. py:attribute:: width :type: decimal.Decimal | None :value: None .. py:attribute:: height :type: decimal.Decimal | None :value: None .. py:attribute:: dpi :type: int | None :value: None .. py:attribute:: changed :type: datetime.datetime | None :value: None .. py:class:: MediaType Bases: :py:obj:`enum.StrEnum` The kinds of media SanMar serves. .. py:attribute:: IMAGE :value: 'Image' .. py:attribute:: DOCUMENT :value: 'Document' .. py:class:: Contact(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Someone at SanMar to ask about an order, such as its account executive. .. py:attribute:: contact_type :type: str :value: None .. py:attribute:: details :type: ContactDetails :value: None .. py:attribute:: account_name :type: str | None :value: None .. py:attribute:: account_number :type: str | None :value: None .. py:class:: ContactDetails(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A contact's name and address. .. py:attribute:: attention_to :type: str | None :value: None .. py:attribute:: company_name :type: str | None :value: None .. py:attribute:: address1 :type: str | None :value: None .. py:attribute:: address2 :type: str | None :value: None .. py:attribute:: address3 :type: str | None :value: None .. py:attribute:: city :type: str | None :value: None .. py:attribute:: region :type: str | None :value: None .. py:attribute:: postal_code :type: str | None :value: None .. py:attribute:: country :type: str | None :value: None .. py:attribute:: email :type: str | None :value: None .. py:attribute:: phone :type: str | None :value: None .. py:attribute:: comments :type: str | None :value: None .. py:class:: Issue(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A hold on an order, such as ``generalHold`` or ``backOrderHold``. .. py:attribute:: status :type: str :value: None ``Open``, ``Pending`` or ``Closed``. .. py:attribute:: category :type: str :value: None .. py:attribute:: urgent_response_required :type: bool :value: None .. py:attribute:: id :type: str | None :value: None .. py:attribute:: name :type: str | None :value: None .. py:attribute:: description :type: str | None :value: None .. py:attribute:: response_required_by :type: datetime.datetime | None :value: None .. py:attribute:: resolution_url :type: str | None :value: None .. py:attribute:: product_id :type: str | None :value: None .. py:attribute:: part_id :type: str | None :value: None .. py:class:: IssueDetail Bases: :py:obj:`enum.StrEnum` Which issues to include in an order status. .. py:attribute:: NONE :value: 'noIssues' .. py:attribute:: OPEN :value: 'openIssues' Issues that are open or pending. .. py:attribute:: ALL :value: 'allIssues' .. py:class:: OrderStatus(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Where one purchase order stands, sales order by sales order. .. py:attribute:: po_number :type: str :value: None .. py:attribute:: sales_orders :type: list[SalesOrderStatus] :value: None .. py:attribute:: audit_url :type: str | None :value: None .. py:property:: finished :type: bool Whether every sales order is complete or canceled, so SanMar will report nothing more. .. py:class:: OrderStatusService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk.promostandards._common.PromoStandardsService` SanMar's PromoStandards Order Status service. .. py:attribute:: endpoint .. py:attribute:: version :value: '2.0.0' The PromoStandards version SanMar implements, sent as ``wsVersion``. .. py:method:: by_purchase_order(po_number: str, *, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) -> list[OrderStatus] Report where a purchase order stands. ``issues`` picks which holds to include, and ``lines`` whether to include each line. .. py:method:: by_sales_order(sales_order_number: str, *, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) -> list[OrderStatus] Report where one of SanMar's sales orders stands. .. py:method:: updated_since(since: datetime.datetime, *, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) -> list[OrderStatus] Report every order whose status changed after a point in time, at most 30 days ago. SanMar suggests narrowing to seven days if the call times out. :raises ValueError: If ``since`` has no time zone, or is more than 30 days ago. .. py:method:: open_orders(*, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) -> list[OrderStatus] Report every order that is not yet complete or canceled. .. py:method:: open_issues(*, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) -> list[OrderStatus] Report every open order with an open or pending issue. .. py:method:: service_methods() -> list[str] List the Order Status operations SanMar implements. .. py:class:: SalesOrderStatus(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Where one of SanMar's sales orders stands. .. py:attribute:: sales_order_number :type: str :value: None .. py:attribute:: status :type: StatusValue .. py:attribute:: valid_timestamp :type: datetime.datetime :value: None When SanMar last confirmed this status. .. py:attribute:: issue_category :type: str | None :value: None ``generalHold`` when the order is on hold, ``backOrderHold`` when it is backordered. .. py:attribute:: expected_ship_date :type: datetime.date | None :value: None .. py:attribute:: expected_delivery_date :type: datetime.date | None :value: None .. py:attribute:: additional_explanation :type: str | None :value: None .. py:attribute:: contacts :type: list[Contact] :value: None .. py:attribute:: lines :type: list[StatusLine] :value: None The lines, when they were asked for. .. py:attribute:: issues :type: list[Issue] :value: None .. py:class:: Status Bases: :py:obj:`enum.StrEnum` Where an order or line stands. .. py:attribute:: RECEIVED :value: 'received' SanMar has the order, including when it is on hold or backordered. .. py:attribute:: CONFIRMED :value: 'confirmed' .. py:attribute:: PREPRODUCTION :value: 'preproduction' .. py:attribute:: IN_PRODUCTION :value: 'inProduction' .. py:attribute:: IN_STORAGE :value: 'inStorage' .. py:attribute:: PARTIALLY_SHIPPED :value: 'partiallyShipped' .. py:attribute:: SHIPPED :value: 'shipped' .. py:attribute:: COMPLETE :value: 'complete' Shipped in full and invoiced. SanMar reports nothing further. .. py:attribute:: CANCELED :value: 'canceled' SanMar reports nothing further. .. py:class:: StatusLine(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Where one line of a sales order stands. .. py:attribute:: product_id :type: str :value: None The style. .. py:attribute:: sales_order_line_number :type: str :value: None .. py:attribute:: status :type: StatusValue .. py:attribute:: part_id :type: str | None :value: None SanMar's unique key for the style, color and size. .. py:attribute:: po_line_number :type: str | None :value: None .. py:attribute:: quantity_ordered :type: decimal.Decimal :value: None .. py:attribute:: quantity_shipped :type: decimal.Decimal :value: None .. py:attribute:: issue_category :type: str | None :value: None .. py:class:: PartPrice(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` The prices of one part. .. py:attribute:: part_id :type: str :value: None SanMar's unique key for this style, color and size. .. py:attribute:: description :type: str | None :value: None .. py:attribute:: prices :type: list[PriceBreak] :value: None .. py:attribute:: default_part :type: bool :value: None .. py:class:: PriceBreak(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` The price per unit from a minimum quantity up. .. py:attribute:: min_quantity :type: int :value: None .. py:attribute:: price :type: decimal.Decimal .. py:attribute:: uom :type: str :value: None The unit the price is per, ``EA`` for each piece or ``CA`` for each piece by the case. .. py:attribute:: effective_date :type: datetime.datetime | None :value: None .. py:attribute:: expiry_date :type: datetime.datetime | None :value: None .. py:attribute:: discount_code :type: str | None :value: None .. py:class:: PriceType Bases: :py:obj:`enum.StrEnum` Which price to ask for. .. py:attribute:: NET :value: 'Net' This account's cost. .. py:attribute:: LIST :value: 'List' SanMar's suggested retail price (MSRP). .. py:attribute:: CUSTOMER :value: 'Customer' This account's special pricing, where SanMar has set some up. .. py:class:: PricingService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk.promostandards._common.PromoStandardsService` SanMar's PromoStandards Pricing and Configuration service. .. py:attribute:: endpoint .. py:attribute:: version :value: '1.0.0' The PromoStandards version SanMar implements, sent as ``wsVersion``. .. py:method:: get(product_id: str, *, part_id: str | None = None, price_type: PriceType = PriceType.NET, warehouse: sanmar_sdk.common.Warehouse = Warehouse.SEATTLE) -> list[PartPrice] Price every part of a style, or one part. SanMar's prices do not vary by warehouse, but the service requires one, so any warehouse will do. .. py:method:: fob_points(product_id: str) -> list[sanmar_sdk.promostandards.product_data.FobPoint] List SanMar's warehouses. The list is the same for every product. SanMar asks that this be called at most once a week. .. 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:: 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:: 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:: 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:: 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:: 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:: 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:: 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:: 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:: 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:: 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. .. 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:: 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:: 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:: 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:: PromoStandardsOrder(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Model` A purchase order for SanMar's PromoStandards purchase order service. .. py:attribute:: po_number :type: sanmar_sdk.orders.PONumber .. py:attribute:: ship_to :type: sanmar_sdk.common.ShipTo .. py:attribute:: ship_method :type: sanmar_sdk.common.ShipMethod .. py:attribute:: lines :type: Annotated[collections.abc.Sequence[PromoStandardsOrderLine], Field(min_length=1), sanmar_sdk.base.FROZEN] .. py:attribute:: order_date :type: datetime.datetime | None :value: None When the order was placed. Defaults to the time it is sent. .. py:attribute:: ship_references :type: Annotated[collections.abc.Sequence[Annotated[str, Field(min_length=1, max_length=64), sanmar_sdk.base.ORDER_TEXT]], Field(max_length=2), sanmar_sdk.base.FROZEN] :value: () Up to two references for the shipping process. Defaults to the PO number. .. py:method:: merged_lines() -> list[PromoStandardsOrderLine] Return the lines with duplicates combined, keeping the order each first appeared in. SanMar checks inventory line by line, so two lines for the same part and warehouse can each pass on their own while their total is short. .. py:class:: PromoStandardsOrderLine(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Model` One part on a PromoStandards purchase order. .. py:attribute:: part_id :type: Annotated[str, Field(min_length=1, max_length=64), sanmar_sdk.base.ORDER_TEXT] SanMar's unique key for the style, color and size (``UNIQUE_KEY`` in its files). .. py:attribute:: quantity :type: int :value: None .. py:attribute:: warehouse :type: sanmar_sdk.common.Warehouse | None :value: None The warehouse to ship this line from. Leave it unset unless SanMar has set your account up for warehouse selection; otherwise SanMar picks warehouses according to the shipping option on your account. .. py:class:: PurchaseOrderService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk.promostandards._common.PromoStandardsService` SanMar's PromoStandards Purchase Order service. .. py:attribute:: endpoint .. py:attribute:: version :value: '1.0.0' The PromoStandards version SanMar implements, sent as ``wsVersion``. .. py:method:: send(order: PromoStandardsOrder) -> str Place an order. Returns SanMar's transaction id, which starts with the PO number. .. py:method:: supported_order_types() -> list[str] List the order types SanMar accepts. SanMar sells blank goods only: ``Blank``. .. py:class:: SalesOrderShipment(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` What shipped against one of SanMar's sales orders. .. py:attribute:: sales_order_number :type: str :value: None .. py:attribute:: complete :type: bool .. py:attribute:: locations :type: list[ShipmentLocation] :value: None .. py:class:: ShipmentAddress(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Where a shipment left from or went to. .. py:attribute:: address1 :type: str | None :value: None .. py:attribute:: address2 :type: str | None :value: None .. py:attribute:: address3 :type: str | None :value: None .. py:attribute:: address4 :type: str | None :value: None .. py:attribute:: city :type: str | None :value: None .. py:attribute:: region :type: str | None :value: None The state. .. py:attribute:: postal_code :type: str | None :value: None .. py:attribute:: country :type: str | None :value: None .. py:class:: ShipmentLocation(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Everything that shipped from one warehouse to one address. .. py:attribute:: complete :type: bool .. py:attribute:: ship_from :type: ShipmentAddress :value: None .. py:attribute:: ship_to :type: ShipmentAddress :value: None .. py:attribute:: id :type: int | None :value: None .. py:attribute:: destination_type :type: str | None :value: None ``Commercial`` or ``Residential``. .. py:attribute:: packages :type: list[ShipmentPackage] :value: None .. py:class:: ShipmentNotification(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` What shipped against one purchase order. .. py:attribute:: po_number :type: str :value: None .. py:attribute:: complete :type: bool Whether the whole purchase order has shipped. .. py:attribute:: sales_orders :type: list[SalesOrderShipment] :value: None .. py:property:: tracking_numbers :type: list[str] Every package's tracking number, in the order SanMar listed them. .. py:class:: ShipmentNotificationService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk.promostandards._common.PromoStandardsService` SanMar's PromoStandards Order Shipment Notification service. .. py:attribute:: endpoint .. py:attribute:: version :value: '1.0.0' The PromoStandards version SanMar implements, sent as ``wsVersion``. .. py:method:: by_purchase_order(po_number: str) -> list[ShipmentNotification] Report what has shipped against a purchase order. .. py:method:: by_sales_order(sales_order_number: str) -> list[ShipmentNotification] Report what has shipped against one of SanMar's sales orders. .. py:method:: since(since: datetime.datetime) -> list[ShipmentNotification] Report everything shipped after a point in time, at most seven days ago. :raises ValueError: If ``since`` has no time zone, or is more than seven days ago. .. py:class:: ShipmentPackage(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` One box, and its tracking number. .. py:attribute:: tracking_number :type: str :value: None .. py:attribute:: shipment_date :type: datetime.datetime :value: None .. py:attribute:: id :type: int | None :value: None .. py:attribute:: carrier :type: str | None :value: None .. py:attribute:: shipment_method :type: str | None :value: None The carrier's service, such as ``Ground``. .. py:attribute:: dimension_uom :type: str | None :value: None .. py:attribute:: length :type: decimal.Decimal | None :value: None .. py:attribute:: width :type: decimal.Decimal | None :value: None .. py:attribute:: height :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:attribute:: shipping_account :type: str | None :value: None .. py:attribute:: shipment_terms :type: str | None :value: None .. py:attribute:: items :type: list[ShippedItem] :value: None .. py:class:: ShippedItem(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` What went into a package. .. py:attribute:: product_id :type: str | None :value: None The style. .. py:attribute:: part_id :type: str | None :value: None SanMar's unique key for the style, color and size. .. py:attribute:: quantity :type: decimal.Decimal | None :value: None .. py:attribute:: po_line_number :type: str | None :value: None .. py:attribute:: distributor_product_id :type: str | None :value: None .. py:attribute:: distributor_part_id :type: str | None :value: None