IMPORTANT: You need to setup Postman first, use this link to setup PDF.co for Postman.
- Open PDF.co API v.1
- Select Document Parser
- Select Form-Data
- Send Request with cURL or with Postman
- Input Invoice URL
- Send and Check Status
- See Result
- Copy and Paste Code to Editor
- Video Tutorial: Document Parser with Postman & PDF.co
In this tutorial, we will use this sample PDF Invoice as our source file.
Image of the sample PDF Invoice source file
Step 1: Open PDF.co API v.1
Go to Collections Tab and click on PDF.co API v.1 folder
Step 2: Select Document Parser
2a.Look for and click on Document Parser folder
2b. Click on POST /pdf/documentparser
Step 3: Select Form-Data
–
Go to Body tab and select Form-Data
Step 4: Send Request with cURL or with Postman
Option 1: You can send the 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
}'
Option 2: 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 5: Input Invoice URL
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
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 6: Send and Check Status
6a. Click on the Send button
6b. Scroll down and make sure that the Status is 200 OK.
Step 7: See Result
Scroll down to the body response to see the result
Step 8: Copy and Paste Code to Editor
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.
Image of the JSON Output