Skip to content

Add Friend

Deprecated
PUT
/friends/v1/player/{player_id}/friend/{other_player_id}

Modify the friend’s relationship status with the other Player. There is a max number of friends that can be added for a Player. The limit can determined using this API. This API allows you optionally update the player’s notes for the other player. If you do not want to update or set the notes when adding the other player, then do not include a body.

Note: This API supports etags and will return the etag header when with the response and will match the etag value provided when fetching Friend Relationship between these two players. It is highly recommended to provide the etag value with the if-match header to avoid lost updates.

Permissions Required: friend:friend_list:write

Authorizations

Parameters

Path Parameters

player_id
required
integer
other_player_id
required
integer

Header Parameters

if-match

If you provide the ETag that matches the current ETag for this resource, a 304 response will be return - indicating that the resource has not changed.

string

If you provide the ETag that matches the current ETag for this resource, a 304 response will be return - indicating that the resource has not changed.

Request Body

Notes to set for the Player’s friend. If you don’t want to modify notes, no not include in body when adding a friend.

object
notes
string
>= 1 characters <= 4000 characters

Responses

200

Successful Response

Represents the relationship with a potential friend. V1 includes player_id and player_uuid.

object
friends_player_uuid
required
string format: uuid
friends_player_id
integer
status
required
string
Allowed values: NONE FRIENDS FRIEND_REQUEST_SENT FRIEND_REQUEST_PENDING FRIEND_REQUEST_DECLINED_BY_OTHER
notes
string
last_modified_on
required
string format: date-time

Headers

ETag
string

Used to identify this version of the content. Provide with a get request to avoid downloading the same data multiple times.

400

Bad Request

object
auth_success
boolean
default: true
error_code
required
string
desc
required
string

403

Forbidden

object
auth_success
boolean
default: true
error_code
required
string
desc
required
string

409

Conflict

object
auth_success
boolean
default: true
error_code
required
string
desc
required
string

412

The resource’s Etag does not match the Etag provided. Get the Etag from the Get request and try again

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string