Skip to content
Documentation menu

Getting Started

Quickstart

From a new account to your first PDF rendered through the API: connect, query, design, publish, render.

This guide takes you from a new account to an invoice PDF rendered through the API. You need an Oracle or PostgreSQL database you can reach and about fifteen minutes. The same steps apply to any other document: delivery notes, labels, certificates, reports.

  1. Create an account

    Create an account, open the verification link we email you, then sign in. Your workspace starts with a development environment, where you can experiment freely.

  2. Connect a database

    In Data sources, choose New data source, then Oracle (or PostgreSQL). Enter host, port and service name (the database name for PostgreSQL), and the credentials of a user that can read the tables your documents need. Use Test connection before saving.

    Oracle · recommended read-only user
    -- A dedicated, read-only user for PryntCREATE USER prynt_reader IDENTIFIED BY "<a strong password>";GRANT CREATE SESSION TO prynt_reader;GRANT SELECT ON erp.invoices      TO prynt_reader;GRANT SELECT ON erp.invoice_lines TO prynt_reader;GRANT SELECT ON erp.customers     TO prynt_reader;

    Credentials stay protected

    Passwords are encrypted at rest and never sent back to the browser. Datasets can only read: statements that modify data are refused.
  3. Create a template

    In Templates, choose New template, format Document (PDF), code invoice and page size A4. The code is how your application refers to the template, so keep it short and stable.

  4. Add a dataset

    Open the Dataset panel and write the query of the document. Every bind variable becomes a template parameter: here :invoiceId creates the parameter invoiceId. Give it a test value and run the query to see its fields.

    Dataset INVOICE
    SELECT i.invoice_no, i.issue_date, c.name AS customer_name,       l.description, l.quantity, l.amount  FROM erp.invoices i  JOIN erp.customers c      ON c.id = i.customer_id  JOIN erp.invoice_lines l  ON l.invoice_id = i.id WHERE i.id = :invoiceId ORDER BY l.line_no
  5. Design the layout

    Drag fields from the Data panel onto the page: header fields into the page header, line fields into a table in the body. Add totals, a logo and a barcode with the invoice number. Press F5 at any time for a real PDF preview with the test values.

  6. Publish

    Publish validates the template and creates version 1, which can no longer change. Your draft stays editable for the next version. Promote the version to the environment your application uses.

  7. Create an API key

    In Developers → API keys, create a key for the environment. The full key is shown once: store it as a secret in your application's configuration, never in browser code or in source control.

  8. Render the document

    Call the render endpoint with the template code and its parameters. The response body is the PDF.

    Terminal
    curl -X POST https://api.prynt.it/api/v1/render \  -H "Authorization: Bearer prynt_live_..." \  -H "Content-Type: application/json" \  -d '{    "template": "invoice",    "environment": "production",    "parameters": { "invoiceId": 18425 }  }' \  -o invoice-18425.pdf

    A successful call answers 200 OK with Content-Type: application/pdf. Failures answer with a problem document; see errors.

Next steps