Skip to main content
Version: Next

Create report

POST https://api.deckpilot.io/create

Request body

  • themeId - ID of a theme applied to generated report. You can set up and find your theme in Deckpilot app
  • pages - content to be generated inside a report, array of Page objects

Example

Example request
{
"themeId": "c781100c-0602-4d75-8121-1ab34c7a7652",
"pages": [
{
"title": "App Downloads Report",
"charts": [
{
"id": "pie",
"title": "App Downloads by Country",
"data": [
{
"category": "Croatia",
"value": 60
},
{
"category": "Slovenia",
"value": 40
},
]
},
{
"id": "simpleBar",
"title": "Downloads Jan - June 2024",
"data": [
{
"label": "January",
"value": 44
},
{
"label": "February",
"value": 40
},
{
"label": "March",
"value": 49
},
{
"label": "April",
"value": 49
},
{
"label": "May",
"value": 59
},
{
"label": "June",
"value": 55
}
]
}
]
}
]
}

Response

A binary stream representing the PDF document (Content-Type: application/pdf).

Alt text

Page

  • title - page title displayed in upper left corner of a page
  • charts - array of Chart objects (max. 2 per page)