IMPORTANT: You need to set up Postman first, use this link to set up PDF.co for Postman.
In these guidelines, we will learn the basic process of generating barcodes or QR codes with PDF.co using Postman.
- Go to Collections Tab and Click on PDF.co API v.1 Folder
- Look for and Click on Barcode Generator Folder
- Click on POST /barcode/generate endpoint
- You May Opt to Send Request with cURL or by Postman
- Enter Desired Barcode Name on “Name” Key’s Value
- Set Barcode Input Parameters
- Click on Send Button
- Scroll Down and Make Sure that the Status is 200 OK
- Copy the URL and Paste to Browser to See the Generated Barcode
- Video Tutorial: How to Generate Barcodes with Postman
1. Go to Collections Tab and Click on PDF.co API v.1 Folder
First of all, go to Collections Tab and pick the API v.1 folder.
2. Look for and Click on Barcode Generator Folder
After accessing that folder, click on the following Barcode Generator folder.
3. Click on POST /barcode/generate endpoint
The next step would be to click on the endpoint named POST/barcode/generate.
4. You May Opt to Send Request with cURL or by Postman
Take a look at the cURL request you may use for the next step.
For cURL Option:
curl --location --request POST 'https://api.pdf.co/v1/barcode/generate' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{x-api-key}}' \
--data-raw '{
"name": "barcode.png",
"value": "abcdef123456",
"type": "QRCode",
"inline": false,
"decorationImage": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-generator/logo.png"
}'
For Postman Option: – Go to Body tab and select Form-Data
5. Enter Desired Barcode Name on “Name” Key’s Value
Now, it’s time to enter the appropriate Barcode Name and to proceed.
6. Set Barcode Input Parameters
Barcode Input parameters can be customized on this step.
- Enter your barcode value on value key
- Enter the barcode type on type value
- You can find the supported barcode types in column 3
7. Click on Send Button
At the next step, just click the button to send the information.
8. Scroll Down and Make Sure that the Status is 200 OK
It’s time to check if the status is OK (Status 200).
9. Copy the URL and Paste to Browser to See the Generated Barcode
To view your barcode, just copy and paste the URL into your browser.
NOTE: The PNG file is stored temporarily in the cloud and expires in an hour. Be sure to download/move it to permanent storage before the time elapse.