The view endpoint is used when a user wants to view or download a document.
Endpoint POST https://yourapp.com/view/:documentId
Body
Request body contains the information to know which user and account the file is requested by. Usually the config objects in body.config and body.userConfig.
Response
Respond with the actual PDF document, within 30 seconds. Upsales streams your response to the user's browser as it is, including your status code and headers, so send status 200, the header Content-Type: application/pdf and the PDF as the body. An error response reaches the user as is.