Use Sensible’s asynchronous endpoints in production scenarios. You have two options for asynchronous processing:
This topic covers using URLs provided by Sensible. This is a good option if you can’t create either publicly accessible or pre-signed URLs for your documents.
For either option, you can get the results as soon as they’re ready by specifying a webhook.
See prerequisites.
Generate a temporary, one-time Sensible URL for a document:
*YOUR_API_KEY*
with your API key:Use the one-time URL you generated in the previous step to extract data from the document:
YOUR_UPLOAD_URL
with the upload_url
that you received as a response in the previous steps:Troubleshoot: Postman can automatically add authorization and content-type headers that cause errors:
content_type
body parameter in the request in step 1. In this case, it must be application/pdf
.tax_forms
document type you created in the Prerequisites section:Example document | Download link |
---|
200
:To retrieve the document extraction, you have two options:
/documents
endpoint. See the following steps.To retrieve the extraction results with the /documents
endpoint, take the following steps:
id
from that response.*YOUR_EXTRACTION_ID*
and *YOUR_API_KEY*
:parsed_document
object that looks something like the following:Use Sensible’s asynchronous endpoints in production scenarios. You have two options for asynchronous processing:
This topic covers using URLs provided by Sensible. This is a good option if you can’t create either publicly accessible or pre-signed URLs for your documents.
For either option, you can get the results as soon as they’re ready by specifying a webhook.
See prerequisites.
Generate a temporary, one-time Sensible URL for a document:
*YOUR_API_KEY*
with your API key:Use the one-time URL you generated in the previous step to extract data from the document:
YOUR_UPLOAD_URL
with the upload_url
that you received as a response in the previous steps:Troubleshoot: Postman can automatically add authorization and content-type headers that cause errors:
content_type
body parameter in the request in step 1. In this case, it must be application/pdf
.tax_forms
document type you created in the Prerequisites section:Example document | Download link |
---|
200
:To retrieve the document extraction, you have two options:
/documents
endpoint. See the following steps.To retrieve the extraction results with the /documents
endpoint, take the following steps:
id
from that response.*YOUR_EXTRACTION_ID*
and *YOUR_API_KEY*
:parsed_document
object that looks something like the following: