Fetches all users or a single user by ID.
id (optional): The ID of the user to fetch. If not provided, all users are returned.name (optional): Filter users by name or email.status (optional): Filter users by wallet status (new, sent, downloaded, suspended).cardType (optional): Filter users by card type (Mifare EV3, LEGIC, HID, NFC, Other).// Fetch all users
fetch('/api/users')
// Fetch a single user
fetch('/api/users?id=123')
// Filter users by card type
fetch('/api/users?cardType=Mifare EV3')
// Filter by status and name
fetch('/api/users?status=downloaded&name=john')# Fetch all users
curl -X GET "https://your-domain.com/api/users"
# Fetch a single user
curl -X GET "https://your-domain.com/api/users?id=123"
# Filter users by card type
curl -X GET "https://your-domain.com/api/users?cardType=Mifare%20EV3"
# Filter by status and name
curl -X GET "https://your-domain.com/api/users?status=downloaded&name=john"Creates a new user.
name (string, required)email (string, required)imei (string, required)company (string, required)tenantId (string, required)cardType (string, required) - One of: Mifare EV3, LEGIC, HID, NFC, Otherfetch('/api/users', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: 'John Doe',
email: 'john.doe@example.com',
imei: '123456789012345',
company: 'NEOX Corporation',
tenantId: 'tenant123',
cardType: 'Mifare EV3'
})
})curl -X POST "https://your-domain.com/api/users" -H "Content-Type: application/json" -d '{
"name": "John Doe",
"email": "john.doe@example.com",
"imei": "123456789012345",
"company": "NEOX Corporation",
"tenantId": "tenant123",
"cardType": "Mifare EV3"
}'Deletes a user by ID.
id (string, required): The ID of the user to delete.fetch('/api/users?id=123', { method: 'DELETE' })curl -X DELETE "https://your-domain.com/api/users?id=123"Imports users from a CSV file.
file (File, required): The CSV file containing user data with headers: name, email, imei, company, tenantId, cardTypeconst formData = new FormData();
formData.append('file', fileInput.files[0]);
fetch('/api/users/import', {
method: 'POST',
body: formData
})curl -X POST "https://your-domain.com/api/users/import" -F "file=@users.csv"Distributes a wallet to a user.
userId (string, required): The ID of the user to receive the wallet.fetch('/api/wallet?userId=123', { method: 'POST' })curl -X POST "https://your-domain.com/api/wallet?userId=123"Generates a Google Wallet pass for a user.
userId (string, required): The ID of the user.fetch('/api/wallet/google/123')Generates an Apple Wallet pass for a user.
userId (string, required): The ID of the user.fetch('/api/wallet/apple/123')Sends an email notification to a user.
userId (string, required): The ID of the user to email.fetch('/api/email?userId=123', { method: 'POST' })Sends a push notification to a user.
userId (string, required): The ID of the user to send a push notification to.fetch('/api/push?userId=123', { method: 'POST' })