Search for users
curl --request GET \
--url https://api.partoo.co/v2/user/search \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/user/search"
headers = {"x-APIKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-APIKey': '<api-key>'}};
fetch('https://api.partoo.co/v2/user/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.partoo.co/v2/user/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-APIKey: <api-key>"
],
]);
$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.partoo.co/v2/user/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-APIKey", "<api-key>")
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.partoo.co/v2/user/search")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/user/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-APIKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"page": 1,
"max_page": 10,
"count": 287,
"users": [
{
"id": "5309c3a237bbc544d8e26737",
"org_id": 42,
"first_name": "Perceval",
"last_name": "de Galles",
"email": "perceval@kaamelott.com",
"lang": "fr",
"sidebar_pages": [
"bulk_modification"
],
"business_ids": [
"5409c35a97bbc544d8e26737"
],
"accesses": [
[
1,
2
],
[
1,
3
]
],
"role": "BUSINESS_MANAGER",
"provider": "partoo",
"status": "active",
"disabled": false,
"created_at": 1615299414,
"shadow_user_id": "",
"custom_role": "my_custom_role",
"sso_only": false
}
]
}{
"errors": {
"json": {}
}
}{
"errors": {
"authentication": "User not authenticated"
}
}Users
Search for users
This endpoint lets you search for users using filters
GET
/
user
/
search
Search for users
curl --request GET \
--url https://api.partoo.co/v2/user/search \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/user/search"
headers = {"x-APIKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-APIKey': '<api-key>'}};
fetch('https://api.partoo.co/v2/user/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.partoo.co/v2/user/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-APIKey: <api-key>"
],
]);
$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.partoo.co/v2/user/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-APIKey", "<api-key>")
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.partoo.co/v2/user/search")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/user/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-APIKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"page": 1,
"max_page": 10,
"count": 287,
"users": [
{
"id": "5309c3a237bbc544d8e26737",
"org_id": 42,
"first_name": "Perceval",
"last_name": "de Galles",
"email": "perceval@kaamelott.com",
"lang": "fr",
"sidebar_pages": [
"bulk_modification"
],
"business_ids": [
"5409c35a97bbc544d8e26737"
],
"accesses": [
[
1,
2
],
[
1,
3
]
],
"role": "BUSINESS_MANAGER",
"provider": "partoo",
"status": "active",
"disabled": false,
"created_at": 1615299414,
"shadow_user_id": "",
"custom_role": "my_custom_role",
"sso_only": false
}
]
}{
"errors": {
"json": {}
}
}{
"errors": {
"authentication": "User not authenticated"
}
}Authorizations
Query Parameters
Filter users who do not have the specified permission.
For available permissions and their names, use GET /api/v2/permissions to retrieve the full list of available permissions for your organization.
Filter users who have the specified permission.
For available permissions and their names, use GET /api/v2/permissions to retrieve the full list of available permissions for your organization.
Order result by given attribute.
Reverse order can as well be obtained by using a - (minus sign) before the attribute name, e.g. order_by=-name
Available options:
email, first_name, group_id, id, last_activity_date, last_name, org_id, role, status, -email, -first_name, -group_id, -id, -last_activity_date, -last_name, -org_id, -role, -status Was this page helpful?