NOTE: Regimen PDFs previously available via the endpoint /regimens-pdf-report/ are now deprecated and no longer supported.
Generate PDF for Standard/Trait/Gene Reports
Make sure you have already uploaded the DNA file and generate the report prior to PDF generation of this report.
For example, if you want to generate a PDF for the DNA wellness report “Gum Disease” for a specific profile. Please make sure this report is already generated for this profile.
Send a POST request to /reports-pdf-report/ to trigger the pdf generation for this report and this profile. From the response of this request, you’ll get a request_id which will be used for the next step.
If you want the PDF to be white-labelled, please refer to this section.
Periodically call the endpoint GET /reports-pdf-report/ to query the status of generation. It’s recommended to call the endpoint every 8 seconds. Usually the PDF for report will be generated in 1 minute. In the first few calls, the endpoint will only respond with a “pending” status until the PDF is generated. The endpoint will respond with a “success” status and the URL to download the PDF file when the PDF has been generated.
.
White-Label the PDF
This is to make the generated PDF have a specific company logo, company name, professional name, website, email, phone and address. All of these fields are optional.
In the POST request to /report-pdf-report/ or /labs-pdf-report/ or /regimens-pdf-report/ to trigger the generation of PDF, white-labelling can be enabled by setting white_labelled to true with the company_profile information.
Please host the logo publicly on your side and our system will pull that logo when generating the PDF. The file format supported are jpg, png, and svg.
Here is an example:
{
"white_labelled": true,
"company_profile": {
"logo": "http://example.domain/example.jpg", //URL of the logo image or blank(no logo)
"company_name": "Example Company Name",
"professional_name": "Test Professional Name",
"website": "https://www.test.com",
"email": "[email protected]",
"phone": "12341234",
"address": ""
},
... other fields
}
