Render won't work
trebestie opened this issue · 2 comments
trebestie commented
Can someone post a working CURL command to interact with a copy of the easy template provided by docking demo?
A simple
curl -v -X POST http://[ip:port]/api/v1/document-templates/[fullid]/pdfs -H 'Content-Type: application/json' -d {"name": "Myname" }
won't work.
I got no errors, the file is successfully rendered, but the pdf says
Error. Undefined variable $name
Thanks
sethsandaru commented
thanks @trebestie , checking
sethsandaru commented
Hey @trebestie , your payload is wrong, check out the payload here (doc: https://docking.shipsaas.tech/usage/endpoints#post-api-v1-document-templates-uuid-pdfs)
curl --location 'http://localhost:8888/api/v1/document-templates/9b57ad57-8f06-4127-a327-c1cec6a61111/pdfs' \
--header 'Content-Type: application/json' \
--data '{
"variables": {
"name": "Seth"
}
}'