Pedidos API

La API de los pedidos es la parte más importante de la API de Printful, te permite crear nuevos pedidos y confirmarlos para su procesamiento.

Ciclo de vida y estados del pedido

Cada pedido pasará por diferentes fases hasta que sea procesado. Los siguientes tipos de estados marcan dichas fases:

Borrador Has creado este pedido, pero no lo has confirmado. Todavía puedes editarlo y confirmarlo más adelante.
pendiente Este pedido se ha enviado a gestión, pero aún no se ha aceptado. Si quieres, todavía puedes cancelar el pedido.
error El pedido se envió para su procesamiento, pero ha sido devuelto para su revisión por un error (problema con la dirección, faltan archivos de impresión, no se ha podido realizar el cargo, etc.).
Cancelado El pedido se ha cancelado y ya no puede ser procesado. Si se ha cobrado el pedido, la cantidad se devolverá a tu tarjeta de crédito.
en proceso El pedido se está procesando y no podrá ser cancelado o modificado. Contacta con atención al cliente si tienes algún problema con el pedido.
en espera Se ha encontrado un problema en el pedido durante el procesamiento que necesita ser resuelto con el servicio de atención al cliente de Printful para que se pueda continuar con su gestión.
parcial El pedido está parcialmente procesado (algunos artículos ya se han enviado, el resto se enviarán pronto)
procesado Todos los productos se han enviado con éxito

Resumiendo, API te permite crear pedidos con el estado de borrador y después puedes cambiarlos a estado pendiente (ambos pasos pueden realizarse con una sola acción). Solo se cargarán los pedidos confirmados. Si se encuentra un problema en el pedido tras haber sido enviado, cambiará al estado fallido para que se pueda arreglar el problema y el envío pueda volver a ser enviado.

ID externo

El ID externo es una función opcional que te permite enlazar tu pedido en Printful con el ID del pedido de tu sistema sin la necesidad de guardar datos adicionales en tu sistema. El ID externo puede tener hasta 32 caracteres y contener dígitos, alfabeto latino, letras, guiones y pueden ir subrayados; sin embargo, se recomienda utilizar números enteros. Cada ID externo de un pedido debe ser única en la tienda.

Para utilizar la función de ID externo, solo tienes que añadir el atributo ID_externo al crear el pedido. Más tarde, cuando necesites acceder al pedido a través de la API, puedes referenciarla por ID de pedido e ID externo (si colocas antes el símbolo @).

GET /orders/11001 - referencia por ID de pedido de Printful
GET /orders/@988123 - referencia por ID externa
GET /orders/@AA123123 - referencia por ID externa

Puedes asignar el atributo ID_externo también a los artículos de línea. En este caso tienen que ser únicos por pedido.

Especificando productos

Hay dos maneras de especificar la variante de un producto al crear, actualizar o estimar un pedido:

(A) Si cuentas con una variante de un producto existente en tu tienda Printful o almacén, puedes referirte a ella especificando su ID_de_variante_sincronizada o ID_de_variante_externo, o ID_de_variante_de_producto_de_almacén.

(B) Si no cuentas con una variante de un producto existente en tu tienda Printful, puedes crear una variante en el momento utilizando el atributo ID_de_variante desde nuestra API del catálogo de productos junto con archivos de impresión y opciones adicionales.

Añadir archivos de impresión

Hay dos maneras de asignar un archivo de impresión a un artículo. Una es especificando el ID de 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 especificando la URL de archivo. Si ya existe un archivo con la misma URL, se reutilizará.

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

Especificando múltiples archivos por artículo

Cada artículo del pedido tiene que estar unido a uno o varios archivos. Los tipos de archivos disponibles para cada producto están disponibles en la API del catálogo de productos.

Puedes añadir un archivo para cada tipo especificando el atributo tipo. Para el tipo por 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"},{"type":"preview""url": "http://example.com/t-shirts/123/preview.png"}],...

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

Precio de venta

Printful te permite especificar tus costos de venta para el pedido para que el paquete para pedidos internacionales pueda contener tus precios de costo de venta correctos. Para permitir costos de venta, cada artículo del pedido tiene que contener el atributo precio_minorista. También puedes especificar una suma personalizada de descuentos, costes de envíos e impuestos en costos_minoristas al crear el pedido. Si faltan los costos de venta, el paquete incluirá los precios de Printful.

Get list of orders

GET https://api.printful.com/orders

Returns list of order objects from your store
Parámetros de entrada
status string Filter by order status
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 Order [ ]
id integer Order ID
external_id string Order ID from the external system
store integer Store ID
status string Order status:
draft - order is not submitted for fulfillment
failed - order was submitted for fulfillment but was not accepted because of an error (problem with address, printfiles, charging, etc.)
pending - order has been submitted for fulfillment
canceled - order is canceled
onhold - order has encountered a problem during the fulfillment that needs to be resolved together with the Printful customer service
inprocess - order is being fulfilled and is no longer cancellable
partial - order is partially fulfilled (some items are shipped already, the rest will follow)
fulfilled - all items are shipped
shipping string Shipping method. Defaults to 'STANDARD'
created timestamp Time when the order was created
updated timestamp Time when the order was updated
recipient Address Shipping address
name string Full name
company string Company name
address1 string Address line 1
address2 string Address line 2
city string City
state_code string State code
state_name string State name
country_code string Country code
country_name string Country name
zip string ZIP/Postal code
phone string Phone
email string E-mail
items Item [ ] Array of items in the order
id integer Line item ID
external_id string Line item ID from the external system
variant_id integer Variant ID of the item ordered. See Products API
sync_variant_id integer Sync variant ID of the item ordered.
external_variant_id string External variant ID of the item ordered.
warehouse_product_variant_id integer Warehousing product variant ID of the item ordered. See Warehouse Products API
quantity integer Number of items ordered
price string Printful price of the item
retail_price string Original retail price of the item to be displayed on the packing slip
name string Display name of the item. If not given, a name from the Printful system will be displayed on the packing slip
product ProductVariant Short information about the Product and Variant
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 this product
id string Option ID
value mixed Option value
sku string Product identifier (SKU) from the external system
costs Costs Order costs (Printful prices)
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
retail_costs Costs Retail costs that are to be displayed on the packing slip for international shipments. Retail costs are used only if every item in order contains the retail_price attribute.
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
shipments Shipment [ ] Array of shipments already shipped for this order
id integer Shipment ID
carrier string Carrier name
service string Delivery service name
tracking_number string Shipment tracking number
tracking_url string Shipment tracking URL
created timestamp Shipping time
ship_date string Ship date
shipped_at int Ship time in unix timestamp
reshipment boolean Whether this is a reshipment
items ShipmentItem [ ] Array of items in this shipment
item_id integer Line item ID
quantity integer Quantity of items in this shipment
gift GiftData Optional gift message for the packing slip
subject string Gift message title
message string Gift message text
packing_slip PackingSlip Custom packing slip for this order
email string Customer service email
phone string Customer service phone. Should be formatted like this: 111-222-3333
message string Custom packing slip message
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 order status
offset Result set offset
limit Number of items per page (max 100)
Ejecutar

Create a new order

POST https://api.printful.com/orders

Creates a new order and optionally submits it for fulfillment
Parámetros de entrada
Request body OrderInput Order data
external_id string Order ID from the external system
shipping string Shipping method. Defaults to 'STANDARD'
recipient Address Shipping address
name string Full name
company string Company name
address1 string Address line 1
address2 string Address line 2
city string City
state_code string State code
state_name string State name
country_code string Country code
country_name string Country name
zip string ZIP/Postal code
phone string Phone
email string E-mail
items Item [ ] Array of items in the order
id integer Line item ID
external_id string Line item ID from the external system
variant_id integer Variant ID of the item ordered. See Products API
sync_variant_id integer Sync variant ID of the item ordered.
external_variant_id string External variant ID of the item ordered.
warehouse_product_variant_id integer Warehousing product variant ID of the item ordered. See Warehouse Products API
quantity integer Number of items ordered
price string Printful price of the item
retail_price string Original retail price of the item to be displayed on the packing slip
name string Display name of the item. If not given, a name from the Printful system will be displayed on the packing slip
product ProductVariant Short information about the Product and Variant
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 this product
id string Option ID
value mixed Option value
sku string Product identifier (SKU) from the external system
retail_costs Costs Retail costs that are to be displayed on the packing slip for international shipments. Retail costs are used only if every item in order contains the retail_price attribute.
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
gift GiftData Optional gift message for the packing slip
subject string Gift message title
message string Gift message text
packing_slip PackingSlip Custom packing slip for this order
email string Customer service email
phone string Customer service phone. Should be formatted like this: 111-222-3333
message string Custom packing slip message
confirm boolean Automatically submit the newly created order for fulfillment (skip the Draft phase)
update_existing boolean Try to update existing order if an order with the specified external_id already exists
Formato de respuesta:
code integer Código del estado de respuesta 200
result Order
id integer Order ID
external_id string Order ID from the external system
store integer Store ID
status string Order status:
draft - order is not submitted for fulfillment
failed - order was submitted for fulfillment but was not accepted because of an error (problem with address, printfiles, charging, etc.)
pending - order has been submitted for fulfillment
canceled - order is canceled
onhold - order has encountered a problem during the fulfillment that needs to be resolved together with the Printful customer service
inprocess - order is being fulfilled and is no longer cancellable
partial - order is partially fulfilled (some items are shipped already, the rest will follow)
fulfilled - all items are shipped
shipping string Shipping method. Defaults to 'STANDARD'
created timestamp Time when the order was created
updated timestamp Time when the order was updated
recipient Address Shipping address
name string Full name
company string Company name
address1 string Address line 1
address2 string Address line 2
city string City
state_code string State code
state_name string State name
country_code string Country code
country_name string Country name
zip string ZIP/Postal code
phone string Phone
email string E-mail
items Item [ ] Array of items in the order
id integer Line item ID
external_id string Line item ID from the external system
variant_id integer Variant ID of the item ordered. See Products API
sync_variant_id integer Sync variant ID of the item ordered.
external_variant_id string External variant ID of the item ordered.
warehouse_product_variant_id integer Warehousing product variant ID of the item ordered. See Warehouse Products API
quantity integer Number of items ordered
price string Printful price of the item
retail_price string Original retail price of the item to be displayed on the packing slip
name string Display name of the item. If not given, a name from the Printful system will be displayed on the packing slip
product ProductVariant Short information about the Product and Variant
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 this product
id string Option ID
value mixed Option value
sku string Product identifier (SKU) from the external system
costs Costs Order costs (Printful prices)
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
retail_costs Costs Retail costs that are to be displayed on the packing slip for international shipments. Retail costs are used only if every item in order contains the retail_price attribute.
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
shipments Shipment [ ] Array of shipments already shipped for this order
id integer Shipment ID
carrier string Carrier name
service string Delivery service name
tracking_number string Shipment tracking number
tracking_url string Shipment tracking URL
created timestamp Shipping time
ship_date string Ship date
shipped_at int Ship time in unix timestamp
reshipment boolean Whether this is a reshipment
items ShipmentItem [ ] Array of items in this shipment
item_id integer Line item ID
quantity integer Quantity of items in this shipment
gift GiftData Optional gift message for the packing slip
subject string Gift message title
message string Gift message text
packing_slip PackingSlip Custom packing slip for this order
email string Customer service email
phone string Customer service phone. Should be formatted like this: 111-222-3333
message string Custom packing slip message
Clave API
Request body
confirm Automatically submit the newly created order for fulfillment (skip the Draft phase)
update_existing Try to update existing order if an order with the specified external_id already exists
Ejecutar
Crea un pedido que contenga un elemento, que se debe crear sobre la marcha y basado en archivo de impresión, así como un variant_id del catálogo Printful.
Solicitar cuerpo:
{
    "recipient": {
        "name": "John Doe",
        "address1": "19749 Dearborn St",
        "city": "Chatsworth",
        "state_code": "CA",
        "country_code": "US",
        "zip": "91311"
    },
    "items": [{
        "variant_id": 1,
        "quantity": 1,
        "files": [{
            "url": "http://example.com/files/posters/poster_1.jpg"
        }]
    }]
}
Datos de respuesta:
{
    "code": 200,
    "result": {
        "id": 21510,
        "external_id": null,
        "status": "draft",
        "shipping": "STANDARD",
        "created": 1390825082,
        "updated": 1390825082,
        "recipient": {
            "name": "John Doe",
            "company": null,
            "address1": "19749 Dearborn St",
            "address2": null,
            "city": "Chatsworth",
            "state_code": "CA",
            "state_name": "California",
            "country_code": "US",
            "country_name": "United States",
            "zip": "91311",
            "phone": null,
            "email": null
        },
        "items": [{
            "id": 17621,
            "external_id": null,
            "variant_id": 1,
            "quantity": 1,
            "price": "13.00",
            "retail_price": null,
            "name": "Unframed Poster 18×24",
            "product": {
                "variant_id": 1,
                "product_id": 1,
                "image": "https://www.printful.com/storage/products/poster_18x24.jpg",
                "name": "Unframed Poster 18×24"
            },
            "files": [{
                "id": 11818,
                "type": "default",
                "hash": null,
                "url": "http://example.com/files/posters/poster_1.jpg",
                "filename": null,
                "mime_type": null,
                "size": 0,
                "width": null,
                "height": null,
                "dpi": null,
                "status": "waiting",
                "created": 1390823900,
                "thumbnail_url": null,
                "preview_url": null,
                "visible": true
            }],
            "options": []
        }],
        "costs": {
            "subtotal": "13.00",
            "discount": "0.00",
            "shipping": "7.95",
            "tax": "1.17",
            "total": "22.12"
        },
        "retail_costs": {
            "subtotal": null,
            "discount": null,
            "shipping": null,
            "tax": null,
            "total": null
        },
        "shipments": []
    }
}
Create an order containing an item, which is based on an existing Sync Variant from the authorized Printful store and is referenced by its Sync Variant ID. Please note, that the existing Sync Variant must be configured (synced) for this to work.
Solicitar cuerpo:
{
    "recipient": {
        "name": "John Doe",
        "address1": "19749 Dearborn St",
        "city": "Chatsworth",
        "state_code": "CA",
        "country_code": "US",
        "zip": "91311"
    },
    "items": [{
        "sync_variant_id": 1,
        "quantity": 1
    }]
}
Datos de respuesta:
{
    "code": 200,
    "result": {
        "id": 11360229,
        "external_id": null,
        "store": 952434,
        "status": "draft",
        "error": null,
        "shipping": "PRINTFUL_FAST",
        "created": 1539584164,
        "updated": 1539584164,
        "recipient": {
            "name": "John Doe",
            "company": null,
            "address1": "19749 Dearborn St",
            "address2": null,
            "city": "Chatsworth",
            "state_code": "CA",
            "state_name": "California",
            "country_code": "US",
            "country_name": "United States",
            "zip": "91311",
            "phone": null,
            "email": null
        },
        "notes": null,
        "items": [
            {
                "id": 7253102,
                "external_id": null,
                "variant_id": 4011,
                "sync_variant_id": 866913817,
                "external_variant_id": "5bc04fbe956147",
                "quantity": 1,
                "price": "12.95",
                "retail_price": null,
                "name": "Short-Sleeve Unisex T-Shirt - S",
                "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": 76564071,
                        "type": "default",
                        "hash": "1c43709da13e3480049379d41e473ad9",
                        "url": null,
                        "filename": "printfile-23aeb205.png",
                        "mime_type": "image/png",
                        "size": 18660,
                        "width": 1800,
                        "height": 2400,
                        "dpi": 150,
                        "status": "ok",
                        "created": 1539329978,
                        "thumbnail_url": "https://s3.dev.printful.com/files/1c4/1c43709da13e3480049379d41e473ad9_thumb.png",
                        "preview_url": "https://s3.dev.printful.com/files/1c4/1c43709da13e3480049379d41e473ad9_preview.png",
                        "visible": false
                    },
                    {
                        "id": 76564072,
                        "type": "preview",
                        "hash": "2749bee4a392c4ee2f034c7246706329",
                        "url": null,
                        "filename": "mockup-6da92239.jpg",
                        "mime_type": "image/jpeg",
                        "size": 32944,
                        "width": 600,
                        "height": 600,
                        "dpi": 72,
                        "status": "ok",
                        "created": 1539329982,
                        "thumbnail_url": "https://s3.dev.printful.com/files/274/2749bee4a392c4ee2f034c7246706329_thumb.png",
                        "preview_url": "https://s3.dev.printful.com/files/274/2749bee4a392c4ee2f034c7246706329_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": []
                    }
                ],
                "sku": null,
                "discontinued": false,
                "out_of_stock": false
            }
        ],
        "is_sample": false,
        "needs_approval": false,
        "not_synced": false,
        "has_discontinued_items": false,
        "can_change_hold": true,
        "costs": {
            "currency": "USD",
            "subtotal": "12.95",
            "discount": "0.00",
            "shipping": "2.60",
            "digitization": "0.00",
            "additional_fee": "0.00",
            "fulfillment_fee": "0.00",
            "tax": "1.35",
            "vat": "0.00",
            "total": "16.90"
        },
        "retail_costs": {
            "currency": "USD",
            "subtotal": null,
            "discount": null,
            "shipping": null,
            "tax": null,
            "vat": null,
            "total": null
        },
        "shipments": [],
        "gift": null,
        "packing_slip": null,
        "dashboard_url": "https://www.printful.local/dashboard?order_id=11360229"
    },
    "extra": [],
    "debug": []
}
Create an order containing an item, which is based on an existing Sync Variant from the authorized Printful store and is referenced by its external ID. Please note, that the existing Sync Variant must be configured (synced) for this to work.
Solicitar cuerpo:
{
    "recipient": {
        "name": "John Doe",
        "address1": "19749 Dearborn St",
        "city": "Chatsworth",
        "state_code": "CA",
        "country_code": "US",
        "zip": "91311"
    },
    "items": [{
        "external_variant_id": "5bc04fbe956148",
        "quantity": 1
    }]
}
Datos de respuesta:
{
    "code": 200,
    "result": {
        "id": 11360229,
        "external_id": null,
        "store": 952434,
        "status": "draft",
        "error": null,
        "shipping": "PRINTFUL_FAST",
        "created": 1539584164,
        "updated": 1539584164,
        "recipient": {
            "name": "John Doe",
            "company": null,
            "address1": "19749 Dearborn St",
            "address2": null,
            "city": "Chatsworth",
            "state_code": "CA",
            "state_name": "California",
            "country_code": "US",
            "country_name": "United States",
            "zip": "91311",
            "phone": null,
            "email": null
        },
        "notes": null,
        "items": [
            {
                "id": 7253102,
                "external_id": null,
                "variant_id": 4011,
                "sync_variant_id": 866913817,
                "external_variant_id": "5bc04fbe956147",
                "quantity": 1,
                "price": "12.95",
                "retail_price": null,
                "name": "Short-Sleeve Unisex T-Shirt - S",
                "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": 76564071,
                        "type": "default",
                        "hash": "1c43709da13e3480049379d41e473ad9",
                        "url": null,
                        "filename": "printfile-23aeb205.png",
                        "mime_type": "image/png",
                        "size": 18660,
                        "width": 1800,
                        "height": 2400,
                        "dpi": 150,
                        "status": "ok",
                        "created": 1539329978,
                        "thumbnail_url": "https://s3.dev.printful.com/files/1c4/1c43709da13e3480049379d41e473ad9_thumb.png",
                        "preview_url": "https://s3.dev.printful.com/files/1c4/1c43709da13e3480049379d41e473ad9_preview.png",
                        "visible": false
                    },
                    {
                        "id": 76564072,
                        "type": "preview",
                        "hash": "2749bee4a392c4ee2f034c7246706329",
                        "url": null,
                        "filename": "mockup-6da92239.jpg",
                        "mime_type": "image/jpeg",
                        "size": 32944,
                        "width": 600,
                        "height": 600,
                        "dpi": 72,
                        "status": "ok",
                        "created": 1539329982,
                        "thumbnail_url": "https://s3.dev.printful.com/files/274/2749bee4a392c4ee2f034c7246706329_thumb.png",
                        "preview_url": "https://s3.dev.printful.com/files/274/2749bee4a392c4ee2f034c7246706329_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": []
                    }
                ],
                "sku": null,
                "discontinued": false,
                "out_of_stock": false
            }
        ],
        "is_sample": false,
        "needs_approval": false,
        "not_synced": false,
        "has_discontinued_items": false,
        "can_change_hold": true,
        "costs": {
            "currency": "USD",
            "subtotal": "12.95",
            "discount": "0.00",
            "shipping": "2.60",
            "digitization": "0.00",
            "additional_fee": "0.00",
            "fulfillment_fee": "0.00",
            "tax": "1.35",
            "vat": "0.00",
            "total": "16.90"
        },
        "retail_costs": {
            "currency": "USD",
            "subtotal": null,
            "discount": null,
            "shipping": null,
            "tax": null,
            "vat": null,
            "total": null
        },
        "shipments": [],
        "gift": null,
        "packing_slip": null,
        "dashboard_url": "https://www.printful.local/dashboard?order_id=11360229"
    },
    "extra": [],
    "debug": []
}
Create an order with external order ID, custom item names and retail price information.
Solicitar cuerpo:
{
    "external_id": "9887112",
    "recipient": {
        "name": "John Doe",
        "address1": "19749 Dearborn St",
        "city": "Chatsworth",
        "state_code": "CA",
        "country_code": "US",
        "zip": "91311"
    },
    "items": [{
        "variant_id": 2,
        "quantity": 1,
        "name": "Niagara Falls poster",
        "retail_price": "19.99",
        "files": [{
            "url": "http://example.com/files/posters/poster_2.jpg"
        }]
    }, {
        "variant_id": 1,
        "quantity": 3,
        "name": "Grand Canyon poster",
        "retail_price": "17.99",
        "files": [{
            "url": "http://example.com/files/posters/poster_3.jpg"
        }]
    }],
    "retail_costs": {
        "shipping": "24.50"
    }
}
Datos de respuesta:
{
    "code": 200,
    "result": {
        "id": 21509,
        "external_id": "9887112",
        "status": "draft",
        "shipping": "STANDARD",
        "created": 1390825006,
        "updated": 1390825006,
        "recipient": {
            "name": "John Doe",
            "company": null,
            "address1": "19749 Dearborn St",
            "address2": null,
            "city": "Chatsworth",
            "state_code": "CA",
            "state_name": "California",
            "country_code": "US",
            "country_name": "United States",
            "zip": "91311",
            "phone": null,
            "email": null
        },
        "items": [{
            "id": 17619,
            "external_id": null,
            "variant_id": 2,
            "quantity": 1,
            "price": "18.00",
            "retail_price": "19.99",
            "name": "Niagara Falls poster",
            "product": {
                "variant_id": 2,
                "product_id": 1,
                "image": "https://www.printful.com/storage/products/poster_24x36.jpg",
                "name": "Unframed Poster 24×36"
            },
            "files": [{
                "id": 11819,
                "type": "default",
                "hash": null,
                "url": "http://example.com/files/posters/poster_2.jpg",
                "filename": null,
                "mime_type": null,
                "size": 0,
                "width": null,
                "height": null,
                "dpi": null,
                "status": "waiting",
                "created": 1390824712,
                "thumbnail_url": null,
                "preview_url": null,
                "visible": true
            }],
            "options": []
        }, {
            "id": 17620,
            "external_id": null,
            "variant_id": 1,
            "quantity": 3,
            "price": "13.00",
            "retail_price": "17.99",
            "name": "Grand Canyon poster",
            "product": {
                "variant_id": 1,
                "product_id": 1,
                "image": "https://www.printful.com/storage/products/poster_18x24.jpg",
                "name": "Unframed Poster 18×24"
            },
            "files": [{
                "id": 11820,
                "type": "default",
                "hash": null,
                "url": "http://example.com/files/posters/poster_3.jpg",
                "filename": null,
                "mime_type": null,
                "size": 0,
                "width": null,
                "height": null,
                "dpi": null,
                "status": "waiting",
                "created": 1390824712,
                "thumbnail_url": null,
                "preview_url": null,
                "visible": true
            }],
            "options": []
        }],
        "costs": {
            "subtotal": "57.00",
            "discount": "0.00",
            "shipping": "9.95",
            "tax": "5.13",
            "total": "72.08"
        },
        "retail_costs": {
            "subtotal": "73.96",
            "discount": "0.00",
            "shipping": "24.50",
            "tax": "0.00",
            "total": "98.46"
        },
        "shipments": []
    }
}
Create an order containing a shirt with a preview image added, both front and back print files specified and the option to tear off inside label selected.
Solicitar cuerpo:
{
    "recipient": {
        "name": "John Doe",
        "address1": "19749 Dearborn St",
        "city": "Chatsworth",
        "state_code": "CA",
        "country_code": "US",
        "zip": "91311"
    },
    "items": [{
        "variant_id": 1118,
        "quantity": 1,
        "files": [{
            "url": "http://example.com/files/tshirts/shirt_front.ai"
        }, {
            "type": "back",
            "url": "http://example.com/files/tshirts/shirt_back.ai"
        }, {
            "type": "preview",
            "url": "http://example.com/files/tshirts/shirt_mockup.jpg"
        }],
        "options": []
    }]
}
Datos de respuesta:
{
    "code": 200,
    "result": {
        "id": 21516,
        "external_id": null,
        "status": "draft",
        "shipping": "STANDARD",
        "created": 1390825437,
        "updated": 1390825437,
        "recipient": {
            "name": "John Doe",
            "company": null,
            "address1": "19749 Dearborn St",
            "address2": null,
            "city": "Chatsworth",
            "state_code": "CA",
            "state_name": "California",
            "country_code": "US",
            "country_name": "United States",
            "zip": "91311",
            "phone": null,
            "email": null
        },
        "items": [{
            "id": 17627,
            "external_id": null,
            "variant_id": 1118,
            "quantity": 1,
            "price": "20.50",
            "retail_price": null,
            "name": "Alternative 1070 Short Sleeve Men T-Shirt (Black / M)",
            "product": {
                "variant_id": 1118,
                "product_id": 14,
                "image": "https://www.printful.com/storage/products/14/1095.jpg",
                "name": "Alternative 1070 Short Sleeve Men T-Shirt (Black / M)"
            },
            "files": [{
                "id": 11822,
                "type": "default",
                "hash": null,
                "url": "http://example.com/files/tshirts/shirt_front.ai",
                "filename": null,
                "mime_type": null,
                "size": 0,
                "width": null,
                "height": null,
                "dpi": null,
                "status": "waiting",
                "created": 1390825349,
                "thumbnail_url": null,
                "preview_url": null,
                "visible": true
            }, {
                "id": 11823,
                "type": "back",
                "hash": null,
                "url": "http://example.com/files/tshirts/shirt_back.ai",
                "filename": null,
                "mime_type": null,
                "size": 0,
                "width": null,
                "height": null,
                "dpi": null,
                "status": "waiting",
                "created": 1390825349,
                "thumbnail_url": null,
                "preview_url": null,
                "visible": true
            }, {
                "id": 11824,
                "type": "preview",
                "hash": null,
                "url": "http://example.com/files/tshirts/shirt_mockup.jpg",
                "filename": null,
                "mime_type": null,
                "size": 0,
                "width": null,
                "height": null,
                "dpi": null,
                "status": "waiting",
                "created": 1390825349,
                "thumbnail_url": null,
                "preview_url": null,
                "visible": true
            }],
            "options": []
        }],
        "costs": {
            "subtotal": "20.50",
            "discount": "0.00",
            "shipping": "5.50",
            "tax": "1.85",
            "total": "27.85"
        },
        "retail_costs": {
            "subtotal": null,
            "discount": null,
            "shipping": null,
            "tax": null,
            "total": null
        },
        "shipments": []
    }
}

Estimate order costs

POST https://api.printful.com/orders/estimate-costs

Calculates the estimated order costs including item costs, print costs (back prints, inside labels etc.), shipping and taxes
Parámetros de entrada
Request body OrderInput Order data
external_id string Order ID from the external system
shipping string Shipping method. Defaults to 'STANDARD'
recipient Address Shipping address
name string Full name
company string Company name
address1 string Address line 1
address2 string Address line 2
city string City
state_code string State code
state_name string State name
country_code string Country code
country_name string Country name
zip string ZIP/Postal code
phone string Phone
email string E-mail
items Item [ ] Array of items in the order
id integer Line item ID
external_id string Line item ID from the external system
variant_id integer Variant ID of the item ordered. See Products API
sync_variant_id integer Sync variant ID of the item ordered.
external_variant_id string External variant ID of the item ordered.
warehouse_product_variant_id integer Warehousing product variant ID of the item ordered. See Warehouse Products API
quantity integer Number of items ordered
price string Printful price of the item
retail_price string Original retail price of the item to be displayed on the packing slip
name string Display name of the item. If not given, a name from the Printful system will be displayed on the packing slip
product ProductVariant Short information about the Product and Variant
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 this product
id string Option ID
value mixed Option value
sku string Product identifier (SKU) from the external system
retail_costs Costs Retail costs that are to be displayed on the packing slip for international shipments. Retail costs are used only if every item in order contains the retail_price attribute.
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
gift GiftData Optional gift message for the packing slip
subject string Gift message title
message string Gift message text
packing_slip PackingSlip Custom packing slip for this order
email string Customer service email
phone string Customer service phone. Should be formatted like this: 111-222-3333
message string Custom packing slip message
Formato de respuesta:
code integer Código del estado de respuesta 200
result OrderCosts
costs Costs Order costs (Printful prices)
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
retail_costs Costs Retail costs that are to be displayed on the packing slip for international shipments. Retail costs are used only if every item in order contains the retail_price attribute.
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
Clave API
Request body
Ejecutar

Get order data

GET https://api.printful.com/orders/{id}

Returns order data by ID or External ID.
Parámetros de entrada
id integer / string Order ID (integer) or External ID (if prefixed with @)
Formato de respuesta:
code integer Código del estado de respuesta 200
result Order
id integer Order ID
external_id string Order ID from the external system
store integer Store ID
status string Order status:
draft - order is not submitted for fulfillment
failed - order was submitted for fulfillment but was not accepted because of an error (problem with address, printfiles, charging, etc.)
pending - order has been submitted for fulfillment
canceled - order is canceled
onhold - order has encountered a problem during the fulfillment that needs to be resolved together with the Printful customer service
inprocess - order is being fulfilled and is no longer cancellable
partial - order is partially fulfilled (some items are shipped already, the rest will follow)
fulfilled - all items are shipped
shipping string Shipping method. Defaults to 'STANDARD'
created timestamp Time when the order was created
updated timestamp Time when the order was updated
recipient Address Shipping address
name string Full name
company string Company name
address1 string Address line 1
address2 string Address line 2
city string City
state_code string State code
state_name string State name
country_code string Country code
country_name string Country name
zip string ZIP/Postal code
phone string Phone
email string E-mail
items Item [ ] Array of items in the order
id integer Line item ID
external_id string Line item ID from the external system
variant_id integer Variant ID of the item ordered. See Products API
sync_variant_id integer Sync variant ID of the item ordered.
external_variant_id string External variant ID of the item ordered.
warehouse_product_variant_id integer Warehousing product variant ID of the item ordered. See Warehouse Products API
quantity integer Number of items ordered
price string Printful price of the item
retail_price string Original retail price of the item to be displayed on the packing slip
name string Display name of the item. If not given, a name from the Printful system will be displayed on the packing slip
product ProductVariant Short information about the Product and Variant
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 this product
id string Option ID
value mixed Option value
sku string Product identifier (SKU) from the external system
costs Costs Order costs (Printful prices)
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
retail_costs Costs Retail costs that are to be displayed on the packing slip for international shipments. Retail costs are used only if every item in order contains the retail_price attribute.
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
shipments Shipment [ ] Array of shipments already shipped for this order
id integer Shipment ID
carrier string Carrier name
service string Delivery service name
tracking_number string Shipment tracking number
tracking_url string Shipment tracking URL
created timestamp Shipping time
ship_date string Ship date
shipped_at int Ship time in unix timestamp
reshipment boolean Whether this is a reshipment
items ShipmentItem [ ] Array of items in this shipment
item_id integer Line item ID
quantity integer Quantity of items in this shipment
gift GiftData Optional gift message for the packing slip
subject string Gift message title
message string Gift message text
packing_slip PackingSlip Custom packing slip for this order
email string Customer service email
phone string Customer service phone. Should be formatted like this: 111-222-3333
message string Custom packing slip message
Clave API
id Order ID (integer) or External ID (if prefixed with @)
Ejecutar

Cancel an order

DELETE https://api.printful.com/orders/{id}

Cancels pending order or draft. Charged amount is returned to the store owner's credit card.
Parámetros de entrada
id integer / string Order ID (integer) or External ID (if prefixed with @)
Formato de respuesta:
code integer Código del estado de respuesta 200
result Order
id integer Order ID
external_id string Order ID from the external system
store integer Store ID
status string Order status:
draft - order is not submitted for fulfillment
failed - order was submitted for fulfillment but was not accepted because of an error (problem with address, printfiles, charging, etc.)
pending - order has been submitted for fulfillment
canceled - order is canceled
onhold - order has encountered a problem during the fulfillment that needs to be resolved together with the Printful customer service
inprocess - order is being fulfilled and is no longer cancellable
partial - order is partially fulfilled (some items are shipped already, the rest will follow)
fulfilled - all items are shipped
shipping string Shipping method. Defaults to 'STANDARD'
created timestamp Time when the order was created
updated timestamp Time when the order was updated
recipient Address Shipping address
name string Full name
company string Company name
address1 string Address line 1
address2 string Address line 2
city string City
state_code string State code
state_name string State name
country_code string Country code
country_name string Country name
zip string ZIP/Postal code
phone string Phone
email string E-mail
items Item [ ] Array of items in the order
id integer Line item ID
external_id string Line item ID from the external system
variant_id integer Variant ID of the item ordered. See Products API
sync_variant_id integer Sync variant ID of the item ordered.
external_variant_id string External variant ID of the item ordered.
warehouse_product_variant_id integer Warehousing product variant ID of the item ordered. See Warehouse Products API
quantity integer Number of items ordered
price string Printful price of the item
retail_price string Original retail price of the item to be displayed on the packing slip
name string Display name of the item. If not given, a name from the Printful system will be displayed on the packing slip
product ProductVariant Short information about the Product and Variant
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 this product
id string Option ID
value mixed Option value
sku string Product identifier (SKU) from the external system
costs Costs Order costs (Printful prices)
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
retail_costs Costs Retail costs that are to be displayed on the packing slip for international shipments. Retail costs are used only if every item in order contains the retail_price attribute.
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
shipments Shipment [ ] Array of shipments already shipped for this order
id integer Shipment ID
carrier string Carrier name
service string Delivery service name
tracking_number string Shipment tracking number
tracking_url string Shipment tracking URL
created timestamp Shipping time
ship_date string Ship date
shipped_at int Ship time in unix timestamp
reshipment boolean Whether this is a reshipment
items ShipmentItem [ ] Array of items in this shipment
item_id integer Line item ID
quantity integer Quantity of items in this shipment
gift GiftData Optional gift message for the packing slip
subject string Gift message title
message string Gift message text
packing_slip PackingSlip Custom packing slip for this order
email string Customer service email
phone string Customer service phone. Should be formatted like this: 111-222-3333
message string Custom packing slip message
Clave API
id Order ID (integer) or External ID (if prefixed with @)
Ejecutar

Update order data

PUT https://api.printful.com/orders/{id}

Updates unsubmitted order and optionally submits it for the fulfillment.

Note that you need to post only the fields that need to be changed, not all required fields.

If items array is given in the update data, the items will be:
a) updated, if the update data contains the item id or external_id parameter that alreay exists
b) deleted, if the request doesn't contain the item with previously existing id
c) created as new if the id is not given or does not already exist

Parámetros de entrada
id integer Order ID (integer) or External ID (if prefixed with @)
confirm boolean Automatically submit the newly created order for fulfillment (skip the Draft phase)
Request body OrderInput Order data
external_id string Order ID from the external system
shipping string Shipping method. Defaults to 'STANDARD'
recipient Address Shipping address
name string Full name
company string Company name
address1 string Address line 1
address2 string Address line 2
city string City
state_code string State code
state_name string State name
country_code string Country code
country_name string Country name
zip string ZIP/Postal code
phone string Phone
email string E-mail
items Item [ ] Array of items in the order
id integer Line item ID
external_id string Line item ID from the external system
variant_id integer Variant ID of the item ordered. See Products API
sync_variant_id integer Sync variant ID of the item ordered.
external_variant_id string External variant ID of the item ordered.
warehouse_product_variant_id integer Warehousing product variant ID of the item ordered. See Warehouse Products API
quantity integer Number of items ordered
price string Printful price of the item
retail_price string Original retail price of the item to be displayed on the packing slip
name string Display name of the item. If not given, a name from the Printful system will be displayed on the packing slip
product ProductVariant Short information about the Product and Variant
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 this product
id string Option ID
value mixed Option value
sku string Product identifier (SKU) from the external system
retail_costs Costs Retail costs that are to be displayed on the packing slip for international shipments. Retail costs are used only if every item in order contains the retail_price attribute.
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
gift GiftData Optional gift message for the packing slip
subject string Gift message title
message string Gift message text
packing_slip PackingSlip Custom packing slip for this order
email string Customer service email
phone string Customer service phone. Should be formatted like this: 111-222-3333
message string Custom packing slip message
Formato de respuesta:
code integer Código del estado de respuesta 200
result Order
id integer Order ID
external_id string Order ID from the external system
store integer Store ID
status string Order status:
draft - order is not submitted for fulfillment
failed - order was submitted for fulfillment but was not accepted because of an error (problem with address, printfiles, charging, etc.)
pending - order has been submitted for fulfillment
canceled - order is canceled
onhold - order has encountered a problem during the fulfillment that needs to be resolved together with the Printful customer service
inprocess - order is being fulfilled and is no longer cancellable
partial - order is partially fulfilled (some items are shipped already, the rest will follow)
fulfilled - all items are shipped
shipping string Shipping method. Defaults to 'STANDARD'
created timestamp Time when the order was created
updated timestamp Time when the order was updated
recipient Address Shipping address
name string Full name
company string Company name
address1 string Address line 1
address2 string Address line 2
city string City
state_code string State code
state_name string State name
country_code string Country code
country_name string Country name
zip string ZIP/Postal code
phone string Phone
email string E-mail
items Item [ ] Array of items in the order
id integer Line item ID
external_id string Line item ID from the external system
variant_id integer Variant ID of the item ordered. See Products API
sync_variant_id integer Sync variant ID of the item ordered.
external_variant_id string External variant ID of the item ordered.
warehouse_product_variant_id integer Warehousing product variant ID of the item ordered. See Warehouse Products API
quantity integer Number of items ordered
price string Printful price of the item
retail_price string Original retail price of the item to be displayed on the packing slip
name string Display name of the item. If not given, a name from the Printful system will be displayed on the packing slip
product ProductVariant Short information about the Product and Variant
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 this product
id string Option ID
value mixed Option value
sku string Product identifier (SKU) from the external system
costs Costs Order costs (Printful prices)
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
retail_costs Costs Retail costs that are to be displayed on the packing slip for international shipments. Retail costs are used only if every item in order contains the retail_price attribute.
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
shipments Shipment [ ] Array of shipments already shipped for this order
id integer Shipment ID
carrier string Carrier name
service string Delivery service name
tracking_number string Shipment tracking number
tracking_url string Shipment tracking URL
created timestamp Shipping time
ship_date string Ship date
shipped_at int Ship time in unix timestamp
reshipment boolean Whether this is a reshipment
items ShipmentItem [ ] Array of items in this shipment
item_id integer Line item ID
quantity integer Quantity of items in this shipment
gift GiftData Optional gift message for the packing slip
subject string Gift message title
message string Gift message text
packing_slip PackingSlip Custom packing slip for this order
email string Customer service email
phone string Customer service phone. Should be formatted like this: 111-222-3333
message string Custom packing slip message
Clave API
id Order ID (integer) or External ID (if prefixed with @)
confirm Automatically submit the newly created order for fulfillment (skip the Draft phase)
Request body
Ejecutar

Confirm draft for fulfillment

POST https://api.printful.com/orders/{id}/confirm

Approves for fulfillment an order that was saved as a draft. Store owner's credit card is charged when the order is submitted for fulfillment.
Parámetros de entrada
id integer / string Order ID (integer) or External ID (if prefixed with @)
Formato de respuesta:
code integer Código del estado de respuesta 200
result Order
id integer Order ID
external_id string Order ID from the external system
store integer Store ID
status string Order status:
draft - order is not submitted for fulfillment
failed - order was submitted for fulfillment but was not accepted because of an error (problem with address, printfiles, charging, etc.)
pending - order has been submitted for fulfillment
canceled - order is canceled
onhold - order has encountered a problem during the fulfillment that needs to be resolved together with the Printful customer service
inprocess - order is being fulfilled and is no longer cancellable
partial - order is partially fulfilled (some items are shipped already, the rest will follow)
fulfilled - all items are shipped
shipping string Shipping method. Defaults to 'STANDARD'
created timestamp Time when the order was created
updated timestamp Time when the order was updated
recipient Address Shipping address
name string Full name
company string Company name
address1 string Address line 1
address2 string Address line 2
city string City
state_code string State code
state_name string State name
country_code string Country code
country_name string Country name
zip string ZIP/Postal code
phone string Phone
email string E-mail
items Item [ ] Array of items in the order
id integer Line item ID
external_id string Line item ID from the external system
variant_id integer Variant ID of the item ordered. See Products API
sync_variant_id integer Sync variant ID of the item ordered.
external_variant_id string External variant ID of the item ordered.
warehouse_product_variant_id integer Warehousing product variant ID of the item ordered. See Warehouse Products API
quantity integer Number of items ordered
price string Printful price of the item
retail_price string Original retail price of the item to be displayed on the packing slip
name string Display name of the item. If not given, a name from the Printful system will be displayed on the packing slip
product ProductVariant Short information about the Product and Variant
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 this product
id string Option ID
value mixed Option value
sku string Product identifier (SKU) from the external system
costs Costs Order costs (Printful prices)
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
retail_costs Costs Retail costs that are to be displayed on the packing slip for international shipments. Retail costs are used only if every item in order contains the retail_price attribute.
currency string 3 letter currency code
subtotal string Total cost of all items
discount string Discount sum
shipping string Shipping costs
digitization string Digitization costs
tax string Sum of taxes (not included in the item price)
vat string Sum of vat (not included in the item price)
total string Grand Total (subtotal-discount+tax+vat+shipping)
shipments Shipment [ ] Array of shipments already shipped for this order
id integer Shipment ID
carrier string Carrier name
service string Delivery service name
tracking_number string Shipment tracking number
tracking_url string Shipment tracking URL
created timestamp Shipping time
ship_date string Ship date
shipped_at int Ship time in unix timestamp
reshipment boolean Whether this is a reshipment
items ShipmentItem [ ] Array of items in this shipment
item_id integer Line item ID
quantity integer Quantity of items in this shipment
gift GiftData Optional gift message for the packing slip
subject string Gift message title
message string Gift message text
packing_slip PackingSlip Custom packing slip for this order
email string Customer service email
phone string Customer service phone. Should be formatted like this: 111-222-3333
message string Custom packing slip message
Clave API
id Order ID (integer) or External ID (if prefixed with @)
Ejecutar

¿Listo para probar Printful?