Get a user

Get /users/{id}

URL parameters:

Name Description Type Mandatory
id User Id String Yes

Response:

Name Description Type
id User Id String
username Email address of the user String
civility 1: Mr ; 2: Ms Int
firstName User's firstname String
lastName User's last name String
customerType 0: particular ; 1: professionnal String
company Company String
activity Activity String
job Job String
address Address String
address2 Address (after) String
zipCode Zip code String
city City String
country Country String
phone Phone String
mobile Mobile String
settings

Tipimail settings of the user

Name Description Type
newsletter If the user subscribed to the newsletter Boolean
language Interface language String
dateFormat Datetime on timestamp format String
timeFormat String
timezone String
Array
Programming language:

Response exemple:

							{
								"id": "5565re4gre4ht6h54tgregre",
								"username": "email1@example.com",
								"civility": 1,
								"firstName": "Firstname1",
								"lastName": "Lastname1",
								"customerType": 1,
								"company": "Company1",
								"activity": "Activity1",
								"job": "Job1",
								"address": "Address1",
								"address2": "Address11",
								"zipCode": "Zipcode1",
								"city": "City1",
								"country": "Country1",
								"phone": "00-00-00-00-01",
								"mobile": "00-00-00-00-11",
								"settings": {
									"newsletter": true,
									"language": "EN",
									"dateFormat": "MM/DD/YYYY",
									"timeFormat": "HH:mm:ss",
									"timezone": "Europe/Paris"
								}
							}
							

Code example:

								curl -X GET -H "Content-Type: application/json" -H "X-Tipimail-ApiUser:YOUR_SMTP_USERNAME" -H "X-Tipimail-ApiKey:YOUR_SMTP_KEY" https://api.tipimail.com/v1/users/f4re5f5re4gre7gre8g87g58
							
require 'vendor/autoload.php';

$tipimail = new Tipimail\Tipimail('YOUR_SMTP_USERNAME', 'YOUR_API_KEY');

try {
	
	$result = $tipimail->getUsersService()->get('646r54g6r4gr6g46g46546d4');
	var_dump($result);
		
}
catch(Tipimail\Exceptions\TipimailException $e) {
	echo 'Exception received :', $e->getMessage(), "\n";
	
}