curl --request POST \
--url https://api.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate', 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.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"is_active": true,
"updated_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"is_default": true,
"working_hours": {},
"is_current": true,
"is_direct_seller": true,
"profile": {},
"company": {},
"client": {},
"organization": {}
}Deactivate a profile assignment (organization)
Switches off a member’s profile assignment in the organization space; if the member has no other active profile there, they are deactivated too.
curl --request POST \
--url https://api.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate', 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.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/iam/userprofile-organizations/{userProfileId}/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"is_active": true,
"updated_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"is_default": true,
"working_hours": {},
"is_current": true,
"is_direct_seller": true,
"profile": {},
"company": {},
"client": {},
"organization": {}
}user_profiles.update
Conditions
- The assignment of a built-in profile (administrator, read only) cannot be deactivated.
- A caller cannot deactivate their own assignment.
- When it would leave the member with no active assignment in the space, the member is deactivated too; this is refused with 403 (and nothing changes) if the member is the owner of the organization.
- Sets the assignment inactive.
- Revokes the public accounting export shares created by that assignment; they stay revoked if the assignment is reactivated.
- Deactivates the member of the space when no other active assignment remains.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the profile assignment (the link between a member and a profile in this organization space), not of the profile itself.
Query Parameters
Response mode. Default none; none answers 204 No Content.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, is_active, updated_at, created_at, is_default, working_hours, is_current, is_direct_seller.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: profile, profile.groupedRoles, company, company.organization, client, organization.
Response
Resource (only with response=resource).
Identifier of the profile assignment (27-character KSUID string).
Whether the assignment is active. An inactive assignment cannot be used to sign in or switch profile.
Date and time the record was last changed (ISO 8601, UTC).
Date and time the record was created (ISO 8601, UTC).
Whether this is the person's default assignment, a preference the apps can use to choose a profile. A person has at most one default per kind of space (companies, clients or organizations).
Time windows during which the person may use this assignment, as opening hours per weekday (monday to sunday, each a list of HH:MM-HH:MM ranges) with optional dated exceptions, or null when there is no restriction. Companies can also define their own hours.
Whether the profile of this assignment is the profile of the session making the request.
Whether the assignment counts as a direct seller. Always false outside company spaces.
Profile of the assignment. Only present when requested with include=profile.
Company that owns the assignment. Only present for company assignments and when requested with include=company.
Client that owns the assignment. Only present for client assignments and when requested with include=client.
Organization that owns the assignment. Only present for organization assignments and when requested with include=organization.