Skip to content

Print Diagnostics

Feature code: SAC::PRINT-DX

Print Diagnostics provides API-level capabilities for troubleshooting and inspecting print operations. These features are designed for Charlie Supportson — Arda’s Customer Support team — who needs to investigate print-related issues without requiring backend log access or AWS expertise.

All diagnostic capabilities are expressed through the existing print API endpoints (no new endpoints required). They are activated via query parameters on existing print requests.


The live-print parameter controls whether Documint treats the request as a production render or a test render:

ValueBehavior
trueProduction rendering. Counts against the Documint service quota. Produces final output without watermarks.
falseTest rendering. Does not count against quota. Produces output with a watermark overlay.

This parameter exists on all print endpoints. The frontend always sends live-print=true for user-initiated prints. Support teams can set live-print=false when reproducing print issues to avoid consuming quota.

IDRequirement
SAC::PRINT-DX::FR-0001All print endpoints shall accept a live-print query parameter (boolean, default: true).
SAC::PRINT-DX::FR-0002When live-print=false, the Documint request shall be sent in test/preview mode. The resulting PDF shall contain a watermark and shall not count against the service quota.

When troubleshooting a print issue, the support team needs to see the exact JSON payload that was (or would be) sent to Documint — the template ID used, the field values mapped, and the grid layout constructed. Currently this information is only available in CloudWatch logs.

The print API will accept a debug parameter that includes the constructed Documint payload in the API response, alongside the normal print result.

IDRequirement
SAC::PRINT-DX::FR-0003All print endpoints shall accept a debug query parameter (boolean, default: false).
SAC::PRINT-DX::FR-0004When debug=true, the API response shall include the Documint payload (template ID, grid JSON, and template configuration) in addition to the normal result (PDF URL or error).
SAC::PRINT-DX::FR-0005The debug payload shall be included regardless of whether the Documint rendering succeeds or fails. On failure, both the error and the payload that caused the failure shall be returned.

A dry-run mode constructs and returns the Documint payload without actually calling the Documint API. This allows the support team to inspect what would be sent without triggering any rendering — useful for verifying field mappings, template resolution, and payload structure before committing to a render.

IDRequirement
SAC::PRINT-DX::FR-0006All print endpoints shall accept a dry-run query parameter (boolean, default: false).
SAC::PRINT-DX::FR-0007When dry-run=true, the system shall construct the full Documint payload (template resolution, field mapping, grid layout) but shall not call the Documint API.
SAC::PRINT-DX::FR-0008The dry-run response shall include: the resolved template ID, template configuration, the constructed grid payload, and the list of items included in each template group (for multi-template requests).
SAC::PRINT-DX::FR-0009Dry-run requests shall not update print status, record print events, or have any side effects on the system state.

The diagnostic parameters can be combined:

live-printdebugdry-runBehavior
truefalsefalseNormal production print (default)
falsefalsefalseTest print with watermark
truetruefalseProduction print + payload in response
falsetruefalseTest print + payload in response
anyanytrueNo Documint call; payload returned; live-print is ignored
IDRequirement
SAC::PRINT-DX::FR-0010When dry-run=true, the live-print parameter shall have no effect (no Documint call is made).
SAC::PRINT-DX::FR-0011When dry-run=true, the debug parameter shall have no effect (the payload is always returned in dry-run mode).

AspectDetail
Feature codeSAC::PRINT-DX
RequirementsSAC::PRINT-DX::FR-0001 through SAC::PRINT-DX::FR-0011
Use casesSAC::PRINT-DX::0001 (4 scenarios)
PersonaCharlie Supportson (Customer Support Specialist)
Parent featurePrinting (SAC::PRINT)
GitHub tickets#762, #792