Skip to main content

Developer Guide

Welcome to the Rynko Developer Guide! This guide provides comprehensive technical documentation for integrating Rynko into your applications.

What You'll Learn​

This developer guide covers everything you need to integrate Rynko programmatically:

Getting Started​

Advanced Features​

Integration​


Quick Example​

Here's a quick example to get you started with generating a PDF document:

const response = await fetch('https://api.rynko.dev/api/v1/documents/generate', {
method: 'POST',
headers: {
'Authorization': 'Bearer rd_sk_abc123xyz456...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
templateId: 'invoice-template',
format: 'pdf',
variables: {
invoiceNumber: 'INV-2025-001',
customerName: 'Acme Corporation',
lineItems: [
{ description: 'Consulting', quantity: 10, price: 100 },
{ description: 'Development', quantity: 5, price: 150 }
],
total: 1750.00
}
})
});

const data = await response.json();
console.log('Document ready:', data.downloadUrl);

Note: All documents are generated from templates. Templates are created via the Dashboard or API.


Base URL​

All API requests should be made to:

https://api.rynko.dev

Authentication​

Rynko uses API keys for authentication. Include your API key in the Authorization header:

curl https://api.rynko.dev/api/v1/documents/generate \
-H "Authorization: Bearer rd_sk_abc123xyz456..." \
-H "Content-Type: application/json" \
-d '{"templateId": "...", "format": "pdf", "variables": {...}}'

Learn more about Authentication →


Core Concepts​

Templates​

Templates are reusable document designs. They define:

  • Layout: How content is arranged (headers, sections, tables)
  • Variables: Placeholders for dynamic data ({{customerName}})
  • Formatting: Styles, fonts, colors
  • Format: PDF or Excel output

Document Generation​

Generate documents by:

  1. Providing a template ID
  2. Specifying the output format (pdf/xlsx)
  3. Passing variables to populate the template

Batch Processing​

For high-volume generation:

  1. Submit a batch request with multiple documents
  2. Receive a batch ID
  3. Poll for status or receive webhook notification
  4. Download generated documents

Language Examples​

The Rynko API is a standard REST API that works with any HTTP client. Here are examples in popular languages:

Node.js​

import { Rynko } from '@rynko/sdk';

const client = new Rynko({ apiKey: process.env.RYNKO_API_KEY });

const result = await client.documents.generate({
templateId: 'invoice-template',
format: 'pdf',
variables: {
invoiceNumber: 'INV-001',
customerName: 'Acme Corp'
}
});

Python​

from rynko import Rynko

client = Rynko(api_key=os.environ["RYNKO_API_KEY"])

result = client.documents.generate(
template_id="invoice-template",
format="pdf",
variables={
"invoiceNumber": "INV-001",
"customerName": "Acme Corp"
}
)

Java​

Rynko client = new Rynko(System.getenv("RYNKO_API_KEY"));

GenerateResult result = client.documents().generate(
GenerateRequest.builder()
.templateId("invoice-template")
.format("pdf")
.variable("invoiceNumber", "INV-001")
.variable("customerName", "Acme Corp")
.build()
);

cURL​

curl -X POST https://api.rynko.dev/api/v1/documents/generate \
-H "Authorization: Bearer rd_sk_..." \
-H "Content-Type: application/json" \
-d '{
"templateId": "invoice-template",
"format": "pdf",
"variables": {
"invoiceNumber": "INV-001",
"customerName": "Acme Corp"
}
}'

See specific endpoint documentation in the API Reference for detailed examples.


Getting Help​


Ready to integrate? → Start with Authentication