Print on Demand API Best Practices

In This Guide

We frequently work with print on demand companies that are building API integrations. Over the years, we’ve connected with hundreds of providers across many different platforms. That experience has given us a clear sense of what makes an API easy and pleasant to work with.

If you’re planning to build or improve a print on demand API, these are the best practices we recommend.

TIP:

If you’d like to go deeper, you can also check our full print on demand integration specifications here. It covers everything in this guide in more detail, plus additional requirements.

Authentication & Structure

Use a REST based API with API key authentication passed in the request headers. Keeping this standard and straightforward helps make integrations easier for developers.

Error Handling

Return error messages in a clean, flat JSON format.

Avoid deeply nested structures, and use HTTP status codes correctly and consistently. Clear, predictable errors save time for everyone.

Order Submission

Accept the entire order in a single submission rather than requiring multiple calls for different parts of the order. Also allow us to include our own order number along with an optional PO number.

Duplicate order numbers should be rejected to prevent accidental double orders.

Packing Slips

Accept a packing slip URL with each order so it can be printed and included with the shipment.

Shipping Options

Provide a predefined list of shipping method codes. We’ll handle the mapping on our end and send the correct code with each order. There should also be an option to include a third party shipping account number when needed.

Line Item Details

Each line item should allow passing, at least, the following data:

  • Quantity
  • A print file URL, which links to the artwork to be printed
  • A print SKU, which identifies the blank product the artwork will be printed on

Optional fields for size, color, and any other product variations are welcome too.

Order Status Notifications

Allow us to include a status notification webhook URL with each order. When there are order updates or shipment events, send a JSON POST request to that URL.

Shipment notifications should include at least the tracking number and carrier name so we can generate tracking links. Additional details such as shipping method, weight, cost, and ship date are helpful but optional.

If a webhook post fails, you can retry at increasing intervals.

Order Management Endpoints

Provide a cancellation endpoint so we can request that an order be canceled. Also include a separate status endpoint that allows us to manually pull the current order status and tracking details.

Need Help?

If you have any questions about any of the information in this guide, we’re here to help!

Click here to email Order Desk support.