PDF generator example
A practical read-only integration for generating client profile PDFs.
Scenario
You are building PDF Creator, a partner product that generates branded client profile PDFs for brokers and developers.
Requested scopes
organization:read
client:read
property:read
media:readUser journey
- Create PDF Creator in Partners.
- Submit it for Qentrah review.
- After approval, workspace admins see PDF Creator in Workspace Integrations.
- The admin clicks Visit Partner and lands on your product.
- Your product shows Authorize with Qentrah.
- After consent, your backend calls Workspace APIs and builds the PDF from authorized organization data.
Backend sketch
export async function generateClientProfilePdf(input: {
organizationId: string;
clientId: string;
accessToken: string;
}) {
const client = await fetch(
`${process.env.QENTRAH_WORKSPACE_API_URL}/api/v1/partner/organizations/${input.organizationId}/clients/${input.clientId}`,
{ headers: { authorization: `Bearer ${input.accessToken}` } },
);
if (!client.ok) throw new Error(await client.text());
const data = await client.json();
return renderPdf(data);
}