Agents¶
Access via client.agents.
signtraker.agents.AgentsClient ¶
AgentsClient(api_key: Optional[str] = None, base_url: Optional[str] = None, *, subdomain: Optional[str] = None, timeout_seconds: Optional[float] = None, max_retries: Optional[int] = None, retry_backoff_seconds: Optional[float] = None)
Bases: BaseClient
Client for the /api/agents endpoints.
Source code in signtraker/base_client.py
list_agents ¶
list_agents(*, email: Optional[str] = None, filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[ODataValue] = None, select: Optional[ODataValue] = None) -> List[Dict[str, Any]]
List agents, optionally filtered, sorted, and paged.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
email
|
Optional[str]
|
Find an agent by exact email address. |
None
|
filter
|
Optional[str]
|
OData |
None
|
top
|
Optional[int]
|
OData |
None
|
skip
|
Optional[int]
|
OData |
None
|
orderby
|
Optional[ODataValue]
|
OData |
None
|
select
|
Optional[ODataValue]
|
OData |
None
|
Returns:
| Type | Description |
|---|---|
List[Dict[str, Any]]
|
The list of matching agent records. |
Raises:
| Type | Description |
|---|---|
AuthenticationError
|
If the API key is invalid. |
SignTrakerError
|
For other API errors. |
Source code in signtraker/agents.py
get_agent ¶
Get a single agent by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent_id
|
int
|
Unique identifier of the agent. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The agent record. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
If the agent does not exist. |
AuthenticationError
|
If the API key is invalid. |
SignTrakerError
|
For other API errors. |
Source code in signtraker/agents.py
create_agent ¶
Create an agent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent
|
Dict[str, Any]
|
The agent payload. Required fields include |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The created agent record. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If the payload is invalid. |
AuthenticationError
|
If the API key is invalid. |
SignTrakerError
|
For other API errors. |
Source code in signtraker/agents.py
update_agent ¶
Update an agent using a JSON Merge Patch.
Only the fields present in changes are modified; omitted fields
remain unchanged. You may not convert an agent to/from a manager with
this method, and synced National Account agents cannot be updated
directly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent_id
|
int
|
Unique identifier of the agent to update. |
required |
changes
|
Dict[str, Any]
|
The partial agent payload to merge. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The updated agent record. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
If the agent does not exist. |
ValidationError
|
If the payload is invalid. |
AuthenticationError
|
If the API key is invalid. |
SignTrakerError
|
For other API errors. |
Source code in signtraker/agents.py
activate_agent ¶
Activate an agent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent_id
|
int
|
Unique identifier of the agent to activate. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The parsed response payload (empty when the API returns no body). |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
If the agent does not exist. |
AuthenticationError
|
If the API key is invalid. |
SignTrakerError
|
For other API errors. |
Source code in signtraker/agents.py
deactivate_agent ¶
Deactivate an agent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent_id
|
int
|
Unique identifier of the agent to deactivate. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The parsed response payload (empty when the API returns no body). |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
If the agent does not exist. |
AuthenticationError
|
If the API key is invalid. |
SignTrakerError
|
For other API errors. |