{"openapi":"3.0.3","info":{"title":"Account API","description":"API for managing user profiles, images, and addresses.","version":"1.0.0"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/abc-c3a/abc/1.0.0"},{"url":"http://127.0.0.1:2000/api/v1","description":"Local development server"},{"url":"https://bifrost.enfec.cloud/account/api/v1","description":"Staging server"}],"tags":[{"name":"User Profile","description":"Operations related to profiles"},{"name":"Profile Image","description":"Operations related to profile images"}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ListUserProfile":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user.","example":"spiraldeveloper@gmail.com"},"id":{"type":"string","description":"The unique identifier of the user.","example":"66eaec737fe923eb0f33228c"},"name":{"type":"string","description":"The name of the user.","example":"Ashish Sahu"}}},"GetALLUserProfileResponse":{"type":"object","properties":{"count":{"type":"integer","example":10},"items":{"type":"array","description":"List of user profiles.","items":{"$ref":"#/components/schemas/ListUserProfile"}}}},"GetUsersProfileResponse":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the user profile.","example":"678e1620549e84797c7e4204"},"user_id":{"type":"array","description":"The user ID and name associated with the profile.","items":{"type":"string"},"example":["66ed76e44e8448b7a4b53e88","Tanwika"]},"profile_image":{"type":"string","description":"URL of the user's profile image.","example":"http://bifrost.enfec.cloud/account/api/v1/bucket/dl/678f3a172fae61b8574a1f4a"},"skill_points":{"type":"integer","description":"Points representing the user's skill level.","example":0},"phone_number":{"type":"string","description":"The user's phone number.","example":"9898989890"},"user_address_ids":{"type":"array","description":"List of user address IDs.","items":{"type":"string"},"example":[]},"email":{"type":"string","description":"The email address of the user.","example":"tanuu1423@gmail.com"},"name":{"type":"string","description":"The name of the user.","example":"Tanwika"},"stackmq":{"type":"object","description":"StackMQ configuration details.","properties":{"default":{"type":"object","description":"Default StackMQ settings.","properties":{"client_id":{"type":"string","example":"677e499841fe5e1a1ba60e52"},"host":{"type":"string","example":"stackmq.enfec.cloud"},"mqtts_port":{"type":"string","example":"8883"},"password":{"type":"string","example":"ee42255e2942f71179f592fbe23d6673"},"sub_topic":{"type":"string","example":"8c7ca7567680cd5ef989ca0e9e82c201"},"token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ..."},"username":{"type":"string","example":"676e33f6712a8ce7d6cd07f5"},"wss_port":{"type":"string","example":"8443"}}},"live":{"type":"object","description":"Live StackMQ settings.","properties":{"client_id":{"type":"string","example":"677e499841fe5e1a1ba60e53"},"host":{"type":"string","example":"stackmq.enfec.cloud"},"mqtts_port":{"type":"string","example":"8883"},"password":{"type":"string","example":"3cdf0af5e0f1c4bafd2268155d0aee67"},"sub_topic":{"type":"string","example":"61664f30b35838bd7bad7d77c65cbb7d"},"token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ..."},"username":{"type":"string","example":"676e33f6712a8ce7d6cd07f5"},"wss_port":{"type":"string","example":"8443"}}}}}}},"GetUserProfileResponse":{"type":"object","properties":{"id":{"type":"string","example":"676279fbd1ff2df84792afc4"},"profile_image":{"type":"array","items":{"type":"string","example":"http://127.0.0.1:2000/bucket/dl/67627a20d1ff2df84792afc5"}},"skill_points":{"type":"integer","example":0},"phone_number":{"type":"string","example":"9898989898"},"user_address_ids":{"type":"array","items":{"type":"string"},"example":[]},"email":{"type":"string","example":"tanuu1423@gmail.com"},"name":{"type":"string","example":"Tanwika"}}},"PutUserProfileRequest":{"type":"object","properties":{"phone_number":{"type":"string","example":"9898989898"}}},"GetUploadResponse":{"type":"object","properties":{"attachment_id":{"type":"string","example":"6762911430bafed02a64d915"},"upload_url":{"type":"string","example":"https://example.com/upload/url"}}}}},"paths":{"/profiles":{"get":{"tags":["User Profile"],"summary":"Get ALL User Profile","security":[{"BearerAuth":[]}],"parameters":[{"name":"limit","in":"query","description":"The maximum number of user profiles to return.","required":false,"schema":{"type":"integer","example":10}},{"name":"offset","in":"query","description":"The number of user profiles to skip before starting to return results.","required":false,"schema":{"type":"integer","example":0}}],"responses":{"200":{"description":"All Users profile retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetALLUserProfileResponse"}}}},"401":{"description":"Unauthorized. Invalid or missing authentication token."},"404":{"description":"Not Found. Users profile does not exist."}}}},"/profile":{"get":{"tags":["User Profile"],"summary":"Get The User Profile","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"User profile retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUsersProfileResponse"}}}},"401":{"description":"Unauthorized. Invalid or missing authentication token."},"404":{"description":"Not Found. User profile does not exist."}}}},"/profile/":{"patch":{"tags":["User Profile"],"summary":"Update User Profile","security":[{"BearerAuth":[]}],"requestBody":{"description":"Request payload to update the user profile.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutUserProfileRequest"}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized. Invalid or missing authentication token.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message for missing or invalid token.","example":"Unauthorized. Invalid or missing authentication token."}}}}}},"404":{"description":"Not Found. User profile does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message when the user profile is not found.","example":"Not Found. User profile does not exist."}}}}}}}}},"/profile/image/{user_id}":{"post":{"tags":["Profile Image"],"summary":"Get Profile Image Upload URL","security":[{"BearerAuth":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Profile image upload URL retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUploadResponse"}}}},"401":{"description":"Unauthorized. Invalid or missing authentication token."},"404":{"description":"Not Found. User profile does not exist."}}},"get":{"tags":["Profile Image"],"summary":"Get Profile Image Downloaded URL","security":[{"BearerAuth":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"https://example.com/upload/url."},"401":{"description":"Unauthorized. Invalid or missing authentication token."},"404":{"description":"Not Found. profile image does not exist."}}}},"/profile/image/{attachment_id}/activate":{"get":{"tags":["Profile Image"],"summary":"Activate Profile Image","security":[{"BearerAuth":[]}],"parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized. Invalid or missing authentication token."},"404":{"description":"Not Found. Attachment does not exist."},"400":{"description":"Bad Request."}}}}}}