Files
Filter recipient files in a program
Applies advanced recipient filters and returns matching recipients with their file counts for the authenticated admin’s client. The file-management UI uses this endpoint to build scoped selections for bulk permission changes and file bundles. Requires admin file access through user.permissions.
POST
/
files
/
filter
/
{program_id}
Filter recipient files in a program
curl --request POST \
--url https://api.gratona.com/v1/files/filter/{program_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter_groups": [
{}
],
"page": 1,
"per_page": 25
}
'import requests
url = "https://api.gratona.com/v1/files/filter/{program_id}"
payload = {
"filter_groups": [{}],
"page": 1,
"per_page": 25
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({filter_groups: [{}], page: 1, per_page: 25})
};
fetch('https://api.gratona.com/v1/files/filter/{program_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.gratona.com/v1/files/filter/{program_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filter_groups' => [
[
]
],
'page' => 1,
'per_page' => 25
]),
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 := "https://api.gratona.com/v1/files/filter/{program_id}"
payload := strings.NewReader("{\n \"filter_groups\": [\n {}\n ],\n \"page\": 1,\n \"per_page\": 25\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/files/filter/{program_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter_groups\": [\n {}\n ],\n \"page\": 1,\n \"per_page\": 25\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/files/filter/{program_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter_groups\": [\n {}\n ],\n \"page\": 1,\n \"per_page\": 25\n}"
response = http.request(request)
puts response.read_body{
"entities": [
{}
],
"total": 25,
"total_files": 73,
"title_field_definitions": [
{}
],
"applied_filters": {}
}{
"message": "Unauthorized",
"status": "error"
}Authorizations
bearerAuthapiKeyAuth
Path Parameters
Body
application/json
⌘I
Filter recipient files in a program
curl --request POST \
--url https://api.gratona.com/v1/files/filter/{program_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter_groups": [
{}
],
"page": 1,
"per_page": 25
}
'import requests
url = "https://api.gratona.com/v1/files/filter/{program_id}"
payload = {
"filter_groups": [{}],
"page": 1,
"per_page": 25
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({filter_groups: [{}], page: 1, per_page: 25})
};
fetch('https://api.gratona.com/v1/files/filter/{program_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.gratona.com/v1/files/filter/{program_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filter_groups' => [
[
]
],
'page' => 1,
'per_page' => 25
]),
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 := "https://api.gratona.com/v1/files/filter/{program_id}"
payload := strings.NewReader("{\n \"filter_groups\": [\n {}\n ],\n \"page\": 1,\n \"per_page\": 25\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/files/filter/{program_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter_groups\": [\n {}\n ],\n \"page\": 1,\n \"per_page\": 25\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/files/filter/{program_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter_groups\": [\n {}\n ],\n \"page\": 1,\n \"per_page\": 25\n}"
response = http.request(request)
puts response.read_body{
"entities": [
{}
],
"total": 25,
"total_files": 73,
"title_field_definitions": [
{}
],
"applied_filters": {}
}{
"message": "Unauthorized",
"status": "error"
}