> For the complete documentation index, see [llms.txt](https://docs.spectrumcustomizer.com/integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spectrumcustomizer.com/integration/api/webtoprint-w2p.md).

# WebToPrint (W2P)

The Spectrum [Web To Print API](#get-web-to-print-status) allows Spectrum clients or manufacturing partners to retrieve output files that can be used to create unique designs. The files that are returned by Spectrum differ from product to product, but are commonly high-resolution graphics files that are sized to specific dimensions and quality guidelines that were established when on-boarding the product. Spectrum prioritizes web to print requests based on the incoming date and the priority that is set on the order acknowledgement.

### **Flow**

The typical flow to create web to print files are as follows:

* An end user customizes a product using Spectrum web or app-based tools.
* The customization details are stored within Spectrum as a “RecipeSet” that contains one or more recipes.
* The user adds the item to the E-Commerce cart and purchases.
* Once the purchase is completed, the Spectrum client POSTs an [Order Acknowledgement API](/integration/ecommerce/order-acknowledgement.md) call to Spectrum.
* The [Order Acknowledgement](/integration/ecommerce/order-acknowledgement.md) will queue the item for creation of the print file. This process typically takes between 1-3 minutes depending on load.
* The [WebToPrint API](#get-web-to-print-status) route can be used to check status and/or retrieve web to print files.

## Get Web to Print Status

`GET` `https://api.spectrumcustomizer.com/api/webtoprint/:recipeSetReadableId`

It is assumed that once an order is acknowledged, the web to print process has begun creating the print files. As such, the Web to Print route can be considered as a status route to ensure that the files are ready. The route will start the web to print process if it has not been started previously, i.e. via order acknowledgement.

#### Path Parameters

| Name                  | Type   | Description                                                                                                                                  |
| --------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| recipeSetReadableId\* | string | 8 digit alphanumeric RecipeSet readable identifier. A RecipeSet UUID (GUID) is also accepted and will be transparently resolved to readable. |

#### 200

```
// Indicates a successful response. The body is the raw web-to-print output
// produced by the pipeline for the RecipeSet — typically a string (e.g. a URL
// or client-specific payload). 200 is only returned for clients that are not
// downloading files directly; most W2P flows use 303 (see below).
```

#### 202

<pre class="language-json"><code class="lang-json">// Indicates the request has been accepted for processing but is not yet complete.
<strong>// The exact text varies with internal queue state:
</strong>Web To Print for BJVYR44F is in the processing queue.
Web To Print for BJVYR44F was created and is queued for processing.
Web To Print for BJVYR44F is currently being processed.
Web To Print for BJVYR44F is currently on hold.
</code></pre>

#### 303

```
// Indicates valid web to print files are ready. The print file URI is returned
// via the Location header. The body text varies by sub-status:

HTTP/1.1 303 See Other
Location: https://cdn.spectrumcustomizer.com/assets/generated/recipeset/98RR5KP8/recipe/5FTHF782/enhanced/20210506202211059.png

Web To Print for ZELQN9Y3 successfully created. Result in location.
// or:
Web To Print for ZELQN9Y3 is in the delivery queue. Output in location.
```

#### 400

```
// The recipeSetReadableId / GUID is malformed or otherwise invalid. The body
// is a plain-text message describing the validation failure.
```

#### 401

```
// Lookup by readable ID is not permitted for this client/configuration.
// Empty body (standard ASP.NET Core Unauthorized result).
```

#### 403

<pre class="language-json"><code class="lang-json"><strong>// Forbidden indicates that the web to print request was received but has
</strong><strong>// been cancelled.
</strong>
<strong>Web To Print for BJVYR44F was cancelled.
</strong></code></pre>

#### 404

```
// Indicates that no entity matches the supplied identifier.
// Empty body (standard ASP.NET Core NotFound result).
```

#### 500

```javascript
// A server error occurred. An RFC 7807 ProblemDetails JSON document is returned;
// the `detail` field links to the log entry for further investigation.
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
    "title": "An error occurred while processing your request.",
    "status": 500,
    "detail": "Error in WebToPrintController RecipeSetAsync BJVYR44F https://api.spectrumcustomizer.com/logentry/detail/{logId}"
}
```

### **W2P Queue**

Spectrum uses web to print operations that translate the customization actions that a user performed on a recipe to high-quality output used in manufacturing. These operations are queued and processed in first in, first out based on the priority of the order in [order acknowledgement](/integration/ecommerce/order-acknowledgement.md). This means that there is no strict guarantee that an order will be processed immediately based on the number of items in the queue and processing availability.

Since backend operations are often complex and involve creating multiple high-quality outputs and specifications, it can take multiple seconds for each recipe processed to be completed in the queue. Spectrum will always favor providing adequate resources for user-facing operations which may result in delays for large orders containing many customized recipes or heavy traffic periods. In practice, orders are typically processed within minutes but can be up to one hour. To accommodate this, the web to print API exposes an endpoint that displays the status of the item in the queue and a result if it has been processed.


---

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

```
GET https://docs.spectrumcustomizer.com/integration/api/webtoprint-w2p.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
