API Judging Scores

From zFairs Contest Management
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Judging Scores

Two related endpoints:

  1. Upload scores — POST /api/data/JudgingScores (also documented at API Upload Judging Score)
  2. Get scores for a round — POST /api/data/JudgingScoresForRound

Authentication

All data API calls are POST (unless noted) with JSON body:

Field Required Description
ApiKey Yes Private API key for your site.
FairId Yes Fair GUID from the site URL (f query parameter).
Body Depends Request payload. Use {} when no body fields are needed.


Calls must be run server-side — do not expose your API key in a browser.

Response envelope

Most endpoints return:

{
  Success: true,
  Message: null,   // error text when Success is false
  Body: { ... }    // endpoint-specific payload
}


Upload scores

See API Upload Judging Score for the full request shape (RoundId, ClearOldScores, Assignments with ProjectKey, JudgeId, Score, Notes).

Get scores for a round

fetch('/api/data/JudgingScoresForRound', {
    method:'POST',
    headers:{'Content-Type': 'application/json'},
    body: JSON.stringify({
            ApiKey:'<Private key>',
            FairId: '9df61f13-474b-442f-ac1f-edca7348ef71',
            Body: {
				RoundId: 2,
				ClearOldScores: false  // WARNING: if true this CLEARS scores before reading
			}
        })
})
.then(response => response.json())
.then(data=>{console.log('Success: ',data);})
.catch((error)=>{console.log('Error: ', error);});

Response

{
  Success: true,
  Message: null,
  Body: [{
    ProjectId: "AB-100",
    At: "2024-03-15T10:00:00",  // adjusted to fair timezone
    Score: 95.5,
    Notes: "Strong methodology",
    NoShow: false,
    Rubric: "Main Rubric",
    ScoreBreakdown: [
      { Id: "q1", Name: "Scientific method", Score: "5" }
    ],
    JudgeId: 9001,
    JudgePublicId: "judge-public-guid",
    JudgeName: "Sam Judge"
  }]
}

Field notes

  • Round ids come from API Get Info → Rounds.
  • On the get endpoint, ClearOldScores: true will clear the round scores before returning results — leave it false unless you intend to wipe scores.
  • Score breakdown is only returned when rubric detail data is available for the assessment.