Skip to main content
POST
/
search
/
count
Count
curl --request POST \
  --url https://api.example.com/search/count \
  --header 'Content-Type: application/json' \
  --data '
{
  "where": {
    "AND": [
      {
        "property": "<string>",
        "value": {
          "equals": "<string>"
        },
        "includeAllBranches": true,
        "excludeBaseBranch": false,
        "timeZone": "UTC",
        "textSearchDepth": 0
      }
    ],
    "OR": [
      {
        "property": "<string>",
        "value": {
          "equals": "<string>"
        },
        "includeAllBranches": true,
        "excludeBaseBranch": false,
        "timeZone": "UTC",
        "textSearchDepth": 0
      }
    ]
  },
  "includeAllBranches": true,
  "excludeBaseBranch": false,
  "timeZone": "UTC",
  "textSearchDepth": 0
}
'
import requests

url = "https://api.example.com/search/count"

payload = {
"where": {
"AND": [
{
"property": "<string>",
"value": { "equals": "<string>" },
"includeAllBranches": True,
"excludeBaseBranch": False,
"timeZone": "UTC",
"textSearchDepth": 0
}
],
"OR": [
{
"property": "<string>",
"value": { "equals": "<string>" },
"includeAllBranches": True,
"excludeBaseBranch": False,
"timeZone": "UTC",
"textSearchDepth": 0
}
]
},
"includeAllBranches": True,
"excludeBaseBranch": False,
"timeZone": "UTC",
"textSearchDepth": 0
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
where: {
AND: [
{
property: '<string>',
value: {equals: '<string>'},
includeAllBranches: true,
excludeBaseBranch: false,
timeZone: 'UTC',
textSearchDepth: 0
}
],
OR: [
{
property: '<string>',
value: {equals: '<string>'},
includeAllBranches: true,
excludeBaseBranch: false,
timeZone: 'UTC',
textSearchDepth: 0
}
]
},
includeAllBranches: true,
excludeBaseBranch: false,
timeZone: 'UTC',
textSearchDepth: 0
})
};

fetch('https://api.example.com/search/count', 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.example.com/search/count",
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([
'where' => [
'AND' => [
[
'property' => '<string>',
'value' => [
'equals' => '<string>'
],
'includeAllBranches' => true,
'excludeBaseBranch' => false,
'timeZone' => 'UTC',
'textSearchDepth' => 0
]
],
'OR' => [
[
'property' => '<string>',
'value' => [
'equals' => '<string>'
],
'includeAllBranches' => true,
'excludeBaseBranch' => false,
'timeZone' => 'UTC',
'textSearchDepth' => 0
]
]
],
'includeAllBranches' => true,
'excludeBaseBranch' => false,
'timeZone' => 'UTC',
'textSearchDepth' => 0
]),
CURLOPT_HTTPHEADER => [
"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.example.com/search/count"

payload := strings.NewReader("{\n \"where\": {\n \"AND\": [\n {\n \"property\": \"<string>\",\n \"value\": {\n \"equals\": \"<string>\"\n },\n \"includeAllBranches\": true,\n \"excludeBaseBranch\": false,\n \"timeZone\": \"UTC\",\n \"textSearchDepth\": 0\n }\n ],\n \"OR\": [\n {\n \"property\": \"<string>\",\n \"value\": {\n \"equals\": \"<string>\"\n },\n \"includeAllBranches\": true,\n \"excludeBaseBranch\": false,\n \"timeZone\": \"UTC\",\n \"textSearchDepth\": 0\n }\n ]\n },\n \"includeAllBranches\": true,\n \"excludeBaseBranch\": false,\n \"timeZone\": \"UTC\",\n \"textSearchDepth\": 0\n}")

req, _ := http.NewRequest("POST", url, payload)

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.example.com/search/count")
.header("Content-Type", "application/json")
.body("{\n \"where\": {\n \"AND\": [\n {\n \"property\": \"<string>\",\n \"value\": {\n \"equals\": \"<string>\"\n },\n \"includeAllBranches\": true,\n \"excludeBaseBranch\": false,\n \"timeZone\": \"UTC\",\n \"textSearchDepth\": 0\n }\n ],\n \"OR\": [\n {\n \"property\": \"<string>\",\n \"value\": {\n \"equals\": \"<string>\"\n },\n \"includeAllBranches\": true,\n \"excludeBaseBranch\": false,\n \"timeZone\": \"UTC\",\n \"textSearchDepth\": 0\n }\n ]\n },\n \"includeAllBranches\": true,\n \"excludeBaseBranch\": false,\n \"timeZone\": \"UTC\",\n \"textSearchDepth\": 0\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/search/count")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"where\": {\n \"AND\": [\n {\n \"property\": \"<string>\",\n \"value\": {\n \"equals\": \"<string>\"\n },\n \"includeAllBranches\": true,\n \"excludeBaseBranch\": false,\n \"timeZone\": \"UTC\",\n \"textSearchDepth\": 0\n }\n ],\n \"OR\": [\n {\n \"property\": \"<string>\",\n \"value\": {\n \"equals\": \"<string>\"\n },\n \"includeAllBranches\": true,\n \"excludeBaseBranch\": false,\n \"timeZone\": \"UTC\",\n \"textSearchDepth\": 0\n }\n ]\n },\n \"includeAllBranches\": true,\n \"excludeBaseBranch\": false,\n \"timeZone\": \"UTC\",\n \"textSearchDepth\": 0\n}"

response = http.request(request)
puts response.read_body
{
  "count": 123
}

Body

application/json
entityType
enum<string>
required
Available options:
PAYMENT_METHOD,
PAYMENT,
POLICY,
CUSTOMER,
ASSET,
INVOICE,
DOCUMENT,
SIGNATURE,
TENANT,
PRODUCT,
QUOTE,
BROKERAGE_FIRM,
CLAIM,
EXTERNAL_SERVICE,
NOTIFICATION,
PREMIUM_SCHEDULE,
CHECK,
ALERT,
DISTRIBUTION_REQUEST,
DEROGATION,
BROKERAGE_FEE,
COMMENT,
CONVERSATION,
CONVERSATION_MESSAGE
where
object
required
includeAllBranches
boolean
default:true

Search all branches regardless of their type and status. false = look only at BASE branch

excludeBaseBranch
boolean
default:false
timeZone
string
default:UTC

This timezone is used in case no offset is specified in date filters values (ex: if 2021-01-01 or 2021-01-01T00:00:00 are provided, the timezone option is used to convert it to a UTC date)

textSearchDepth
number
default:0

[EXPERIMENTAL] The number of relations text search filters are checked against (exponential impact on performances)

Required range: 0 <= x <= 3

Response

200 - application/json
count
number
required