curl --request POST \
--url https://api.exowpee.com/v1/team/agents/{agentId}/deactivate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/team/agents/{agentId}/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/team/agents/{agentId}/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/team/agents/{agentId}/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/team/agents/{agentId}/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/team/agents/{agentId}/deactivate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/team/agents/{agentId}/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>",
"username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"type": "<string>",
"working_hours": {},
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"profile_id": "<string>",
"is_direct_seller": true,
"company": {},
"client": {},
"organization": {}
}Deactivate an agent (company)
Switches an agent account off and signs it out in the company space, for example when it should no longer act.
curl --request POST \
--url https://api.exowpee.com/v1/team/agents/{agentId}/deactivate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/team/agents/{agentId}/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/team/agents/{agentId}/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/team/agents/{agentId}/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/team/agents/{agentId}/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/team/agents/{agentId}/deactivate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/team/agents/{agentId}/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>",
"username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"type": "<string>",
"working_hours": {},
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"profile_id": "<string>",
"is_direct_seller": true,
"company": {},
"client": {},
"organization": {}
}agents.update
Conditions
- The caller must be a member (user, client or organization account) of the company space; agent accounts cannot manage agent accounts.
- Calling it on an agent account that is already inactive is accepted and changes nothing visible.
- The agent account is set to inactive and its session is invalidated: it is signed out.
- The public accounting export links created by this agent account are revoked and are not reopened by reactivating.
- Reactivation is done through the update action by sending is_active true.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the agent (27-character KSUID string). It must belong to the current space.
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, username, first_name, last_name, type, working_hours, is_active, created_at, updated_at, profile_id, 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: company, company.organization, client, organization.
Response
Resource (only with response=resource).
Identifier of the agent account (27-character KSUID string).
Login name of the agent account, lowercase. Generated from the first and last name at creation; unique within its company, client account or organization.
First name of the agent account.
Last name of the agent account.
Kind of agent account: agent (company), client_agent or organization_agent.
Weekly schedule during which the agent account may work, keyed by day name (monday to sunday) with time ranges such as 09:00-12:00, plus optional dated exceptions; null when no schedule is set.
Whether the agent account can sign in. Set to false by deactivation.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).
Identifier of the access profile assigned to the agent account (27-character KSUID string).
True when the agent account is a seller of its company with no cash register (sells directly). Always false for client and organization agent accounts.
Short company the agent account belongs to, for company agent accounts. Only rendered when requested with the include parameter.
Short client account the agent account belongs to, for client agent accounts. Only rendered when requested with the include parameter.
Organization the agent account belongs to. Only rendered for organization agent accounts, and only when requested with the include parameter.