REST API Users

From XING Events Developer Documentation
Jump to: navigation, search

Object type: user

Properties

User objects provide the following properties.

Attributes: R - accessible in read requests W - accessible in write (update) requests C - accessible in create requests

Property
Type
Attributes Description

id Integer R-- The internal database id of this object.
firstName
String
RWC
The first name of the user.
required
lastName
String
RWC
The last name of the user.
required
username
String
R-C
The unique username of the user.
required (NOTE: must be a valid email address)
password
String
--C
The password for the account.
required
language
Language
RWC
The language of the user.
required
email
String
R-C
The email address of the user.
optional (Default: username)
timezone
Timezone
RWC
The timezone of the user.
optional (Default: Europe/Berlin)
birthday
Date
RWC
The birthday of the user.
optional (Default: null)
gender
String
RWC
The gender of the user: m - male f - female.
optional (Default: null)
telephone
String
RWC
The telephone number of the user
optional (Default: null)
company
String
RWC
The company of the user
optional (Default: null)
signUpPromotionCode
String
R-C
The promotion code the user can use on sign up.
optional (Default: null)
signupTime
Date
R--
The timestamp of when the user was signed up.
lastLogin
Date
R--
The timestamp of when the user has last logged in.
creationTime Date R--
The timestamp, when the event was created.
lastModified Date R--
The timestamp, when the event was last modified.

Objects

Objects inside an user object can be accessed through URLs like /api/user/<id>/<object>. For example /api/user/345543/bankAccount.

Name
Description
bankAccount Detailed information about the bank account of the user.
address/billing Detailed information about the billing address of the user.

Methods

Find

Call GET /api/user/find
Parameters username — email address of the user to find
Description This request will return the id of the user with the given email address (=username).
Response {"ids":[<id of user>],"success":true/false}.
Needed key type Any

Read

Call GET /api/user/<id>
Description This request will return the user object with the specified internal id. The response contains all properties marked with R.
Response {"user":{"firstName": ...}, "success":true}.
Needed key type Any
Errors See General Errorcodes.

Update

Call POST /api/user/<id>
Parameters All properties marked with W.
Description This request will update the properties of the user with the internal id <id>. Only properties which are provided as parameters will be updated.
Response {"success":true}.
Needed key type Administrator, Editor
Errors See General Errorcodes.

Request Permission

Call POST /api/user/<id>/requestPermission
Parameters password - The password of the user account to request permissions for
Description This request will request api permission for the given user object. More info here. By default, you can add only one user permission to an API key.
Response {"success":true} and HTTP Status 201 - the given password was right and the permission was created
{"success":false, "errors":["com.amiando.api.rest.InvalidPassword"]}
and HTTP Status 400 - the given password was wrong. You will get this response even if your API Key has already permission of the user.
Needed key type Administrator
Errors com.amiando.api.rest.InsecureConnection
com.amiando.api.rest.NoMultiUserKey

com.amiando.api.rest.InvalidPassword
See General Errorcodes.

Logout

Call POST /api/user/<id>/logout
Description Logs out the user with the specified internal id.
Response {"success":true}.
Needed key type Administrator, Editor
Errors See General Errorcodes.

Enumerate events

Call GET /api/user/<id>/events
Description This request will return all the events of the user.
Parameters resultType: With this parameter set to full the returned object will contain the whole events objects. If this value is set to ids, only the event ids are returned (default).

pageSize: if resultType=full is used, this call returns only so many events as stated in this parameter (default and maximum value is 500).
page: if resultType=full is used, this call returns a maximum of 500 events. If more events exists, use this parameter to select the page you want to receive. Example: "pageSize=100&page=0" will return the first 100 events. "pageSize=100&page=1" will return events number 101 to 200.

Response {"events":[...], "id":true}.

If the parameter resultType=full is used, the response will contain additional information about the current page: {"lastPage": ..., "totalResults":..., "currentPage":..., "success": true, "events":[{...},...,{...}]}

Needed key type Any
Errors See General Errorcodes.
REST API Contents
Getting Started Get your API key Overview Formats Errors
Data Types Event Participant Payment Ticket
Ticket Categories ProductDefinition Products CodeDefinition
TicketShop Addresses Ticket Types Payment Types
BankAccount UserDataDefinition UserData User
ApiKey
Data Synchronization Sync Interface