curl --request GET \
--url https://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId} \
--header 'Authorization: <api-key>'import requests
url = "https://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId}', 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://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId}",
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: <api-key>"
],
]);
$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://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyGet File Metadata
Read one document’s details: name, type, size, owner record, folder,
category, and upload status. Use it to check that an upload finished. To
get the content, call Get Download URL (getCompanyFileDownloadUrl); for
every upload of a re-uploaded file, call List File Versions
(listCompanyFileVersions).
Returns full metadata for a single file, including its upload status
(pending until the upload is finalized, then ready). Does not return
file content — use Get Download URL
and fetch the bytes from the signed URL.
A file placed on several entities is summarized by its PRIMARY (oldest)
placement; placementCount > 1 flags the rest — enumerate them with
List File Placements.
Required permission: file.view
curl --request GET \
--url https://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId} \
--header 'Authorization: <api-key>'import requests
url = "https://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId}', 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://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId}",
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: <api-key>"
],
]);
$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://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://go.aiinsurance.io/api/v1/companies/{companyId}/files/{fileId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyAuthorizations
Path Parameters
Response
File metadata
Full metadata for one file. Unlike the list shape this also represents
files whose upload was never finalized: status is pending until
finalize flips it to ready, and the version-derived fields (fileName,
contentType, byteSize, uploadedAt, uploadedBy) are null while no
current version exists.
A file can be placed on more than one entity (see the placements
endpoints). The owner fields here (entityType, entityId, folderId,
category) reflect the file's primary accessible placement — the oldest live one;
placementCount > 1 flags that others exist.
Invoice attachments can appear on their linked event with placementKind: invoice. That appearance is read-only and requires invoice.view in addition
to file.view. Manage its attachment and event association on the invoice.
Upload lifecycle state. pending = upload intent created but not
finalized; ready = bytes verified in storage and available for
download; quarantined = malware scan verdict outstanding (not yet
downloadable); infected = malware detected (downloads permanently
refused).
pending, ready, quarantined, infected 