Administration
PDF generator
The pdf generator operations of the Core API.
Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.
| Method | Path | Operation |
|---|---|---|
| POST | /api/pdf/generate | Generate pdf from html |
Generate pdf from html
POST/api/pdf/generate
Access. Send a bearer token or an API key. Any signed-in member can call this operation.
Request body
Send JSON with the shape GeneratePdfFromHtmlCommand. Command to generate a PDF from HTML content
| Field | Type | Required | Description |
|---|---|---|---|
htmlContent | string | Yes | HTML content to convert to PDF |
fileName | string | No | Optional filename for the PDF (without extension) |
Response
200. Returns a SingleResult envelope. The data field is string.
curl -X POST "https://api.miridia.io/api/pdf/generate" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"htmlContent": "string",
"fileName": "string"
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": "string",
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}