curl --request GET \
--url https://connect.penbox.io/v1/document_intelligence/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://connect.penbox.io/v1/document_intelligence/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://connect.penbox.io/v1/document_intelligence/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://connect.penbox.io/v1/document_intelligence/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://connect.penbox.io/v1/document_intelligence/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://connect.penbox.io/v1/document_intelligence/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://connect.penbox.io/v1/document_intelligence/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"attachments": [
{
"name": "<string>",
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"results": {
"fields": [
{
"key": "firstname",
"name": "firstname",
"type": "text",
"value": "Jane",
"confidence": "high"
},
{
"key": "lastname",
"name": "lastname",
"type": "text",
"value": "Doe",
"confidence": "high"
},
{
"key": "number",
"name": "id card number",
"type": "text",
"value": "000-0000000-00",
"confidence": "high"
},
{
"key": "birthday",
"name": "date de naissance",
"hint": "DD MMM YYYY",
"type": "text",
"value": "01 JAN 1990",
"confidence": "high"
}
],
"validation": {
"is_valid": true,
"is_blurry": false,
"user_explanation": "All required fields were successfully extracted from the document."
},
"document_type": "ID Card"
},
"updated_at": "2023-11-07T05:31:56Z",
"language": "<string>",
"creator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com"
},
"usage": {
"input": 123,
"output": 123,
"total": 123,
"pages": 123
}
}Get Document Intelligence
Retrieve the results of a document intelligence extraction job.
curl --request GET \
--url https://connect.penbox.io/v1/document_intelligence/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://connect.penbox.io/v1/document_intelligence/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://connect.penbox.io/v1/document_intelligence/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://connect.penbox.io/v1/document_intelligence/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://connect.penbox.io/v1/document_intelligence/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://connect.penbox.io/v1/document_intelligence/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://connect.penbox.io/v1/document_intelligence/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"attachments": [
{
"name": "<string>",
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"results": {
"fields": [
{
"key": "firstname",
"name": "firstname",
"type": "text",
"value": "Jane",
"confidence": "high"
},
{
"key": "lastname",
"name": "lastname",
"type": "text",
"value": "Doe",
"confidence": "high"
},
{
"key": "number",
"name": "id card number",
"type": "text",
"value": "000-0000000-00",
"confidence": "high"
},
{
"key": "birthday",
"name": "date de naissance",
"hint": "DD MMM YYYY",
"type": "text",
"value": "01 JAN 1990",
"confidence": "high"
}
],
"validation": {
"is_valid": true,
"is_blurry": false,
"user_explanation": "All required fields were successfully extracted from the document."
},
"document_type": "ID Card"
},
"updated_at": "2023-11-07T05:31:56Z",
"language": "<string>",
"creator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com"
},
"usage": {
"input": 123,
"output": 123,
"total": 123,
"pages": 123
}
}results object contains the extracted field values with the same keys you specified when creating the job. Values are automatically typed based on the field type (text, number, or date).Authorizations
API token (starts with pnbx_). Create at https://app.penbox.io/workspace/settings/api. Include as: Authorization: Bearer {token}
Path Parameters
Document intelligence job UUID
Response
Successful response
Document intelligence job UUID
Job creation timestamp
Array of processed documents
Show child attributes
Show child attributes
Extraction results: the extracted fields, a validation assessment, and the detected document type.
Show child attributes
Show child attributes
{
"fields": [
{
"key": "firstname",
"name": "firstname",
"type": "text",
"value": "Jane",
"confidence": "high"
},
{
"key": "lastname",
"name": "lastname",
"type": "text",
"value": "Doe",
"confidence": "high"
},
{
"key": "number",
"name": "id card number",
"type": "text",
"value": "000-0000000-00",
"confidence": "high"
},
{
"key": "birthday",
"name": "date de naissance",
"hint": "DD MMM YYYY",
"type": "text",
"value": "01 JAN 1990",
"confidence": "high"
}
],
"validation": {
"is_valid": true,
"is_blurry": false,
"user_explanation": "All required fields were successfully extracted from the document."
},
"document_type": "ID Card"
}
Last update timestamp
Document language detected or specified
The quality level this extraction ran at, and therefore the rate it was billed at per page ('fast' 3 credits per page, 'advanced' 6). Null for extractions created before levels existed.
fast, advanced User who created the job
Show child attributes
Show child attributes
Token usage statistics for the AI processing
Show child attributes
Show child attributes
Was this page helpful?