curl --request PUT \
--url https://api.exowpee.com/v1/team/agent-clients/{agentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/team/agent-clients/{agentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/team/agent-clients/{agentId}', 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/agent-clients/{agentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/agent-clients/{agentId}"
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/team/agent-clients/{agentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/team/agent-clients/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.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": {}
}{
"message": "<string>",
"errors": {}
}Update an agent (client account)
Changes an agent account’s name, username, profile, password, working hours or active state in the client space. Changing the password, profile or active state signs the agent account out.
curl --request PUT \
--url https://api.exowpee.com/v1/team/agent-clients/{agentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/team/agent-clients/{agentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/team/agent-clients/{agentId}', 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/agent-clients/{agentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/agent-clients/{agentId}"
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/team/agent-clients/{agentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/team/agent-clients/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.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": {}
}{
"message": "<string>",
"errors": {}
}agents.update
Conditions
- The caller must be a member (user, client or organization account) of the client space; agent accounts cannot manage agent accounts.
- username, when sent, is lowercased and must match 3 to 100 letters, digits, dots, dashes or underscores, and be unique among the agent accounts of the same client and organization (the current agent account is ignored).
- password is optional on update; when sent it must meet the same strength rule as on creation.
- profile_id, when sent, must be a profile of the current client account that can be assigned to this kind of agent account; sending null or omitting it keeps the current profile.
- When password, profile_id or is_active changes, the agent account’s current session is invalidated: it is signed out and must log in again.
- When is_active goes from true to false, the public accounting export links created by this agent account are revoked, and reactivating the agent account does not reopen them.
- Fields left out keep their current value; working_hours is cleared only when sent as null.
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.