> For the complete documentation index, see [llms.txt](https://help.orderdesk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.orderdesk.com/technical-documentation/api-and-integration-reference/print-on-demand-api-best-practices.md).

# Print on Demand API Best Practices

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.

{% hint style="info" icon="hand-back-point-right" %}
If you’d like to go deeper, you can also check our full [**print on demand integration specifications here.**](https://www.orderdesk.com/wp-content/uploads/2022/04/POD_Integration_Specification_v1.0.pdf) It covers everything in this guide in more detail, plus additional requirements.
{% endhint %}

## 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.orderdesk.com/technical-documentation/api-and-integration-reference/print-on-demand-api-best-practices.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
