User API

GET

The GET method returns a user object. Users can be identified by id:

GET https://projecten.viadesk.com/api/user?id=618…
GET https://projecten.viadesk.com/api/user?id=mar…
        &fullprofile=true  // optional, default is false, returns all properties visible on the user profile

response body:
{
    "id": "6180-75736572",
    "email": "marc@viadesk.nl",
    "name": "Marc Leidner",
    "lastname": "Leidner",
    "firstname": "Marc",
    "company": "Viadesk",
    "gender": "male",
    "thumbnailUrl": "https://projecten.viadesk.com/thumbnail/393836-757…  // last digits indicate image size
    "created": "2007-06-20T16:51:43CEST"
}

 

POST

The POST method allows to create or update a User and as well set permissions. Setting permissions on an Office can be done directly or via adding people to member lists.

This method can only be called as a Webmaster.

POST  https://projecten.viadesk.com/api/user.json
form field “email” // required
form field “lastname” // required
form field “fid” // foreign id, optional (see 1)
form field “invite” // boolean, default is true, optional (see 2)
form field “memberlist” // pointer, optional (see 3)
form field “officepermission” // string, optional (see 4)
other...  // optional (see 5)     
           

  • A foreign id can be provided by the caller, it will be used to identify the user before taking the email parameter. Using a fid will allow you to later change the email for a user. This is otherwise not possible to do via the API.
  • By default, a new user will receive an invitation to join the platform. If you do not wish this you should set the boolean to false
  • You can provide a memberlist form field  with the value of a pointer string (e.g. 3733-67726f7570)  for each of the Member lists that you want the user to be added to
  • You can provide an officepermission form field with a format id-permission (e.g. 623-read) for each of the offices that you want to add the user to. Allowed permissions are “read”, “add”, “edit”, “manage”. The id is in this case not the entire pointer of the office but only the “number” part.
  • You can update almost any user field: category, locale, gender, firstname, prefix, email, company, companyaddress1, companyaddress2, companyzip, companycity, companycountry, visitaddress1, visitaddress2, visitzip, visitcity, visitcountry, division, department, jobtitle, phone, cellphone, fax, xing, skypename, title, notes, expertise, introduction, topics, tags, customcontact1, customcontact2, customcontact3, customcontact4, customcontact5, customcompany1 → 5, customaboutme1 → 5,  deactivated

PUT

Use PUT to upload a user's profile photo.

PUT https://projecten.viadesk.com/api/user?id=mar…

[file in request body]


DELETE

The DELETE method allows to permanently remove users or to deactivate them. The id parameter is required. The deactivateonly parameter is optional (default is true)

DELETE marc@viadesk.nl&deactivateonly=true">https://projecten.viadesk.com/api/user?id=marc@viadesk.nl&deactivateonly=true