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 Barcode Generator folder
Step 3 – Click on POST /barcode/generate endpoint
Step 4 – You can send request with cURL
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"
}'
Step 5 – Or you can send it with Postman by going to Body tab and select Form-Data
Step 6 – Enter your desired barcode name on name key’s value
Step 7 – Enter your barcode value on value key
Step 8 – Enter the barcode type on type value
Step 9 – You can find the supported barcode types in column 3
Step 10 – Click on Send button
Step 11 – Scroll down and make sure that the Status is 200 OK.
Step 12 – Copy the URL and paste it in your browser’s address bar to see the generated barcode
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.