Skip to content

Update User Settings

PATCH
/api/user-settings/profile
curl --request PATCH \
--url https://api.wink.travel/api/user-settings/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Wink-Version: 2.0' \
--data '{ "firstName": "Alexandra", "lastName": "Beaumont", "profilePicture": { "angle": null, "attribution": [], "category": "2", "descriptions": [ { "description": "Elegant lobby of The Siam Residences", "language": "en", "title": "Lobby Entrance" } ], "height": 1600, "identifier": "the-siam-residences/lobby-entrance", "isLandscape": true, "lifestyleType": null, "multimediaIdentifier": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51", "published": true, "sort": 10, "source": "CLOUDINARY", "type": "IMAGE", "width": 2560 }, "username": "[email protected]" }'

Updates the authenticated user’s profile with the supplied values and returns the saved profile.

Wink-Version
string
default: 2.0.0
Allowed values: 2.0

Updated profile fields for the authenticated user including name, email address, and profile picture

Media typeapplication/json

User profile information including name, email, and profile picture

object
firstName
required

User first name

string
>= 1 characters
Example
Alexandra
lastName
required

User last name

string
>= 1 characters
Example
Beaumont
profilePicture

Profile picture uploaded via Cloudinary; optional

object
angle

Media angle

string
Example
-90
attribution

Whether image has attribution properties

Array<object>
object
name
required

Name of contributor

string
>= 1 characters
Example
Samuel Adams
url

URL to contributor

string format: uri
Example
https://maps.google.com/maps/contrib/111628493169070103594
Example
{
"name": "Samuel Adams",
"url": "https://maps.google.com/maps/contrib/111628493169070103594"
}
category

Supported OTA specification PIC code. See OTA geoname data

string
Example
1
descriptions

Localized media captions to give user some context about where this media was taken.

Array<object>

Foundation class for storing multi-language content (names and descriptions) with content change detection throughout the Wink Platform.

object
creator

Whether it was user or system generated.

string
default: USER
Allowed values: SYSTEM USER
Example
SYSTEM
description
required

Longer text description

string
>= 1 characters <= 2147483647 characters
Example
This is a longer description in the specified language.
hashMismatch
boolean
language
required

Indicate which language this description is written in.

string
default: en >= 2 characters <= 2 characters /^[a-z]{2}(-[A-Z]{2})?$/
Example
en
md5ContentHash

The md5 hash of the name, description and language.

string
Example
d41d8cd98f00b204e9800998ecf8427e
name
required

Use as title or short text description

string
Example
An example title
Example
{
"creator": "USER",
"description": "Spacious suite with floor-to-ceiling windows overlooking the Chao Phraya River, featuring a king-size bed, private balcony, and marble bathroom.",
"language": "en",
"md5ContentHash": "a3f1c8e2d74b60912a5c3e9b1d7f4e82",
"name": "Deluxe River View Suite"
}
height
required

Media height in pixels.

integer format: int32
>= 1
Example
1600
identifier
required

Use this identifier to communicate with Cloudinary.

string
>= 1 characters
Example
cloudinary-image-1
isLandscape

True if media width is greater or equal to height

boolean
Example
true
lifestyleType

Associate this media with a specific lifestyle type. A user searching and filtering inventory based on lifestyles can be shown relevant media first.

string
Allowed values: LIFESTYLE_HEALTH_FITNESS LIFESTYLE_RELAX LIFESTYLE_ADULT_ONLY LIFESTYLE_ADVENTURE LIFESTYLE_BUSINESS LIFESTYLE_LGBT LIFESTYLE_SINGLE_PARENT LIFESTYLE_SOLO_FEMALE LIFESTYLE_BEAUTY LIFESTYLE_FOODIE LIFESTYLE_FAMILY LIFESTYLE_ROMANCE LIFESTYLE_COUPLE LIFESTYLE_SOLO LIFESTYLE_BACKPACKER LIFESTYLE_SHOPPING LIFESTYLE_SPORTS LIFESTYLE_MOUNTAIN LIFESTYLE_BEACH LIFESTYLE_CITY LIFESTYLE_COUNTRY LIFESTYLE_CULTURE LIFESTYLE_ECO
Example
LIFESTYLE_HEALTH_FITNESS
multimediaIdentifier
required

Document identifier

string format: uuid
>= 1 characters
Example
3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51
published

Instead of deleting the media, choose to un-publish it instead for later re-use. Could be you keep seasonal images of the property.

boolean
Example
true
sort
required

Sort allows you to control how you want to sort this record in a list of media records.

integer format: int32
default: 999
Example
10
source
required

Currently ONLY using Cloudinary to store all image / video assets.

string
default: CLOUDINARY
Allowed values: YOUTUBE CLOUDINARY
Example
CLOUDINARY
type
required

Whether Cloudinary media is a VIDEO or IMAGE.

string
Allowed values: IMAGE VIDEO AUDIO RAW
Example
IMAGE
width
required

Media width in pixels.

integer format: int32
>= 1
Example
2560
Example
{
"angle": null,
"attribution": [],
"category": "2",
"descriptions": [
{
"description": "Elegant lobby of The Siam Residences",
"language": "en",
"title": "Lobby Entrance"
}
],
"height": 1600,
"identifier": "the-siam-residences/lobby-entrance",
"isLandscape": true,
"lifestyleType": null,
"multimediaIdentifier": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51",
"published": true,
"sort": 10,
"source": "CLOUDINARY",
"type": "IMAGE",
"width": 2560
}
username
required

Email address used as login username

string format: email
>= 1 characters
Example
{
"firstName": "Alexandra",
"lastName": "Beaumont",
"profilePicture": {
"angle": null,
"attribution": [],
"category": "2",
"descriptions": [
{
"description": "Elegant lobby of The Siam Residences",
"language": "en",
"title": "Lobby Entrance"
}
],
"height": 1600,
"identifier": "the-siam-residences/lobby-entrance",
"isLandscape": true,
"lifestyleType": null,
"multimediaIdentifier": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51",
"published": true,
"sort": 10,
"source": "CLOUDINARY",
"type": "IMAGE",
"width": 2560
},
"username": "[email protected]"
}

Updated user profile after applying the requested changes

Media typeapplication/json

User profile response including identifier, name, email, and optional profile picture

object
firstName
required

User first name

string
>= 1 characters
identifier
required

Unique user identifier (UUID)

string format: uuid
>= 1 characters
lastName
required

User last name

string
>= 1 characters
profilePicture

Profile picture metadata from Cloudinary or federated identity provider

object
angle

Media angle

string
attribution

Whether image has attribution properties

Array<object>
object
name
required

Name of contributor

string
>= 1 characters
url

URL to contributor

string format: uri
category

Supported OTA specification PIC code. See OTA geoname data

string
descriptions

Localized media captions to give user some context about where this media was taken.

Array<object>

Foundation class for storing multi-language content (names and descriptions) with content change detection throughout the Wink Platform.

object
creator

Whether it was user or system generated.

string
default: USER
Allowed values: SYSTEM USER
description
required

Longer text description

string
>= 1 characters <= 2147483647 characters
hashMismatch
boolean
language
required

Indicate which language this description is written in.

string
default: en >= 2 characters <= 2 characters /^[a-z]{2}(-[A-Z]{2})?$/
md5ContentHash

The md5 hash of the name, description and language.

string
name
required

Use as title or short text description

string
height
required

Media height in pixels.

integer format: int32
>= 1
identifier
required

Use this identifier to communicate with Cloudinary.

string
>= 1 characters
isLandscape

True if media width is greater or equal to height

boolean
lifestyleType

Associate this media with a specific lifestyle type. A user searching and filtering inventory based on lifestyles can be shown relevant media first.

string
Allowed values: LIFESTYLE_HEALTH_FITNESS LIFESTYLE_RELAX LIFESTYLE_ADULT_ONLY LIFESTYLE_ADVENTURE LIFESTYLE_BUSINESS LIFESTYLE_LGBT LIFESTYLE_SINGLE_PARENT LIFESTYLE_SOLO_FEMALE LIFESTYLE_BEAUTY LIFESTYLE_FOODIE LIFESTYLE_FAMILY LIFESTYLE_ROMANCE LIFESTYLE_COUPLE LIFESTYLE_SOLO LIFESTYLE_BACKPACKER LIFESTYLE_SHOPPING LIFESTYLE_SPORTS LIFESTYLE_MOUNTAIN LIFESTYLE_BEACH LIFESTYLE_CITY LIFESTYLE_COUNTRY LIFESTYLE_CULTURE LIFESTYLE_ECO
multimediaIdentifier
required

Document identifier

string format: uuid
>= 1 characters
published

Instead of deleting the media, choose to un-publish it instead for later re-use. Could be you keep seasonal images of the property.

boolean
sort
required

Sort allows you to control how you want to sort this record in a list of media records.

integer format: int32
default: 999
source
required

Currently ONLY using Cloudinary to store all image / video assets.

string
default: CLOUDINARY
Allowed values: YOUTUBE CLOUDINARY
type
required

Whether Cloudinary media is a VIDEO or IMAGE.

string
Allowed values: IMAGE VIDEO AUDIO RAW
width
required

Media width in pixels.

integer format: int32
>= 1
profilePictureUrl

Fully qualified Cloudinary URL for the user’s profile picture

string format: uri
username
required

Email address used as login username

string format: email
>= 1 characters
Example
{
"firstName": "Alexandra",
"identifier": "c3a9f2e1-8b4d-4c7a-a1e2-5f0b6d9e2c84",
"lastName": "Beaumont",
"profilePicture": {
"angle": null,
"attribution": [],
"category": "2",
"descriptions": [
{
"description": "Elegant lobby of The Siam Residences",
"language": "en",
"title": "Lobby Entrance"
}
],
"height": 1600,
"identifier": "the-siam-residences/lobby-entrance",
"isLandscape": true,
"lifestyleType": null,
"multimediaIdentifier": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51",
"published": true,
"sort": 10,
"source": "CLOUDINARY",
"type": "IMAGE",
"width": 2560
},
"profilePictureUrl": "https://res.cloudinary.com/wink/image/upload/v1/property/the-siam-residences.jpg",
"username": "[email protected]"
}

Bad Request — missing or invalid request parameter or body

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
Examplegenerated
{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Unauthorized — authentication is required or the session has expired

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
Examplegenerated
{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Forbidden — authenticated but lacking the required permission or scope

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
Examplegenerated
{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Not Found — the requested resource does not exist

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
Examplegenerated
{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Method Not Allowed — the HTTP verb is not supported on this endpoint

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
Examplegenerated
{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Conflict — the resource was modified by someone else since you read it; re-read it and retry with the new version

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
Examplegenerated
{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Unsupported Media Type — use application/json

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
Examplegenerated
{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Internal Server Error — an unexpected failure occurred on the server

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
Examplegenerated
{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Service Unavailable — a downstream dependency is unreachable

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
Examplegenerated
{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}