Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Resource URL 

Returns a staff member using username.

Code Block
languagebash
GET /staff/:username
ANY /staff/:username?_method=get

Parameters

Table of allowed paramatersparameters.

_fieldspartial stringAllows 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.

idnumberThe staff identifier. For example, 123. This can be used in subsequent staff requests as :staff_id.
usernamestringA unique name given to a staff member. This can be used in subsequent staff requests as :username.
firstnamestringThe firstname of the staff member.
surnamestringThe surname of the staff member.
titlestringThe staff members title. For example: mr, mrs, dr, etc
emailstringThe staff members email.
faxstringThe staff members fax
phonestringThe staff members phone number.
mobilestringThe staff members mobile number
positionstringThe staff members position. For example, software engineer or CEO.

...

Code Block
languagebash
GET /staff/kurt_wagner.json?_fields=email&_limit=2
Code Block
languagejavascript
{
   "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."
   }
}