Get document by ID
curl --request GET \
--url http://localhost:3000/v2/documents/{id} \
--header 'x-API-Key: <api-key>'import requests
url = "http://localhost:3000/v2/documents/{id}"
headers = {"x-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-API-Key': '<api-key>'}};
fetch('http://localhost:3000/v2/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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/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 => [
"x-API-Key: <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 := "http://localhost:3000/v2/documents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-API-Key", "<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("http://localhost:3000/v2/documents/{id}")
.header("x-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["x-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"fileName": "<string>",
"accessGroup": "<string>",
"_id": "<string>",
"number": 123,
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
},
"url": "<string>",
"name": "<string>",
"objectId": "<string>",
"userId": "<string>",
"jobId": "<string>",
"customerId": "<string>",
"absenceId": "<string>",
"complaintId": "<string>",
"uploadId": "<string>"
}Documents
Get Document
Retrieve a document by its unique identifier.
GET
/
documents
/
{id}
Get document by ID
curl --request GET \
--url http://localhost:3000/v2/documents/{id} \
--header 'x-API-Key: <api-key>'import requests
url = "http://localhost:3000/v2/documents/{id}"
headers = {"x-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-API-Key': '<api-key>'}};
fetch('http://localhost:3000/v2/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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/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 => [
"x-API-Key: <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 := "http://localhost:3000/v2/documents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-API-Key", "<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("http://localhost:3000/v2/documents/{id}")
.header("x-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["x-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"fileName": "<string>",
"accessGroup": "<string>",
"_id": "<string>",
"number": 123,
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
},
"url": "<string>",
"name": "<string>",
"objectId": "<string>",
"userId": "<string>",
"jobId": "<string>",
"customerId": "<string>",
"absenceId": "<string>",
"complaintId": "<string>",
"uploadId": "<string>"
}Authorizations
API-KeyBearer-Auth
Path Parameters
Document ID
Response
Document retrieved successfully
A document represents a file or attachment stored in the system, with metadata and references to related entities.
Original file name
Access group for the document (e.g. service, objectmanager)
Unique identifier of the entity
Unique number of the entity, used for identification
The ID of the company this entity belongs to
Entity Status information
Show child attributes
Show child attributes
URL to access the document file
Display name of the document
Related object ID
Related user ID
Related job ID
Related customer ID
Related absence ID
Related complaint ID
Upload process ID
Was this page helpful?

