Remove points in specific pool. If number of points are lower than max points, balance will be disappeared. You are allowed to modify ONLY for your campus.

live_help Notes

assignment This action requires one of theses roles: Advanced tutor

settings Params

Param name Description
id required . Must be String

The requested id

points required . Must be a number.

Number of points to be removed. Points are converted to absolute values and decremented by that point.

DELETE /v2/pools/1/points/remove
{
  "points": 10
}

{
  "id": 25,
  "current_points": 1290,
  "max_points": 1400,
  "cursus_id": 1,
  "campus_id": 1
}
curl  -X DELETE -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"points":10}' "https://api.intra.42.fr/v2/pools/1/points/remove"

{
  "id": 25,
  "current_points": 1290,
  "max_points": 1400,
  "cursus_id": 1,
  "campus_id": 1
}
require "oauth2"
UID = "Your application uid"
SECRET = "Your application secret"
client = OAuth2::Client.new(UID, SECRET, site: "https://api.intra.42.fr")
token = client.client_credentials.get_token

params = {points: 10}
response = token.delete("/v2/pools/1/points/remove", params: params)
response.status
# => 
response.parsed
# => {"id"=>25, "current_points"=>1290, "max_points"=>1400, "cursus_id"=>1, "campus_id"=>1}