FX Reports API


fxreports provides a server based API that allows you to work with your report data in PDF format.

The maximum number of requests is 25 per minute.

Required JSON Data Pairs

Name Description Example


Report template identifier

"templateID": "z0L0H00000XXxxx"


sObject from which the report is built



A valid access token from a bearer token request


A valid Salesforce login identifier

See id example.


Your org domain



Example 1. Using token
Example 2. Using id


The FXReports API provides several endpoints for working with PDFs.

App URL Example


Returns information about the template and the sObject.

To format output with a JSON query, you must have a JSON query tool installed for your operating system.


Review markup after handlebars syntax has been applied


See template with data loaded


Render the PDF file, such as to save locally

Token Request

A token is required to utilize the API.

Example 3. Token request, in curl
curl -X POST -F "grant_type=password" -F
-F "client_secret=1234567890123456789" -F "username=myuser@mydomain.com"
-F "password=xxxxxxxxx"

The resulting output would look something like:








Merge Endpoint

You can combine multiple items into one PDF file with the /merge endpoint.

Example 4. Endpoint, in curl:
curl -X POST -H "Content-Type: application/json" -d '{ "files":[{ "type": "image", "id":"00X1X000001X1xx"}, {"type":"image", "id":"00P1X000001X1xx"}, {"type":"attachment", "id":"00PS0000003Xx6x"}] "token":"XXXXXC5XAkYJ30XxXxnXXXXX7XxXxoV118xxx9avg5XX3u7xXXxXXoXxX.XXXXXnXXXxXX_G23xX9f9XX12Xxx.oT9xxxxxx", "id":"https://test.salesforce.com/id/00D1F000000X7x8XXX/0051F000002x8xxXXX", "instance":"https://xxxx-xxxxx-0000.xx00.my.salesforce.com"}' https://fxreports.herokuapp.com/merge > test.pdf