home > support > API > List staff members
List of staff members
List of staff members. Use if developing a solution to perform a list of payments assigned to specific staff member. Returns basic information about the member.
For use by tour operators only, not available for those accessing the API with Marketplace Agent credentials.
Endpoint | /c/staff/list |
Formats | XML |
Example | /c/staff/list.xml |
Verb | GET |
PHP examples use the PHP Client Library with SimpleXML
object list_staff_members ( int $channel = 0 )
// Set the Channel ID
// For Suppliers this can be found in the API settings page
$channel = 3;
// Query the TourCMS API
$result = $tourcms->list_staff_members($channel);
// Loop through each Tour and print out the Tour ID
foreach($result->users->user as $user) {
print 'Username: ' . $user->username .' - ';
print 'email: ' . $user->email .'
';
}
Username: username1 - email: example@email.com
C# examples use the .Net Client Library
Code sample here soon
VB examples use the .Net Client Library
Code sample here soon
NodeJS examples use the NodeJS Wrapper
TourCMS.listStaffMembers({
channelId: 13277,
callback: function(response, status) {
if (response.total_users == 0)
console.log(response);
else{
//Loop through each component and output its component key
response.users.user.forEach(function(user) {
console.log("User " + user.username + ": " + user.email);
});
}
}
});
User example: example@email.com
Looking for sample code in a different language? TourCMS and community provided API libraries
Enter your TourCMS API credentials below to call the List staff members endpoint.
There are no querystring parameters supported by this method.
XML Node | Notes | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request | Confirmation of the request that you sent | ||||||||||||||
error | Any error message returned, if there is no error this will just contain the text OK | ||||||||||||||
total_users | Number of staff members connected to the channel requested | ||||||||||||||
users |
Array of staff members
|
||||||||||||||