Introduction

Web software developer - do not waste your time on searching online printout designers and printer – we have it all! It works conveniently in your Internet browser. You or your client can design or change the printout and issue it in html or in PDF format. All this can be done with the help of a simple user interface. Check out API and integrate it today.

User Authentication

Current version of our API uses your account apikey for authentication and it must be given in every request. All request must be done over SSL. To acquire personal apikey, please sign up here.

Error Codes

Errors are returned using HTTP error code syntax. All additional info about error is sent JSON-formatted in response body.
Sample error response
{ "success": false, "error": "Authentication failed: no apikey specified" }
Code Description
400 The request cannot be fulfilled due to bad syntax.
401 Unauthorized request. Use when authentication is required and has failed.
403 Provided credentials were successfully authenticated but that the credentials still do not grant the client permission to access the resource.
404 The requested resource could not be found.
405 A request was made of a resource using a request method not supported by that resource.

API Reference

https://actualreports.com/Api/
0.4

/Editor

Editor related calls

/Editor/access

https://actualreports.com/Api/Editor/access
POST
Opens editor for user with given email
  • apikeyrequiredApi key.
  • emailrequiredUser email who's account is accessed.
  • templateoptionalTemplate identificator retrived using /User/getTemplates.
  • dataoptionalA list of items given as string, url or file upload in supported format. Expects always an array. JSON example: [{"name": "Test1"}, {"name": "Test2"}].
  • dataformatoptionalFormat of dataset, defaults to json. Valid values are json and csv (Semicolon separated) and csv; (Semicolon separated) and csv, (Comma separated) and xls (Microsoft Excel 2007 and older) and xlsx (Microsoft Excel).

/Editor/pdf

https://actualreports.com/Api/Editor/pdf
POST
Opend pdf download dialog
  • apikeyrequiredApi key.
  • emailrequiredUser email who's account is accessed.
  • templaterequiredTemplate identificator retrived using /User/getTemplates.
  • datarequiredA list of items given as string, url or file upload in supported format. Expects always an array. JSON example: [{"name": "Test1"}, {"name": "Test2"}].
  • dataformatoptionalFormat of dataset, defaults to json. Valid values are json and csv (Semicolon separated) and csv; (Semicolon separated) and csv, (Comma separated) and xls (Microsoft Excel 2007 and older) and xlsx (Microsoft Excel).
  • formatoptionalOverwrites page format. Defaults to A4 If value is set to letter, then each page in output is separate label. Valid values are A4 and letter and label.
  • unitoptionalOverwrites tempalte unit. Defaults to in. Valid values are in (inch) and cm (centimetre).
  • orientationoptionalOverwrites tempalte orientation. Defaults to P. Valid values are P (portrait) and L (landscape).
  • outputoptionalOutput type. Defaults to D. Valid values are D (send to the browser and force a file download) and I (send the file inline to the browser) and S (return the document as a string) and E (return the document as base64 mime multi-part email attachment (RFC 2045)).

/User

User related calls

/User/getTemplates

https://actualreports.com/Api/User/getTemplates
GET
Returns user templates
  • apikeyrequiredApi key.
  • emailrequiredUser email who's account is accessed.
  • filteroptionalFilter templates by access rights. Accepts comma separated string with access rights. Example private,organization. Valid values are private (Private templates) and organization (Organization templates) and public (Public templates).
Returns key-value pairs, where key is the unique identificator and value is the name of template
Sample response
{ "success": true, "response": { "1339882251": "Epic label", "1339948278": "Small label", "1340229807": "test", "1340229967": "Test 2", "1340230031": "test 3", "1340230168": "test 5" } }

Examples

PHP

<?php $url = "https://actualreports.com/Api/Editor/pdf"; $parameters = array( "apikey" => "demoaccount", "email" => "demo@actualreports.com", "template" => "1358009426", "data" => json_encode(array( array( "name" => "Test product", "code" => "T1232312", "price" => "55", "discount" => "30", "description" => "Lorem ipsum dolor sit amet, consectetur adipiscing elit" ) )), "output" => "S" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters); curl_exec($ch); $pdfString = curl_multi_getcontent($ch); curl_close($ch); header("Content-type: application/pdf"); echo $pdfString; ?>