User
Get User Info
GET https://api.stretch.com/api/v1/auth/user
Code sample
Response
UserProfileOut
{
"gender": "male",
"birthDate": "2000-07-08",
"timezone": "Asia/Dubai",
"firstName": "John",
"lastName": "Smith",
"description": "string",
"languages": [],
"experience": 3,
"requiresParking": False,
"id": "cf6e0f9c-ae94-4d72-8faf-cdc90394c261",
"type": "guest",
"username": "string",
"phone": "+97100000000",
"email": "[email protected]",
"verifiedPhone": False,
"verifiedEmail": False,
"available": False,
"verified": False,
"avatarUrl": "string",
"mediaType": "string",
"mediaUrl": "string",
"mediaPreviewUrl": "string",
"sessionCount": 1234,
"totalPayment": 1234,
"totalPaymentCurrency": "string",
"profileCompletion":
}
Put User Info
PUT https://api.stretch.com/api/v1/auth/user
Input Fields / Form-Data / JSON
Query Parameter | Type | Description | Example |
---|---|---|---|
gender | User gender |
male | |
birthDate | string (date) | User Birth date |
2000-07-08 |
timezone | string | Default timezone for user |
Asia/Dubai |
firstName | string | User first |
John |
lastName | string | User last name |
Smith |
description | string | About |
|
languages | array | Languages |
|
experience | integer | Experience in years |
3 |
requiresParking | boolean | Requires parking |
Code sample
curl -X PUT \
--url "https://api.stretch.com/api/v1/auth/user" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"\
-d '{
"gender": "male",
"birthDate": "2000-07-08",
"timezone": "Asia/Dubai",
"firstName": "John",
"lastName": "Smith",
"description": "string",
"languages": [],
"experience": 3,
"requiresParking": False
}'
Response
UserProfileOut
{
"gender": "male",
"birthDate": "2000-07-08",
"timezone": "Asia/Dubai",
"firstName": "John",
"lastName": "Smith",
"description": "string",
"languages": [],
"experience": 3,
"requiresParking": False,
"id": "49005dfe-7fda-41f3-8268-5d60c3f21704",
"type": "guest",
"username": "string",
"phone": "+97100000000",
"email": "[email protected]",
"verifiedPhone": False,
"verifiedEmail": False,
"available": False,
"verified": False,
"avatarUrl": "string",
"mediaType": "string",
"mediaUrl": "string",
"mediaPreviewUrl": "string",
"sessionCount": 1234,
"totalPayment": 1234,
"totalPaymentCurrency": "string",
"profileCompletion":
}
ErrorResponse
ErrorResponse:
error string
message string
code integer