Demo MYGA Endpoint
POST /api/pdf/DemoMYGA
Section titled “POST /api/pdf/DemoMYGA”Generate a PDF illustration for Multi-Year Guaranteed Annuity (MYGA) products.
Endpoint
Section titled “Endpoint”POST https://api.illustrata.com/api/pdf/DemoMYGAAuthentication
Section titled “Authentication”This endpoint requires Bearer token authentication. See Authentication for details.
Request Headers
Section titled “Request Headers”| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token (format: Bearer ill_xxx...) |
Content-Type | Yes | Must be application/json |
Request Body
Section titled “Request Body”{ "printIllustration": "yes", "annuiyInputData": { "Product": "Demo MYGA", "initamt": 100000, "State": "CA" }}Field Descriptions
Section titled “Field Descriptions”Top Level Fields
Section titled “Top Level Fields”| Field | Type | Required | Description |
|---|---|---|---|
printIllustration | string | Yes | "yes" for PDF output, "no" for JSON data |
annuiyInputData | object | Yes | Annuity configuration data |
Annuity Input Data Fields
Section titled “Annuity Input Data Fields”The annuiyInputData object accepts flexible fields that vary by product configuration. Common fields include:
| Field | Type | Description | Example |
|---|---|---|---|
Product | string | Product name | "Demo MYGA" |
initamt | number | Initial investment amount | 100000 |
State | string | US state code | "CA", "NY", "TX" |
Additional fields may be included based on your specific product requirements. The API accepts any valid JSON structure within annuiyInputData.
Response
Section titled “Response”Success Response (200 OK)
Section titled “Success Response (200 OK)”When printIllustration: "no"
Section titled “When printIllustration: "no"”Returns JSON data with illustration details.
When printIllustration: "yes"
Section titled “When printIllustration: "yes"”Returns a PDF file with headers:
Content-Type: application/pdfContent-Disposition: inline; filename=illustration_[timestamp].pdf
Error Responses
Section titled “Error Responses”Validation Error (400)
Section titled “Validation Error (400)”{ "error": "Validation error", "message": "printIllustration must be 'yes' or 'no'"}Authentication Error (401)
Section titled “Authentication Error (401)”{ "error": "Invalid or inactive API key", "message": "API key not found or expired"}Rate Limit Error (429)
Section titled “Rate Limit Error (429)”{ "error": "Rate limit exceeded", "message": "Too many requests. Please try again later."}Example Requests
Section titled “Example Requests”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" } }'JavaScript (Fetch)
Section titled “JavaScript (Fetch)”const response = await fetch("https://api.illustrata.com/api/pdf/DemoMYGA", { method: "POST", headers: { Authorization: "Bearer ill_your_api_key_here", "Content-Type": "application/json", }, body: JSON.stringify({ printIllustration: "yes", annuiyInputData: { Product: "Demo MYGA", initamt: 100000, State: "CA", }, }),});
if (response.ok) { const blob = await response.blob(); // Handle PDF blob}- The
printIllustrationfield must be exactly"yes"or"no" - State codes must be valid US state abbreviations
- The
annuiyInputDatastructure is flexible and depends on your product configuration - Rate limiting: 100 requests per 15-minute window by default