Skip to content

Get guest

Endpoint

GET /organizations/{org_id}/guests/{guest_email}

This endpoint retrieves the details for a specific guest user within the organization, identified by their email address.

Request

Replace {org_id} with your Organization ID and {guest_email} with the URL-encoded email address of the guest you want to retrieve (e.g., user%40example.com).

Headers

  • Authorization: Bearer {your_access_token}
  • Accept: application/json
  • X-Tallyfy-Client: APIClient

Query parameters (optional)

  • with (string): Include additional related data, e.g., stats.

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const guestEmail = "guest.to.get@example.com";
const encodedEmail = encodeURIComponent(guestEmail); // Ensure email is URL encoded
const queryParams = '?with=stats'; // Example: Add query params if needed
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/guests/${encodedEmail}${queryParams}`;
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, {
method: 'GET',
headers: headers
})
.then(response => {
return response.json().then(data => { // Attempt to parse JSON regardless of status
if (!response.ok) {
console.error(`Failed to get guest ${guestEmail}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data; // Pass successful data along
});
})
.then(data => {
console.log(`Successfully retrieved guest ${guestEmail}:`);
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error getting guest ${guestEmail}:`, error.message);
});

Response

A successful request returns a 200 OK or 201 Created status code and a JSON object containing a data field with the guest’s details.

{
"data": {
"id": "guest_code_abc123",
"email": "guest.to.get@example.com",
"last_accessed_at": "2024-05-15T10:00:00Z",
"details": {
"first_name": "Specific",
"last_name": "Guest",
"status": "active",
"company_name": "Guest Company",
// ... other guest details ...
},
// Included if requested with 'with=stats'
"stats": { ... }
}
}

If the guest email is not found or you lack permission, you will likely receive a 404 Not Found or 403 Forbidden error.


Guests > List guests

The GET endpoint retrieves guest users from an organization with their details like email access history location information and optional statistics using various programming languages through authenticated API requests.

Guests > Delete guest

A DELETE endpoint that removes guest users from an organization by their email address and returns either a success status code or guest record details upon completion.

Guests > Create guest

The POST endpoint creates guest users in an organization by accepting JSON data with required email and optional fields like name and company details while returning the newly created guest’s information upon success.

Guests > Update guest

The PUT endpoint allows modification of existing guest user details through their email address with updated information like name phone and company details while maintaining the original email address.