# Topmate User and Service Api's ## Access to the API's There are two scenarios: - Frontend to Topmate server call: CORS needs to be allowed on the website's server to enable the call from the frontend. Please share the domain from which calls will be made to galactus with Topmate team. - Server to Topmate server call: An access token needs to be included in the request to authenticate the server-to-server call to the Topmate service. e.g. Authourization : pokmovvcnlppbndzreyqwcordihufchtikkgbvab ## Service Api ```json https://galactus.run/service-public/79642 { "id": 79642, "title": "Package", "description": "<p>testing asds dsas</p>", "duration": 10, "charge": 0, "user": 110, "bookings_count": 0, "promised_response_time": 48, "type": 4, "original_charge": 0, "bookings_limit": null, "has_flexible_charge": false, "package_services": [ { "id": 5509, "service": { "id": 6919, "title": "Backend Development Roadmap", "description": "<p>We will be discussing about how to go about building your profile as a backend developer.</p>", "type": 1, "duration": 60, "charge": 100, "is_donation": false }, "created": "2023-03-08T14:13:29.748931+05:30", "modified_date": "2023-03-11T15:38:48.567812+05:30", "count": 2, "is_deleted": false }, { "id": 5532, "service": { "id": 107832, "title": "Document New", "description": null, "type": 5, "duration": 0, "charge": 200, "is_donation": false }, "created": "2023-03-08T16:42:14.733860+05:30", "modified_date": "2023-04-27T15:59:21.312495+05:30", "count": 2, "is_deleted": false } ], "total_charge": 600, "session_count": 4, "currency": { "code": "INR", "currency": "Indian Rupee", "display_text": "₹" } } ``` Description The provided JSON represents an object with various properties and nested objects. Here's an explanation of each field: - "id": 79642 - It represents the ID of the package. - "title": "Package" - The title or name of the package. - "description": "<p>testing asds dsas</p>" - The description of the package, which may include HTML tags. - "duration": 10 - The duration of the package in some unit (minutes, hours, etc.). - "charge": 0 - The charge or cost associated with the package. - "user": 110 - The ID of the user associated with the package. - "bookings_count": 0 - The number of bookings made for this package. - "promised_response_time": 48 - The promised response time for the package. - "type": 4 - The type of the package. - "original_charge": 0 - The original charge of the package (if applicable). - "bookings_limit": null - The limit on the number of bookings for the package (if applicable). - "has_flexible_charge": false - Indicates whether the package has a flexible charge option. - "package_services": An array of objects representing the services included in the package. Each object contains the following properties: - "id": The ID of the package service. - "service": An object representing the service included in the package. It contains the following properties: - "id": The ID of the service. - "title": The title or name of the service. - "description": The description of the service (may be null). - "type": The type of the service. - "duration": The duration of the service. - "charge": The charge or cost associated with the service. - "is_donation": Indicates whether the service is a donation. - "created": The creation date of the package service. - "modified_date": The last modified date of the package service. - "count": The count or quantity of the package service. - "is_deleted": Indicates whether the package service is deleted. - "total_charge": 600 - The total charge or cost of the package. - "session_count": 4 - The number of sessions included in the package. - "currency": An object representing the currency information. It contains the following properties: - "code": The currency code (e.g., INR for Indian Rupee). - "currency": The currency name (e.g., "Indian Rupee"). - "display_text": The symbol or text used to represent the currency (e.g., "₹"). # user profile api ```json https://galactus.run/fetchByUsername/?username=nileshattopmate_test { "id": 110, "first_name": "Nilesh", "last_name": "Bhosale", "username": "nileshattopmate_test", "social_url": "nilesh", "title": "Backend Lead at topmate.io", "description": "", "timezone": "Asia/Kolkata", "profile_pic": "https://topmate-staging.s3.ap-south-1.amazonaws.com/br3CyvWEuS4GngSNT8RZQk.png", "full_name": "Nilesh Bhosale", "services": [ { "id": 79642, "title": "Package", "description": "<p>testing asds dsas</p>", "duration": 10, "charge": 0, "user": 110, "type": 4, "specific_date": null, "bookings_limit": null, "package_services": [ { "id": 5509, "package": { "id": 79642, "title": "Package", "description": "<p>testing asds dsas</p>", "type": 4, "duration": 10, "charge": 0, "is_donation": false }, "service": { "id": 6919, "title": "Backend Development Roadmap", "description": "<p>We will be discussing about how to go about building your profile as a backend developer.</p>", "type": 1, "duration": 60, "charge": 100, "is_donation": false }, "created": "2023-03-08T14:13:29.748931+05:30", "modified_date": "2023-03-11T15:38:48.567812+05:30", "count": 2, "is_deleted": false } ], "total_charge": 600, "session_count": 4, "currency": { "code": "INR", "currency": "Indian Rupee", "display_text": "₹" }, "break_after_call": 0, "package_validity_in_months": 0 } ], "buffer": 1, "testimonials": [ { "id": 16610, "liked_properties": null, "follower_name": "Nilesh Bhosale 1", "text": "nice nice", "user": "nileshattopmate_test", "profile_pic": null, "service": "Just Hangout", "document": null, "booking": "Consumer: Nilesh Bhosale 1, time: 2023-05-19 16:00:00+00:00, expert: nileshattopmate_test, status: completed, price: 0, ee494eda-e13b-4cf5-93fa-d1fa7a32e6d2", "query": null, "image_url": "https://res.cloudinary.com/topmate/image/upload/s--_0o9YKDm--/c_fit,h_1080,w_1080/c_fit,co_rgb:141414,g_north_west,h_60,l_text:Poppins_40:Just%20Hangout,w_600,x_204,y_126/c_fit,co_rgb:141414,g_west,h_664,l_text:Poppins_48:nice%20nice,w_900,x_112,y_-16/c_fit,g_south_west,h_80,l_profile_pics:nileshattopmate_test_ZQ5dnVfxJyLxfQEnmYTYMd,w_80,x_64,y_24/c_fit,co_rgb:FFFFFF,g_south_west,l_text:Poppins_32:topmate.io%252Fnileshattopmate_test,x_172,y_42/v1/meta-image/testimonial_w8orw5.jpg" } ], "query_price": 0, "paid_query_title": "Ask a question", "query_description": "Ask me any anything and I'll revert with a detailed answer", "bookings_count": 159, "booking_period": 60, "ratings_count": 8, "achievements": [ { "title": "164+ bookings", "sub_titile": " Top 1% on topmate.io", "icon": "https://topmate-staging.s3.ap-south-1.amazonaws.com/booking.svg" }, { "title": "Star Struck", "sub_titile": "4.6/5 (7 ratings)", "icon": "https://topmate-staging.s3.ap-south-1.amazonaws.com/testimonial.svg" } ], "avg_ratings": 4.6, "total_ratings": 7 } ``` Description: "id": 110 - It represents the ID of the user. "first_name": "Nilesh" - The first name of the user. "last_name": "Bhosale" - The last name of the user. "username": "nileshattopmate_test" - The username of the user. "social_url": "nilesh" - The social URL of the user. "title": "Backend Lead at topmate.io" - The title or job position of the user. "description": "" - The description or bio of the user. "timezone": "Asia/Kolkata" - The timezone of the user. "profile_pic": "https://topmate-staging.s3.ap-south-1.amazonaws.com/br3CyvWEuS4GngSNT8RZQk.png" - The URL of the user's profile picture. "full_name": "Nilesh Bhosale" - The full name of the user. "services": An array containing information about the services offered by the user. "buffer": 1 - A buffer value associated with the user. "testimonials": An array containing testimonials or feedback received by the user. "query_price": 0 - The price associated with a query or question asked to the user. "paid_query_title": "Ask a question" - The title or name of a paid query. "query_description": "Ask me anything and I'll revert with a detailed answer" - The description of a query. "bookings_count": 159 - The total count of bookings made for the user's services. "booking_period": 60 - The booking period or duration for the user's services. "ratings_count": 8 - The total count of ratings received by the user. "achievements": An array containing information about the achievements of the user. "avg_ratings": 4.6 - The average rating received by the user. "total_ratings": 7 - The total count of ratings received by the user.