profile
Get a user profile, update the user profile
User profile endpoint
get profile
GET
https://carpoolingbackend.herokuapp.com/v1/apis/profile
This endpoint gets the profile of the currently logged in user.
Headers
Name
Type
Description
Authorization
string
The auth token for the currently logged in user.
[
{
"first_name": "Nathan",
"last_name": null,
"phone_number": null,
"profile_pic": "http://127.0.0.1:8000/v1/apis/profile/sample.jpg",
"user": 4
}
]
An example of a get request on the profile endpoint.
An example of a get request on the profile endpoint.

update profile
PUT
https://carpoolingbackend.herokuapp.com/v1/apis/profile/{id}
A PUT request to update the users profile
Request Body
Name
Type
Description
phone_number
string
The users phone number
{
"first_name": "vick",
"last_name": "Waichigo",
"phone_number": "0712115461",
"profile_pic": "http://127.0.0.1:8000/v1/apis/profile/1/profile_pics/artur-aldyrkhanov-XmsxXelvq30-unsplash.jpg",
"user": 3
}
An example of a profile update request
An example of a profile update request

Last updated
Was this helpful?