Resource URL
Returns a staff member using username.
Code Block |
---|
|
GET /staff/:username
ANY /staff/:username?_method=get |
Parameters
Table of allowed paramatersparameters.
_fields | partial string | Allows you to specify optional fields and linked objects to include in the response. |
---|
Handling the response
Below is a table of available response fields and objects that are returned within the response object of the returned object. The optional fields and objects can be requested in the _fields
paramater parameter; see included examples. Underlined values are default.
id | number | The staff identifier. For example, 123. This can be used in subsequent staff requests as :staff_id. |
---|
username | string | A unique name given to a staff member. This can be used in subsequent staff requests as :username. |
---|
firstname | string | The firstname of the staff member. |
---|
surname | string | The surname of the staff member. |
---|
title | string | The staff members title. For example: mr, mrs, dr, etc |
---|
email | string | The staff members email. |
---|
fax | string | The staff members fax |
---|
phone | string | The staff members phone number. |
---|
mobile | string | The staff members mobile number |
---|
position | string | The staff members position. For example, software engineer or CEO. |
---|
...
Code Block |
---|
|
GET /staff/kurt_wagner.json?_fields=email&_limit=2 |
Code Block |
---|
|
{
"response" :
{
"firstname" : "AffinityLive",
"email" : "system@affinitylive.com",
"id" : "1",
"surname" : "System"
},
{
"firstname" : "Michael",
"email" : "michael.david@internetrix.com.au",
"id" : "2",
"surname" : "David"
}
,
"meta" : {
"status" : "ok",
"message" : "Everything executed as expected."
}
} |