Skip to content
Navigation

Save a place

PUT
https://api.nicer.travel/favorites

Saves a place for the caller, or refreshes its snapshot when it is already saved — saving twice never creates a second entry.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Request body JSON required

  • name
    string
    required
    maxLength: 300 · minLength: 1
  • kind
    HOTEL
    or
    ACTIVITY
    required
  • reference
    string
    required
    maxLength: 512 · minLength: 1
  • activity
    optional

    Any of the following:

    • FavoriteActivity
      • destinationId
        string
        required
        maxLength: 32 · minLength: 1
      • destinationName
        required

        Any of the following:

        • string
        • null
      • durationMinutes
        required

        Any of the following:

        • integer
        • null
      • reviewCount
        required

        Any of the following:

        • integer
        • null
    • null
  • city
    optional

    Any of the following:

    • string
    • null
  • country
    optional

    Any of the following:

    • string
    • null
  • imageUrl
    optional

    Any of the following:

    • string
    • null
  • latitude
    optional

    Any of the following:

    • number
    • null
  • longitude
    optional

    Any of the following:

    • number
    • null
  • rateCodes
    optional

    Any of the following:

    • array<string>
    • null
  • starRating
    optional

    Any of the following:

    • number
    • null

Returns

200

OK

JSON
  • name
    string
    required
    maxLength: 300 · minLength: 1
  • createdAt
    string
    required
  • updatedAt
    string
    required
  • favoriteId
    string
    required
  • kind
    HOTEL
    or
    ACTIVITY
    required
  • reference
    string
    required
    maxLength: 512 · minLength: 1
  • type
    string
    required
  • userId
    string
    required
  • activity
    optional

    Any of the following:

    • FavoriteActivity
      • destinationId
        string
        required
        maxLength: 32 · minLength: 1
      • destinationName
        required

        Any of the following:

        • string
        • null
      • durationMinutes
        required

        Any of the following:

        • integer
        • null
      • reviewCount
        required

        Any of the following:

        • integer
        • null
    • null
  • city
    optional

    Any of the following:

    • string
    • null
  • country
    optional

    Any of the following:

    • string
    • null
  • imageUrl
    optional

    Any of the following:

    • string
    • null
  • latitude
    optional

    Any of the following:

    • number
    • null
  • longitude
    optional

    Any of the following:

    • number
    • null
  • rateCodes
    optional

    Any of the following:

    • array<string>
    • null
  • starRating
    optional

    Any of the following:

    • number
    • null

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close