Search partners
Return the partners matching a filter, with the total number of matches.
A filter has two levels. The entries of and are combined with and, and an entry is either a single condition or an or group of conditions.
A group holds conditions only, so there is no third level. A filter carries at most 20 conditions in total, and a larger request is refused rather than trimmed.
A condition names a field, an operator and a value. Set isCustomProperty to true when the name is one of the workspace’s own partner properties: static fields and custom properties are separate sets, so the same name can exist in both. Names are matched without regard to case.
Operators
| Operator | Value |
|---|---|
Eq, Neq | a single value |
In, Nin | an array of values, which must not be empty |
Contains, NotContains | a text value matched as a substring |
Gt, Gte, Lt, Lte | a single value |
Between | an object holding from and to, both included |
Empty, NotEmpty | no value at all |
Fields
| Field | Type | Operators |
|---|---|---|
name | text | Eq, Neq, In, Contains, NotContains |
status | Active, Prospect, Rejected, Applicant, Inactive, Onboarding | Eq, Neq, In, Nin |
onboardingStatus | NotOnboarded, InProgress, Completed | Eq, Neq, In, Nin |
source | ManuallyAdded, SignupForm | Eq, Neq, In, Nin |
partnerTypeId | number | Eq, Neq, In, Nin |
groupId | number | Eq, Neq, In, Nin, Empty, NotEmpty |
referralCode | text | Eq, Neq, In |
currency | text | Eq, Neq, In |
language | text | Eq, Neq, In |
sinceDate | date | Eq, Neq, Gt, Gte, Lt, Lte, Between, Empty, NotEmpty |
creationDate | date | Eq, Neq, Gt, Gte, Lt, Lte, Between |
mainContactEmail | text | Eq, Neq, In, Contains |
programId | number | Eq, In, Nin |
partnerLevelId | number | Eq, In, Nin |
qualifyingLevelId | number | Eq, In, Nin |
onboardingStageId | number | Eq, In, Nin |
prospectionStageId | number | Eq, In, Nin, Empty, NotEmpty |
A custom property accepts the operators that suit its own type. A date is written as an ISO 8601 string, for example 2025-01-31.
Refusals
Every condition is checked before any data is read, and a filter that cannot be applied refuses the whole request: no partner is returned.
The metadata of the error lists one entry per problem under errors, each with the JSON path of the offending value, a code and a message.
When a name was not recognised, metadata also lists the names that may be used under staticFields and customProperties.
curl --request POST \
--url https://api.example.com/v3/partners/search \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"filters": {
"and": [
{
"or": [
{
"field": "<string>",
"isCustomProperty": true,
"value": "<unknown>"
}
],
"field": "<string>",
"isCustomProperty": true,
"value": "<unknown>"
}
]
},
"offset": 123,
"limit": 123
}
'import requests
url = "https://api.example.com/v3/partners/search"
payload = {
"filters": { "and": [
{
"or": [
{
"field": "<string>",
"isCustomProperty": True,
"value": "<unknown>"
}
],
"field": "<string>",
"isCustomProperty": True,
"value": "<unknown>"
}
] },
"offset": 123,
"limit": 123
}
headers = {"Content-Type": "application/json-patch+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
filters: {
and: [
{
or: [{field: '<string>', isCustomProperty: true, value: '<unknown>'}],
field: '<string>',
isCustomProperty: true,
value: '<unknown>'
}
]
},
offset: 123,
limit: 123
})
};
fetch('https://api.example.com/v3/partners/search', 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/v3/partners/search",
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([
'filters' => [
'and' => [
[
'or' => [
[
'field' => '<string>',
'isCustomProperty' => true,
'value' => '<unknown>'
]
],
'field' => '<string>',
'isCustomProperty' => true,
'value' => '<unknown>'
]
]
],
'offset' => 123,
'limit' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+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/v3/partners/search"
payload := strings.NewReader("{\n \"filters\": {\n \"and\": [\n {\n \"or\": [\n {\n \"field\": \"<string>\",\n \"isCustomProperty\": true,\n \"value\": \"<unknown>\"\n }\n ],\n \"field\": \"<string>\",\n \"isCustomProperty\": true,\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"offset\": 123,\n \"limit\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json-patch+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/v3/partners/search")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"filters\": {\n \"and\": [\n {\n \"or\": [\n {\n \"field\": \"<string>\",\n \"isCustomProperty\": true,\n \"value\": \"<unknown>\"\n }\n ],\n \"field\": \"<string>\",\n \"isCustomProperty\": true,\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"offset\": 123,\n \"limit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v3/partners/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"filters\": {\n \"and\": [\n {\n \"or\": [\n {\n \"field\": \"<string>\",\n \"isCustomProperty\": true,\n \"value\": \"<unknown>\"\n }\n ],\n \"field\": \"<string>\",\n \"isCustomProperty\": true,\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"offset\": 123,\n \"limit\": 123\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": 123,
"name": "<string>",
"groupId": 123,
"onboardingStatus": "Unknown",
"status": "Unknown",
"source": "Unknown",
"company": {
"id": 123,
"name": "<string>",
"websiteUrls": [
"<string>"
]
},
"mainContact": {
"id": 123,
"email": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"jobTitle": "<string>",
"phoneNumber": "<string>",
"linkedInProfileUrl": "<string>",
"creationDate": "2023-11-07T05:31:56Z",
"isMainContact": true
},
"onboardingStage": {
"id": 123,
"name": "<string>",
"description": "<string>",
"order": 123,
"onboardingPipelineId": 123,
"onboardingPipelineName": "<string>"
},
"onboardingStages": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"order": 123,
"onboardingPipelineId": 123,
"onboardingPipelineName": "<string>"
}
],
"levels": [
{
"programLevelId": 123,
"programLevelName": "<string>",
"programId": 123,
"programName": "<string>"
}
],
"sinceDate": "2023-11-07T05:31:56Z",
"partnerTypeId": 123,
"partnerTypeName": "<string>",
"properties": {},
"ownerUserId": 123,
"owner": {
"id": 123,
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"referralCode": "<string>",
"paypalEmail": "<string>",
"currency": "<string>",
"payoutProvider": {
"type": "Unknown",
"details": {}
},
"language": "<string>"
}
],
"paginationSkipCount": 123,
"totalCount": 123
}{
"errorCode": "Transactions.InvalidCustomerIdentifier",
"errorMessage": "You must specify one customer identifier"
}Body
curl --request POST \
--url https://api.example.com/v3/partners/search \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"filters": {
"and": [
{
"or": [
{
"field": "<string>",
"isCustomProperty": true,
"value": "<unknown>"
}
],
"field": "<string>",
"isCustomProperty": true,
"value": "<unknown>"
}
]
},
"offset": 123,
"limit": 123
}
'import requests
url = "https://api.example.com/v3/partners/search"
payload = {
"filters": { "and": [
{
"or": [
{
"field": "<string>",
"isCustomProperty": True,
"value": "<unknown>"
}
],
"field": "<string>",
"isCustomProperty": True,
"value": "<unknown>"
}
] },
"offset": 123,
"limit": 123
}
headers = {"Content-Type": "application/json-patch+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
filters: {
and: [
{
or: [{field: '<string>', isCustomProperty: true, value: '<unknown>'}],
field: '<string>',
isCustomProperty: true,
value: '<unknown>'
}
]
},
offset: 123,
limit: 123
})
};
fetch('https://api.example.com/v3/partners/search', 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/v3/partners/search",
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([
'filters' => [
'and' => [
[
'or' => [
[
'field' => '<string>',
'isCustomProperty' => true,
'value' => '<unknown>'
]
],
'field' => '<string>',
'isCustomProperty' => true,
'value' => '<unknown>'
]
]
],
'offset' => 123,
'limit' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+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/v3/partners/search"
payload := strings.NewReader("{\n \"filters\": {\n \"and\": [\n {\n \"or\": [\n {\n \"field\": \"<string>\",\n \"isCustomProperty\": true,\n \"value\": \"<unknown>\"\n }\n ],\n \"field\": \"<string>\",\n \"isCustomProperty\": true,\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"offset\": 123,\n \"limit\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json-patch+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/v3/partners/search")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"filters\": {\n \"and\": [\n {\n \"or\": [\n {\n \"field\": \"<string>\",\n \"isCustomProperty\": true,\n \"value\": \"<unknown>\"\n }\n ],\n \"field\": \"<string>\",\n \"isCustomProperty\": true,\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"offset\": 123,\n \"limit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v3/partners/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"filters\": {\n \"and\": [\n {\n \"or\": [\n {\n \"field\": \"<string>\",\n \"isCustomProperty\": true,\n \"value\": \"<unknown>\"\n }\n ],\n \"field\": \"<string>\",\n \"isCustomProperty\": true,\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"offset\": 123,\n \"limit\": 123\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": 123,
"name": "<string>",
"groupId": 123,
"onboardingStatus": "Unknown",
"status": "Unknown",
"source": "Unknown",
"company": {
"id": 123,
"name": "<string>",
"websiteUrls": [
"<string>"
]
},
"mainContact": {
"id": 123,
"email": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"jobTitle": "<string>",
"phoneNumber": "<string>",
"linkedInProfileUrl": "<string>",
"creationDate": "2023-11-07T05:31:56Z",
"isMainContact": true
},
"onboardingStage": {
"id": 123,
"name": "<string>",
"description": "<string>",
"order": 123,
"onboardingPipelineId": 123,
"onboardingPipelineName": "<string>"
},
"onboardingStages": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"order": 123,
"onboardingPipelineId": 123,
"onboardingPipelineName": "<string>"
}
],
"levels": [
{
"programLevelId": 123,
"programLevelName": "<string>",
"programId": 123,
"programName": "<string>"
}
],
"sinceDate": "2023-11-07T05:31:56Z",
"partnerTypeId": 123,
"partnerTypeName": "<string>",
"properties": {},
"ownerUserId": 123,
"owner": {
"id": 123,
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"referralCode": "<string>",
"paypalEmail": "<string>",
"currency": "<string>",
"payoutProvider": {
"type": "Unknown",
"details": {}
},
"language": "<string>"
}
],
"paginationSkipCount": 123,
"totalCount": 123
}{
"errorCode": "Transactions.InvalidCustomerIdentifier",
"errorMessage": "You must specify one customer identifier"
}
