API de productos

El recurso API de productos te permite crear, modificar y eliminar productos de una tienda de Printful basada en pedidos manuales o la plataforma de API (puedes crear una tienda de este tipo accediendo a la sección Tiendas de tu panel Printful).

Para configurar productos y variantes en una tienda Printful de Shopify, WooCommerce u otra plataforma compatible, consulta API de sincronización de plataformas de comercio electrónico.

Para gestionar productos del almacén, consulta API de productos de Almacén.

Los fundamentos

Cada producto de tu tienda Printful debe contener una o varias variantes (imagina varias tallas o colores del mismo diseño de camiseta). Además, para cada variante, tendrás que especificar una variante vacía de producto de nuestro Catálogo Printful y un archivo de impresión. Estas dos propiedades, junto con el precio y el ID externo (se explica más adelante) permitirán que la variante se pueda comprar. Echa un vistazo a las siguientes secciones para más detalles. Finalmente, ten en cuenta que por razones técnicas un producto de tu tienda Printful se llama Producto sincronizado, y una variante de un producto se llama Variante sincronizada.

Asignar una variante de producto en blanco

Printful tiene un catálogo considerable de productos y variantes en blanco, donde cada variante (por ejemplo la combinación de talla y color de un producto particular) tiene un ID único, al que llamamos ID_de_variante. Puedes buscar a través del catálogo vía <?=Html::a('Printful Catalog API', '/docs/catalog')?> para encontrar un ID_de_variante específico. Además, al crear un Producto sincronizado en tu tienda Printful, cada una de sus Variantes sincronizadas se debe asociar con un ID_de_variante del Catálogo de Printful. Asimismo, para asignar un ID_de_variante específico para una Variante sincronizada específica, simplemente se necesita añadir al cuerpo de solicitud HTTP (ver ejemplos de un punto final específico).

Asignar un único archivo de impresión

Hay dos maneras de asignar un archivo de impresión a una Variante sincronizada. Una es especificando el ID del archivo si el archivo ya existe en la Biblioteca de archivos de la tienda autorizada;

{ ... "files": [{"id": 12345}],...}

El segundo método, y el más conveniente, es especificar la URL de archivo. Si ya existe un archivo con la misma URL, se volverá a utilizar.

{..."files": [{"url": "http://example.com/t-shirts/123/front.pdf"}],...}

Además, cada Variante sincronizada tiene que estar unida a uno o varios archivos de impresión. Los tipos de archivo disponibles para cada producto están disponibles en la API del Catálogo de Printful. Puedes añadir un archivo para cada tipo especificando el atributo tipo. Para el tipo defecto, se puede saltar este atributo.

..."files":[{"type": "default","url": "http://example.com/t-shirts/123/front.pdf"},{"type": "back""url": "http://example.com/t-shirts/123/back.pdf"}],...

Recuerda que utilizar archivos adicionales puede aumentar el precio del artículo.

ID externo

Al crear un Producto sincronizado o una Variante sincronizada puedes especificar un ID externo, que después podrás utilizar como referencia al gestionar o pedir Productos sincronizados o Variantes sincronizadas específicos. En particular, al solicitar un Producto sincronizado o Variante sincronizada, puedes utilizar el ID interno de Printful o tu ID externo (tiene un símbolo @ como prefijo) en la URL de solicitud.

Get a list of Sync Products

GET https://api.printful.com/store/products

Returns a list of Sync Product objects from your custom Printful store.
Parámetros de entrada
status string Filter by item status (synced/unsynced/all). If only some of the variants are synced,the product is returned by both unsynced and synced filters
offset integer Result set offset
limit integer Number of items per page (max 100)
Formato de respuesta:
code integer Código del estado de respuesta 200
result SyncProduct [ ]
id integer Sync Product ID
external_id string Product ID from the E-commerce platform
name string Product name
variants integer Total number of Sync Variants belonging to this product
synced integer Number of synced Sync Variants belonging to this product
paging Paging Información sobre la paginación
total integer Número total de artículos disponible
offset integer Fijar resultado actual de compensación de página
limit integer Número máximo de artículos por página
Clave API
status Filter by item status (synced/unsynced/all). If only some of the variants are synced,the product is returned by both unsynced and synced filters
offset Result set offset
limit Number of items per page (max 100)
Ejecutar
Datos de respuesta:
    {
        "code": 200,
        "result": [
            {
                "id": 79348721,
                "external_id": "e9460f6c67",
                "name": "API product",
                "variants": 2,
                "synced": 2
            }
        ],
        "extra": [],
        "paging": {
            "total": 1,
            "offset": 0,
            "limit": 20
        },
        "debug": []
    }

Create a new Sync Product

POST https://api.printful.com/store/products

Creates a new Sync Product together with its Sync Variants
Parámetros de entrada
Request body RequestProductBody POST request body
sync_product RequestProduct Information about the Sync Product
external_id string Product ID from your E-commerce platform
name string Product name
thumbnail string Thumbnail image URL. Although we do not limit thumbnail image size, we recommend to keep it reasonably small.
sync_variants RequestVariant [ ] Information about the Sync Variants
external_id string Variant ID from the E-commerce platform
variant_id integer Printful Variant ID that this Sync Variant is synced to
retail_price float Retail price that this item is sold for
files RequestFile [ ] Array of attached print files
type string Role of the file in the order
id integer File ID

* Required if no URL given
url string Source URL where the file is downloaded from

* Required if no File ID given
options ItemOption [ ] Array of additional options for the configured product/variant
id string Option ID
value mixed Option value
Formato de respuesta:
code integer Código del estado de respuesta 200
result RequestProductResponse
id integer Sync Product id
external_id string Sync Product ID from the external system
name string Sync Product name
variants integer Total number of variants in Sync Product
synced integer Total number of Sync variants in Sync Product
Clave API
Request body
Ejecutar
Solicitar cuerpo:
    {
        "sync_product": {
            "name": "API product Bella",
            "thumbnail": "https://example.com/image.jpg"
        },
        "sync_variants": [
            {
                "retail_price": "21.00",
                "variant_id": 4011,
                "files": [
                    {
                        "url": "https://example.com/image.jpg"
                    },
                    {
                        "type": "back",
                        "url": "https://example.com/image.jpg"
                    }
                ]
            },
            {
                "retail_price": "21.00",
                "variant_id": 4012,
                "files": [
                    {
                        "url": "https://example.com/image.jpg"
                    },
                    {
                        "type": "back",
                        "url": "https://example.com/image.jpg"
                    }
                ]
            }
        ]
    }
Datos de respuesta:
    {
        "code": 200,
        "result": {
            "id": 79348732,
            "external_id": "5bd9947c709b34",
            "name": "API product Bella",
            "variants": 2,
            "synced": 2
        },
        "extra": [],
        "debug": []
    }

Get information about a single Sync Product and its Sync Variants

GET https://api.printful.com/store/products/{id}

Returns information about an existing Sync Product together with a list of its Sync Variants.
Parámetros de entrada
id integer / string Sync Product ID (integer) or External ID (if prefixed with @)
Formato de respuesta:
code integer Código del estado de respuesta 200
result SyncProductInfo
sync_product SyncProduct Information about the selected product
id integer Sync Product ID
external_id string Product ID from the E-commerce platform
name string Product name
variants integer Total number of Sync Variants belonging to this product
synced integer Number of synced Sync Variants belonging to this product
sync_variants SyncVariant [ ] Array of Sync Variants available for the selected product
id integer Sync Variant ID
external_id string Variant ID from the E-commerce platform
sync_product_id integer Sync Product ID that this variant belongs to
name string Sync Variant name
synced boolean Indicates if this Sync Variant is properly linked with Printful product
variant_id integer Printful Variant ID that this Sync Variant is synced to
retail_price float Retail price that this item is sold for
currency string Currency in which prices are returned
product ProductVariant Short information about the Printful Product and Variant that this Sync Variant is synced to
variant_id integer Variant ID
product_id integer Product ID of this variant
image string URL of a sample image for this variant
name string Display name of this variant
files File [ ] Array of attached printfiles / preview images
id integer File ID
type string Role of the file in the order
hash string MD5 checksum of the file
url string Source URL where the file is downloaded from
filename string File name
mime_type string MIME type of the file
size integer Size in bytes
width integer Width in pixels
height integer Height in pixels
dpi integer Resolution DPI.
Note: for vector files this may be indicated as only 72dpi, but it doesn't affect print quality since the vector files are resolution independent.
status string File processing status:
ok - file was processed successfuly
waiting - file is being processed
failed - file failed to be processed
created timestamp File creation time
thumbnail_url string Small thumbnail URL
preview_url string Medium preview image URL
visible boolean Show file in the Printfile Library (default true)
options ItemOption [ ] Array of additional options for the configured product/variant
id string Option ID
value mixed Option value
Clave API
id Sync Product ID (integer) or External ID (if prefixed with @)
Ejecutar
Datos de respuesta:
    {
        "code": 200,
        "result": {
            "sync_product": {
                "id": 79348721,
                "external_id": "e9460f6c67",
                "name": "API product",
                "variants": 2,
                "synced": 2
            },
            "sync_variants": [
                {
                    "id": 866914574,
                    "external_id": "5bd967595a1174",
                    "sync_product_id": 79348721,
                    "name": "API product",
                    "synced": true,
                    "variant_id": 4011,
                    "retail_price": "18.00",
                    "currency": "USD",
                    "product": {
                        "variant_id": 4011,
                        "product_id": 71,
                        "image": "https://s3.dev.printful.com/products/71/4012_1517927381.jpg",
                        "name": "Bella + Canvas 3001 Unisex Short Sleeve Jersey T-Shirt with Tear Away Label (White / S)"
                    },
                    "files": [
                        {
                            "id": 76564075,
                            "type": "default",
                            "hash": "7d6a2367c1e338750e68dc66b20cba1a",
                            "url": "https://picsum.photos/200/300",
                            "filename": "76564075.jpg",
                            "mime_type": "image/jpeg",
                            "size": 8245,
                            "width": 200,
                            "height": 300,
                            "dpi": null,
                            "status": "ok",
                            "created": 1539341673,
                            "thumbnail_url": "https://s3.dev.printful.com/files/7d6/7d6a2367c1e338750e68dc66b20cba1a_thumb.png",
                            "preview_url": "https://s3.dev.printful.com/files/7d6/7d6a2367c1e338750e68dc66b20cba1a_preview.png",
                            "visible": true
                        },
                        {
                            "id": 76564075,
                            "type": "back",
                            "hash": "7d6a2367c1e338750e68dc66b20cba1a",
                            "url": "https://picsum.photos/200/300",
                            "filename": "76564075.jpg",
                            "mime_type": "image/jpeg",
                            "size": 8245,
                            "width": 200,
                            "height": 300,
                            "dpi": null,
                            "status": "ok",
                            "created": 1539341673,
                            "thumbnail_url": "https://s3.dev.printful.com/files/7d6/7d6a2367c1e338750e68dc66b20cba1a_thumb.png",
                            "preview_url": "https://s3.dev.printful.com/files/7d6/7d6a2367c1e338750e68dc66b20cba1a_preview.png",
                            "visible": true
                        }
                    ],
                    "options": [
                        {
                            "id": "embroidery_type",
                            "value": "flat"
                        },
                        {
                            "id": "thread_colors",
                            "value": []
                        },
                        {
                            "id": "thread_colors_3d",
                            "value": []
                        },
                        {
                            "id": "thread_colors_chest_left",
                            "value": []
                        }
                    ]
                },
                {
                    "id": 866914580,
                    "external_id": "5bd96ea4a381f8",
                    "sync_product_id": 79348721,
                    "name": "API product",
                    "synced": true,
                    "variant_id": 4011,
                    "retail_price": "21.00",
                    "currency": "USD",
                    "product": {
                        "variant_id": 4011,
                        "product_id": 71,
                        "image": "https://s3.dev.printful.com/products/71/4012_1517927381.jpg",
                        "name": "Bella + Canvas 3001 Unisex Short Sleeve Jersey T-Shirt with Tear Away Label (White / S)"
                    },
                    "files": [
                        {
                            "id": 76564390,
                            "type": "default",
                            "hash": "77440392f60d2346a1bf690c1564d973",
                            "url": "https://i.etsystatic.com/17947654/r/il/3a0750/1565927694/il_570xN.1565927694_gfxu.jpg",
                            "filename": "il_570xN.1565927694_gfxu.jpg",
                            "mime_type": "image/jpeg",
                            "size": 70053,
                            "width": 570,
                            "height": 570,
                            "dpi": null,
                            "status": "ok",
                            "created": 1540982496,
                            "thumbnail_url": "https://s3.dev.printful.com/files/774/77440392f60d2346a1bf690c1564d973_thumb.png",
                            "preview_url": "https://s3.dev.printful.com/files/774/77440392f60d2346a1bf690c1564d973_preview.png",
                            "visible": true
                        },
                        {
                            "id": 76564159,
                            "type": "back",
                            "hash": "ebd559858e5703088de8900ce99c37d3",
                            "url": "https://picsum.photos/200/300?image=2",
                            "filename": "76564159.jpg",
                            "mime_type": "image/jpeg",
                            "size": 11246,
                            "width": 200,
                            "height": 300,
                            "dpi": null,
                            "status": "ok",
                            "created": 1540797879,
                            "thumbnail_url": "https://s3.dev.printful.com/files/ebd/ebd559858e5703088de8900ce99c37d3_thumb.png",
                            "preview_url": "https://s3.dev.printful.com/files/ebd/ebd559858e5703088de8900ce99c37d3_preview.png",
                            "visible": true
                        },
                        {
                            "id": 76564391,
                            "type": "preview",
                            "hash": "a0b4fa4e51f3feeee7a5f14260a257ea",
                            "url": null,
                            "filename": "mockup-fafde22d.png",
                            "mime_type": "image/png",
                            "size": 222824,
                            "width": 600,
                            "height": 600,
                            "dpi": 72,
                            "status": "ok",
                            "created": 1540982574,
                            "thumbnail_url": "https://s3.dev.printful.com/files/a0b/a0b4fa4e51f3feeee7a5f14260a257ea_thumb.png",
                            "preview_url": "https://s3.dev.printful.com/files/a0b/a0b4fa4e51f3feeee7a5f14260a257ea_preview.png",
                            "visible": false
                        }
                    ],
                    "options": [
                        {
                            "id": "embroidery_type",
                            "value": "flat"
                        },
                        {
                            "id": "thread_colors",
                            "value": []
                        },
                        {
                            "id": "thread_colors_3d",
                            "value": []
                        },
                        {
                            "id": "thread_colors_chest_left",
                            "value": []
                        }
                    ]
                }
            ]
        },
        "extra": [],
        "debug": []
    }

Delete a Sync Product

DELETE https://api.printful.com/store/products/{id}

Deletes a Sync Product with all of its Sync Variants
Parámetros de entrada
id integer / string Sync Product ID (integer) or External ID (if prefixed with @)
Formato de respuesta:
code integer Código del estado de respuesta 200
result ProductInfo
product Product Information about the selected product
id integer Product ID
type string Product type identifier
brand string Brand name
model string Model name
image string URL of a sample image for this product
variant_count integer Number of available variants for this product
currency string Currency in which prices are returned
files FileType [ ] Definitions of Print/Mockup file categories that can be attached to this product
id string Deprecated file type identifier. Please use type field instead!
type string File type identifier - use this to specify a file's purpose when creating an order
title string Display name
additional_price string Additional price when this print file type is used
options OptionType [ ] Definitions of additional options that are available for this product
id string Option identifier - use this to specify the option when creating an order
title string Display name
type string Data type of this option (currently only 'bool' is supported)
values array Option values - [key, value] map
additional_price string Additional price when this option is used
additional_price_breakdown array Additional price breakdown by type - [key, value] map
is_discontinued boolean If product is disabled in push
description string Product description
variants Variant [ ] Array of Variants available for the selected product
id integer Variant ID, use this to specify the product when creating orders
product_id integer ID of the product that this variant belongs to
name string Display name
size string Item size
color string Item color
color_code string Hexadecimal RGB color code. May not exactly reflect the real-world color
color_code2 string Secondary hexadecimal RGB color code. May not exactly reflect the real-world color
image string URL of a preview image for this variant
price string Variant's price (can change depending on print files and optional settings)
in_stock boolean Stock availability of this variant
Clave API
id Sync Product ID (integer) or External ID (if prefixed with @)
Ejecutar

Modify a Sync Product

PUT https://api.printful.com/store/products/{id}

Modifies an existing Sync Product with its Sync Variants.

Please note that in the request body you only need to specify the fields that need to be changed. Furthermore, if you want to update existing sync variants, then in the sync variants array you must specify the IDs of all existing sync variants. All omitted existing sync variants will be deleted. All new sync variants without an ID will be created. See examples for more insights.
Parámetros de entrada
id integer / string Sync Product ID (integer) or External ID (if prefixed with @)
Request body PutRequestProductBody PUT request body
sync_product RequestProduct Information about the Sync Product
external_id string Product ID from your E-commerce platform
name string Product name
thumbnail string Thumbnail image URL. Although we do not limit thumbnail image size, we recommend to keep it reasonably small.
sync_variants PutRequestVariant [ ] Information about the Sync Variants
id integer Sync Variant ID. Please specify the IDs of all Sync Variants you wish to keep.
external_id string Variant ID from the E-commerce platform
variant_id integer Printful Variant ID that this Sync Variant is synced to
retail_price float Retail price that this item is sold for
files RequestFile [ ] Array of attached print files
type string Role of the file in the order
id integer File ID

* Required if no URL given
url string Source URL where the file is downloaded from

* Required if no File ID given
options ItemOption [ ] Array of additional options for the configured product/variant
id string Option ID
value mixed Option value
Formato de respuesta:
code integer Código del estado de respuesta 200
result RequestProductResponse
id integer Sync Product id
external_id string Sync Product ID from the external system
name string Sync Product name
variants integer Total number of variants in Sync Product
synced integer Total number of Sync variants in Sync Product
Clave API
id Sync Product ID (integer) or External ID (if prefixed with @)
Request body
Ejecutar
Actualizar el nombre y la miniatura de un producto de sincronización
Solicitar cuerpo:
    {
        "sync_product": {
            "name": "API product new name",
            "thumbnail": "https://example.com/image.jpg"
        }
    }
Datos de respuesta:
    {
        "code": 200,
        "result": {
            "id": 79348721,
            "external_id": "e9460f6c67",
            "name": "API product new name",
            "variants": 2,
            "synced": 2
        },
        "extra": [],
        "debug": []
    }
Update a Sync Product and one of its Sync Variants
Solicitar cuerpo:
    {
        "sync_product": {
            "name": "API product new name",
            "thumbnail": "https://example.com/image.jpg"
        },
        "sync_variants": [
            	{
                    "id": 866914574
                },
                {
                    "id": 866914580,
                    "retail_price": 21,
                    "files": [
                        {
                            "url": "https://example.com/image.jpg"
                        },
                        {
                            "type": "back",
                            "url": "https://example.com/image.jpg"
                        }
                    ]
                }
        ]
    }
Datos de respuesta:
    {
        "code": 200,
        "result": {
            "id": 79348721,
            "external_id": "e9460f6c67",
            "name": "API product",
            "variants": 2,
            "synced": 2
        },
        "extra": [],
        "debug": []
    }

Create a new Sync Variant

POST https://api.printful.com/store/products/{id}/variants

Creates a new Sync Variant for an existing Sync Product.
Parámetros de entrada
id integer / string Sync Product ID (integer) or External ID (if prefixed with @)
Request body RequestVariant POST request body
external_id string Variant ID from the E-commerce platform
variant_id integer Printful Variant ID that this Sync Variant is synced to
retail_price float Retail price that this item is sold for
files RequestFile [ ] Array of attached print files
type string Role of the file in the order
id integer File ID

* Required if no URL given
url string Source URL where the file is downloaded from

* Required if no File ID given
options ItemOption [ ] Array of additional options for the configured product/variant
id string Option ID
value mixed Option value
Formato de respuesta:
code integer Código del estado de respuesta 200
result RequestVariantResponse
id integer Sync Variant id
external_id string Sync Variant ID from the external system
sync_product_id integer Sync Variant ID in Printful
name string Sync Variant name
synced bool Is this variant synced
variant_id integer Printful Variant ID that this Sync Variant is synced to
retail_price float Retail price that this item is sold for
currency string Items currenct
product ProductMiniInfo
variant_id integer Printful Variant ID that this Sync Variant is synced to
product_id integer Printful Product ID that this Variant Id belongs to
image string Variants default image in Printfuls Catalog
name string Variants full name in Printfuls Catalog
files File [ ] Array of attached print files
id integer File ID
type string Role of the file in the order
hash string MD5 checksum of the file
url string Source URL where the file is downloaded from
filename string File name
mime_type string MIME type of the file
size integer Size in bytes
width integer Width in pixels
height integer Height in pixels
dpi integer Resolution DPI.
Note: for vector files this may be indicated as only 72dpi, but it doesn't affect print quality since the vector files are resolution independent.
status string File processing status:
ok - file was processed successfuly
waiting - file is being processed
failed - file failed to be processed
created timestamp File creation time
thumbnail_url string Small thumbnail URL
preview_url string Medium preview image URL
visible boolean Show file in the Printfile Library (default true)
options ItemOption [ ] Array of additional options for the configured product/variant
id string Option ID
value mixed Option value
Clave API
id Sync Product ID (integer) or External ID (if prefixed with @)
Request body
Ejecutar
Solicitar cuerpo:
    {
        "external_id": "my-external-id",
        "retail_price": "19.00",
        "variant_id": 4011,
        "files": [
            {
                "type": "default",
                "url": "https://example.com/image.jpg"
            },
            {
                "type": "back",
                "url": "https://example.com/image.jpg"
            }
        ],
        "options": [
            {
                "id": "embroidery_type",
                "value": "flat"
            },
            {
                "id": "thread_colors",
                "value": []
            },
            {
                "id": "thread_colors_3d",
                "value": []
            },
            {
                "id": "thread_colors_chest_left",
                "value": []
            }
        ]
    }
Datos de respuesta:
    {
        "code": 200,
        "result": {
            "id": 866914592,
            "external_id": "my-external-id",
            "sync_product_id": 79348732,
            "name": "API product Bella",
            "synced": true,
            "variant_id": 4011,
            "retail_price": "19.00",
            "currency": "USD",
            "product": {
                "variant_id": 4011,
                "product_id": 71,
                "image": "https://s3.dev.printful.com/products/71/4012_1517927381.jpg",
                "name": "Bella + Canvas 3001 Unisex Short Sleeve Jersey T-Shirt with Tear Away Label (White / S)"
            },
            "files": [
                {
                    "id": 76564159,
                    "type": "default",
                    "hash": "ebd559858e5703088de8900ce99c37d3",
                    "url": "https://example.com/image.jpg",
                    "filename": "76564159.jpg",
                    "mime_type": "image/jpeg",
                    "size": 11246,
                    "width": 200,
                    "height": 300,
                    "dpi": null,
                    "status": "ok",
                    "created": 1540797879,
                    "thumbnail_url": "https://s3.dev.printful.com/files/ebd/ebd559858e5703088de8900ce99c37d3_thumb.png",
                    "preview_url": "https://s3.dev.printful.com/files/ebd/ebd559858e5703088de8900ce99c37d3_preview.png",
                    "visible": true
                },
                {
                    "id": 76564159,
                    "type": "back",
                    "hash": "ebd559858e5703088de8900ce99c37d3",
                    "url": "https://example.com/image.jpg",
                    "filename": "76564159.jpg",
                    "mime_type": "image/jpeg",
                    "size": 11246,
                    "width": 200,
                    "height": 300,
                    "dpi": null,
                    "status": "ok",
                    "created": 1540797879,
                    "thumbnail_url": "https://s3.dev.printful.com/files/ebd/ebd559858e5703088de8900ce99c37d3_thumb.png",
                    "preview_url": "https://s3.dev.printful.com/files/ebd/ebd559858e5703088de8900ce99c37d3_preview.png",
                    "visible": true
                }
            ],
            "options": [
                {
                    "id": "embroidery_type",
                    "value": "flat"
                },
                {
                    "id": "thread_colors",
                    "value": []
                },
                {
                    "id": "thread_colors_3d",
                    "value": []
                },
                {
                    "id": "thread_colors_chest_left",
                    "value": []
                }
            ]
        },
        "extra": [],
        "debug": []
    }

Get information about a single Sync Variant

GET https://api.printful.com/store/variants/{id}

Returns information about an existing Sync Variant.
Parámetros de entrada
id integer Sync Variant ID (integer) or External ID (if prefixed with @)
Formato de respuesta:
code integer Código del estado de respuesta 200
result SyncVariantInfo
sync_variant SyncVariant Information about the selected Sync Variant
id integer Sync Variant ID
external_id string Variant ID from the E-commerce platform
sync_product_id integer Sync Product ID that this variant belongs to
name string Sync Variant name
synced boolean Indicates if this Sync Variant is properly linked with Printful product
variant_id integer Printful Variant ID that this Sync Variant is synced to
retail_price float Retail price that this item is sold for
currency string Currency in which prices are returned
product ProductVariant Short information about the Printful Product and Variant that this Sync Variant is synced to
variant_id integer Variant ID
product_id integer Product ID of this variant
image string URL of a sample image for this variant
name string Display name of this variant
files File [ ] Array of attached printfiles / preview images
id integer File ID
type string Role of the file in the order
hash string MD5 checksum of the file
url string Source URL where the file is downloaded from
filename string File name
mime_type string MIME type of the file
size integer Size in bytes
width integer Width in pixels
height integer Height in pixels
dpi integer Resolution DPI.
Note: for vector files this may be indicated as only 72dpi, but it doesn't affect print quality since the vector files are resolution independent.
status string File processing status:
ok - file was processed successfuly
waiting - file is being processed
failed - file failed to be processed
created timestamp File creation time
thumbnail_url string Small thumbnail URL
preview_url string Medium preview image URL
visible boolean Show file in the Printfile Library (default true)
options ItemOption [ ] Array of additional options for the configured product/variant
id string Option ID
value mixed Option value
sync_product SyncProduct Information about the Sync Product that the Sync Variant belongs to
id integer Sync Product ID
external_id string Product ID from the E-commerce platform
name string Product name
variants integer Total number of Sync Variants belonging to this product
synced integer Number of synced Sync Variants belonging to this product
Clave API
id Sync Variant ID (integer) or External ID (if prefixed with @)
Ejecutar
Datos de respuesta:
    {
        "code": 200,
        "result": {
            "sync_variant": {
                "id": 866914574,
                "external_id": "5bd967595a1174",
                "sync_product_id": 79348721,
                "name": "API product",
                "synced": true,
                "variant_id": 4011,
                "retail_price": "18.00",
                "currency": "USD",
                "product": {
                    "variant_id": 4011,
                    "product_id": 71,
                    "image": "https://s3.dev.printful.com/products/71/4012_1517927381.jpg",
                    "name": "Bella + Canvas 3001 Unisex Short Sleeve Jersey T-Shirt with Tear Away Label (White / S)"
                },
                "files": [
                    {
                        "id": 76564075,
                        "type": "default",
                        "hash": "7d6a2367c1e338750e68dc66b20cba1a",
                        "url": "https://picsum.photos/200/300",
                        "filename": "76564075.jpg",
                        "mime_type": "image/jpeg",
                        "size": 8245,
                        "width": 200,
                        "height": 300,
                        "dpi": null,
                        "status": "ok",
                        "created": 1539341673,
                        "thumbnail_url": "https://s3.dev.printful.com/files/7d6/7d6a2367c1e338750e68dc66b20cba1a_thumb.png",
                        "preview_url": "https://s3.dev.printful.com/files/7d6/7d6a2367c1e338750e68dc66b20cba1a_preview.png",
                        "visible": true
                    },
                    {
                        "id": 76564075,
                        "type": "back",
                        "hash": "7d6a2367c1e338750e68dc66b20cba1a",
                        "url": "https://picsum.photos/200/300",
                        "filename": "76564075.jpg",
                        "mime_type": "image/jpeg",
                        "size": 8245,
                        "width": 200,
                        "height": 300,
                        "dpi": null,
                        "status": "ok",
                        "created": 1539341673,
                        "thumbnail_url": "https://s3.dev.printful.com/files/7d6/7d6a2367c1e338750e68dc66b20cba1a_thumb.png",
                        "preview_url": "https://s3.dev.printful.com/files/7d6/7d6a2367c1e338750e68dc66b20cba1a_preview.png",
                        "visible": true
                    }
                ],
                "options": [
                    {
                        "id": "embroidery_type",
                        "value": "flat"
                    },
                    {
                        "id": "thread_colors",
                        "value": []
                    },
                    {
                        "id": "thread_colors_3d",
                        "value": []
                    },
                    {
                        "id": "thread_colors_chest_left",
                        "value": []
                    }
                ]
            },
            "sync_product": {
                "id": 79348721,
                "external_id": "e9460f6c67",
                "name": "API product",
                "variants": 1,
                "synced": 1
            }
        },
        "extra": [],
        "debug": []
    }

Delete a Sync Variant

DELETE https://api.printful.com/store/variants/{id}

Deletes a single Sync Variant.
Parámetros de entrada
id integer / string Sync Variant ID (integer) or External ID (if prefixed with @)
Formato de respuesta:
code integer Código del estado de respuesta 200
result VariantInfo
variant Variant Information about the selected Variant
id integer Variant ID, use this to specify the product when creating orders
product_id integer ID of the product that this variant belongs to
name string Display name
size string Item size
color string Item color
color_code string Hexadecimal RGB color code. May not exactly reflect the real-world color
color_code2 string Secondary hexadecimal RGB color code. May not exactly reflect the real-world color
image string URL of a preview image for this variant
price string Variant's price (can change depending on print files and optional settings)
in_stock boolean Stock availability of this variant
product Product Information about the Product that the Variant belongs to
id integer Product ID
type string Product type identifier
brand string Brand name
model string Model name
image string URL of a sample image for this product
variant_count integer Number of available variants for this product
currency string Currency in which prices are returned
files FileType [ ] Definitions of Print/Mockup file categories that can be attached to this product
id string Deprecated file type identifier. Please use type field instead!
type string File type identifier - use this to specify a file's purpose when creating an order
title string Display name
additional_price string Additional price when this print file type is used
options OptionType [ ] Definitions of additional options that are available for this product
id string Option identifier - use this to specify the option when creating an order
title string Display name
type string Data type of this option (currently only 'bool' is supported)
values array Option values - [key, value] map
additional_price string Additional price when this option is used
additional_price_breakdown array Additional price breakdown by type - [key, value] map
is_discontinued boolean If product is disabled in push
description string Product description
Clave API
id Sync Variant ID (integer) or External ID (if prefixed with @)
Ejecutar

Modify a Sync Variant

PUT https://api.printful.com/store/variants/{id}

Modifies an existing Sync Variant.

Please note that in the request body you only need to specify the fields that need to be changed. See examples for more insights.
Parámetros de entrada
id integer / string Sync Variant ID (integer) or External ID (if prefixed with @)
Request body RequestVariant PUT request body
external_id string Variant ID from the E-commerce platform
variant_id integer Printful Variant ID that this Sync Variant is synced to
retail_price float Retail price that this item is sold for
files RequestFile [ ] Array of attached print files
type string Role of the file in the order
id integer File ID

* Required if no URL given
url string Source URL where the file is downloaded from

* Required if no File ID given
options ItemOption [ ] Array of additional options for the configured product/variant
id string Option ID
value mixed Option value
Formato de respuesta:
code integer Código del estado de respuesta 200
result RequestVariantResponse
id integer Sync Variant id
external_id string Sync Variant ID from the external system
sync_product_id integer Sync Variant ID in Printful
name string Sync Variant name
synced bool Is this variant synced
variant_id integer Printful Variant ID that this Sync Variant is synced to
retail_price float Retail price that this item is sold for
currency string Items currenct
product ProductMiniInfo
variant_id integer Printful Variant ID that this Sync Variant is synced to
product_id integer Printful Product ID that this Variant Id belongs to
image string Variants default image in Printfuls Catalog
name string Variants full name in Printfuls Catalog
files File [ ] Array of attached print files
id integer File ID
type string Role of the file in the order
hash string MD5 checksum of the file
url string Source URL where the file is downloaded from
filename string File name
mime_type string MIME type of the file
size integer Size in bytes
width integer Width in pixels
height integer Height in pixels
dpi integer Resolution DPI.
Note: for vector files this may be indicated as only 72dpi, but it doesn't affect print quality since the vector files are resolution independent.
status string File processing status:
ok - file was processed successfuly
waiting - file is being processed
failed - file failed to be processed
created timestamp File creation time
thumbnail_url string Small thumbnail URL
preview_url string Medium preview image URL
visible boolean Show file in the Printfile Library (default true)
options ItemOption [ ] Array of additional options for the configured product/variant
id string Option ID
value mixed Option value
Clave API
id Sync Variant ID (integer) or External ID (if prefixed with @)
Request body
Ejecutar
Actualizar el precio de una variante de sincronización existente
Solicitar cuerpo:
    {
        "retail_price": "29.00"
    }
Datos de respuesta:
    {
        "code": 200,
        "result": {
            "id": 866914574,
            "external_id": "5bd967595a1174",
            "sync_product_id": 79348721,
            "name": "API product",
            "synced": true,
            "variant_id": 4011,
            "retail_price": "29.00",
            "currency": "",
            "product": {
                "variant_id": 4011,
                "product_id": 71,
                "image": "https://s3.dev.printful.com/products/71/4012_1517927381.jpg",
                "name": "Bella + Canvas 3001 Unisex Short Sleeve Jersey T-Shirt with Tear Away Label (White / S)"
            },
            "files": [
                {
                    "id": 76564075,
                    "type": "default",
                    "hash": "7d6a2367c1e338750e68dc66b20cba1a",
                    "url": "https://example.com/image.jpg",
                    "filename": "76564075.jpg",
                    "mime_type": "image/jpeg",
                    "size": 8245,
                    "width": 200,
                    "height": 300,
                    "dpi": null,
                    "status": "ok",
                    "created": 1539341673,
                    "thumbnail_url": "https://s3.dev.printful.com/files/7d6/7d6a2367c1e338750e68dc66b20cba1a_thumb.png",
                    "preview_url": "https://s3.dev.printful.com/files/7d6/7d6a2367c1e338750e68dc66b20cba1a_preview.png",
                    "visible": true
                },
                {
                    "id": 76564075,
                    "type": "back",
                    "hash": "7d6a2367c1e338750e68dc66b20cba1a",
                    "url": "https://example.com/image.jpg",
                    "filename": "76564075.jpg",
                    "mime_type": "image/jpeg",
                    "size": 8245,
                    "width": 200,
                    "height": 300,
                    "dpi": null,
                    "status": "ok",
                    "created": 1539341673,
                    "thumbnail_url": "https://s3.dev.printful.com/files/7d6/7d6a2367c1e338750e68dc66b20cba1a_thumb.png",
                    "preview_url": "https://s3.dev.printful.com/files/7d6/7d6a2367c1e338750e68dc66b20cba1a_preview.png",
                    "visible": true
                }
            ],
            "options": [
                {
                    "id": "embroidery_type",
                    "value": "flat"
                },
                {
                    "id": "thread_colors",
                    "value": []
                },
                {
                    "id": "thread_colors_3d",
                    "value": []
                },
                {
                    "id": "thread_colors_chest_left",
                    "value": []
                }
            ]
        },
        "extra": [],
        "debug": []
    }
Actualiza la camiseta variante para que solo tenga estampado frontal en lugar de por ambas partes.
Solicitar cuerpo:
    {
        "files": [
            {
                "type": "default",
                "url": "https://example.com/image.jpg"
            }
        ]
    }
Datos de respuesta:
    {
        "code": 200,
        "result": {
            "id": 866914574,
            "external_id": "5bd967595a1174",
            "sync_product_id": 79348721,
            "name": "API product",
            "synced": true,
            "variant_id": 4011,
            "retail_price": "29.00",
            "currency": "",
            "product": {
                "variant_id": 4011,
                "product_id": 71,
                "image": "https://s3.dev.printful.com/products/71/4012_1517927381.jpg",
                "name": "Bella + Canvas 3001 Unisex Short Sleeve Jersey T-Shirt with Tear Away Label (White / S)"
            },
            "files": [
                {
                    "id": 76564159,
                    "type": "default",
                    "hash": "ebd559858e5703088de8900ce99c37d3",
                    "url": "https://example.com/image.jpg",
                    "filename": "76564159.jpg",
                    "mime_type": "image/jpeg",
                    "size": 11246,
                    "width": 200,
                    "height": 300,
                    "dpi": null,
                    "status": "ok",
                    "created": 1540797879,
                    "thumbnail_url": "https://s3.dev.printful.com/files/ebd/ebd559858e5703088de8900ce99c37d3_thumb.png",
                    "preview_url": "https://s3.dev.printful.com/files/ebd/ebd559858e5703088de8900ce99c37d3_preview.png",
                    "visible": true
                }
            ],
            "options": [
                {
                    "id": "embroidery_type",
                    "value": "flat"
                },
                {
                    "id": "thread_colors",
                    "value": []
                },
                {
                    "id": "thread_colors_3d",
                    "value": []
                },
                {
                    "id": "thread_colors_chest_left",
                    "value": []
                }
            ]
        },
        "extra": [],
        "debug": []
    }

¿Listo para probar Printful?