Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

Print Action Extension API

Requires the AdminPrintAction component.

The Print Action Extension API lets you build print action extensions that generate custom printable documents for orders, products, and other resources. Use this API to create branded labels, packing slips, custom invoices, or specialty documents.

  • Custom print documents: Generate custom printable documents like labels, invoices, or packing slips for orders and products.
  • Branded materials: Create branded shipping labels, return labels, or custom receipts.
  • Order documentation: Generate custom order documentation, pick lists, or fulfillment sheets.
  • Product labels: Create product labels with barcodes, pricing, or custom information.

The Print Action Extension API object provides properties for print action extensions that generate custom printable documents. Access the following properties on the API object to access selected resources and display picker dialogs for print configuration.

required

Provides methods for authenticating calls to your app backend. Use the idToken() method to retrieve a signed JWT token that verifies the current user's identity for secure server-side operations.

required

An array of currently viewed or selected resource identifiers. Use this to access the IDs of items to include in the print document, such as selected orders or products.

Anchor to extension
extension
{ target: ; }
required

The identifier of the running extension target. Use this to determine which target your extension is rendering in and conditionally adjust functionality or UI based on the extension context.

required

Utilities for translating content according to the current localization of the admin. Use these methods to provide translated strings that match the merchant's language preferences, ensuring your extension is accessible to a global audience.

Anchor to intents
intents
required

Provides information to the receiver of an intent. Use this to access data passed from other extensions or parts of the admin when your extension is launched through intent-based navigation.

Anchor to picker
picker
required

Opens a custom Picker API dialog for selecting from a list of custom options. Use this when you need merchants to choose print settings or document configurations.

Anchor to query
query
< = unknown, Variables = { [key: string]: unknown; }>(query: string, options?: { variables?: Variables; version?: Omit<, "2023-04">; }) => Promise<{ data?: ; errors?: []; }>
required

Executes GraphQL queries against the GraphQL Admin API. Use this to fetch shop data, manage resources, or perform mutations. Queries are automatically authenticated with the current user's permissions. Optionally specify GraphQL variables and API version for your query.

Anchor to resourcePicker
resourcePicker
required

Opens the Resource Picker API modal for selecting products, variants, or collections. Use this to let merchants choose additional resources to include in the print document.


  • Use @media print CSS for print-optimized styling: Apply print-specific styles with @media print queries to control page breaks, hide UI elements, and optimize for paper output. The print preview shows the screen styles until printing.
  • Set document MIME type correctly: Return Content-Type: application/pdf for PDFs, image/png for images, or text/html for HTML documents. Incorrect MIME types might trigger browser download instead of preview.
  • Test window.print() behavior: If generating HTML, then test that window.print() works correctly. Some CSS frameworks or scripts might interfere with browser print dialogs.

  • Print action extensions must return a URL string. You can't render the print UI directly within the extension or control the print preview appearance.
  • URLs must be publicly accessible with CORS headers allowing the Shopify admin origin. Authentication tokens in URLs can expire while merchants have the preview open.
  • Extensions don't have access to printer settings. You can't configure print options like page orientation, margins, or paper size. Merchants control these through browser print dialogs.

Was this page helpful?