Update user profile
PUT {{url}}/users/0001-1234-2345-4567-5678
Update user profile
This request mocks the behavior behind updating a user's profile.
It also leverages Qodex's contextual responses by accessing the {{$body}}
, {{$body 'keyname'}}
, {{$headers}}
, and {{$headers 'keyname'}}
variables.
Request Body
{"firstName"=>"{{$randomFirstName}}", "lastName"=>"{{$randomLastName}}", "dob"=>"{{$randomDatePast}}", "userAddress"=>"{{$randomStreetAddress}}", "city"=>"{{$randomCity}}", "country"=>"{{$randomCountry}}"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
x-mock-response-name | string | ||
x-mock-response-id | string | UID of the example response. Note that this id will be different if you have forked the original collection |
RESPONSES
status: OK
"{\n \"firstName\": \"{{$body 'firstName'}}\",\n \"lastName\": \"{{$body 'lastName'}}\",\n \"userId\": \"{{userId}}\",\n \"dob\": \"{{$randomDatePast}}\",\n \"userStatus\": \"{{$randomBoolean}}\",\n \"lastUpdate\": \"{{$randomDateRecent}}\",\n \"payload\": {{$body}},\n \"hostUrl\": \"{{$headers 'host'}}\",\n \"headers\": {{$headers}}\n}"