Quick Start
Quick Start Guide
Section titled “Quick Start Guide”Get up and running with the Illustrata API in just a few minutes.
Prerequisites
Section titled “Prerequisites”Before you begin, make sure you have:
- An API key (contact support to obtain one)
- A tool for making HTTP requests (cURL, Postman, or your programming language of choice)
Step 1: Test Your Connection
Section titled “Step 1: Test Your Connection”First, verify the API is accessible:
curl https://api.illustrata.com/healthYou should receive a response like:
{ "status": "ok"}Step 2: Generate a PDF Illustration
Section titled “Step 2: Generate a PDF Illustration”Option A: Get JSON Data
Section titled “Option A: Get JSON Data”To retrieve illustration data in JSON format:
curl -X POST https://api.illustrata.com/api/pdf/DemoMYGA \ -H "Authorization: Bearer ill_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{ "printIllustration": "no", "annuiyInputData": { "Product": "Demo MYGA", "initamt": 100000, "State": "CA" } }'Option B: Generate PDF Document
Section titled “Option B: Generate PDF Document”To receive a PDF file directly:
curl -X POST https://api.illustrata.com/api/pdf/DemoMYGA \ -H "Authorization: Bearer ill_your_api_key_here" \ -H "Content-Type: application/json" \ -o illustration.pdf \ -d '{ "printIllustration": "yes", "annuiyInputData": { "Product": "Demo MYGA", "initamt": 100000, "State": "CA" } }'Step 3: Understanding the Response
Section titled “Step 3: Understanding the Response”When printIllustration: "no" (JSON Response)
Section titled “When printIllustration: "no" (JSON Response)”The API returns illustration data in JSON format that can be processed programmatically.
When printIllustration: "yes" (PDF Response)
Section titled “When printIllustration: "yes" (PDF Response)”The API returns a PDF file directly with headers:
Content-Type: application/pdfContent-Disposition: inline; filename=illustration_[timestamp].pdf
Complete Example in Node.js
Section titled “Complete Example in Node.js”Here’s a complete example using Node.js:
const axios = require("axios");const fs = require("fs");
async function generateIllustration() { try { // Option 1: Get JSON data const jsonResponse = await axios.post( "https://api.illustrata.com/api/pdf/DemoMYGA", { printIllustration: "no", annuiyInputData: { Product: "Demo MYGA", initamt: 100000, State: "CA", }, }, { headers: { Authorization: `Bearer ${process.env.ILLUSTRATA_API_KEY}`, "Content-Type": "application/json", }, }, );
console.log("Illustration data:", jsonResponse.data);
// Option 2: Get PDF directly const pdfResponse = await axios.post( "https://api.illustrata.com/api/pdf/DemoMYGA", { printIllustration: "yes", annuiyInputData: { Product: "Demo MYGA", initamt: 100000, State: "CA", }, }, { headers: { Authorization: `Bearer ${process.env.ILLUSTRATA_API_KEY}`, "Content-Type": "application/json", }, responseType: "arraybuffer", }, );
// Save PDF to file fs.writeFileSync("illustration.pdf", pdfResponse.data); console.log("PDF saved as illustration.pdf"); } catch (error) { console.error("Error:", error.response?.data || error.message); }}
generateIllustration();Common Issues
Section titled “Common Issues”API Key Not Working
Section titled “API Key Not Working”- Verify your API key starts with
ill_ - Check if the key is active (not expired or revoked)
- Ensure you’re using the correct header name
Validation Errors
Section titled “Validation Errors”- Check that
initamtmeets minimum requirements - Verify
Stateis a valid US state code - Ensure
printIllustrationis exactly"yes"or"no"
Rate Limiting
Section titled “Rate Limiting”- Default: 100 requests per 15 minutes
- If exceeded, wait or contact support for higher limits
Next Steps
Section titled “Next Steps”Now that you’ve made your first API call:
- Explore the full API reference
- Learn about error handling
- Check out language-specific examples
- Review rate limiting guidelines
Need Help?
Section titled “Need Help?”- Check our API Reference for detailed endpoint documentation
- Contact support for API key issues
- Report bugs or request features through our support channel