curl --request PUT \
--url http://localhost:8000/v1/views/{view_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Updated description",
"fields": [
"fund_name",
"bank_name",
"swift_code"
],
"is_default": true,
"name": "Updated View Name"
}
'import requests
url = "http://localhost:8000/v1/views/{view_id}"
payload = {
"description": "Updated description",
"fields": ["fund_name", "bank_name", "swift_code"],
"is_default": True,
"name": "Updated View Name"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Updated description',
fields: ['fund_name', 'bank_name', 'swift_code'],
is_default: true,
name: 'Updated View Name'
})
};
fetch('http://localhost:8000/v1/views/{view_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 => "8000",
CURLOPT_URL => "http://localhost:8000/v1/views/{view_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Updated description',
'fields' => [
'fund_name',
'bank_name',
'swift_code'
],
'is_default' => true,
'name' => 'Updated View Name'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/v1/views/{view_id}"
payload := strings.NewReader("{\n \"description\": \"Updated description\",\n \"fields\": [\n \"fund_name\",\n \"bank_name\",\n \"swift_code\"\n ],\n \"is_default\": true,\n \"name\": \"Updated View Name\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("http://localhost:8000/v1/views/{view_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Updated description\",\n \"fields\": [\n \"fund_name\",\n \"bank_name\",\n \"swift_code\"\n ],\n \"is_default\": true,\n \"name\": \"Updated View Name\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/views/{view_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Updated description\",\n \"fields\": [\n \"fund_name\",\n \"bank_name\",\n \"swift_code\"\n ],\n \"is_default\": true,\n \"name\": \"Updated View Name\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2024-01-15T10:30:00Z",
"description": "Fields needed for accounting workflow",
"document_type": "capital_call",
"fields": [
"fund_name",
"due_date",
"call_amount_lp",
"bank_name"
],
"is_default": true,
"name": "accounting",
"updated_at": "2024-01-15T10:30:00Z",
"view_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"available_fields": [
"fund_name",
"notice_date",
"due_date",
"call_amount_lp"
],
"error": "invalid_fields",
"invalid_fields": [
"foo_bar",
"xyz"
],
"message": "The following fields are not available for document type 'capital_call': foo_bar, xyz"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update a view
Update an existing view.
Only provided fields will be updated.
If is_default is true, any existing default view for this document
type will be unset.
Returns: ViewResponse with updated view details.
Raises: HTTPException 400: Invalid fields or duplicate name HTTPException 404: View not found
curl --request PUT \
--url http://localhost:8000/v1/views/{view_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Updated description",
"fields": [
"fund_name",
"bank_name",
"swift_code"
],
"is_default": true,
"name": "Updated View Name"
}
'import requests
url = "http://localhost:8000/v1/views/{view_id}"
payload = {
"description": "Updated description",
"fields": ["fund_name", "bank_name", "swift_code"],
"is_default": True,
"name": "Updated View Name"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Updated description',
fields: ['fund_name', 'bank_name', 'swift_code'],
is_default: true,
name: 'Updated View Name'
})
};
fetch('http://localhost:8000/v1/views/{view_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 => "8000",
CURLOPT_URL => "http://localhost:8000/v1/views/{view_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Updated description',
'fields' => [
'fund_name',
'bank_name',
'swift_code'
],
'is_default' => true,
'name' => 'Updated View Name'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/v1/views/{view_id}"
payload := strings.NewReader("{\n \"description\": \"Updated description\",\n \"fields\": [\n \"fund_name\",\n \"bank_name\",\n \"swift_code\"\n ],\n \"is_default\": true,\n \"name\": \"Updated View Name\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("http://localhost:8000/v1/views/{view_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Updated description\",\n \"fields\": [\n \"fund_name\",\n \"bank_name\",\n \"swift_code\"\n ],\n \"is_default\": true,\n \"name\": \"Updated View Name\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/views/{view_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Updated description\",\n \"fields\": [\n \"fund_name\",\n \"bank_name\",\n \"swift_code\"\n ],\n \"is_default\": true,\n \"name\": \"Updated View Name\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2024-01-15T10:30:00Z",
"description": "Fields needed for accounting workflow",
"document_type": "capital_call",
"fields": [
"fund_name",
"due_date",
"call_amount_lp",
"bank_name"
],
"is_default": true,
"name": "accounting",
"updated_at": "2024-01-15T10:30:00Z",
"view_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"available_fields": [
"fund_name",
"notice_date",
"due_date",
"call_amount_lp"
],
"error": "invalid_fields",
"invalid_fields": [
"foo_bar",
"xyz"
],
"message": "The following fields are not available for document type 'capital_call': foo_bar, xyz"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
API Key authentication. Format: dk_test_ or dk_live_
Path Parameters
View ID
Body
Request for updating a view (PUT /v1/views/{view_id}).
All fields are optional - only provided fields will be updated.
Response
Updated view
Tenant view response.
Views define which fields from extracted data are returned when querying documents.
Unique identifier for the view
Document type code this view applies to
View name (e.g., 'accounting', 'compliance')
List of field names included in this view
Whether this is the default view for this document type
View creation timestamp (ISO 8601)
Last modification timestamp (ISO 8601)
Optional description of the view's purpose