Miridia
Portal
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.

MethodPathOperation
POST/api/pdf/generateGenerate 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

FieldTypeRequiredDescription
htmlContentstringYesHTML content to convert to PDF
fileNamestringNoOptional filename for the PDF (without extension)

Response

200. Returns a SingleResult envelope. The data field is string.

Request
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"
}'
Response
{
  "message": "string",
  "messages": [
    {
      "title": "string",
      "message": "string",
      "level": "Standard",
      "icon": "SyncAlert",
      "code": "string"
    }
  ],
  "data": "string",
  "statusCode": "OK",
  "canRead": true,
  "canEdit": true,
  "canDelete": true
}