Fix API endpoint return values

Return "true" for successful updates/PUT requests instead of object JSON. Check for error in response body when attempting unauthorised operations.