POST ​/api​/v3​/account​/me​/preferences​/saved_location

Adds a saved location to the user’s preferences.

Request

Example Request

{
  "auth_token": "abc1245920feab98ca",
  "location": {
    "lat": {
    },
    "lng": {
    }
  }
}

Example Parameters

  • auth_token: The user's auth_token obtained by calling the auth API. If provided, the response will indicate follow status for elements in the followers array.

    • Required: yes
    • Type: string
    • Example: abc1245920feab98ca
  • location: The location object containing the attributes for the artist profile.

    • Required: yes
    • lat:

      • Required: no
      • Type: Number
      • Example: 29.7628
    • lng:

      • Required: no
      • Type: Number
      • Example: -95.3831

Response

Example Response

{
  "location": {
    "id": {
    },
    "preference_id": {
    },
    "city_station_id": {
    },
    "city": {
    },
    "province": {
    },
    "country": {
    },
    "lat": {
    },
    "lng": {
    }
  }
}

Response Parameters

  • location:

    • Required: no
    • id:

      • Required: yes
      • Type: Integer
      • Example: 1
    • preference_id:

      • Required: yes
      • Type: Integer
      • Example: 2
    • citystationid: The official station id for the city corresponding to the location

      • Required: yes
      • Type: Integer
      • Example: 23
    • city:

      • Required: yes
      • Type: String
      • Example: Houston
    • province:

      • Required: yes
      • Type: String
      • Example: TX
    • country:

      • Required: yes
      • Type: String
      • Example: US
    • lat:

      • Required: yes
      • Type: Number
      • Example: 29.7628
    • lng:

      • Required: yes
      • Type: Number
      • Example: -95.3831

Response Codes

Successful Response Codes

  • 200: The location was added.

Failure Response Codes

  • 401: Invalid or missing auth_token parameter

  • 422: The object failed validation. The response contains an errors key that can be used to describe the specific validation errors encountered.