List Documents
curl --request GET \
--url https://api.nugen.in/api/v3/documents/list \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/documents/list"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nugen.in/api/v3/documents/list', 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.nugen.in/api/v3/documents/list",
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://api.nugen.in/api/v3/documents/list"
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://api.nugen.in/api/v3/documents/list")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/documents/list")
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{
"categories": [
{
"count": 5,
"name": "financial"
}
],
"documents": [
{
"categories": [
"financial",
"2024"
],
"created_at": "2024-01-15T10:30:00Z",
"document_id": "document_01k4x9m2p7q3r5s8",
"document_name": "Quarterly Report",
"status": "READY"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Documents
List Documents
Retrieve all documents and categories for the authenticated user.
This endpoint returns a paginated, lean list row per document. Fetch GET /documents/{id} for the full record: filename, type, size, uploader, processing progress.
Query Parameters:
status(optional): Filter by document statuslimit(optional): Number of documents to return (1-100, default: 10)offset(optional): Number of documents to skip for pagination (default: 0)
Returns:
-
List of document objects, each containing:document_id: Unique document identifierdocument_name: Display name of the documentstatus: Processing status (e.g.,READY,PROCESSING,FAILED)created_at: ISO 8601 timestamp when the document was createdcategories: List of category names assigned to this document
-
categories: List of category objects, each containing:name: Category namecount: Number of documents in this category
Example Request:
GET /api/v3/documents/list
Headers: {"Authorization": "Bearer <api_key>"}
Example Response:
{
"documents": [
{
"document_id": "document_01k4x9m2p7q3r5s8",
"document_name": "Quarterly Report",
"status": "READY",
"created_at": "2024-01-15T10:30:00Z",
"categories": ["financial", "2024"]
},
{
"document_id": "document_01k4x9m2p7q3r5sa",
"document_name": "Meeting Notes",
"status": "PROCESSING",
"created_at": "2024-01-16T14:20:00Z",
"categories": ["meetings"]
}
],
"categories": [
{
"name": "financial",
"count": 5
},
{
"name": "2024",
"count": 12
},
{
"name": "meetings",
"count": 8
}
]
}
Notes:
- Categories are automatically extracted and organized for easy filtering
- Each category shows the total count of documents tagged with that category
GET
/
api
/
v3
/
documents
/
list
List Documents
curl --request GET \
--url https://api.nugen.in/api/v3/documents/list \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/documents/list"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nugen.in/api/v3/documents/list', 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.nugen.in/api/v3/documents/list",
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://api.nugen.in/api/v3/documents/list"
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://api.nugen.in/api/v3/documents/list")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/documents/list")
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{
"categories": [
{
"count": 5,
"name": "financial"
}
],
"documents": [
{
"categories": [
"financial",
"2024"
],
"created_at": "2024-01-15T10:30:00Z",
"document_id": "document_01k4x9m2p7q3r5s8",
"document_name": "Quarterly Report",
"status": "READY"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter by document status
Number of documents to return
Required range:
1 <= x <= 100Number of documents to skip
Required range:
x >= 0Response
Returns a lean list of all documents uploaded by the authenticated user, and available document categories with counts
Was this page helpful?