Purchase Reward

Purchase a reward item from the student's rewards shop.

POST
/purchase/{itemId}

Authorization

Authorization<token>

This is the session_id returned when logging in. It must be prefixed with Basic. e.g. Basic eW91IHNob3VsZCBzdGFyIHRoaXMgcmVwbyE=

In: header

Request Body

application/x-www-form-urlencodedRequired
pupil_idinteger

Path Parameters

itemIdRequiredinteger
curl -X POST "https://www.classcharts.com/apiv2student/purchase/0" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d ''

Reward purchased

{
  "data": {
    "single_purchase": "yes",
    "order_id": 0,
    "balance": 0
  },
  "success": 0
}