Add player claim

PUT /players/ player_id /claims

Creates a claim on the player for the current authenticated user. Errors if a player already has a verified claim, and will remove any claim that the user currently has.

Request:

Header Expected Value Optional
Content-Type application/json false
Authorization Pointercrate access token false

Response: 201 CREATED

Header Value
Content-Type application/json
Location URL to access the current user’s claim on the player
Field Type Description
data PlayerClaim The created claim object

Errors:

Status code Error code Description
404 40401 No player with id player_id was found, or the specified nationality or subdivision wasn’t recognized
422 42231 Player already has an associated verified claim

Example request:

PUT /api/v1/players/1/claims
Accept: application/json
Authorization: Bearer <omitted>

Modifying player claims

PATCH /players/ player_id /claims/ user_id /

Access Restrictions:
Access to this endpoint requires at least MODERATOR permissions if modifying the verification status of a claim.

Modifies the specified claim. Only the owning user can modify the lock_submissions field.

Request:

Header Expected Value Optional
Content-Type application/json false
Authorization Pointercrate access token false
Field Type Description Optional
verified boolean If this claim should be verified (the user should own the player) true
lock_submissions boolean If the player should require authentication by the user for submissions true

Response: 200 OK

Header Value
Content-Type application/json
Field Type Description
data PlayerClaim The edited player claim object

Errors:

Status code Error code Description
404 40401 No claim or player with the specified ID exists
403 40306 Attempt to modify an unverified claim

Example request:

POST /api/v1/players/34/claims/1/
Accept: application/json
Authorization: Bearer <omitted>
Content-Type: application/json

{
    "verified": true
}

Deleting player claims

PATCH /players/ player_id /claims/ user_id /

Access Restrictions:
Access to this endpoint requires at least MODERATOR permissions.

Deletes the specified claim.

Request:

Header Expected Value Optional
Authorization Pointercrate access token false

Response: 204 NO CONTENT

Nothing

Errors:

Status code Error code Description
404 40401 No claim or player with the specified ID exists

Example request:

DELETE /api/v1/players/34/claims/1/
Authorization: Bearer <omitted>

Player claim listing

GET /players/claims/

Pagination:
This endpoint supports pagination and filtering via query parameters. Please see the documentation on pagination for information on the additional request and response fields headers.

Access Restrictions:
Access to this endpoint requires at least MODERATOR permissions.

This endpoint gets a list of all claims.

Additionally, the endpoint uses its own special format for PlayerClaim objects, which defines a “listed form” for the claim.

Field Type Description
id integer The id of the claim
user NamedId The name and id of the user owning the claim
player NamedId The name and id of the player claimed by the user
verified boolean If this claim was verified by a Moderator

Filtering:

The result can be filtered by verified and by any_name_contains, which causes the endpoint to only return players or users whose name contains the given substring.

Pagination is done by the id field.

Request:

Header Expected Value Optional
Authorization Pointercrate access token false

Response: 200 OK

Header Value
Content-Type application/json
Field Type Description
- List[ListedClaim] A list of claims (see above for the special format)

Example request:

GET /api/v1/players/claims/
Accept: application/json
Authorization: Bearer <omitted>