How to get invoice info from URL for invoice parser API in PowerShell and PDF.co Web API

Follow this simple tutorial to learn get invoice info from URL to have invoice parser API in PowerShell

We regularly create and update our sample code library so you may quickly learn invoice parser API and the step-by-step process in PowerShell. PDF.co Web API was designed to assist invoice parser API in PowerShell. PDF.co Web API is the Rest API that provides set of data extraction functions, tools for documents manipulation, splitting and merging of pdf files. Includes built-in OCR, images recognition, can generate and read barcodes from images, scans and pdf.

The SDK samples displayed below below explain how to quickly make your application do invoice parser API in PowerShell with the help of PDF.co Web API. This sample code in PowerShell is all you need. Just copy-paste it to the code editor, then add a reference to PDF.co Web API and you are ready to try it! Use of PDF.co Web API in PowerShell is also described in the documentation given along with the product.

Trial version of ByteScout is available for free download from our website. This and other source code samples for PowerShell and other programming languages are available.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

GetInvoiceInfoFromUrl.ps1

      
# The authentication key (API Key). # Get your own by registering at https://app.pdf.co/documentation/api $API_KEY = "***********************************" # Direct URL of PDF file to get information $SourceFileURL = "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-json/sample.pdf" # Prepare URL for `Invoice Parser` API call $query = "https://api.pdf.co/v1/pdf/invoiceparser?url=$($SourceFileURL)&inline=True" $query = [System.Uri]::EscapeUriString($query) try { # Execute request $jsonResponse = Invoke-RestMethod -Method Get -Headers @{ "x-api-key" = $API_KEY } -Uri $query if ($jsonResponse.error -eq $false) { # Display PDF document information Write-Host $jsonResponse.body } else { # Display service reported error Write-Host $jsonResponse.message } } catch { # Display request error Write-Host $_.Exception }

run.bat

      
@echo off powershell -NoProfile -ExecutionPolicy Bypass -Command "& .\GetInvoiceInfoFromUrl.ps1" echo Script finished with errorlevel=%errorlevel% pause

VIDEO

ON-PREMISE OFFLINE SDK

Get 60 Day Free Trial

See also:

ON-DEMAND REST WEB API

Get Your API Key

See also:

Related Samples: