IMPORTANT: You need to setup Postman first, use this link to setup PDF.co for Postman.
Step 1 – Go to Collections Tab and click on PDF.co API v.1 folder
Step 2 – Look for and click on Document Parser folder
Step 3 – Click on POST /pdf/documentparser
Step 4 – Go to Body tab and select Form-Data
Step 5 – You can send a request with cURL
curl --location --request POST 'https://api.pdf.co/v1/pdf/documentparser' \
--header 'Content-Type: application/json' \
--header 'x-api-key: INSERT_YOUR_API_KEY_HERE' \
--data-raw '{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/sample-invoice.pdf",
"outputFormat": "JSON",
"templateId": "1",
"async": false,
"encrypt": "false",
"inline": "true",
"password": "",
"profiles": "",
"storeResult": false
}'
Step 6 – Or you can send it with Postman by setting the inline key to true to see the output in the response body and false to get the downloadable link. In this demo, we will set it to true.
Step 7 – Enter the invoice URL in the URL key’s value. To learn how to upload the invoice in the temporary storage click here
Note: You can create a custom template using the Document Parser Template Editor (Windows Only). Another great resource can be found in our Document Parser Video Tutorials here
Step 8 – The template id is set to 1 by default which is the Universal Invoice Parser template. It parses the invoice and extracts basic information.
Step 9 – Click on the Send button
Step 10 – Scroll down and make sure that the Status is 200 OK.
Step 11 – Scroll down to the body response to see the result
Step 12 – Click on the copy to clipboard icon on the left to copy the code and paste it to your favorite editor
Note: Set inline to false to get the downloadable JSON file result
NOTE: The JSON file is temporarily stored in the cloud and will expire in an hour. Be sure to download/move it to permanent storage.