---
title: "Idempotent print-job creation"
description: "Prevent duplicate physical prints when retrying CloudPrint print-job requests after a timeout or network failure."
---
<nav class="docs-breadcrumb" aria-label="Breadcrumb"><a href="/docs/">CloudPrint Documentation</a><span aria-hidden="true">/</span><span>API reference</span></nav>

# Idempotent print-job creation

<p class="docs-lead">Prevent duplicate physical prints when retrying CloudPrint print-job requests after a timeout or network failure.</p>

<div class="api-reference-actions"><span><strong>API version:</strong> v1</span><a href="/docs/api/v1/openapi.json">Download OpenAPI v1 JSON</a><a href="/docs/api/v1/explorer/">Open in the interactive API Explorer</a><a href="/docs/api/v1/idempotency/index.md">View as Markdown</a></div>

## Why printing needs idempotency

A timeout can happen after CloudPrint accepted the request but before your backend received the response. Creating a new job at that point can print the same label or document twice.

## Key design

Build a stable key from the business operation, such as `shipment-18451-label-v1`. Keep it opaque, at most 128 characters and identical for retries of the same payload. An intentional reprint is a new operation and needs a new key.

## Reuse rules

The same account, key and payload return the original result. Reusing the key with a different payload returns `409 Conflict`. Persist the key before the first request so a worker restart does not generate a replacement.

## Recovery after uncertainty

After a network failure, retry the same create request with the same key. Once a `print_job_id` is known, persist it and read job status instead of creating another job.

## Related documentation

<div class="docs-card-grid"><a class="docs-card" href="/docs/api/v1/print-jobs/create/"><strong>Create a print job</strong><span>Send an uploaded CloudPrint document to a selected printer with idempotency and explicit print options.</span></a>
<a class="docs-card" href="/docs/api/v1/errors/"><strong>CloudPrint API errors and retries</strong><span>Handle CloudPrint API status codes, machine-readable errors, rate limits, request tracing and safe retry decisions.</span></a>
<a class="docs-card" href="/docs/api/print-jobs/"><strong>Create and track CloudPrint print jobs</strong><span>Create idempotent print jobs, validate printer options and follow each job safely until it is printed or fails.</span></a></div>

<nav class="docs-resource-links" aria-label="Next steps"><a href="/docs/api/v1/explorer/">OpenAPI</a><a href="https://my.cloudprint.me">Open account</a><a href="/docs/legal/privacy/">Privacy Policy</a><a href="/docs/legal/terms/">Terms</a><a href="/docs/legal/payments-and-refunds/">Payment and refunds</a><a href="/docs/legal/data-processing/">DPA</a></nav>