Skip to content

Make a Printify product from a design

POST
/api/v1/printify/products
curl --request POST \
--url https://digize.com/api/v1/printify/products \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "title": "example", "description": "", "blueprintId": 1, "printProviderId": 1, "variants": [ { "id": 1, "price": 1 } ], "design": { "uploadId": "example", "position": "front", "x": 0.5, "y": 0.5, "scale": 1, "angle": 0 }, "importToStore": true }'

Makes a product in the connected Printify shop from a design in its library (printify.designs.upload): a product type and print provider from the catalog, the variants to sell with each one’s price in cents, and where the design goes on them, fitted inside the print area unless scale says otherwise. Printify renders the mockups. With importToStore (the default), it then comes into the store as a draft, so paid orders for it go to Printify; if that fails, the product is made all the same and importError says why.

Needs the commerce:write permission.

Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
title
required
string
>= 1 characters <= 200 characters
description

Plain text; paragraphs are kept.

string
"" <= 20000 characters
blueprintId
required

A blueprint id from printify.catalog.blueprints.

integer
> 0 <= 9007199254740991
printProviderId
required

A print provider id from printify.catalog.providers.

integer
> 0 <= 9007199254740991
variants
required
Array<object>
>= 1 items <= 200 items
object
id
required
integer
> 0 <= 9007199254740991
price
required

What it sells for, in the store currency’s minor unit (cents for dollars), as the store will price it. Printify keeps the same number as its own price.

integer
>= 1 <= 100000000
design
required
object
uploadId
required
string
>= 1 characters <= 64 characters
position
string
default: front >= 1 characters <= 40 characters
x
number
default: 0.5 <= 1
y
number
default: 0.5 <= 1
scale

The design’s width as a share of the print area’s width; 1 is as wide as the area. Left out, the design is fitted inside the print area whole.

number
> 0 <= 10
angle
number
0 >= -360 <= 360
importToStore
boolean
default: true

Done

Media typeapplication/json
object
printifyId
required

Printify’s id for the new product.

string
title
required
string
image
required

Its first mockup, on Printify; they take a moment to render.

string | null
variants
required
integer
>= -9007199254740991 <= 9007199254740991
priceFrom
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
priceTo
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
costFrom
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
costTo
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
productId
required

The store product it came in as, when importToStore was on.

string | null
importError
required

Why it didn’t come into the store, when importToStore was on: it’s made in Printify all the same, and printify.products.import brings it in.

string | null
skipped
required

Variants left out of the store past its 100.

integer
>= -9007199254740991 <= 9007199254740991

Example generated

{
"printifyId": "example",
"title": "example",
"image": "example",
"variants": 1,
"priceFrom": 1,
"priceTo": 1,
"costFrom": 1,
"costTo": 1,
"productId": "example",
"importError": "example",
"skipped": 1
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}