HTTP API

Download Generated Reports

Get your awesome documents with this simple HTTP API

Download the generated report

/render/{renderId}

Endpoint to retreive a generated document from a render ID, a unique identifier for rendered files.

Authentification header is not needed to call this API.

Response header

The Content-Disposition can be changed to "attachment;" if the query parameter ?download=true is added when calling the endpoint.

{
  // mime-type
  "Content-Type"         : "application/pdf",
  // Content-disposition with filename
  "Content-Disposition"  : "inline; filename="url-encoded-report-name.docx""
}

Response body

The report is deleted as soon as this endpoint is called
A second call with the same renderId always returns a 404 Error

On success, the file is returned.
On error, a JSON is returned with details of the problem.

Status Code Body
200 File stream
400 { "success" : false, "error" : "Invalid renderId"}
404 { "success" : false, "error" : "File not found"}

Curl Example

The command downloads the generated report into the file "FILENAME.pdf".

If an error occurs (status 4XX or 5XX), the error is also saved into the file. Each render ID can be downloaded only one time.

curl --location --request GET 'https://api.carbone.io/render/RENDER_ID' \
--header 'carbone-version: 4' \
-o 'FILENAME.pdf'