Document Processing
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" \
"Authorization: ReportingCloud-APIKey $REPORTINGCLOUD_API_KEY" \
"Content-Type: application/json" \
@document.json
The parts of every request:
- The credentials in the
Authorizationheader, 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/convertandPOST /v1/document/thumbnails, and a JSON object with properties such asdocumentsortemplateforPOST /v1/document/appendandPOST /v1/document/findandreplace. - Options as query parameters, such as
returnFormat=PDFortemplateName=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 to | Read |
|---|---|
| Send your API key or user name and password with a request | Authentication |
| Convert DOCX, HTML, PDF or RTF into another format, or extract plain text | Converting Documents |
| Combine several documents into one, with a divider between them | Appending Documents |
| Replace text placeholders in a template that has no merge fields | Find and Replace |
| Render the pages of a document or a stored template as images | Thumbnails |
| Upload, list, download or delete templates, or read their merge fields | Managing Templates |
| Show a document from your storage in the viewer widget of ReportingCloud | Sharing Documents |
| Check text for spelling errors and get suggestions | Spell Checking |
| Read, accept or reject the tracked changes of a document | Tracked Changes |
| Find out why a request is refused | Errors and Status Codes |
| Create documents from a template and JSON data | Mail Merge |
Where to Start
- Authentication: send your API key with a first request.
- Converting Documents: send a document and decode the result.
- 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/appendand 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/thumbnailsandGET /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/shareand the viewer widget. - Spell Checking: check spelling and get suggestions with the proofing endpoints.
- Tracked Changes: list and remove tracked changes with the
processing/reviewendpoints. - Errors and Status Codes: the status codes of the Web API, quota errors and the 60-second limit.