Users

Get a list of users

GET /people/users[/id/#{company_id}]

URI arguments

Argument Type Required Value
id integer The #{company_id} of the company from which you want to get users.

cURL request example

curl -u #:#{password}'\
-H 'User-Agent: #{user_agent}'\
-X GET https://#{subdomain}.iscriba.com/api/people/users

XML response example

HTTP Status: 200 OK

<?xml version="1.0" encoding="utf-8"?>
<xml>
	<users>
		<user>
		...
		</user>
		<user>
		...
		</user>
	</users>
</xml>

Note: the data available in <item> nodes are different depending on whether the user is related to your own company or a client company. See get a user to see the different possibilities.

Top


Get a user

GET /people/user/id/#{user_id}

URI arguments

Argument Type Required Value
id integer yes The #{user_id} of the user your wish to get.

cURL request example

curl -u #:#{password}'\
-H 'User-Agent: #{user_agent}'\
-X GET https://#{subdomain}.iscriba.com/api/people/user/id/1

XML response examples

When #{user_id} is equal to the #{user_id} of a user related to your own company:

HTTP Status: 200 OK

<?xml version="1.0" encoding="utf-8"?>
<xml>
	<user>
		<user_id>1</user_id>
		<company_id>1</company_id>
		<company_name>Company Name</company_name>
		<parent_company_id>0</parent_company_id><!-- always equal to 0 when it's your own company -->
		<firstname>Firstname</firstname>
		<lastname>Lastname</lastname>
		<email>firstname@companyname.com</email>		
		<username>username</username>
		<other_infos>
		    <title>Title</title>
		    <officephone>0123456789</officephone>
		    <officephone_ext>123</officephone_ext>
		    <mobilephone>0612345678</mobilephone>
		    <fax>0123456789</fax>
		    <homephone>0123456789</homephone>
		    <imname>IM Name</imname>
		    <imservice>AIM</imservice>
		</other_infos>
		<language>french</language>
		<show_help>1</show_help>
		<is_account_owner>1</is_account_owner>
		<is_admin>1</is_admin>
		<feeds_token>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</feeds_token>
	</user>
</xml>	

When #{user_id} is equal to the #{user_id} of a user related to a client company:

HTTP Status: 200 OK

<?xml version="1.0" encoding="utf-8"?>
<xml>
	<user>
		<user_id>4</user_id>
		<company_id>2</company_id>
		<company_name>Client Name</company_name>
		<parent_company_id>1</parent_company_id><!-- always equal to the #{company_id} of your own company when it's client company -->
		<firstname>Firstname</firstname>
		<lastname>Lastname</lastname>
		<email>firstname@clientname.com</email>		
		<other_infos>
		    <title>Title</title>
		    <officephone>0123456789</officephone>
		    <officephone_ext>123</officephone_ext>
		    <mobilephone>0612345678</mobilephone>
		    <fax>0123456789</fax>
		    <homephone>0123456789</homephone>
		    <imname>IM Name</imname>
		    <imservice>AIM</imservice>
		</other_infos>
		<language>french</language>
		<show_help>1</show_help>
		<is_favorite>1</is_favorite>
		<auth_token>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</auth_token>
		<feeds_token>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</feeds_token>
	</user>
</xml>	

Top


Create a user

POST /people/user

Request fields

Field Type Required Value
Common fields for all users:
company_id integer yes #{company_id} of the company to bind this user to.
firstname string yes Firstname.
lastname string yes Lastname.
email string yes E-mail.
language string yes Language. See the possible values ​​of language.
title string Title (role in the company).
officephone string Professional telephone line.
officephone_ext string Extension for the professional telephone line.
mobilephone string Mobile phone line.
fax string Fax line.
homephone string Personal phone line.
imname string The username for an Instant Messaging Service.
imservice string Instant Messaging Service.
See the possible values ​​of imservice.
show_help boolean Enable/disable the interface contextual help.
Fields for a user related to your own company:
username string yes Username.
password string yes Password.
is_admin boolean Determines whether the user is an administrator.
Fields for a user related to a client company:
is_favorite boolean Determines whether the user is a favorite interlocutor.

cURL request example

curl -u #:#{password}'\
-H 'User-Agent: #{user_agent}'\
-d "company_id=1&firstname=John&lastname=Doe&email=johndoe@domaine.com&language=french"\
https://#{subdomain}.iscriba.com/api/people/user

XML response example

HTTP Status: 201 Created

<?xml version="1.0" encoding="utf-8"?>
<xml>
	<user_id>1</user_id>
</xml>	

Top


Modify a user

PUT /people/user/id/#{user_id}

URI arguments

Argument Type Required Value
id integer yes The #{user_id} of the user you wish to modify.

Request fields

Same as create a user except that no field is required.

Note: updates to the password or username are not done and you can’t move a user.

cURL request example

curl -u #:#{password}'\
-H 'User-Agent: #{user_agent}'\
-X PUT\
-d "firsname=Jane&language=english"\
https://#{subdomain}.iscriba.com/api/people/user/id/1

XML response example

HTTP Response: 200 OK

<?xml version="1.0" encoding="utf-8"?>
<xml>
	<user_id>1</user_id>
</xml>	

Top


Delete a user

DELETE /people/user/id/#{user_id}

URI arguments

Argument Type Required Value
id integer yes The #{user_id} of the user you wish to delete.

cURL request example

	
curl -u #:#{password}'\
-H 'User-Agent: #{user_agent}'\
-X DELETE https://#{subdomain}.iscriba.com/api/people/user/id/1

XML response example

HTTP Response: 200 OK

<?xml version="1.0" encoding="utf-8"?>
<xml>
	<user_id>1</user_id>
</xml>	

Top