sanmar_sdk.promostandards

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

Classes

PromoStandards

SanMar's PromoStandards services, which take only the SanMar.com login.

FutureStock

Stock a warehouse expects to receive.

InventoryService

SanMar's PromoStandards Inventory service.

LocationStock

One part's stock at one warehouse.

PartStock

One part's stock across SanMar's warehouses.

AccountInfo

The account and address an invoice is billed or sold to.

Invoice

An invoice or credit memo.

InvoiceLine

One line of an invoice.

InvoiceService

SanMar's PromoStandards Invoice service.

Tax

A tax charged on an invoice.

ClassType

The image classes SanMar's guide lists. PromoStandards defines more.

MediaClass

A classification of a piece of media, such as Front or Swatch.

MediaContentService

SanMar's PromoStandards Media Content service.

MediaItem

One image or document.

MediaType

The kinds of media SanMar serves.

Contact

Someone at SanMar to ask about an order, such as its account executive.

ContactDetails

A contact's name and address.

Issue

A hold on an order, such as generalHold or backOrderHold.

IssueDetail

Which issues to include in an order status.

OrderStatus

Where one purchase order stands, sales order by sales order.

OrderStatusService

SanMar's PromoStandards Order Status service.

SalesOrderStatus

Where one of SanMar's sales orders stands.

Status

Where an order or line stands.

StatusLine

Where one line of a sales order stands.

PartPrice

The prices of one part.

PriceBreak

The price per unit from a minimum quantity up.

PriceType

Which price to ask for.

PricingService

SanMar's PromoStandards Pricing and Configuration service.

ApparelSize

A part's size.

Category

A category a product is listed under.

Color

One of a part's colors.

Dimension

A part's measurements.

FobPoint

A place SanMar ships from: one of its warehouses.

MarketingPoint

A selling point from a product's description.

Packaging

A way a part is packed: how many to a box, and how big and heavy the box is.

PartReference

A product, or one part of it, in a list of changed, closed-out or sellable items.

PriceGroup

A named set of price breaks, such as MSRP.

Product

A style, and every color and size of it.

ProductDataService

SanMar's PromoStandards Product Data service.

ProductPart

One color and size of a style.

ProductPrice

One price break.

RelatedProduct

Another product SanMar relates to this one.

Specification

A measurement of a part, such as its chest or inseam.

PromoStandardsOrder

A purchase order for SanMar's PromoStandards purchase order service.

PromoStandardsOrderLine

One part on a PromoStandards purchase order.

PurchaseOrderService

SanMar's PromoStandards Purchase Order service.

SalesOrderShipment

What shipped against one of SanMar's sales orders.

ShipmentAddress

Where a shipment left from or went to.

ShipmentLocation

Everything that shipped from one warehouse to one address.

ShipmentNotification

What shipped against one purchase order.

ShipmentNotificationService

SanMar's PromoStandards Order Shipment Notification service.

ShipmentPackage

One box, and its tracking number.

ShippedItem

What went into a package.

Package Contents

class sanmar_sdk.promostandards.PromoStandards(soap: sanmar_sdk._soap.SoapClient, credentials: sanmar_sdk._soap.Credentials)[source]

SanMar’s PromoStandards services, which take only the SanMar.com login.

product_data[source]

Product Data 2.0.0.

media_content[source]

Media Content 1.1.0.

inventory[source]

Inventory 2.0.0.

pricing[source]

Pricing and Configuration 1.0.0.

order_status[source]

Order Status 2.0.0.

shipment_notifications[source]

Order Shipment Notification 1.0.0.

invoices[source]

Invoice 1.0.0.

purchase_orders[source]

Purchase Order 1.0.0.

class sanmar_sdk.promostandards.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.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.

class sanmar_sdk.promostandards.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.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.AccountInfo(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

The account and address an invoice is billed or sold to.

account_name: str | None = None[source]
account_number: str | None = None[source]
attention_to: str | None = None[source]
address1: str | None = None[source]
address2: str | None = None[source]
address3: str | None = None[source]
city: str | None = None[source]
region: str | None = None[source]

The state.

postal_code: str | None = None[source]
country: str | None = None[source]
email: str | None = None[source]
phone: str | None = None[source]
class sanmar_sdk.promostandards.Invoice(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

An invoice or credit memo.

invoice_number: str = None[source]
invoice_type: str = None[source]

Whether this is an invoice or a credit memo, as SanMar spells it.

invoice_date: datetime.date = None[source]
payment_due_date: datetime.date = None[source]
currency: str[source]
sales_amount: decimal.Decimal = None[source]
shipping_amount: decimal.Decimal = None[source]
handling_amount: decimal.Decimal = None[source]
tax_amount: decimal.Decimal = None[source]
invoice_amount: decimal.Decimal = None[source]
advance_payment_amount: decimal.Decimal = None[source]
amount_due: decimal.Decimal = None[source]
po_number: str | None = None[source]
po_version: str | None = None[source]
bill_to: AccountInfo | None = None[source]
sold_to: AccountInfo | None = None[source]
comments: str | None = None[source]
payment_terms: str | None = None[source]
fob: str | None = None[source]
document_url: str | None = None[source]
payment_url: str | None = None[source]
lines: list[InvoiceLine] = None[source]
sales_order_numbers: list[str] = None[source]
taxes: list[Tax] = None[source]
class sanmar_sdk.promostandards.InvoiceLine(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

One line of an invoice.

invoice_quantity: decimal.Decimal = None[source]
uom: str = None[source]
description: str = None[source]
unit_price: decimal.Decimal = None[source]
extended_price: decimal.Decimal = None[source]
line_number: decimal.Decimal | None = None[source]
product_id: str | None = None[source]

The style.

part_id: str | None = None[source]

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

charge_id: str | None = None[source]
po_line_number: decimal.Decimal | None = None[source]
ordered_quantity: decimal.Decimal | None = None[source]
back_ordered_quantity: decimal.Decimal | None = None[source]
discount_amount: decimal.Decimal | None = None[source]
distributor_product_id: str | None = None[source]
distributor_part_id: str | None = None[source]
class sanmar_sdk.promostandards.InvoiceService(soap: SoapClient, credentials: Credentials)[source]

Bases: sanmar_sdk.promostandards._common.PromoStandardsService

SanMar’s PromoStandards Invoice service.

endpoint[source]
version = '1.0.0'[source]

The PromoStandards version SanMar implements, sent as wsVersion.

by_purchase_order(po_number: str) → list[Invoice][source]

Find the invoices for a purchase order.

get(invoice_number: str) → Invoice[source]

Find one invoice by its number.

Raises:

NotFoundError – If SanMar has no such invoice.

by_date(invoice_date: datetime.date) → list[Invoice][source]

Find every invoice dated a given day.

available_since(since: datetime.datetime) → list[Invoice][source]

Find every invoice issued after a point in time.

class sanmar_sdk.promostandards.Tax(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A tax charged on an invoice.

tax_type: str = None[source]
jurisdiction: str = None[source]
amount: decimal.Decimal = None[source]
class sanmar_sdk.promostandards.ClassType[source]

Bases: enum.IntEnum

The image classes SanMar’s guide lists. PromoStandards defines more.

SWATCH = 1004[source]
PRIMARY = 1006[source]
FRONT = 1007[source]
REAR = 1008[source]
HIGH_RESOLUTION = 2001[source]
class sanmar_sdk.promostandards.MediaClass(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A classification of a piece of media, such as Front or Swatch.

id: int = None[source]
name: str = None[source]
class sanmar_sdk.promostandards.MediaContentService(soap: SoapClient, credentials: Credentials)[source]

Bases: sanmar_sdk.promostandards._common.PromoStandardsService

SanMar’s PromoStandards Media Content service.

endpoint[source]
version = '1.1.0'[source]

The PromoStandards version SanMar implements, sent as wsVersion.

get(product_id: str, *, media_type: MediaType = MediaType.IMAGE, part_id: str | None = None, class_type: ClassType | int | None = None) → list[MediaItem][source]

List a style’s images or documents, optionally for one part or one class.

class sanmar_sdk.promostandards.MediaItem(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

One image or document.

product_id: str = None[source]
part_id: str | None = None[source]
url: str[source]
media_type: str = None[source]
classes: list[MediaClass] = None[source]
color: str | None = None[source]

The color shown, as SanMar names it on the image.

description: str | None = None[source]
single_part: bool = None[source]

Whether the media shows exactly the one part it is listed under.

file_size: decimal.Decimal | None = None[source]
width: decimal.Decimal | None = None[source]
height: decimal.Decimal | None = None[source]
dpi: int | None = None[source]
changed: datetime.datetime | None = None[source]
class sanmar_sdk.promostandards.MediaType[source]

Bases: enum.StrEnum

The kinds of media SanMar serves.

IMAGE = 'Image'[source]
DOCUMENT = 'Document'[source]
class sanmar_sdk.promostandards.Contact(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

Someone at SanMar to ask about an order, such as its account executive.

contact_type: str = None[source]
details: ContactDetails = None[source]
account_name: str | None = None[source]
account_number: str | None = None[source]
class sanmar_sdk.promostandards.ContactDetails(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A contact’s name and address.

attention_to: str | None = None[source]
company_name: str | None = None[source]
address1: str | None = None[source]
address2: str | None = None[source]
address3: str | None = None[source]
city: str | None = None[source]
region: str | None = None[source]
postal_code: str | None = None[source]
country: str | None = None[source]
email: str | None = None[source]
phone: str | None = None[source]
comments: str | None = None[source]
class sanmar_sdk.promostandards.Issue(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A hold on an order, such as generalHold or backOrderHold.

status: str = None[source]

Open, Pending or Closed.

category: str = None[source]
urgent_response_required: bool = None[source]
id: str | None = None[source]
name: str | None = None[source]
description: str | None = None[source]
response_required_by: datetime.datetime | None = None[source]
resolution_url: str | None = None[source]
product_id: str | None = None[source]
part_id: str | None = None[source]
class sanmar_sdk.promostandards.IssueDetail[source]

Bases: enum.StrEnum

Which issues to include in an order status.

NONE = 'noIssues'[source]
OPEN = 'openIssues'[source]

Issues that are open or pending.

ALL = 'allIssues'[source]
class sanmar_sdk.promostandards.OrderStatus(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

Where one purchase order stands, sales order by sales order.

po_number: str = None[source]
sales_orders: list[SalesOrderStatus] = None[source]
audit_url: str | None = None[source]
property finished: bool[source]

Whether every sales order is complete or canceled, so SanMar will report nothing more.

class sanmar_sdk.promostandards.OrderStatusService(soap: SoapClient, credentials: Credentials)[source]

Bases: sanmar_sdk.promostandards._common.PromoStandardsService

SanMar’s PromoStandards Order Status service.

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

The PromoStandards version SanMar implements, sent as wsVersion.

by_purchase_order(po_number: str, *, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) → list[OrderStatus][source]

Report where a purchase order stands.

issues picks which holds to include, and lines whether to include each line.

by_sales_order(sales_order_number: str, *, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) → list[OrderStatus][source]

Report where one of SanMar’s sales orders stands.

updated_since(since: datetime.datetime, *, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) → list[OrderStatus][source]

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.

open_orders(*, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) → list[OrderStatus][source]

Report every order that is not yet complete or canceled.

open_issues(*, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) → list[OrderStatus][source]

Report every open order with an open or pending issue.

service_methods() → list[str][source]

List the Order Status operations SanMar implements.

class sanmar_sdk.promostandards.SalesOrderStatus(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

Where one of SanMar’s sales orders stands.

sales_order_number: str = None[source]
status: StatusValue[source]
valid_timestamp: datetime.datetime = None[source]

When SanMar last confirmed this status.

issue_category: str | None = None[source]

generalHold when the order is on hold, backOrderHold when it is backordered.

expected_ship_date: datetime.date | None = None[source]
expected_delivery_date: datetime.date | None = None[source]
additional_explanation: str | None = None[source]
contacts: list[Contact] = None[source]
lines: list[StatusLine] = None[source]

The lines, when they were asked for.

issues: list[Issue] = None[source]
class sanmar_sdk.promostandards.Status[source]

Bases: enum.StrEnum

Where an order or line stands.

RECEIVED = 'received'[source]

SanMar has the order, including when it is on hold or backordered.

CONFIRMED = 'confirmed'[source]
PREPRODUCTION = 'preproduction'[source]
IN_PRODUCTION = 'inProduction'[source]
IN_STORAGE = 'inStorage'[source]
PARTIALLY_SHIPPED = 'partiallyShipped'[source]
SHIPPED = 'shipped'[source]
COMPLETE = 'complete'[source]

Shipped in full and invoiced. SanMar reports nothing further.

CANCELED = 'canceled'[source]

SanMar reports nothing further.

class sanmar_sdk.promostandards.StatusLine(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

Where one line of a sales order stands.

product_id: str = None[source]

The style.

sales_order_line_number: str = None[source]
status: StatusValue[source]
part_id: str | None = None[source]

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

po_line_number: str | None = None[source]
quantity_ordered: decimal.Decimal = None[source]
quantity_shipped: decimal.Decimal = None[source]
issue_category: str | None = None[source]
class sanmar_sdk.promostandards.PartPrice(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

The prices of one part.

part_id: str = None[source]

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

description: str | None = None[source]
prices: list[PriceBreak] = None[source]
default_part: bool = None[source]
class sanmar_sdk.promostandards.PriceBreak(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

The price per unit from a minimum quantity up.

min_quantity: int = None[source]
price: decimal.Decimal[source]
uom: str = None[source]

The unit the price is per, EA for each piece or CA for each piece by the case.

effective_date: datetime.datetime | None = None[source]
expiry_date: datetime.datetime | None = None[source]
discount_code: str | None = None[source]
class sanmar_sdk.promostandards.PriceType[source]

Bases: enum.StrEnum

Which price to ask for.

NET = 'Net'[source]

This account’s cost.

LIST = 'List'[source]

SanMar’s suggested retail price (MSRP).

CUSTOMER = 'Customer'[source]

This account’s special pricing, where SanMar has set some up.

class sanmar_sdk.promostandards.PricingService(soap: SoapClient, credentials: Credentials)[source]

Bases: sanmar_sdk.promostandards._common.PromoStandardsService

SanMar’s PromoStandards Pricing and Configuration service.

endpoint[source]
version = '1.0.0'[source]

The PromoStandards version SanMar implements, sent as wsVersion.

get(product_id: str, *, part_id: str | None = None, price_type: PriceType = PriceType.NET, warehouse: sanmar_sdk.common.Warehouse = Warehouse.SEATTLE) → list[PartPrice][source]

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.

fob_points(product_id: str) → list[sanmar_sdk.promostandards.product_data.FobPoint][source]

List SanMar’s warehouses. The list is the same for every product.

SanMar asks that this be called at most once a week.

class sanmar_sdk.promostandards.ApparelSize(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A part’s size.

apparel_style: str = None[source]

Unisex, Mens, Womens, Youth, MensTall and so on.

label_size: str = None[source]

XS through 6XL, OSFA, or CUSTOM when custom_size holds it.

custom_size: str | None = None[source]

The size when it is not a standard label size, such as a pant size (2732).

property size: str[source]

The size as SanMar prints it, which is the custom size where there is one.

class sanmar_sdk.promostandards.Category(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A category a product is listed under.

category: str[source]
subcategory: str | None = None[source]
class sanmar_sdk.promostandards.Color(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

One of a part’s colors.

catalog_color: str = None[source]

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

color_name: str | None = None[source]

The full color name, for display only.

hex: str | None = None[source]
approximate_pms: str | None = None[source]

The nearest Pantone color, such as BLACK C.

class sanmar_sdk.promostandards.Dimension(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A part’s measurements.

dimension_uom: str = None[source]
depth: decimal.Decimal[source]
height: decimal.Decimal[source]
width: decimal.Decimal[source]
weight_uom: str = None[source]
weight: decimal.Decimal[source]
class sanmar_sdk.promostandards.FobPoint(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A place SanMar ships from: one of its warehouses.

warehouse: sanmar_sdk.common.WarehouseNumber = None[source]
city: str | None = None[source]
state: str | None = None[source]
postal_code: str | None = None[source]
country: str | None = None[source]
currencies: Annotated[list[str], pluck('currency')] = None[source]

The currencies SanMar prices in from here. Only the pricing service reports them.

class sanmar_sdk.promostandards.MarketingPoint(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A selling point from a product’s description.

text: str = None[source]
point_type: str | None = None[source]
class sanmar_sdk.promostandards.Packaging(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A way a part is packed: how many to a box, and how big and heavy the box is.

package_type: str = None[source]
quantity: decimal.Decimal[source]
description: str | None = None[source]
default: bool = False[source]
dimension_uom: str | None = None[source]
depth: decimal.Decimal | None = None[source]
height: decimal.Decimal | None = None[source]
width: decimal.Decimal | None = None[source]
weight_uom: str | None = None[source]
weight: decimal.Decimal | None = None[source]
class sanmar_sdk.promostandards.PartReference(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A product, or one part of it, in a list of changed, closed-out or sellable items.

product_id: str = None[source]
part_id: str | None = None[source]
class sanmar_sdk.promostandards.PriceGroup(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A named set of price breaks, such as MSRP.

name: str = None[source]
currency: str[source]
description: str | None = None[source]
prices: list[ProductPrice] = None[source]
class sanmar_sdk.promostandards.Product(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A style, and every color and size of it.

product_id: str = None[source]

The style number, such as K500.

name: str = None[source]
descriptions: list[str] = None[source]

The description, one paragraph or bullet point to an entry.

brand: str | None = None[source]
line_name: str | None = None[source]
marketing_points: list[MarketingPoint] = None[source]
keywords: Annotated[list[str], pluck('keyword')] = None[source]
categories: list[Category] = None[source]
related_products: list[RelatedProduct] = None[source]
primary_image_url: str | None = None[source]
price_groups: list[PriceGroup] = None[source]
price_expires_date: datetime.datetime | None = None[source]
parts: list[ProductPart] = None[source]
fob_points: list[FobPoint] = None[source]
export: bool | None = None[source]
compliance_info_available: bool | None = None[source]
unspsc_commodity_code: int | None = None[source]
last_change_date: datetime.datetime | None = None[source]
creation_date: datetime.datetime | None = None[source]
effective_date: datetime.datetime | None = None[source]
end_date: datetime.datetime | None = None[source]
closeout: bool = None[source]
caution: bool = None[source]
caution_comment: str | None = None[source]
class sanmar_sdk.promostandards.ProductDataService(soap: SoapClient, credentials: Credentials)[source]

Bases: sanmar_sdk.promostandards._common.PromoStandardsService

SanMar’s PromoStandards Product Data service.

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

The PromoStandards version SanMar implements, sent as wsVersion.

get(product_id: str, *, part_id: str | None = None, catalog_color: str | None = None) → Product[source]

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.

closeouts() → list[PartReference][source]

List every part SanMar has discontinued.

modified_since(since: datetime.datetime) → list[PartReference][source]

List every part that changed after a point in time.

sellable(product_id: str | None = None, *, part_id: str | None = None, is_sellable: bool = True) → list[PartReference][source]

List the parts SanMar sells, across the catalog or within one style.

With is_sellable=False, list the parts SanMar no longer sells instead.

class sanmar_sdk.promostandards.ProductPart(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

One color and size of a style.

part_id: str = None[source]

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

primary_color: Color | None = None[source]
colors: list[Color] = None[source]
descriptions: list[str] = None[source]
apparel_size: ApparelSize | None = None[source]
country_of_origin: str | None = None[source]
primary_material: str | None = None[source]
specifications: list[Specification] = None[source]
dimension: Dimension | None = None[source]
lead_time: int | None = None[source]
gtin: str | None = None[source]
rush_service: bool = None[source]
packaging: list[Packaging] = None[source]
shipping_packages: list[Packaging] = None[source]

How the part ships, as the case it comes in and how many pieces are in it.

effective_date: datetime.datetime | None = None[source]
end_date: datetime.datetime | None = None[source]
closeout: bool = None[source]
caution: bool = None[source]
caution_comment: str | None = None[source]
on_demand: bool = None[source]
hazmat: bool = None[source]
property catalog_color: str | None[source]

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

class sanmar_sdk.promostandards.ProductPrice(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

One price break.

quantity_min: int = None[source]
quantity_max: int | None = None[source]
price: decimal.Decimal[source]
discount_code: str | None = None[source]
class sanmar_sdk.promostandards.RelatedProduct(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

Another product SanMar relates to this one.

relation_type: str = None[source]

Companion Sell, Substitute or Common Grouping.

product_id: str = None[source]
part_id: str | None = None[source]
class sanmar_sdk.promostandards.Specification(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

A measurement of a part, such as its chest or inseam.

specification_type: str = None[source]
uom: str = None[source]
value: str = None[source]
class sanmar_sdk.promostandards.PromoStandardsOrder(/, **data: Any)[source]

Bases: sanmar_sdk.base.Model

A purchase order for SanMar’s PromoStandards purchase order service.

po_number: sanmar_sdk.orders.PONumber[source]
ship_to: sanmar_sdk.common.ShipTo[source]
ship_method: sanmar_sdk.common.ShipMethod[source]
lines: Annotated[collections.abc.Sequence[PromoStandardsOrderLine], Field(min_length=1), sanmar_sdk.base.FROZEN][source]
order_date: datetime.datetime | None = None[source]

When the order was placed. Defaults to the time it is sent.

ship_references: 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] = ()[source]

Up to two references for the shipping process. Defaults to the PO number.

merged_lines() → list[PromoStandardsOrderLine][source]

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.

class sanmar_sdk.promostandards.PromoStandardsOrderLine(/, **data: Any)[source]

Bases: sanmar_sdk.base.Model

One part on a PromoStandards purchase order.

part_id: Annotated[str, Field(min_length=1, max_length=64), sanmar_sdk.base.ORDER_TEXT][source]

SanMar’s unique key for the style, color and size (UNIQUE_KEY in its files).

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

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.

class sanmar_sdk.promostandards.PurchaseOrderService(soap: SoapClient, credentials: Credentials)[source]

Bases: sanmar_sdk.promostandards._common.PromoStandardsService

SanMar’s PromoStandards Purchase Order service.

endpoint[source]
version = '1.0.0'[source]

The PromoStandards version SanMar implements, sent as wsVersion.

send(order: PromoStandardsOrder) → str[source]

Place an order. Returns SanMar’s transaction id, which starts with the PO number.

supported_order_types() → list[str][source]

List the order types SanMar accepts. SanMar sells blank goods only: Blank.

class sanmar_sdk.promostandards.SalesOrderShipment(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

What shipped against one of SanMar’s sales orders.

sales_order_number: str = None[source]
complete: bool[source]
locations: list[ShipmentLocation] = None[source]
class sanmar_sdk.promostandards.ShipmentAddress(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

Where a shipment left from or went to.

address1: str | None = None[source]
address2: str | None = None[source]
address3: str | None = None[source]
address4: str | None = None[source]
city: str | None = None[source]
region: str | None = None[source]

The state.

postal_code: str | None = None[source]
country: str | None = None[source]
class sanmar_sdk.promostandards.ShipmentLocation(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

Everything that shipped from one warehouse to one address.

complete: bool[source]
ship_from: ShipmentAddress = None[source]
ship_to: ShipmentAddress = None[source]
id: int | None = None[source]
destination_type: str | None = None[source]

Commercial or Residential.

packages: list[ShipmentPackage] = None[source]
class sanmar_sdk.promostandards.ShipmentNotification(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

What shipped against one purchase order.

po_number: str = None[source]
complete: bool[source]

Whether the whole purchase order has shipped.

sales_orders: list[SalesOrderShipment] = None[source]
property tracking_numbers: list[str][source]

Every package’s tracking number, in the order SanMar listed them.

class sanmar_sdk.promostandards.ShipmentNotificationService(soap: SoapClient, credentials: Credentials)[source]

Bases: sanmar_sdk.promostandards._common.PromoStandardsService

SanMar’s PromoStandards Order Shipment Notification service.

endpoint[source]
version = '1.0.0'[source]

The PromoStandards version SanMar implements, sent as wsVersion.

by_purchase_order(po_number: str) → list[ShipmentNotification][source]

Report what has shipped against a purchase order.

by_sales_order(sales_order_number: str) → list[ShipmentNotification][source]

Report what has shipped against one of SanMar’s sales orders.

since(since: datetime.datetime) → list[ShipmentNotification][source]

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.

class sanmar_sdk.promostandards.ShipmentPackage(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

One box, and its tracking number.

tracking_number: str = None[source]
shipment_date: datetime.datetime = None[source]
id: int | None = None[source]
carrier: str | None = None[source]
shipment_method: str | None = None[source]

The carrier’s service, such as Ground.

dimension_uom: str | None = None[source]
length: decimal.Decimal | None = None[source]
width: decimal.Decimal | None = None[source]
height: decimal.Decimal | None = None[source]
weight_uom: str | None = None[source]
weight: decimal.Decimal | None = None[source]
shipping_account: str | None = None[source]
shipment_terms: str | None = None[source]
items: list[ShippedItem] = None[source]
class sanmar_sdk.promostandards.ShippedItem(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

What went into a package.

product_id: str | None = None[source]

The style.

part_id: str | None = None[source]

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

quantity: decimal.Decimal | None = None[source]
po_line_number: str | None = None[source]
distributor_product_id: str | None = None[source]
distributor_part_id: str | None = None[source]