DocDigitizer PowerShell Module
Commands Reference
Available Commands
| Command | Description |
|---|---|
Send-DocDigitizerDocument |
Send a PDF document for processing |
Test-DocDigitizerConnection |
Test API connectivity |
Get-DocDigitizerConfig |
View current configuration |
Set-DocDigitizerConfig |
Set default configuration values |
Get-DocDigitizerHelp |
Show help and usage examples |
Additional Reference
- Raw HTTP API Reference – For direct API calls without PowerShell
- Error Troubleshooting – Common errors and solutions
Send-DocDigitizerDocument
Sends a PDF document to the DocDigitizer API for OCR, classification, and data extraction.
Syntax
Send-DocDigitizerDocument
-FilePath <string>
[-DocumentId <guid>]
[-ContextId <guid>]
[-Pipeline <string>]
[-LogLevel <string>]
[-BaseUrl <string>]
[-TimeoutSec <int>]
[-SaveExtraction]
[-OutputPath <string>]
[-Depth <int>]
Parameters
| Parameter | Required | Description |
|---|---|---|
-FilePath |
Yes | Path to the PDF file to process. Accepts pipeline input. |
-DocumentId |
No | Unique identifier for the document (GUID). Auto-generated if not provided. |
-ContextId |
No | Context identifier for grouping related documents (GUID). Auto-generated if not provided. |
-Pipeline |
No | Name of the pipeline to execute (e.g., MainPipelineWithOCR, MainPipelineWithFile). |
-LogLevel |
No | Response verbosity: Minimal, Medium, or Full. |
-BaseUrl |
No | Override the default API URL. |
-TimeoutSec |
No | Request timeout in seconds. Default: 300. |
-SaveExtraction |
No | Save result to {filename}_extraction.json in the same directory. |
-OutputPath |
No | Custom path to save the JSON result. |
-Depth |
No | JSON serialization depth. Default: 20. |
Output
Returns a JSON string containing:
{
"traceId": "ABC1234",
"state": "PROCESSINGX",
"pipeline": "MainPipelineWithOCR",
"pageCount": 3,
"filePath": "C:\\docs\\invoice.pdf",
"documentId": "a1b2c3d4-...",
"contextId": "e5f6g7h8-...",
"output": {
"extractions": [...]
},
"timers": {
"DocIngester_Total": 1234.56,
"DocWorker_Total": 1200.00
}
}
Test-DocDigitizerConnection
Tests the connection to the DocDigitizer API.
Syntax
Test-DocDigitizerConnection
[-BaseUrl <string>]
[-Quiet]
Parameters
| Parameter | Required | Description |
|---|---|---|
-BaseUrl |
No | Override the default API URL. |
-Quiet |
No | Returns only $true or $false instead of detailed status. |
Output
Url : https://apix.docdigitizer.com/sync
Connected : True
Response : I am alive
Error :
Latency : 45
Get-DocDigitizerConfig
Displays the current configuration values for the DocDigitizer module.
Syntax
Get-DocDigitizerConfig
Output
BaseUrl : https://apix.docdigitizer.com/sync
BaseUrlSource : Default
Pipeline : (not set - will use server default)
PipelineSource : Default
LogLevel : (not set - will use Minimal)
LogLevelSource : Default
Timeout : 300
TimeoutSource : Default
Set-DocDigitizerConfig
Sets default configuration values for the DocDigitizer module.
Syntax
Set-DocDigitizerConfig
[-ApiKey <string>]
[-BaseUrl <string>]
[-Pipeline <string>]
[-LogLevel <string>]
[-Timeout <int>]
[-Persist]
Parameters
| Parameter | Required | Description |
|---|---|---|
-ApiKey |
No | Your DocDigitizer API key. Get one at docdigitizer.com/contact |
-BaseUrl |
No | Default base URL for the API. |
-Pipeline |
No | Default pipeline name. |
-LogLevel |
No | Default log level: Minimal, Medium, or Full. |
-Timeout |
No | Default timeout in seconds (10-3600). |
-Persist |
No | Save configuration to PowerShell profile for future sessions. |
Get-DocDigitizerHelp
Displays help information and usage examples for the module.
Syntax
Get-DocDigitizerHelp
Raw HTTP API Reference
If you need to call the API directly (without PowerShell), here’s the specification:
Endpoint
POST https://apix.docdigitizer.com/sync
Content-Type
multipart/form-data
Important: Do NOT use application/json. The API requires multipart form data.
Required Form Fields
| Field | Type | Description |
|---|---|---|
files |
File | The PDF file to process |
id |
String | Document GUID (e.g., 550e8400-e29b-41d4-a716-446655440000) |
contextID |
String | Context GUID for grouping related documents |
HTTP Headers
| Header | Required | Description |
|---|---|---|
x-api-key |
Yes | Your API key (lowercase header name) |
X-DD-Pipeline |
No | Pipeline name (e.g., MainPipelineWithOCR) |
X-DD-LogLevel |
No | Response verbosity: Minimal, Medium, or Full |
Example cURL Request
curl -X POST https://apix.docdigitizer.com/sync \
-H "x-api-key: your-api-key-here" \
-H "X-DD-Pipeline: MainPipelineWithOCR" \
-F "files=@invoice.pdf" \
-F "id=550e8400-e29b-41d4-a716-446655440000" \
-F "contextID=660e8400-e29b-41d4-a716-446655440001"
Error Troubleshooting
401 Unauthorized
Cause: Wrong header name or invalid API key.
Solution:
- Ensure the header is
x-api-key(lowercase), notX-DD-ApiKey - Verify your API key is correct
- Request a new key at docdigitizer.com/contact
415 Unsupported Media Type
Cause: Using JSON instead of multipart/form-data.
Solution:
- Use
Content-Type: multipart/form-data - Send the file as a form field, not as JSON
504 Gateway Timeout
Cause: Document too large or server overloaded.
Solution:
- Try a smaller document
- Increase timeout:
Send-DocDigitizerDocument -TimeoutSec 600 - Retry after a few minutes
Connection Test Fails
Cause: Network issues or missing API key.
Solution:
- Check your internet connection
- Verify firewall allows access to
apix.docdigitizer.com - Ensure API key is set:
Set-DocDigitizerConfig -ApiKey "your-key"