Apps और backend workflows के लिए Shopify PDF API
Shopify app या backend workflow से gPdf call करके mapped Shopify data से order PDFs, invoices, packing slips, returns और labels generate करें.
/api/v1/pdf/render Shopify app या ecommerce backend order, customer, product, fulfillment और return data को gPdf JSON या template data में map करे, फिर native Shopify app-store integration claim किए बिना deterministic PDFs return करे.
यह API कब इस्तेमाल करें
- आप Shopify app, private backend या fulfillment workflow बना रहे हैं जो external APIs call कर सकता है.
- आपकी app पहले से Shopify order, fulfillment, customer या product data receive करती है.
- आपको invoices, packing slips, return documents, warehouse labels या PDF attachments चाहिए.
- Merchant-specific document layouts के लिए stable template_id contract चाहिए.
यह क्या replace नहीं करता
- आप gPdf को official Shopify app या app-store listing मान रहे हैं.
- आपको merchant store में install, OAuth handle या webhooks पर direct subscribe करने के लिए gPdf चाहिए.
- आपको gPdf से shipping rates, postage purchase, inventory management या merchant UI features चाहिए.
कौन सा endpoint call करें
/api/v1/pdf/render
JSON Render इस workflow का default path है।
/api/v1/template-render
जब workflow को related API path, template contract या capabilities lookup चाहिए, तब इसका उपयोग करें।
Minimal request
POST /api/v1/template-render - app backend mapped Shopify order data को 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 }
]
}
]
}
gPdf क्या handle करता है
- आपके app backend द्वारा mapped Shopify-derived JSON से PDF rendering.
- Merchant या brand-specific document layouts के लिए Template Render.
- Barcodes, QR codes, tables, totals, images, labels और packing-slip structures.
- Public gPdf APIs से stateless PDF generation.
आपका system क्या संभालता है
- Shopify app code, OAuth, webhooks, merchant UI और app-store distribution.
- Order, fulfillment, customer, return, product और tax data mapping.
- Merchant configuration, template selection, delivery, storage और retries.
Production checklist
- Shopify credentials और gPdf API tokens backend में रखें, browser code में नहीं.
- Shopify data को explicit render payload या template data schema में map करें.
- Approval के बाद merchant-specific layouts के लिए Template Render use करें.
- Merchant workflow के अनुसार generated PDFs या source data store करें.
- Document करें कि integration आपकी app द्वारा gPdf call करना है, official gPdf Shopify app नहीं.
Claim boundaries
- जब तक public official Shopify app मौजूद न हो, ऐसा claim न करें.
- gPdf Shopify OAuth, app installation, webhooks या merchant settings run नहीं करता.
- Caller Shopify data mapping और ecommerce business rules own करता है.
Integration model
Clean Shopify integration model backend-to-backend है. आपकी app Shopify data receive या fetch करती है, उसे gPdf DocumentRequest या template data object में map करती है, gPdf call करती है, और merchant workflow के अनुसार PDF return या store करती है.
इससे public claim accurate रहता है: gPdf PDF generation API है जिसे आपकी Shopify app call कर सकती है. जब तक separate app product मौजूद न हो, यह public official Shopify app नहीं है.
Template Render merchant layouts में fit होता है
Ecommerce PDFs अक्सर merchant-specific हो जाते हैं: branding, item tables, return instructions, label blocks, gift notes और localized text. Template Render आपकी app को layouts published templates में रखने देता है, जबकि app सिर्फ mapped order data भेजती है.
Platform logic app में रखें
OAuth, webhooks, merchant settings, fulfillment state, inventory, return rules और app-store distribution आपकी Shopify app में रहते हैं. gPdf को final render data receive करना चाहिए और PDF produce करना चाहिए.
FAQ
- क्या gPdf official Shopify app है?
- नहीं. यह page उन apps और backends के लिए है जो gPdf call करते हैं. जब तक वह product मौजूद न हो, gPdf को official Shopify app-store integration की तरह present न करें.
- gPdf API call कहाँ होना चाहिए?
- gPdf को अपने backend या app server से call करें, जहाँ Shopify credentials और gPdf API tokens protected रहते हैं.
- Shopify PDFs JSON Render use करें या Template Render?
- Custom generated layouts के लिए JSON Render use करें. Merchant या brand layout approve होने और callers को सिर्फ data भेजना हो, तब Template Render use करें.
- क्या gPdf Shopify webhooks handle करता है?
- नहीं. आपकी app webhooks receive करती है, data map करती है और render कब करना है decide करती है. gPdf सिर्फ received PDF request render करता है.