billing

GET /v1/invoices/{invoiceId}/pdf

Download the invoice or credit note as a PDF, in a chosen language.

จุดสิ้นสุด billing ทั้งหมด

การยืนยันตัวตน

ส่ง API key เป็น bearer token เอนด์พอยต์นี้ไม่ได้ระบุสิทธิ์การใช้งานเฉพาะในข้อกำหนด ดังนั้นควรให้คีย์ของคุณมีสิทธิ์น้อยที่สุดเท่าที่จำเป็นและให้ตรวจสอบจากการตอบกลับแทนที่จะคาดเดา

ปลายทางนี้ไม่ต้องใช้รหัสองค์กร คีย์ของคุณระบุองค์กรที่เป็นเจ้าของอยู่แล้ว และการตอบกลับจะถูกจำกัดขอบเขตไว้เฉพาะองค์กรนั้น

ทดลองใช้เลย

แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ

curl -X GET https://api.zinndigital.com/v1/invoices/{invoiceId}/pdf \
  -H "Authorization: Bearer zdk_live_…"

เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API

รายละเอียด

The rendered legal document (#708, `docs/34` §4.2) — server-side HTML→PDF, in all 58 locales including RTL, with embedded fonts covering Latin, Greek, Cyrillic, CJK, Arabic and Hebrew. Rendered from the invoice's **immutable snapshot**, never from live data: a customer who has since moved still sees the address that was on the document, because a re-render that updated it would be a different legal document under the same number. That is also what makes the render deterministic and the cache disposable. ⭐ **Labels translate; numbers, tax wording and the document identity do not.** The invoice number, the amounts and the dates keep their canonical form, and the **English document is the authoritative original** — a translated rendering is a copy of the same numbered document for the customer's convenience and says so in its footer. Answers a short-lived signed URL rather than the bytes, so a multi-megabyte document never transits the engine twice. ⛔ When no document bucket is configured in an environment the response is the **PDF itself** (`application/pdf`) rather than a refusal: the cache is an optimisation, and a customer must not be unable to download their own invoice because a bucket is missing.

พารามิเตอร์

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
invoiceId (path)Uuidใช่The billing document's id. This is the `Invoice`/`CreditNote` id — **not** the order's. It was the order's id while `/v1/invoices` projected orders (docs/34 §7); the projection…
locale (query)stringไม่ใช่Language to render in. Defaults to the account's own. A language this platform does not ship is a `422` rather than a silent fallback — and it is validated because the value rea…

การตอบกลับ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
urlstringใช่Minted per request and **never persisted** — it expires in minutes, so storing it in a list payload or a cache would hand a client a link that is already dead.
expires_atstringไม่ใช่
localestringใช่The language the document was rendered in.

ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้

401 · 403 · 404 · 422 · 429 · 503