GET
View an agent (organization)
Organization space User accounts only For: Administrator · Permission: agents.retrieve Conditions
  • The caller must be a member (user, client or organization account) of the organization space; agent accounts cannot manage agent accounts.
Part of Manage agent accounts.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string
required

Identifier of the agent (27-character KSUID string). It must belong to the current space.

Query Parameters

response
enum<string>
default:resource

Response mode. Default resource; none answers 204 No Content.

Available options:
resource
fields
string

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.

include
string

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

200 - application/json

Resource.

id

Identifier of the agent account (27-character KSUID string).

username

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

First name of the agent account.

last_name

Last name of the agent account.

type

Kind of agent account: agent (company), client_agent or organization_agent.

working_hours
object | null

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.

is_active
boolean

Whether the agent account can sign in. Set to false by deactivation.

created_at

Date and time the record was created (ISO 8601, UTC).

updated_at

Date and time the record was last changed (ISO 8601, UTC).

profile_id

Identifier of the access profile assigned to the agent account (27-character KSUID string).

is_direct_seller
boolean

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.

company
object | null

Short company the agent account belongs to, for company agent accounts. Only rendered when requested with the include parameter.

client
object | null

Short client account the agent account belongs to, for client agent accounts. Only rendered when requested with the include parameter.

organization
object | null

Organization the agent account belongs to. Only rendered for organization agent accounts, and only when requested with the include parameter.