Shopify PDF API for apps and backend workflows
Call gPdf from a Shopify app or backend workflow to generate order PDFs, invoices, packing slips, returns, and labels from mapped Shopify data.
/api/v1/pdf/render Use a Shopify app or ecommerce backend to map order, customer, product, fulfillment, and return data into gPdf JSON or template data, then return deterministic PDFs without claiming a native Shopify app-store integration.
When to use this API
- You are building a Shopify app, private backend, or fulfillment workflow that can call external APIs.
- Your app already receives Shopify order, fulfillment, customer, or product data.
- You need invoices, packing slips, return documents, warehouse labels, or PDF attachments.
- You want a stable template_id contract for merchant-specific document layouts.
What it does not replace
- You expect gPdf to be an official Shopify app or app-store listing.
- You need gPdf to install in a merchant store, handle OAuth, or subscribe to webhooks directly.
- You need shipping rates, postage purchase, inventory management, or merchant UI features from gPdf.
Which endpoint to call
/api/v1/pdf/render
JSON Render is the default path for this workflow.
/api/v1/template-render
Use this when the workflow needs the related API path, template contract, or capabilities lookup.
Minimal request
POST /api/v1/template-render - app backend sends mapped Shopify order data to a published template.
{
"template_id": "packing_list",
"data": [
{
"order_number": "#1042",
"customer_name": "Example Buyer",
"ship_to": "1200 Market St, San Francisco, CA",
"items": [
{ "sku": "TSHIRT-BLK-M", "name": "Black T-shirt", "quantity": 2 },
{ "sku": "MUG-WHT", "name": "White mug", "quantity": 1 }
]
}
]
}
What gPdf handles
- PDF rendering from Shopify-derived JSON mapped by your app backend.
- Template Render for merchant or brand-specific document layouts.
- Barcodes, QR codes, tables, totals, images, labels, and packing-slip structures.
- Stateless PDF generation through the public gPdf APIs.
What your system owns
- Shopify app code, OAuth, webhooks, merchant UI, and app-store distribution.
- Order, fulfillment, customer, return, product, and tax data mapping.
- Merchant configuration, template selection, delivery, storage, and retries.
Production checklist
- Keep Shopify credentials and gPdf API tokens in the backend, not browser code.
- Map Shopify data into an explicit render payload or template data schema.
- Use Template Render for merchant-specific layouts after approval.
- Store generated PDFs or source data according to the merchant workflow.
- Document that the integration is your app calling gPdf, not an official gPdf Shopify app.
Claim boundaries
- Do not claim a public official Shopify app unless it exists.
- gPdf does not run Shopify OAuth, app installation, webhooks, or merchant settings.
- The caller owns Shopify data mapping and ecommerce business rules.
Integration model
The clean Shopify integration model is backend-to-backend. Your app receives or fetches Shopify data, maps it into a gPdf DocumentRequest or template data object, calls gPdf, and returns or stores the PDF according to your merchant workflow.
This keeps the public claim accurate: gPdf is the PDF generation API your Shopify app can call. It is not a public official Shopify app unless that separate app product exists.
Template Render fits merchant layouts
Ecommerce PDFs often become merchant-specific: branding, item tables, return instructions, label blocks, gift notes, and localized text. Template Render lets your app keep those layouts in published templates while the app sends only the mapped order data.
Keep platform logic in the app
OAuth, webhooks, merchant settings, fulfillment state, inventory, return rules, and app-store distribution remain in your Shopify app. gPdf should receive the final render data and produce the PDF.
FAQ
- Is gPdf an official Shopify app?
- No. This page is for apps and backends that call gPdf. Do not present gPdf as an official Shopify app-store integration unless that product exists.
- Where should the gPdf API call happen?
- Call gPdf from your backend or app server, where Shopify credentials and gPdf API tokens are protected.
- Should Shopify PDFs use JSON Render or Template Render?
- Use JSON Render for custom generated layouts. Use Template Render when a merchant or brand layout is approved and callers should only send data.
- Does gPdf handle Shopify webhooks?
- No. Your app receives webhooks, maps the data, and decides when to render. gPdf only renders the PDF request it receives.