RentalTideRentalTideDocs
Dashboard

Staff API

Manage staff accounts, permissions, and schedules

Endpoints for managing user accounts, staff roles and permissions, and staff scheduling.

Users

Get current user data

GET /user

Returns user data including locations, permissions, and settings

Responses

CodeDescription
200User data retrieved successfully
401Unauthorized
500Internal server error

Create a new user

POST /user

Creates a new user via Auth0 and stores the record in DynamoDB

Request body

FieldTypeRequiredDescription
emailstringYes
customerIdstringYes
namestringYes
rolestringNo
permissionsarrayNo
locationsarrayNo
userSkillsarrayNo

Responses

CodeDescription
201User created successfully
400Missing required fields
500Internal server error

Update current user

PATCH /user

Updates the authenticated user's record in DynamoDB

Request body

FieldTypeRequiredDescription
profileNamestringNo
locationsarrayNo
userPermissionsarrayNo
userSkillsarrayNo

Responses

CodeDescription
200User updated successfully
401Unauthorized
500Internal server error

Delete a user

DELETE /user

Deletes the user from Auth0 and DynamoDB

Request body

FieldTypeRequiredDescription
idstringYesThe user ID to delete

Responses

CodeDescription
200User deleted successfully
400User ID is required
500Internal server error

Accept terms and conditions

POST /user/accept-terms

Records the user's acceptance of terms of service, provider terms, and privacy policy

Responses

CodeDescription
200Terms accepted successfully
401Unauthorized
500Internal server error

Check if user needs to accept terms

GET /user/terms-status

Returns whether the user has accepted the current version of terms

Responses

CodeDescription
200Terms status retrieved
401Unauthorized

Download user's personal data as PDF

GET /user/export/my-data

Exports all personal data associated with the authenticated user as a formatted PDF (GDPR/privacy compliance)

Responses

CodeDescription
200User data exported successfully as PDF
401Unauthorized
500Internal server error

Get audit logs for a specific user

GET /user/{userId}/audit-logs

Returns activity logs for a user (requires admin permissions)

Parameters

NameInTypeRequiredDescription
userIdpathstringYes
limitqueryintegerNo
offsetqueryintegerNo

Responses

CodeDescription
200Audit logs retrieved successfully
401Unauthorized
403Forbidden - insufficient permissions
500Internal server error

Register an Expo push token

POST /user/push-token

Stores an Expo push token for the authenticated user to enable push notifications

Request body

FieldTypeRequiredDescription
tokenstringYesThe Expo push token (e.g. ExponentPushToken[xxx])

Responses

CodeDescription
200Push token registered successfully
400Token is required
401Unauthorized
500Internal server error

Remove an Expo push token

DELETE /user/push-token

Removes an Expo push token for the authenticated user

Request body

FieldTypeRequiredDescription
tokenstringYesThe Expo push token to remove

Responses

CodeDescription
200Push token removed successfully
400Token is required
401Unauthorized
500Internal server error

User Management

Get users by customer ID

GET /userManagement

Retrieves all users associated with a customer ID. If no customerId is provided, uses the authenticated user's customerId.

Parameters

NameInTypeRequiredDescription
customerIdquerystringNoCustomer ID to query users for

Responses

CodeDescription
200Users retrieved successfully
400Customer ID not found for the authenticated user
401Unauthorized
404User not found
500Internal server error

Create a new user

POST /userManagement

Creates a new user via Auth0 and stores the record in DynamoDB

Request body

FieldTypeRequiredDescription
emailstringYes
customerIdstringYes
namestringYes
userRolestringNo
permissionsarrayNo
locationsarrayNo
userSkillsarrayNo
isSetupbooleanNo

Responses

CodeDescription
201User created successfully
400Missing required fields
409User already exists
500Internal server error

Update a user

PATCH /userManagement

Updates the user record in DynamoDB

Request body

FieldTypeRequiredDescription
idstringYesUser ID to update

Responses

CodeDescription
200User updated successfully
400User ID is required
500Internal server error

Delete a user

DELETE /userManagement

Deletes the user from Auth0 and DynamoDB

Request body

FieldTypeRequiredDescription
idstringYesUser ID to delete

Responses

CodeDescription
200User deleted successfully
400User ID is required
500Internal server error

Find available phone numbers

POST /userManagement/find-phone-numbers

Searches for available phone numbers by country and area code

Request body

FieldTypeRequiredDescription
countrystringYesCountry code
areaCodestringYesArea code to search

Responses

CodeDescription
200Available numbers retrieved successfully
400Country and area code are required
500Internal server error

Purchase a phone number

POST /userManagement/purchase-phone-number

Purchases a phone number and assigns it to a location with default IVR configuration

Request body

FieldTypeRequiredDescription
phoneNumberstringYesPhone number to purchase
locationIdstringYesLocation ID to assign the number to

Responses

CodeDescription
200Phone number purchased successfully
400Phone number and locationId are required
500Internal server error

Resend staff invitation email

POST /userManagement/{id}/resend-invitation

Sends a password change email to the staff member so they can set their password

Parameters

NameInTypeRequiredDescription
idpathstringYesUser ID

Responses

CodeDescription
200Invitation email sent successfully
404User not found
500Internal server error

Staff Schedule

Create a new staff schedule

POST /staffSchedule

Creates a new schedule entry for a staff member at a location

Request body

FieldTypeRequiredDescription
customerIdstringYes
locationIdstringYes
staffIdstringYes
startTimestringYes
endTimestringYes
recurringbooleanNo
recurrencePatternobjectNoPattern for recurring schedules
templateIdstringNo

Responses

CodeDescription
201Schedule created successfully
400Missing required fields
500Server error

Get staff schedules

GET /staffSchedule

Retrieves schedules by locationId or customerId

Parameters

NameInTypeRequiredDescription
locationIdquerystringNoThe location ID (either locationId or customerId required)
customerIdquerystringNoThe customer ID (either locationId or customerId required)

Responses

CodeDescription
200Successfully retrieved schedules
400At least one query parameter required
500Server error

Update a staff schedule

PUT /staffSchedule/{id}

Updates details of an existing staff schedule

Parameters

NameInTypeRequiredDescription
idpathstringYesThe schedule ID

Request body

FieldTypeRequiredDescription
startTimestringNo
endTimestringNo
recurringbooleanNo
recurrencePatternobjectNo

Responses

CodeDescription
200Schedule updated successfully
400No fields to update
500Server error

Delete a staff schedule

DELETE /staffSchedule/{id}

Removes a staff schedule. Only the owner (matching customerId) can delete.

Parameters

NameInTypeRequiredDescription
idpathstringYesThe schedule ID

Responses

CodeDescription
200Schedule deleted successfully
403Forbidden - no permission to delete
404Schedule not found
500Server error

Was this page helpful?
Need help? Contact Support.See what’s new. Check out changelog.Questions? Book a video chat.
Ask AI
Responses are generated using AI and may contain mistakes.
Ask questions about RentalTide and get help with your integration.