Welcome to the Prince Handyman Services API! This guide provides documentation for accessing and utilizing the backend endpoints to interact with our service offerings, including making appointments, user authentication, and handling inquiries.
- Fetch a User:
/auth/users
- Fetch details of a user. Requires authentication.
- Sign Up:
/auth/users
- Required Payloads: email, name, phone_number, password - Login:
/authtoken/token/login
- Required Payloads: email, password - Users will receive an auth_token upon successful authentication. - Make an Appointment:
/api/phs/
- Required Payloads: user (as {user_id}), service_name, time, address, date (in YY-MM-DD format) - This is a protected route. Authentication is required. - Inquiries:
/contact/
- Required Payloads: name, email, phone_number, message - Forgot Password:
/forgot-password/
- Required Payload: email - A token will be sent to the user's email address for password reset verification. - Verify Token:
/verify-token/
- Required Payloads: token, user_id - Reset Password:
/reset-password/
- Required Payloads: user_id, new_password, confirm_password - OAuth Google Authentication:
/accounts/google/login/callback/
- For signin/signup using Google email accounts. - Logout:
/authtoken/token/logout
- This is an authenticated route. Once a logout is successful, the response will be 204, "No Content", which means the token has been destroyed and the frontend can navigate to the login page.
To access protected endpoints, authentication is required. Users can sign up to receive credentials or log in to receive an auth_token. The token should be provided as "Token {token_value}" in the header of API calls to protected endpoints.
- Login and Receive Token:
/authtoken/token/login/
- Successful login provides an auth_token for accessing protected endpoints.
- Register as a New User:
/auth/users/
- Provides access to the service by creating a new user account.
- Logout and Destroy Token:
/authtoken/token/logout
- Authenticated route for securely logging out. A successful logout will return a 204 "No Content" response, indicating that the token has been successfully destroyed.
The backend server utilizes PostgreSQL as its database system, ensuring reliability and scalability for storing user information, service appointments, and other relevant data.
For more information on endpoints, including request and response formats, refer to our comprehensive API documentation or reach out to our support team. Our backend is built with Python's Django REST Framework, offering robust and scalable solutions for managing handyman service appointments and user interactions.