PrintiPy Data Objects
Technical documentation on the various data objects (dataclasses) in the Python interface for PrintiPy.
__CreateOrder
__CreateOrder()
__CreateOrderLineItemBase
__CreateOrderLineItemBase(variant_id: int, quantity: int)
Address
Address object to store and validate shop data between Python and Printify.
This is similar to Location
but includes more information and used for specific APIs
Parameters:
Name | Type | Description | Default |
---|---|---|---|
first_name |
str |
First name of recipient |
required |
last_name |
str |
Last name of recipient |
required |
address1 |
str |
First line of the address |
required |
city |
str |
City |
required |
country |
str |
Country |
required |
region |
str |
Region |
required |
zip |
str |
Zipcode |
required |
address2 |
Optional[str] |
Second line of the address. Defaults to None. |
None |
email |
Optional[str] |
Email of the recipient. Defaults to None. |
None |
phone |
Optional[str] |
Phone of the recipient. Defaults to None. |
None |
company |
Optional[str] |
Company name of the recipient. Defaults to None. |
None |
Artwork
Object representing an Image or Artwork. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str |
Artwork ID in Printify |
required |
file_name |
str |
filename in Printify |
required |
height |
int |
height of the image |
required |
width |
int |
width of the image |
required |
size |
int |
byte size of the image |
required |
mime_type |
str |
media type of the image, e.g., |
required |
preview_url |
str |
URL to preview the image |
required |
upload_time |
str |
ISO date format of the time the image was uploaded |
required |
Blueprint
Blueprint object to store and validate shop data between Python and Printify
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
int |
Blueprint ID |
required |
title |
str |
Name of Blueprint |
required |
description |
str |
Description of the Blueprint given by the provider |
required |
brand |
str |
Brand given by the provider |
required |
model |
str |
Model given by the provider |
required |
images |
List[str] |
List of image URLs given by the provider |
required |
CreateOrderByAdvancedImageProcessing
Options to create an order by advanced image processing. This method allows for setting a new blueprint, print provider, and print areas for each line item.
Author's note - It may be best to create a product with a specific variant first and then use
CreateOrderByExistingProduct
to create orders.
Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
external_id |
str |
ID of the external storefront |
required |
label |
str |
label for the order - typically an order number |
required |
line_items |
List[printipy.data_objects.CreateOrderLineItemAdvancedProcessing] |
list of items to include in order, specified by blueprints, print providers, and print areas |
required |
shipping_method |
int |
ID of the shipping policy in the storefront |
required |
send_shipping_notification |
bool |
flag to send or silence shipping notifications |
required |
address_to |
Address |
address for the recipient |
required |
CreateOrderByExistingProduct
Options to create an order for existing products. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
external_id |
str |
ID of the external storefront |
required |
label |
str |
label for the order - typically an order number |
required |
line_items |
List[printipy.data_objects.CreateOrderLineItem] |
list of items to include in order, specified by product information |
required |
shipping_method |
int |
ID of the shipping policy in the storefront |
required |
send_shipping_notification |
bool |
flag to send or silence shipping notifications |
required |
address_to |
Address |
address for the recipient |
required |
CreateOrderByPrintDetails
Options to create an order by print details. Stores and validate data between Python and Printify.
Author's note - this is the least desirable
way to create an order. Please use another CreateOrberBy
method
Parameters:
Name | Type | Description | Default |
---|---|---|---|
external_id |
str |
ID of the external storefront |
required |
label |
str |
label for the order - typically an order number |
required |
line_items |
List[printipy.data_objects.CreateOrderLineItemPrintDetails] |
list of items to include in order, specified by print details |
required |
shipping_method |
int |
ID of the shipping policy in the storefront |
required |
send_shipping_notification |
bool |
flag to send or silence shipping notifications |
required |
address_to |
Address |
address for the recipient |
required |
CreateOrderBySimpleImageProcessing
Options to create an order for existing products with simple image manipulations against a blueprint, variant, and print area. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
external_id |
str |
ID of the external storefront |
required |
label |
str |
label for the order - typically an order number |
required |
line_items |
List[printipy.data_objects.CreateOrderLineItemSimpleProcessing] |
list of items to include in order, specified by blueprints, variants, and print areas |
required |
shipping_method |
int |
ID of the shipping policy in the storefront |
required |
send_shipping_notification |
bool |
flag to send or silence shipping notifications |
required |
address_to |
Address |
address for the recipient |
required |
CreateOrderBySku
Options to create an order by an SKU number. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
external_id |
str |
ID of the external storefront |
required |
label |
str |
label for the order - typically an order number |
required |
line_items |
List[printipy.data_objects.CreateOrderLineItemSku] |
list of items to include in order, specified by SKUs |
required |
shipping_method |
int |
ID of the shipping policy in the storefront |
required |
send_shipping_notification |
bool |
flag to send or silence shipping notifications |
required |
address_to |
Address |
address for the recipient |
required |
CreateOrderLineItem
Options to create an line item for an order order by using product information. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
product_id |
str |
ID of the product to include in an order |
required |
variant_id |
int |
the variant of the product to use in an order |
required |
quantity |
int |
the number of copies to include int he line item for a specific product |
required |
CreateOrderLineItemAdvancedProcessing
Options to create an line item for an order order by using advanced image processing. Stores and validate data between Python and Printify.
Author's note - It may be best to create a product with a specific variant first and then use
CreateOrderByExistingProduct
to create orders.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
variant_id |
int |
ID of the variant |
required |
quantity |
int |
number of items to include |
required |
blueprint_id |
int |
ID of the blueprint from the print provider |
required |
print_provider_id |
int |
ID of the print provider |
required |
print_areas |
Dict[str, List[printipy.data_objects.PrintAreaInfo]] |
information for new print areas |
required |
CreateOrderLineItemAdvancedProcessingPrintAreaInfo
Options to create or update a print area for an image. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
float |
Coordinate across the X axis for an image to start |
required |
y |
float |
Coordinate across the Y axis for an image to start |
required |
scale |
float |
The scaling factor for an image to be resized |
required |
angle |
int |
The angle at which an image will be rotated |
required |
src |
str |
the filename of the image to use |
required |
CreateOrderLineItemPrintDetails
Options to create an line item for an order by using product information and using simple print area information and transformations. Stores and validate data between Python and Printify.
Author's note - It may be best to create a product with a specific variant first and then use
CreateOrderByExistingProduct
to create orders.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
variant_id |
int |
the variant of the product to use in an order |
required |
quantity |
int |
the number of copies to include int he line item for a specific product |
required |
print_provider_id |
int |
ID of the print provider |
required |
blueprint_id |
int |
ID of the blueprint for the product |
required |
print_areas |
Dict[str, Any] |
information on print areas for a variant. Warning! |
required |
print_details |
Dict[str, Any] |
information on print details. Warning! |
required |
CreateOrderLineItemSimpleProcessing
Options to create an line item for an order by using product information and using simple print area information and transformations. Stores and validate data between Python and Printify.
Author's note - It may be best to create a product with a specific variant first and then use
CreateOrderByExistingProduct
to create orders.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
variant_id |
int |
the variant of the product to use in an order |
required |
quantity |
int |
the number of copies to include int he line item for a specific product |
required |
print_provider_id |
int |
ID of the print provider |
required |
blueprint_id |
int |
ID of the blueprint for the product |
required |
print_areas |
Dict[str, Any] |
information on print areas for a variant. Warning! |
required |
CreateOrderLineItemSku
Options to create an line item for an order by using SKU. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sku |
str |
the SKU of an item to include in the order |
required |
quantity |
int |
the number of items to include |
required |
CreateProduct
Options to create a new product. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title |
str |
Display name of the product |
required |
description |
str |
Lengthy description of the item |
required |
blueprint_id |
int |
Blueprint ID from the Print Provider |
required |
print_provider_id |
int |
Print Provider ID |
required |
variants |
List[printipy.data_objects.CreateProductVariant] |
List of product variants, their price, and if they are enabled |
required |
print_areas |
List[printipy.data_objects.CreateProductPrintArea] |
List of product dimensions and print areas |
required |
add_print_area(self, print_area)
Appends a new pint area to the product. Useful if variants are not all known at the time of creating the product
Parameters:
Name | Type | Description | Default |
---|---|---|---|
print_area |
CreateProductPrintArea |
New print area to attach to the new product |
required |
Show source code in printipy/data_objects.py
def add_print_area(self, print_area: CreateProductPrintArea):
"""
Appends a new pint area to the product. Useful if variants are not all known at the time of creating the product
Args:
print_area: New print area to attach to the new product
"""
self.print_areas.append(print_area)
add_variant(self, variant)
Appends a new variant to the product. Useful if variants are not all known at the time of creating the product
Parameters:
Name | Type | Description | Default |
---|---|---|---|
variant |
CreateProductVariant |
New variant to attach to the new product |
required |
Show source code in printipy/data_objects.py
def add_variant(self, variant: CreateProductVariant):
"""
Appends a new variant to the product. Useful if variants are not all known at the time of creating the product
Args:
variant: New variant to attach to the new product
"""
self.variants.append(variant)
CreateProductPrintArea
Options to create a new product print area. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
variant_ids |
List[int] |
List of variants of the product to include from the print provider. |
required |
placeholders |
List[printipy.data_objects.CreateProductPrintAreaPlaceholder] |
List of product placeholders - their dimensions and sizes |
required |
CreateProductPrintAreaPlaceholder
Options to create a new print area for a product placeholder. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
position |
str |
The position of the print area |
required |
images |
List[printipy.data_objects.CreateProductPrintAreaPlaceholderImage] |
List of images, their size, and dimensions for the placeholder |
required |
CreateProductPrintAreaPlaceholderImage
Options to create a new image in a place holder for a print area. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str |
Image ID to use in the print area |
required |
x |
float |
Coordinate across the X axis for an image to start |
required |
y |
float |
Coordinate across the Y axis for an image to start |
required |
scale |
float |
The scaling factor for an image to be resized |
required |
angle |
int |
The angle at which an image will be rotated |
required |
CreateProductVariant
Options to create a new product variant. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
int |
Variant ID for a product from a print provider |
required |
price |
int |
Price the product will sell at. All numbers are whole integers, e.g., $12.95 is |
required |
is_enabled |
bool |
Flag for enabling a variant in a store |
required |
CreateShippingEstimate
Object representing a shipping estimate for a list of items to a given address from a print provider. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line_items |
List[Union[printipy.data_objects.ShippingEstimateLineItemByProduct, printipy.data_objects.ShippingEstimateLineItemByVariant, printipy.data_objects.ShippingEstimateLineItemBySku]] |
List of items. This can be a list of products, a list of items by their SKU, or a list of new |
required |
address_to |
Address |
Address of the recipient |
required |
CreateWebhook
Options to create a webhook. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
str |
External webhook URL |
required |
topic |
str |
type of event to push data to |
required |
LineItem
Information for an order containing specific product, the variant used, and the quantity ordered. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
product_id |
str |
ID of the product |
required |
quantity |
int |
Number of items the customer bought |
required |
variant_id |
int |
Specific variant of the product from the print provider |
required |
print_provider_id |
int |
ID of theprint provider |
required |
cost |
int |
Cost of all the items |
required |
shipping_cost |
int |
Shipping cost for the items |
required |
status |
str |
Status of the items |
required |
metadata |
Dict |
Any associated metadata for the items |
required |
sent_to_production_at |
Optional[str] |
ISO timestamp of when the products were sent to production |
None |
fulfilled_at |
Optional[str] |
ISO timestamp of when the products were fulfilled for the order |
None |
Location
Location object to store and validate shop data between Python and Printify
Parameters:
Name | Type | Description | Default |
---|---|---|---|
address1 |
str |
First address line |
required |
city |
str |
City |
required |
country |
str |
Country |
required |
region |
str |
Region |
required |
zip |
str |
Zipcode |
required |
address2 |
Optional[str] |
Second address line. Defaults to None. |
None |
Order
Object representing a previously created order. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str |
Order ID |
required |
address_to |
Address |
Address of the recipient |
required |
line_items |
List[printipy.data_objects.LineItem] |
List of items in the order - their products and quantities |
required |
metadata |
Dict |
Any extra metadata regarding the order |
required |
total_price |
int |
Total price the customer paid |
required |
total_shipping |
int |
Total price the shipping cost |
required |
total_tax |
int |
Total tax of the order |
required |
status |
str |
Current status of the order |
required |
shipping_method |
int |
Shipping ID linked to the storefront |
required |
created_at |
str |
ISO timestamp of when the order was created |
required |
sent_to_production_at |
Optional[str] |
ISO timestamp of when the order was sent to production |
None |
shipments |
Optional[List[printipy.data_objects.Shipment]] |
List of shipments of the items in the order |
None |
fulfilled_at |
Optional[str] |
ISO timestamp of when the order was fulfilled |
None |
fulfilment_type |
Optional[str] |
How the order was fulfilled |
None |
PlaceholderImage
Object representing placeholder information for a published product. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str |
Placeholder ID |
required |
name |
Optional[str] |
Name of the placeholder |
None |
type |
Optional[str] |
Type of the placeholder |
None |
height |
Optional[int] |
Height of the image |
None |
width |
Optional[int] |
Width of the image |
None |
x |
float |
Coordinate across the X axis for an image to start |
required |
y |
float |
Coordinate across the Y axis for an image to start |
required |
scale |
float |
The scaling factor for an image to be resized |
required |
angle |
int |
The angle at which an image will be rotated |
required |
PrintAreaInfo
Options to create or update a print area for an image. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
float |
Coordinate across the X axis for an image to start |
required |
y |
float |
Coordinate across the Y axis for an image to start |
required |
scale |
float |
The scaling factor for an image to be resized |
required |
angle |
int |
The angle at which an image will be rotated |
required |
PrintProvider
Print Provider object to store and validate shop data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
int |
Provider's ID |
required |
title |
str |
Name of the provider. |
required |
location |
Optional[printipy.data_objects.Location] |
Location of the provider. Defaults to None. |
None |
PrintProviderVariants
Object representing a Variant from a print provider. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
int |
Provider ID |
required |
title |
str |
Name of provider |
required |
variants |
List[printipy.data_objects.Variant] |
List of variants provider offers |
required |
get_variant_ids(self)
Returns a list of all IDs from the associated variants
Show source code in printipy/data_objects.py
def get_variant_ids(self) -> List[int]:
"""
Returns a list of all IDs from the associated variants
"""
return [x.id for x in self.variants]
Product
Object representing a product in Printify. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str |
Product ID |
required |
title |
str |
Display name of the product |
required |
description |
str |
Lengthy description of the item |
required |
tags |
List[str] |
List of tags associated with the product |
required |
options |
List[printipy.data_objects.ProductOption] |
List of product options - types and names |
required |
variants |
List[printipy.data_objects.ProductVariant] |
List of product variants - features and measurements |
required |
images |
List[printipy.data_objects.ProductImage] |
List of URLs for displaying the product variants |
required |
created_at |
str |
ISO timestamp of when the product was created |
required |
updated_at |
str |
ISO timestamp of when the product was updated |
required |
visible |
bool |
flag if the product is visible in shop (false typically means archived) |
required |
is_locked |
bool |
flag if the features of the product are locked from changes |
required |
blueprint_id |
int |
Blueprint ID from the print provider |
required |
user_id |
int |
Printify account ID |
required |
shop_id |
int |
Storefront ID for the specific store in the Printify account |
required |
print_provider_id |
int |
Print Provider ID |
required |
print_areas |
List[printipy.data_objects.ProductPrintArea] |
List of prrint areas for the product across its variants |
required |
twodaydelivery_enabled |
Optional[bool] |
flag if two-day delivery is allowed as an option |
None |
external |
Optional[printipy.data_objects.ProductExternal] |
storefront information for published products |
None |
ProductExternal
Object representing storefront information for a published product. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str |
ID in the storefront |
required |
handle |
str |
link associated with the product in the storefront |
required |
shipping_template_id |
Optional[str] |
shipping profile associated with the product in the storefront |
None |
channel |
Optional[str] |
type of storefront |
None |
ProductImage
Object representing image information for a published product. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
src |
str |
File source in Printify |
required |
variant_ids |
List[int] |
List of possible variants for the product |
required |
position |
str |
Position of the image agaist the blueprint for the given variants |
required |
is_default |
bool |
Flag if the image is the first image in the storefront |
required |
is_selected_for_publishing |
Optional[bool] |
Flag if the image should be published |
None |
ProductOption
Object representing product option information for a published product. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str |
Option display name |
required |
type |
str |
Type of option |
required |
values |
List[printipy.data_objects.ProductOptionValue] |
List of values to include as options |
required |
ProductOptionValue
Object representing product option information for a published product. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str |
ID of the option |
required |
title |
str |
Display name for the option |
required |
ProductPlaceholder
Object representing placeholder information for a published product. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
position |
str |
Position of the image across the blueprint on its variant |
required |
images |
List[printipy.data_objects.PlaceholderImage] |
List of image information - dimensions and alterations - across the blueprint on its variant |
required |
ProductPrintArea
Object representing a print area for a published product. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
variant_ids |
List[int] |
List of variants for the product |
required |
placeholders |
List[printipy.data_objects.ProductPlaceholder] |
List of placeholders against the variants for the product |
required |
background |
Optional[str] |
Color for the background - useful if a placeholder is transparent |
None |
ProductVariant
Object representing variant information for a published product. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
int |
Variant ID |
required |
price |
int |
Price of the specific variant |
required |
is_enabled |
bool |
Flag if the variant is included in the product |
required |
sku |
Optional[str] |
SKU for the variant |
None |
cost |
Optional[int] |
Cost to produce the variant |
None |
title |
Optional[str] |
Display title of the variant |
None |
grams |
Optional[int] |
Weight of the variant |
None |
is_default |
Optional[bool] |
Flag if the variant is the default in the storefront |
None |
is_available |
Optional[bool] |
Flag if the variant is available - false may mean out of stock |
None |
options |
Optional[List[int]] |
Additional options for the variant |
None |
quantity |
Optional[int] |
The number of variants left |
None |
Publish
Object that tells Printify what to publish to a shop for a given product. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title |
bool |
True if the title in the storefront should be updated to that in Printify |
True |
description |
bool |
True if the description in the storefront should be updated to that in Printify |
True |
images |
bool |
True if the images in the storefront should be updated to that in Printify |
True |
variants |
bool |
True if the variants in the storefront should be updated to that in Printify |
True |
tags |
bool |
True if the tags in the storefront should be updated to that in Printify |
True |
keyFeatures |
bool |
True if the keyFeatures in the storefront should be updated to that in Printify |
True |
shipping_template |
bool |
True if the shipping_template in the storefront should be updated to that in Printify |
True |
PublishingSucceeded
Options to set a product publishing to a storefront as succeeded. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
external |
PublishingSucceededExternal |
Storefront information |
required |
PublishingSucceededExternal
Options to set storefront information for a product that has been successfully published. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str |
the storefront id |
required |
handle |
str |
the type of storefront |
required |
Shipment
Object representing a shipment for an order Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
carrier |
str |
Carrier name |
required |
number |
str |
Tracking number |
required |
url |
str |
URL for tracking |
required |
delivered_at |
str |
ISO timestamp of when the item was delivered |
required |
ShippingCost
Object representing all shipping costs from a print provider. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
standard |
int |
cost of shipping given standard shipping |
required |
express |
Optional[int] |
cost of shipping given express shipping |
None |
ShippingEstimateLineItemByProduct
Object representing a shipping estimate for an item based on its product and variant information. Stores and validate data between Python and Printify.
Used for CreateShippingEstimate
Parameters:
Name | Type | Description | Default |
---|---|---|---|
product_id |
str |
ID of a product already created in a shop |
required |
variant_id |
int |
Variant ID of that product |
required |
quantity |
int |
Number of items to send |
required |
ShippingEstimateLineItemBySku
Object representing a shipping estimate for an item based on SKU number and quantity. Stores and validate data between Python and Printify.
Used for CreateShippingEstimate
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sku |
str |
SKU number of item |
required |
quantity |
int |
Number of items to send |
required |
ShippingEstimateLineItemByVariant
Object representing a shipping estimate for a new item based on its variant information. Stores and validate data between Python and Printify.
Used for CreateShippingEstimate
Parameters:
Name | Type | Description | Default |
---|---|---|---|
print_provider_id |
int |
ID of the Print Provider |
required |
blueprint_id |
int |
ID of the Blueprint of the product from the provider |
required |
variant_id |
int |
ID of the variant from the blueprint given from the producer |
required |
quantity |
int |
Positive integer of items |
required |
ShippingInfo
Object representing all shipping information for a group of items from a print provider. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
handling_time |
ShippingInfoHandlingTime |
Handling time information before an item is shipped |
required |
profiles |
List[printipy.data_objects.ShippingInfoProfile] |
List of shipping information. Includes various prices to different countries. |
required |
ShippingInfoHandlingTime
Object representing the handling time for a given shipping option from a print provider. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
int |
The amount of time |
required |
unit |
str |
The unit of time |
required |
ShippingInfoProfile
Object representing the shipping profile a group of items to a given set of countries from a print provider. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
variant_ids |
List[int] |
A list of variants of a given product |
required |
first_item |
ShippingInfoProfileCost |
cost to ship the first item |
required |
additional_items |
ShippingInfoProfileCost |
cost to ship any additional items to the first item |
required |
countries |
List[str] |
a list of country codes this shipping profile applies to |
required |
ShippingInfoProfileCost
Object representing the shipping cost for an item from a print provider. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cost |
int |
shipping cost in whole values. E.g., $12.98 would be 1298 |
required |
currency |
str |
currency of the shipping cost, e.g., USD |
required |
Shop
Shop object to store and validate shop data between Python and Printify
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str |
Shop ID |
required |
title |
str |
Shop Name |
required |
sales_channel |
str |
Sales Channel, e.g., Etsy, Walmart, etc. |
required |
UpdateProduct
Options to update a product and its information. All fields are optional. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title |
Optional[str] |
New product title |
None |
description |
Optional[str] |
New product description |
None |
blueprint_id |
Optional[int] |
New ID of a blueprint from the print provider |
None |
print_provider_id |
Optional[int] |
New ID of the print provider |
None |
variants |
Optional[List[printipy.data_objects.CreateProductVariant]] |
New product variants - prices and eligibility - for the product |
None |
print_areas |
Optional[List[printipy.data_objects.CreateProductPrintArea]] |
New print areas - placeholders and printing specifications - for the product |
None |
external |
Optional[printipy.data_objects.UpdateProductExternal] |
New external information - storefront and shipping - for the product |
None |
UpdateProductExternal
Options to update a product external information. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
Optional[str] |
Storefront ID |
None |
handle |
Optional[str] |
The type of storefront |
None |
shipping_template_id |
Optional[str] |
Shipping methods in the store the product will use |
None |
UpdateWebhook
Options to update a webhook. All fields are optional. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
Optional[str] |
External webhook URL |
None |
topic |
Optional[str] |
type of event to push data to |
None |
Variant
Object representing a Variant for a product. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
int |
Variant ID |
required |
title |
str |
Name of the variant |
required |
options |
VariantOption |
Options given to the variant |
required |
placeholders |
List[printipy.data_objects.VariantPlaceholder] |
List of placeholders for the artwork |
required |
VariantOption
Object representing various options for Variants. Stores and validate data between Python and Printify. Different products and their variants will use different combinations of values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color |
Optional[str] |
Color of item. Defaults to None. |
None |
size |
Optional[str] |
Size of item. Defaults to None. |
None |
paper |
Optional[str] |
Paper of item. Defaults to None. |
None |
quantity |
Optional[str] |
Quantity of item. Defaults to None. |
None |
VariantPlaceholder
Object representing the Placeholder for a product variant. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
position |
str |
Position of artwork |
required |
height |
int |
Height of artwork |
required |
width |
int |
Width of artwork |
required |
Webhook
Object representing a Webhook. Stores and validate data between Python and Printify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str |
Webhook ID |
required |
shop_id |
str |
ID of the shop relating to the webhook |
required |
url |
str |
External webhook URL |
required |
topic |
str |
type of event to push data to |
required |