ReportingCloud

Document Processing

Topic

Merging templates with JSON data is the main task of ReportingCloud, but the Web API does more with documents. It converts documents between formats, combines several into one, replaces text, renders pages as images, manages the templates in your storage, checks spelling and works with tracked changes. Each of these tasks has its own guide below, with a curl request and the same call in an SDK.

How a Request Looks

Every endpoint is below https://api.reporting.cloud/v1/, and the Web API answers on HTTPS only. A request to convert a document looks like this:

curl "https://api.reporting.cloud/v1/document/convert?returnFormat=PDF" \
  -H "Authorization: ReportingCloud-APIKey $REPORTINGCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @document.json

The parts of every request:

  • The credentials in the Authorization header, an API key of your account or its user name and password. Authentication shows both forms.
  • Documents as Base64. Requests and responses are JSON. A document or a template is a Base64 string: the body is that string alone for endpoints that take one document, such as POST /v1/document/convert and POST /v1/document/thumbnails, and a JSON object with properties such as documents or template for POST /v1/document/append and POST /v1/document/findandreplace.
  • Options as query parameters, such as returnFormat=PDF or templateName=sample_invoice.tx.
  • Results as Base64. A created document comes back as a Base64 string in a JSON string, and the documents of a merge and page images as a JSON array of such strings. Endpoints that read information, such as the template list or the spell check, return it as JSON.

The SDKs for .NET, PHP, Java and Ruby wrap the same requests in a ReportingCloud class with a method for each endpoint they cover. The .NET, PHP and Java SDKs do the Base64 encoding and decoding for you; the Ruby SDK takes and returns Base64 strings. SDKs compares them.

Several endpoints count against a quota of your plan. Each successful request to merge, convert, append, findandreplace, removetrackedchange and the two thumbnails endpoints adds one document to the document quota. Spell checks and suggestions count against the spell checking quota, and each uploaded template against the template storage quota. Plans and Licensing lists the quotas, and Errors and Status Codes explains what happens when a quota is exceeded or a request takes longer than 60 seconds.

Find the Right Page

If you want toRead
Send your API key or user name and password with a requestAuthentication
Convert DOCX, HTML, PDF or RTF into another format, or extract plain textConverting Documents
Combine several documents into one, with a divider between themAppending Documents
Replace text placeholders in a template that has no merge fieldsFind and Replace
Render the pages of a document or a stored template as imagesThumbnails
Upload, list, download or delete templates, or read their merge fieldsManaging Templates
Show a document from your storage in the viewer widget of ReportingCloudSharing Documents
Check text for spelling errors and get suggestionsSpell Checking
Read, accept or reject the tracked changes of a documentTracked Changes
Find out why a request is refusedErrors and Status Codes
Create documents from a template and JSON dataMail Merge

Where to Start

  1. Authentication: send your API key with a first request.
  2. Converting Documents: send a document and decode the result.
  3. The page of the task you need, from the table above.

Every endpoint, with all parameters and responses, is listed in the Web API reference. A first merge with curl is the subject of the Getting Started tutorial Web API.

Pages in This Section

  • Authentication: send an API key or Basic credentials with every request, from curl and the SDKs.
  • Converting Documents: convert a document to PDF, DOCX, TXT and other formats with POST /v1/document/convert.
  • Appending Documents: combine documents with POST /v1/document/append and set the properties of the result.
  • Find and Replace: replace text pairs in a template with POST /v1/document/findandreplace.
  • Thumbnails: render page images with POST /v1/document/thumbnails and GET /v1/templates/thumbnails.
  • Managing Templates: upload, list, count, download and delete templates and read their structure with the templates endpoints.
  • Sharing Documents: show a document from your storage in a web page with GET /v1/document/share and the viewer widget.
  • Spell Checking: check spelling and get suggestions with the proofing endpoints.
  • Tracked Changes: list and remove tracked changes with the processing/review endpoints.
  • Errors and Status Codes: the status codes of the Web API, quota errors and the 60-second limit.