Update user.

PUT /api/v1/users/{id}

Path parameters

  • id string Required

    User ID.

application/json

Body Required

  • id string Required

    The id of the user.

  • firstName string Required

    The first name of the user.

  • lastName string Required

    The last name of the user.

  • streetName string

    The street name of the user.

  • houseNumber string

    The house number of the user.

  • zipCode integer(int32)

    The zip code of the user.

  • city string

    The city of the user.

  • country string

    The country of the user.

  • phoneNumber string

    The phone number of the user.

  • aboutMe string

    The about me of the user.

  • favGenres array[string]

    The favorite genres of the user.

Responses

  • 401 */*

    Unauthorized

    Hide response attribute Show response attribute object
    • error object
      Hide error attributes Show error attributes object
      • code string
      • message string
      • target string
      • details array[object]
        Hide details attributes Show details attributes object
        • code string
        • message string
        • target string
  • 404 */*

    Not Found

    Hide response attribute Show response attribute object
    • error object
      Hide error attributes Show error attributes object
      • code string
      • message string
      • target string
      • details array[object]
        Hide details attributes Show details attributes object
        • code string
        • message string
        • target string
  • 500 */*

    Internal Server Error

    Hide response attribute Show response attribute object
    • error object
      Hide error attributes Show error attributes object
      • code string
      • message string
      • target string
      • details array[object]
        Hide details attributes Show details attributes object
        • code string
        • message string
        • target string
  • 400 */*

    Bad Request

    Hide response attribute Show response attribute object
    • error object
      Hide error attributes Show error attributes object
      • code string
      • message string
      • target string
      • details array[object]
        Hide details attributes Show details attributes object
        • code string
        • message string
        • target string
  • 200 */*

    User updated.

    Hide response attributes Show response attributes object
    • id string
    • firstName string
    • lastName string
    • email string
    • streetName string
    • houseNumber string
    • zipCode integer(int32)
    • city string
    • country string
    • phoneNumber string
    • aboutMe string
    • favGenres array[string]
PUT /api/v1/users/{id}
curl \
 --request PUT 'http://localhost:8080/api/v1/users/{id}' \
 --header "Content-Type: application/json" \
 --data '{"id":123456,"firstName":"Robert","lastName":"Smith","streetName":"Street 1","houseNumber":1,"zipCode":12345,"city":"Dhaka","country":"Bangladesh","phoneNumber":1234567890,"aboutMe":"I am a software engineer.","favGenres":["Fiction","Non-fiction"]}'
Request examples
{
  "id": 123456,
  "firstName": "Robert",
  "lastName": "Smith",
  "streetName": "Street 1",
  "houseNumber": 1,
  "zipCode": 12345,
  "city": "Dhaka",
  "country": "Bangladesh",
  "phoneNumber": 1234567890,
  "aboutMe": "I am a software engineer.",
  "favGenres": [
    "Fiction",
    "Non-fiction"
  ]
}
Response examples (401)
{
  "error": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string"
      }
    ]
  }
}
Response examples (404)
{
  "error": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string"
      }
    ]
  }
}
Response examples (500)
{
  "error": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string"
      }
    ]
  }
}
Response examples (400)
{
  "error": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string"
      }
    ]
  }
}
Response examples (200)
{
  "id": "string",
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "streetName": "string",
  "houseNumber": "string",
  "zipCode": 42,
  "city": "string",
  "country": "string",
  "phoneNumber": "string",
  "aboutMe": "string",
  "favGenres": [
    "string"
  ]
}