curl --request GET \
--url https://api.partoo.co/v2/user/{user_id} \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/user/{user_id}"
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/{user_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.partoo.co/v2/user/{user_id}",
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/{user_id}"
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/{user_id}")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/user/{user_id}")
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{
"id": "5309c3a237bbc544d8e26737",
"org_id": 42,
"first_name": "Perceval",
"last_name": "de Galles",
"email": "perceval@kaamelott.com",
"lang": "fr",
"sidebar_pages": [
"bulk_modification"
],
"available_features": [
"diffusion"
],
"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": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"errors": {
"json": "Resource not found"
}
}User information
This endpoint lets you retrieve all the information on a user. You need to have READ access to this users.
curl --request GET \
--url https://api.partoo.co/v2/user/{user_id} \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/user/{user_id}"
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/{user_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.partoo.co/v2/user/{user_id}",
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/{user_id}"
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/{user_id}")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/user/{user_id}")
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{
"id": "5309c3a237bbc544d8e26737",
"org_id": 42,
"first_name": "Perceval",
"last_name": "de Galles",
"email": "perceval@kaamelott.com",
"lang": "fr",
"sidebar_pages": [
"bulk_modification"
],
"available_features": [
"diffusion"
],
"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": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"errors": {
"json": "Resource not found"
}
}Authorizations
Query Parameters
Response
OK
Partoo App User
Populated only for BUSINESS_MANAGER role.
List of businesses ids the user can access.
Note: For a reliable way of getting all the businesses the user can access, use operation/searchBusinesses.
Business id
List of (list of Group ID).
Accesses of the users for the new groups system, only for GROUP_MANAGER users.
[[1, 2], [1, 3]]
Optional API identifier of a custom role to assign to the user. The value must match the api_id of one of the custom roles available to your organization.
If no custom role is given, users with the role GROUP_MANAGER or BUSINESS_MANAGER will automatically be assigned to the default built-in custom role associated with their role.
For more information about custom roles, see Managing User Permissions with Custom Roles
"my_custom_role"
Was this page helpful?