How to place your first Prodigi API order
Tags
Interested in joining the world's leading print on demand platform?
The process of putting an order into our print network via our API (v4) can be summarised as:
- Acquire an API key
- Pick a product
- Source an image
- Submit order
Let's go through these steps and create an order for a 16x24" fine art print.
1. Acquire an API key
First, create an account. This will give you access to both our sandbox and live environments.
Your API Key can then be found in your dashboard at Settings > Integrations > API. Click "Show API Key" to reveal your X-API-Key
.
This key gives complete access to your API account so keep it private!
The key from dashboard.prodigi.com is your live API Key. For the purposes of testing, we strongly recommend using the sandbox environment. Read more about our environments in our API docs.
2. Pick a product
You can find a product on our site, by browsing the dashboard, by downloading our product catalogue, or, if you know roughly what you want and are just browsing for variants of a particular product, by using our lookup endpoints.
For this example order, we're using one of our more popular SKUs, a Global 16x24" fine art print: GLOBAL-FAP-16x24
.
Using the new v4 Product Details endpoint, we can find out everything we need to know about this SKU by sending a GET request to /v4.0/products/GLOBAL-FAP-16x24
:
{
"outcome": "Ok",
"product": {
"sku": "GLOBAL-FAP-16x24",
"description": "EMA, Enhanced Matte Art Paper, 200gsm, 40x60cm / 16x24\"",
"productDimensions": {
"width": 16.0000,
"height": 24.0000,
"units": "in"
},
"attributes": {},
"printAreas": {
"default": {
"required": true
}
},
"variants": [
{
"attributes": {},
"shipsTo": [
...
],
"printAreaSizes": {
"default": {
"horizontalResolution": 4800,
"verticalResolution": 7200
}
}
}
]
}
}
3. Source an image
The GLOBAL-FAP-16x24
measures 16x24 inches, and requires an equally large image asset to accompany it. Most of our products have a recommended DPI (dots per inch) of 300, so a 16x24" print requires a 4800x7200px file for the best print quality:
16" x 300px = 4800px
24" x 300px = 7200px
We accept jpg and png format images. For some products we may recommend one format over the other (e.g. apparel and device cases work best with png).
We require a full URL path to this image asset as part of creating the order, at either a public or a private signed URL.
We will download and retain a copy of your supplied image for 30 days in order to ensure smooth fulfillment, at which point the imagery will be automatically removed from our system. Read more about our image requirements and file retention in our API order process guide.
4. Place an order
Now that you have chosen a product and sourced an image, you can create the order by POSTing the data to /v4.0/orders/
.
The data should be in our Order object format:
curl "https://api.sandbox.prodigi.com/v4.0/Orders"
-X POST
-H "X-API-Key: your-rest-api-key"
-H "Content-Type: application/json"
-d '
{
"shippingMethod": "Budget",
"recipient": {
"address": {
"line1": "14 test place",
"line2": "test",
"postalOrZipCode": "12345",
"countryCode": "US",
"townOrCity": "somewhere",
"stateOrCounty": "somewhereelse"
},
"name": "John Testman",
"email": "jtestman@prodigi.com"
},
"items": [
{
"sku": "GLOBAL-FAP-16x24",
"copies": 1,
"sizing": "fillPrintArea",
"assets": [
{
"printArea": "default",
"url": "https://your-image-url/image.png"
}
]
}
]
}
This code example uses our sandbox environment, so the item will not be printed or shipped, and you will not be charged. If you were to submit an order to our live environment (at api.prodigi.com), we would then process your order, and send it to one of our global print labs for production and fulfillment.
Our API also includes order quotations, product information and order status endpoints. View our complete API documentation and how-to guides, or contact us for more information.