GET /api/persons/[user_name]
Alias: GET /api/person
Description
Returns person info object for user name. If ”person” alias is used, will always return info for logged in user.
Return
Array of one Person Object
Security
Superuser, person’s manager and self
GET /api/persons/
Description
Returns list of Persons objects.
Parameters
start
Int. Optional. Index to start at
limit
Int. Optional. Max length of result set
organisation_id
Int. Optional. Limits the result set to members/employees of organisation.
event_id
Int. Optional. Limits the result set to persons signed on to event.
Return
Array of Person objects.
Security
Superuser, organisation’s manager if organisation_id is given
PUT /api/persons/[user_name]
Description
Updates person info for user name
Parameters
person_data
Object. All are optional unless otherwise noted. Not that object must be delivered on the "modern" format: "person_data[firstname]=John&person_data[lastname]=Doe". Only fields present will update person. Can contain the following fields:
- user_name
- password
- firstname
- lastname
- jobtitle
- mobile
- email
- birthdate
- extern_person_id
- address
- postcode
- city
- phone
- sex
- notice
- employee_code
- profile_image
- source
- code
- old_password: Required if password or user_name is present, and person is updating self. Not required if manager or superuser is updating. Must match previous password
- password_match: Required if password or user_name is present, and person is updating self. Not required if manager or superuser is updating.. Must match password.
Return
Array of one Person object.
Security
Superuser, person’s manager and self
POST /api/persons New in 2.4.3
Creates new person. Input params are equal to the full view for APIPerson object.
Parameters
organisation_id
Int. Required. Where the new person object should reside.
role_id
Int. Reqired. What role the new person should have in connection to the passed org.
person_data
Json object. Data to update person with. Please note that the 'user_name' must be included in this object. Can contain the following fields:
- user_name
- password
- firstname
- lastname
- jobtitle
- mobile
- email
- birthdate
- extern_person_id
- address
- postcode
- city
- phone
- sex
- notice
- employee_code
- profile_image
- source
- code