---
title: "Generate PDF url"
method: POST
path: "/sales/pdfUrl"
tags: ["Sales"]
---

# Generate PDF url

`POST /sales/pdfUrl`

## Request

- Base URL: `https://api.altera.co`
- URL: `https://api.altera.co/sales/pdfUrl`
- Auth: API key in header `Authorization`

Returns a pre-signed PDF URL for one invoice, valid for 5 minutes. A company-owned PDF still being generated returns 409 PDF_NOT_READY with Retry-After: 2; retry within a bounded budget. Invalid or unavailable invoice selection returns 400. Pending PDF requests do not change status. A successful request changes an ISSUED sales document, including a pro forma, to SENT even if the URL is never downloaded. DRAFT remains DRAFT. SENT is not proof of email delivery.

## Request body

- object
  - `invoiceId` integer, required

## Response `200`

OK

- object
  - `result` 'OK'
  - `data` string: Pre-signed invoice PDF download URL, valid for 5 minutes.

## Other responses

- `400`: Bad Request
- `401`: KEY_EXPIRED: a verified API key has expired. This requires that the company still has OpenAPI access. Unknown/invalid keys can receive the gateway 403.
- `409`: The invoice PDF is still being generated. Wait at least 2 seconds before retrying within a bounded budget.

## Changes

- **2026-10-12** `45544bcb4e8a`: 2 breaking, 1 warning, 3 info
  - request body became required
  - the request property `invoiceId` became required
  - the `invoiceId` request property's min was set to `1.00`
  - added the non-success response with the status `400`
  - …2 more
- **2024-08-26** `64c683372c45`: 1 info
  - endpoint added
- **2024-08-26** `a2d864f3a8db`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/altera-co/apis/altera-api/changes/sales/pdfUrl/post.md)

---

[API](https://skmtc.dev/altera-co/apis/altera-api.md) - [All operations](https://skmtc.dev/altera-co/apis/altera-api/llms.txt) - [OpenAPI document](https://skmtc.dev/altera-co/apis/altera-api/revisions/45544bcb4e8a?raw)
