Preview — pending review
This reference is generated from the platform API contract and is still under review. Operations, fields, and descriptions can change before publication.
Download an invoice PDF from the subscription's Invoices tab
Streams the invoice document for one of the subscription's invoices ("Download invoice" in
the detail page's Invoices tab). The UI lists the subscription's invoices with a per-row
download button; this endpoint returns the rendered PDF for the invoice selected via the
invoiceId query parameter. The download does not mutate the invoice or the subscription —
the resulting state is identical for subsequent reads.
Validation: billingSubscriptionId must identify a subscription visible to the caller in
scopeId and invoiceId must reference an invoice belonging to that subscription (else 404
NOT_FOUND); the invoice must be in a downloadable state — the UI disables the button for
CANCELLED invoices, which have no document, so a CANCELLED invoice maps to 409 CONFLICT;
a missing invoiceId parameter maps to 422 VALIDATION_FAILED; the caller must hold at least
the reader or billing role (else 403).
Async & state: Synchronous read; no state change. The document is rendered (or fetched
from the archive) and streamed inline; no operation is created and no resource.updated SSE
frames are emitted.
Errors: 401 unauthenticated; 403 role lacks billing read access in this scope; 404
unknown subscription or invoice id; 409 invoice is CANCELLED and has no downloadable
document; 422 missing/malformed invoiceId; 500 document rendering or retrieval failure.
Idempotency/Concurrency: Safe, cacheable; no idempotency key required. Repeated
downloads return byte-identical documents for the same finalized invoice.
bearerTokenAuthorizationBearer <token>An API token (pc_live_…) or a service-account key (sak_live_…), created in Identity & Access Management and sent as Authorization: Bearer <token>. Requests are rate limited per credential and per tenant: every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, and a refused request gets 429 RATE_LIMITED with Retry-After.
scopeId*stringOpaque ownership+authorization scope resolving to tenant + subscription + project.
billingSubscriptionId*stringIdentifier of the account-level billing subscription.
invoiceId*stringIdentifier of the invoice (row in the Invoices tab) whose document is downloaded.
The invoice document as a binary PDF stream (Content-Disposition attachment named after the invoice number).
response?unknownapplication/pdfcurl -X GET "https://example.com/scopes/string/billing/subscriptions/string/download?invoiceId=string"null