sanmar_sdk.common¶
Types shared across SanMar’s services and files.
The identifiers here are the ones SanMar’s services actually match on. SanMar has two color names for every product, and only one of them works in a request:
catalog_coloris SanMar’s catalog or mainframe color: the abbreviated name in theSANMAR_MAINFRAME_COLORcolumn ofSanMar_SDL_N.csv(CATALOG_COLORin the SanMarPI files,colorNamein PromoStandards). Every lookup and every order uses it.color_nameis the full display name (COLOR_NAME,standardColorName). It is for showing to people, and SanMar rejects it in requests: “Athletic Hthr” works where “Athletic Heather” does not.
The SDK never mixes the two: a field called catalog_color is always the catalog color.
Attributes¶
A warehouse number as SanMar reports it. |
Classes¶
Which of SanMar's two web service environments to call. |
|
A SanMar warehouse, numbered as SanMar numbers them. |
|
How SanMar ships an order. |
|
Pick an order up from a warehouse instead of having it shipped. |
|
Where an order ships. |
|
SanMar's own key for one style, color and size. |
|
One style, color and size, named the way SanMar's order services expect. |
|
A style to look up, optionally narrowed to one catalog color, one size, or both. |
Module Contents¶
- class sanmar_sdk.common.Environment[source]¶
Bases:
enum.StrEnumWhich of SanMar’s two web service environments to call.
- EDEV = 'https://edev-ws.sanmar.com:8080'[source]¶
SanMar’s test environment. It needs its own credentials, requested from sanmarintegrations@sanmar.com, and its products, prices and inventory may not match production.
- class sanmar_sdk.common.Warehouse[source]¶
Bases:
enum.IntEnumA SanMar warehouse, numbered as SanMar numbers them.
The number is also the warehouse’s PromoStandards FOB id.
- sanmar_sdk.common.WarehouseNumber[source]¶
A warehouse number as SanMar reports it.
A known warehouse parses to
Warehouse. A number SanMar has added since this SDK was released stays a plainintrather than failing the whole response.
- class sanmar_sdk.common.ShipMethod[source]¶
Bases:
enum.StrEnumHow SanMar ships an order.
The value is the ship method as SanMar’s own order services and order files spell it. PromoStandards orders split it into a carrier and a service; see
promostandards_freight().- PSST = 'PSST'[source]¶
SanMar’s Pack Separately, Ship Together program. The ship-to must exactly match the address SanMar has on file.
- class sanmar_sdk.common.WillCall(/, **data: Any)[source]¶
Bases:
sanmar_sdk.base.ModelPick an order up from a warehouse instead of having it shipped.
Only SanMar’s own order services and order files support will call, and only for accounts SanMar has set up for warehouse selection.
- class sanmar_sdk.common.ShipTo(/, **data: Any)[source]¶
Bases:
sanmar_sdk.base.ModelWhere an order ships.
Field lengths are the tightest limits across SanMar’s order services and order files.
- address1: Annotated[str, Field(min_length=1, max_length=35), sanmar_sdk.base.ORDER_TEXT][source]¶
The street address. SanMar asks for the abbreviations ST, AVE, RD, DR and BLVD.
- city: Annotated[str, Field(min_length=1, max_length=28), sanmar_sdk.base.ORDER_TEXT][source]¶
- company: Annotated[str, Field(min_length=1, max_length=28), sanmar_sdk.base.ORDER_TEXT] | None = None[source]¶
- attention: Annotated[str, Field(min_length=1, max_length=35), sanmar_sdk.base.ORDER_TEXT] | None = None[source]¶
The receiver’s name, or the PO number.
- address2: Annotated[str, Field(min_length=1, max_length=35), sanmar_sdk.base.ORDER_TEXT] | None = None[source]¶
The suite or apartment number.
- email: Annotated[str, Field(min_length=3, max_length=105), sanmar_sdk.base.ORDER_TEXT] | None = None[source]¶
Where SanMar sends the order confirmation and shipping notification.
When omitted, SanMar uses the default email on the account.
- phone: Annotated[str, Field(min_length=1, max_length=32), sanmar_sdk.base.ORDER_TEXT] | None = None[source]¶
The receiver’s phone number. Only PromoStandards orders carry it.
- class sanmar_sdk.common.SkuKey(/, **data: Any)[source]¶
Bases:
sanmar_sdk.base.ModelSanMar’s own key for one style, color and size.
INVENTORY_KEYandSIZE_INDEXare in every SanMar product file. The inventory key is not the style number. SanMar recommends ordering by key rather than by style, color and size, because it cannot be misspelled.
- class sanmar_sdk.common.StyleColorSize(/, **data: Any)[source]¶
Bases:
sanmar_sdk.base.ModelOne style, color and size, named the way SanMar’s order services expect.
- class sanmar_sdk.common.StyleQuery(/, **data: Any)[source]¶
Bases:
sanmar_sdk.base.ModelA style to look up, optionally narrowed to one catalog color, one size, or both.