This is the most basic and simple way to use the transform service!
1
2
3
4
5
6
curl -H "Authorization: API_KEY" \
https://api.prexview.com/v1/transform \
-F json="<data.json" \
-F template="template-name" \
-F output="pdf" \
-o result.pdf
You can also use a string instead of a file with curl
1
-F json="{\"hello\":\"World\"}" \
This is the most basic and simple way to use the transform service!
1
2
3
4
5
6
curl -H "Authorization: API_KEY" \
https://api.prexview.com/v1/transform \
-F xml="<data.xml" \
-F template="template-name" \
-F output="pdf" \
-o result.pdf
You can also use a string instead of a file with curl
1
-F xml=" <hello>world</hello>" \
Options
Name
Required
Description
xml / json
Yes
Data to transform in XML or JSON format
output
Yes
Type of document that will be created by PrexView service, it must be html, pdf, png or jpg.
template
Yes
Template’s name to use for the document creation, you can use dynamic values.
templateBackup
No
Template’s name to use if the template option doesn’t exist
note
No
Custom note that can be used to add any information, it’s limit up to 500 chars. This is useful if you want to add metadata such as document, transaction or customer ID. You can use dynamic values.
Response headers
Name
Description
Content-Type
HTML
text/html; charset=utf-8
PDF
application/pdf
PNG
image/png
HTML
image/jpeg
Content-Length
Response content length
X-RateLimit-Limit
Transaction total limit
X-RateLimit-Remaining
Reamaining transactions
X-RateLimit-Reset
Remaining transaction will be reset at this unix timestamp
x-transaction-id
Transaction ID
HTTP Responses
Code
Name
Description
200
OK
Successful HTTP requests. The response will contain an entity corresponding to the requested resource.
400
Bad Request
The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax or size too large.)
In the response body will be the error details
1
2
3
4
5
6
{
"error": {
"message": "Error message...",
"statusCode": 400
}
}
404
Not Found
The requested resource could not be found but may be available in the future.
429
Too Many Requests
The user has sent too many requests in a given amount of time. Use X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset as reference.
500
Internal Server Error
An unexpected condition was encountered and no more specific message is suitable.
Dynamic values
You can use json sintax here to access data and have dynamic template names and notes