API Upload Judging Score
From zFairs Contest Management
Contents
Upload Judging Score
Records project assessment scores for a judging round. Optionally clears existing scores for that round first.
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
}
Request
fetch('/api/data/JudgingScores', {
method:'POST',
headers:{'Content-Type': 'application/json'},
body: JSON.stringify({
ApiKey:'<Private key>',
FairId: '9df61f13-474b-442f-ac1f-edca7348ef71', // value of f in your URL
Body: {
RoundId: 2,
ClearOldScores: true,
Assignments: [
{
ProjectKey: "32161f13-474b-442f-ac1f-edca7348e000",
JudgeId: "judge-public-guid",
Score: 95.5,
Notes: "Strong methodology"
}
]
}
})
})
.then(response => response.json())
.then(data=>{console.log('Success: ',data);})
.catch((error)=>{console.log('Error: ', error);});Response
On success:
{
Success: true,
Message: "Assignment count: 1\n...", // processing log; unknown judge/project lines
Body: null
}
Field notes
- Empty scores returns:
No scores to set. - Notes default to
Loaded by APIwhen omitted. - For reading scores back for a round, POST to
/api/data/JudgingScoresForRoundwithBody.RoundId(see API Judging Scores).
Related APIs