Get a document
curl --request GET \
--url https://api.wellapp.ai/v1/documents/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.wellapp.ai/v1/documents/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.wellapp.ai/v1/documents/{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://api.wellapp.ai/v1/documents/{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: <authorization>"
],
]);
$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://api.wellapp.ai/v1/documents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wellapp.ai/v1/documents/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440010",
"attributes": {
"file_name": "invoice_2024.pdf",
"workspace_id": "550e8400-e29b-41d4-a716-446655440001",
"collect_id": "550e8400-e29b-41d4-a716-446655440002",
"metadata": {
"source_number": "+33123456789",
"target_number": "+33987654321",
"document_type": "invoice"
},
"created_at": "2024-01-20T10:30:00Z",
"updated_at": "2024-01-20T10:30:00Z"
},
"relationships": {
"workspace": {
"data": {
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440001"
}
},
"company": {
"data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440003"
}
},
"people": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440004",
"meta": {
"phone_number": "+33123456789"
}
}
}
}
},
"included": [
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440001",
"attributes": {
"name": "Sales Team Workspace",
"description": "Workspace for sales documents and invoices",
"avatar_color": "#4A90E2",
"external_workspace_id": "sales_ws_001",
"auto_extract_enabled": true,
"created_at": "2024-01-15T09:00:00Z",
"updated_at": "2024-01-15T09:00:00Z"
}
},
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440003",
"attributes": {
"name": "ACME Corporation",
"description": "Leading technology and consulting company",
"locale": "fr",
"domain_name_primary_link_url": "acme.com",
"tax_id": {
"value": "FR12345678901",
"type": "VAT"
},
"registration": {
"trade_name": "ACME",
"registered_name": "ACME Corporation SAS"
},
"registration_number": {
"business_type": "SAS",
"value": "RCS 123456789",
"registry_name": "Registre du Commerce Paris",
"registry_country": "FR"
},
"created_at": "2024-01-10T08:00:00Z",
"updated_at": "2024-01-10T08:00:00Z"
}
},
{
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440004",
"attributes": {
"first_name": "Jean",
"last_name": "Dupont",
"full_name": "Jean Dupont",
"created_at": "2024-01-12T10:00:00Z",
"updated_at": "2024-01-12T10:00:00Z"
}
}
]
}{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "You are not authorized to access this resource",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}{
"code": "DOCUMENT_NOT_FOUND",
"status": 404,
"title": "Document Not Found",
"message": "The requested document could not be found",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}Documents
Get Document by id
GET
/
v1
/
documents
/
{id}
Get a document
curl --request GET \
--url https://api.wellapp.ai/v1/documents/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.wellapp.ai/v1/documents/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.wellapp.ai/v1/documents/{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://api.wellapp.ai/v1/documents/{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: <authorization>"
],
]);
$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://api.wellapp.ai/v1/documents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wellapp.ai/v1/documents/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440010",
"attributes": {
"file_name": "invoice_2024.pdf",
"workspace_id": "550e8400-e29b-41d4-a716-446655440001",
"collect_id": "550e8400-e29b-41d4-a716-446655440002",
"metadata": {
"source_number": "+33123456789",
"target_number": "+33987654321",
"document_type": "invoice"
},
"created_at": "2024-01-20T10:30:00Z",
"updated_at": "2024-01-20T10:30:00Z"
},
"relationships": {
"workspace": {
"data": {
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440001"
}
},
"company": {
"data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440003"
}
},
"people": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440004",
"meta": {
"phone_number": "+33123456789"
}
}
}
}
},
"included": [
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440001",
"attributes": {
"name": "Sales Team Workspace",
"description": "Workspace for sales documents and invoices",
"avatar_color": "#4A90E2",
"external_workspace_id": "sales_ws_001",
"auto_extract_enabled": true,
"created_at": "2024-01-15T09:00:00Z",
"updated_at": "2024-01-15T09:00:00Z"
}
},
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440003",
"attributes": {
"name": "ACME Corporation",
"description": "Leading technology and consulting company",
"locale": "fr",
"domain_name_primary_link_url": "acme.com",
"tax_id": {
"value": "FR12345678901",
"type": "VAT"
},
"registration": {
"trade_name": "ACME",
"registered_name": "ACME Corporation SAS"
},
"registration_number": {
"business_type": "SAS",
"value": "RCS 123456789",
"registry_name": "Registre du Commerce Paris",
"registry_country": "FR"
},
"created_at": "2024-01-10T08:00:00Z",
"updated_at": "2024-01-10T08:00:00Z"
}
},
{
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440004",
"attributes": {
"first_name": "Jean",
"last_name": "Dupont",
"full_name": "Jean Dupont",
"created_at": "2024-01-12T10:00:00Z",
"updated_at": "2024-01-12T10:00:00Z"
}
}
]
}{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "You are not authorized to access this resource",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}{
"code": "DOCUMENT_NOT_FOUND",
"status": 404,
"title": "Document Not Found",
"message": "The requested document could not be found",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}⌘I