Skip to content

Latest commit

 

History

History

prexview

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Description

Data from XML or JSON to PDF, HTML or Image

Example Request

  • Curl
curl -H "Authorization: {{token}}" \
  https://api.prexview.com/v1/transform \
  -F json="{\"hello\":\"World\"}" \
  -F template="template-name" \
  -F output="pdf" \
  -o result.pdf
  • Raw
POST /v1/transform HTTP/1.1
Host: api.prexview.com
Authorization: {{token}}
Content-Type: multipart/form-data; boundary=---abcd1234abcd1234abcd

---abcd1234abcd1234abcd
Content-Disposition: form-data; name="json"

{\"hello\":\"World\"}
---abcd1234abcd1234abcd
Content-Disposition: form-data; name="template"

template-name
---abcd1234abcd1234abcd
Content-Disposition: form-data; name="output"

pdf
---abcd1234abcd1234abcd--

Response

  • Success
Automatically download pdf
  • Error
{
    "error":{
        "name":"Error",
        "status":401,
        "message":"Authorization Required",
        "statusCode":401,
        "code":"AUTHORIZATION_REQUIRED"
    }
}

Regex

[a-zA-Z0-9]{64}

Example API key

BZyM5NrOFggEKScKxgXksF3nRHxTaJS8omSqcrE2oa7x7RekATlVYeJZ9BZGUrQd