<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.zFairs.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Peter</id>
	<title>zFairs Contest Management - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.zFairs.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Peter"/>
	<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=Special:Contributions/Peter"/>
	<updated>2026-11-20T21:55:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Upload_Project_Assets&amp;diff=726</id>
		<title>API Upload Project Assets</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Upload_Project_Assets&amp;diff=726"/>
		<updated>2024-04-11T03:58:18Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Upload Project Assets == &lt;br /&gt;
&lt;br /&gt;
=== Upload Project Image ===&lt;br /&gt;
You can use our API to upload images to a project, so these can be viewed by your judges or in the showcase. To do this, you need to POST a message to your site. Below is an example of what needs to be posted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/project/file&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {&lt;br /&gt;
				&amp;quot;ProjectKey&amp;quot;:&amp;quot;32161f13-474b-442f-ac1f-edca7348e000&amp;quot;,&lt;br /&gt;
				&amp;quot;Base64String&amp;quot; : &amp;quot;iVBORw0KGgoAAAANSUhEUgAAAQIAA...&amp;quot;, //not required if you use DownloadFromUrl&lt;br /&gt;
				&amp;quot;DownloadFromUrl&amp;quot;:&amp;quot;http://yoursite.com/somefile.png&amp;quot;, //optional can be used in stead of Base64String&lt;br /&gt;
				&amp;quot;FileName&amp;quot;: &amp;quot;myAwesomeFile.png&amp;quot;,&lt;br /&gt;
				&amp;quot;Caption&amp;quot;: &amp;quot;indescribable&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload Project Paperwork  === &lt;br /&gt;
You can use our API to upload project paperwork, so these can be viewed by your judges, SRC, and IRB. These files need to be PDFs. You will need to get the PaperworkFileType form the [[API Get Info]]. To do this, you need to POST a message to your site. Below is an example of what needs to be posted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/project/file&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            Username:&#039;admin username&#039;,&lt;br /&gt;
            Password: &#039;password&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {&lt;br /&gt;
				&amp;quot;ProjectKey&amp;quot;:&amp;quot;32161f13-474b-442f-ac1f-edca7348e000&amp;quot;,&lt;br /&gt;
				&amp;quot;PaperworkFileType&amp;quot;: 123, // this is pulled from the get info api&lt;br /&gt;
				&amp;quot;Base64String&amp;quot; : &amp;quot;iVBORw0KGgoAAAANSUhEUgAAAQIAA...&amp;quot;, //not required if you use DownloadFromUrl&lt;br /&gt;
				&amp;quot;DownloadFromUrl&amp;quot;:&amp;quot;http://yoursite.com/somefile.png&amp;quot;, //optional can be used in stead of Base64String&lt;br /&gt;
				&amp;quot;FileName&amp;quot;: &amp;quot;myAwesomeFile.png&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Upload_Judging_Score&amp;diff=725</id>
		<title>API Upload Judging Score</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Upload_Judging_Score&amp;diff=725"/>
		<updated>2024-04-11T03:58:08Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Upload Judging Scores ==&lt;br /&gt;
You can use our api to upload your judges scores. To do this you need to POST a message to your site. Below is an example of what needs to be posted. You can get round Id from the get info api call, judge id, and project key are returned when a judge or project is added. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/JudgingScores&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {&lt;br /&gt;
				RoundId: 123,&lt;br /&gt;
				Assignments:[{&lt;br /&gt;
					ProjectKey: &#039;e381c719-d7fc-471a-b50c-fe51747652e4&#039;,&lt;br /&gt;
					JudgeId: &#039;674907d1-60db-443b-b3c9-4755564c94a9&#039;,&lt;br /&gt;
					Score: 98.2,&lt;br /&gt;
					Notes: &#039;Your project was great!&#039;, //optional&lt;br /&gt;
				},&lt;br /&gt;
				ClearOldScores: true, //(true or false) Optional, default is true&lt;br /&gt;
				...&lt;br /&gt;
				]&lt;br /&gt;
            }&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note that all scores in this round will be cleared, prior to setting these new assignments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Update_Project&amp;diff=724</id>
		<title>API Update Project</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Update_Project&amp;diff=724"/>
		<updated>2024-04-11T03:57:57Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Update Project==&lt;br /&gt;
You can use our api to update a project to do this you need to POST a message to your site. Below is an example of what needs to be posted. &lt;br /&gt;
&lt;br /&gt;
If you need to add a project see [[API Add Project]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/project&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {&lt;br /&gt;
				Title:&#039;Project Title&#039; //Required&lt;br /&gt;
				,CategoryId: 123  //Required&lt;br /&gt;
				,SubCategoryId: 123 //optional&lt;br /&gt;
				,Plan: &#039;Project Plan&#039; // optional&lt;br /&gt;
				,Abstract: &#039;Project Abstract&#039;// optional&lt;br /&gt;
				,Description: &#039;Project Description&#039;// optional&lt;br /&gt;
				,ProjectKey: ’36 char GUID’&lt;br /&gt;
				,EntryVideoLink: ‘video Link’ //optional&lt;br /&gt;
				,EntryVideoLink2: ‘video Link’ //optional&lt;br /&gt;
				,CategoryAwardId: 1 // optional&lt;br /&gt;
				,SpecialAwardsIds: [1, 2] //optional				&lt;br /&gt;
				&amp;quot;CustomQuestions&amp;quot; : //optional&lt;br /&gt;
					[{&lt;br /&gt;
						&amp;quot;Id&amp;quot;: 123,&lt;br /&gt;
						&amp;quot;Value&amp;quot;: &amp;quot;This is my answer&amp;quot;&lt;br /&gt;
					},...] &lt;br /&gt;
				&amp;quot;Files&amp;quot;: //optional&lt;br /&gt;
					[{ &lt;br /&gt;
           					&amp;quot;Base64String&amp;quot; : &amp;quot;iVBORw0KGgoAAAANSUhEUgAAAQIAA...&amp;quot;, //not required if you use DownloadFromUrl&lt;br /&gt;
           					&amp;quot;DownloadFromUrl&amp;quot;:&amp;quot;http://yoursite.com/somefile.png&amp;quot;,//optional can be used in stead of Base64String&lt;br /&gt;
         	  				&amp;quot;FileName&amp;quot;: &amp;quot;myAwesomeFile.png&amp;quot;,&lt;br /&gt;
           					&amp;quot;Caption&amp;quot;: &amp;quot;indescribable&amp;quot;&lt;br /&gt;
           					},&lt;br /&gt;
           					{&lt;br /&gt;
           					&amp;quot;Base64String&amp;quot; : &amp;quot;iVBORw0KGgoAAAANSUhEUgAAAQIAA...&amp;quot;,&lt;br /&gt;
           					&amp;quot;FileName&amp;quot;: &amp;quot;myAwesomeFile2.png&amp;quot;,&lt;br /&gt;
    		       				&amp;quot;Caption&amp;quot;: &amp;quot;indescribable also&amp;quot;&lt;br /&gt;
           					},&lt;br /&gt;
           					{&lt;br /&gt;
           					&amp;quot;DownloadFromUrl&amp;quot;:&amp;quot;http://yoursite.com/somefile.png&amp;quot;,&lt;br /&gt;
           					&amp;quot;FileName&amp;quot;: &amp;quot;myAwesomething.pdf&amp;quot;,&lt;br /&gt;
           					&amp;quot;Caption&amp;quot;: &amp;quot;indescribable pdf&amp;quot;&lt;br /&gt;
           				}]&lt;br /&gt;
			}&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where to get values ==&lt;br /&gt;
Various fields need id values such as &#039;&#039;&#039;CategoryId&#039;&#039;&#039;, &#039;&#039;&#039;CustomQuestion Ids&#039;&#039;&#039;, &#039;&#039;&#039;CategoryAwardId&#039;&#039;&#039;, and &#039;&#039;&#039;SpecialAwardIds&#039;&#039;&#039;. You can get these values from our API. Check out [[API Get Info]]&lt;br /&gt;
&lt;br /&gt;
You can also add &#039;&#039;&#039;FixedProjectId&#039;&#039;&#039;, this allows you to upload the project Id you want to be used for your uploaded project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_SSO&amp;diff=723</id>
		<title>API SSO</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_SSO&amp;diff=723"/>
		<updated>2024-04-11T03:57:45Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SSO ==&lt;br /&gt;
You can use our api to get a SSO url that will allow you to sign-in a user when they go to that url. This token is only good for one time and expires in just a few minutes. You should only create this token when the user has requested to sso into your zFairs site. If you want to get an SSO URL you need to POST a message to your site. Below is an example of what needs to be posted.&lt;br /&gt;
&lt;br /&gt;
 fetch(&#039;/api/data/sso&#039;, {&lt;br /&gt;
 	method:&#039;POST&#039;,&lt;br /&gt;
 	headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
 	body: JSON.stringify({&lt;br /&gt;
 		ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
 		FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
 		Body: {&lt;br /&gt;
 			PersonId:&#039;persons id (36 char GUID)&#039; //Required&lt;br /&gt;
 		}&lt;br /&gt;
 	})&lt;br /&gt;
 })&lt;br /&gt;
 .then(response =&amp;gt; response.json())&lt;br /&gt;
 .then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
 .catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
== Where to get values ==&lt;br /&gt;
You will get the person when you use our API to add the person or project. Do not use the project key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Set_Tags&amp;diff=722</id>
		<title>API Set Tags</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Set_Tags&amp;diff=722"/>
		<updated>2024-04-11T03:57:23Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Set Tags ==&lt;br /&gt;
You can use the zFairs api to add an existing tag to a person or project (entry). This api call will allow you to set tags, if you need to see a list of exiting tags see [[API Get Tags]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/tags/set&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {&lt;br /&gt;
				tagId: 15,&lt;br /&gt;
				Ids: [&#039;e7a0ccab-350d-4ab8-9482-04c5f9750caa&#039;,...] //&lt;br /&gt;
			}&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data, data.Body); })&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please make sure when setting tags you use the correct tag types. Meaning only set project tags to projects and only set person tags to people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Set_Project_Id&amp;diff=721</id>
		<title>API Set Project Id</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Set_Project_Id&amp;diff=721"/>
		<updated>2024-04-11T03:57:09Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Set Project Id==&lt;br /&gt;
You can use our api to set an entry&#039;s or projects Id. To do this you need to POST a message to your site. Below is an example of what needs to be posted.&lt;br /&gt;
&lt;br /&gt;
If you only want to update a project see [[API Update Project]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/setFixedId&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: [{&lt;br /&gt;
                   ProjectKey: &#039;36 char GUID&#039;,&lt;br /&gt;
                   FixedId: &#039;Your Id&#039;&lt;br /&gt;
            },...]&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to remove the fixed id you set just set the value of FixedId to null FixedId:null&lt;br /&gt;
&lt;br /&gt;
*The body of the posted data is an array so you can update multiple project Id&#039;s at once.&lt;br /&gt;
&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Set_Judging_Assignments&amp;diff=720</id>
		<title>API Set Judging Assignments</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Set_Judging_Assignments&amp;diff=720"/>
		<updated>2024-04-11T03:56:58Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Upload loading Judging Assignments ==&lt;br /&gt;
You can use our api to upload your judging assignments. To do this you need to POST a message to your site. Below is an example of what needs to be posted. You can get round Id from the get info api call, judge id, and project key are returned when a judge or project is added. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/JudgingAssignments&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {&lt;br /&gt;
			RoundId: 123,&lt;br /&gt;
			Assignments:[{&lt;br /&gt;
				ProjectKey: &#039;e381c719-d7fc-471a-b50c-fe51747652e4&#039;,&lt;br /&gt;
				JudgeId: &#039;674907d1-60db-443b-b3c9-4755564c94a9&#039;,&lt;br /&gt;
				At: &#039;2020-12-31 11:30 am&#039;, //optional &lt;br /&gt;
			},...],&lt;br /&gt;
			ClearOldAssignments:false, //(true or false) Optional, default is true&lt;br /&gt;
			...&lt;br /&gt;
            }&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note that all all assignments in this round will be cleared, prior to setting these new assignments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Remove_Tags&amp;diff=719</id>
		<title>API Remove Tags</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Remove_Tags&amp;diff=719"/>
		<updated>2024-04-11T03:56:06Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Remove Tags ==&lt;br /&gt;
You can use the zFairs api to add an existing tag to a person or project (entry). This api call will allow you to remove tags, if you need to see a list of exiting tags see [[API Get Tags]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/tags/remove&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {&lt;br /&gt;
				tagId: 15,&lt;br /&gt;
				Ids: [&#039;e7a0ccab-350d-4ab8-9482-04c5f9750caa&#039;,...] //&lt;br /&gt;
			}&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data, data.Body); })&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Judging_Scores&amp;diff=718</id>
		<title>API Judging Scores</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Judging_Scores&amp;diff=718"/>
		<updated>2024-04-11T03:55:25Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Judging Scores ==&lt;br /&gt;
You can use our api to access your judges scores for a given round. To do this you need to POST a message to your site. Below is an example of what needs to be posted. You can get round Id from the get info api call, judge id, and project key are returned when a judge or project is added. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/JudgingScoresForRound&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {&lt;br /&gt;
				RoundId: 1, // see below on how to get round Id&lt;br /&gt;
            }&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can get round info by calling our get info api. [[API Get Info]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Get_Teachers&amp;diff=717</id>
		<title>API Get Teachers</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Get_Teachers&amp;diff=717"/>
		<updated>2024-04-11T03:54:43Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Get Teachers ==&lt;br /&gt;
Get a list of teachers from our API.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/teachers&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {}&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Get_Tags&amp;diff=716</id>
		<title>API Get Tags</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Get_Tags&amp;diff=716"/>
		<updated>2024-04-11T03:53:18Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Get Tags ==&lt;br /&gt;
You can use the zFairs api to get a list of existing tags which can be set on a person or project (entry). This api call will provide you a list of existing tags.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/tags&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {}&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data, data.Body); })&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will return an object like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
	tags : {&lt;br /&gt;
		personTags: [{&lt;br /&gt;
			Id: 3,&lt;br /&gt;
			Value &amp;quot;Best Judge Ever&amp;quot;}, {&lt;br /&gt;
			Id: 4,&lt;br /&gt;
			Value &amp;quot;Bald&amp;quot;},&lt;br /&gt;
			...&lt;br /&gt;
		],&lt;br /&gt;
		projectTags: [{&lt;br /&gt;
			Id: 31,&lt;br /&gt;
			Value &amp;quot;Review Needed&amp;quot;}, {&lt;br /&gt;
			Id: 14,&lt;br /&gt;
			Value &amp;quot;Excellent&amp;quot;},&lt;br /&gt;
			...&lt;br /&gt;
		]&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Get_Schools&amp;diff=715</id>
		<title>API Get Schools</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Get_Schools&amp;diff=715"/>
		<updated>2024-04-11T03:52:39Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Get Schools ==&lt;br /&gt;
Get a list of schools from our API.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/schools&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {}&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Get_participants&amp;diff=714</id>
		<title>API Get participants</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Get_participants&amp;diff=714"/>
		<updated>2024-04-11T03:51:42Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Get Participants ==&lt;br /&gt;
Get a list of participants from our API.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/participants&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {}&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Get_Judges&amp;diff=713</id>
		<title>API Get Judges</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Get_Judges&amp;diff=713"/>
		<updated>2024-04-11T03:51:06Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Get Judges ==&lt;br /&gt;
Get a list of judges from our API.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/judges&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {}&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Get_Info&amp;diff=712</id>
		<title>API Get Info</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Get_Info&amp;diff=712"/>
		<updated>2024-04-11T03:50:25Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Get Info==&lt;br /&gt;
Some of our api calls will require you to have additional information such as category ids or judging session ids. This api call will provide that information. The results of this api call will grow as our api expands. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/info&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {}&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will return an object like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
	Categories : [{&lt;br /&gt;
		Id: 123,&lt;br /&gt;
		Name: &amp;quot;math&amp;quot;,&lt;br /&gt;
		Abbreviation: &amp;quot;ma&amp;quot;&lt;br /&gt;
	}, ...],&lt;br /&gt;
	SubCategories : [{&lt;br /&gt;
		Id: 123,&lt;br /&gt;
		Name: &amp;quot;hard math&amp;quot;,&lt;br /&gt;
		Abbreviation: &amp;quot;hm&amp;quot;&lt;br /&gt;
	}, ...],&lt;br /&gt;
	JudgingSessions: [{&lt;br /&gt;
		Id: 123,&lt;br /&gt;
		Name: &amp;quot;early morning&amp;quot;,&lt;br /&gt;
		MinGrade: &amp;quot;6&amp;quot;,&lt;br /&gt;
		MaxGrade: &amp;quot;12&amp;quot;,&lt;br /&gt;
		StartTime: &amp;quot;&amp;quot;,&lt;br /&gt;
		EndTime: &amp;quot;&amp;quot;,&lt;br /&gt;
	}, ...],&lt;br /&gt;
	SpecialAwards: [{&lt;br /&gt;
		Id: 123,&lt;br /&gt;
		Name: &amp;quot;big winner&amp;quot;,&lt;br /&gt;
	}, ...],&lt;br /&gt;
	CategoryAward: [{&lt;br /&gt;
		Id: 123,&lt;br /&gt;
		Name: &amp;quot;first place&amp;quot;,&lt;br /&gt;
	}, ...],&lt;br /&gt;
	PaperworkFileTypes: [{&lt;br /&gt;
		Id: 123,&lt;br /&gt;
		Name: &amp;quot;form 1c&amp;quot;,&lt;br /&gt;
	}, ...],&lt;br /&gt;
	Rounds: [{&lt;br /&gt;
		Id: 123,&lt;br /&gt;
		Name: &amp;quot;Round One&amp;quot;,&lt;br /&gt;
	}, ...],&lt;br /&gt;
	ProjectCustomQuestions: [{&lt;br /&gt;
		Id: 123,&lt;br /&gt;
		Name: &amp;quot;How big is your project&amp;quot;,&lt;br /&gt;
		Values : [&amp;quot;small&amp;quot;,&amp;quot;large&amp;quot;] // this is only populated if the question has preset values.&lt;br /&gt;
	}, ...],&lt;br /&gt;
	EntryTypes: [{&lt;br /&gt;
		Id: 123,&lt;br /&gt;
		PublicId: &amp;quot;9df61f13-474b-442f-ac1f-edca7348ef71&amp;quot;,&lt;br /&gt;
		Name: &amp;quot;Research Entry&amp;quot;&lt;br /&gt;
	}]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Add_School&amp;diff=711</id>
		<title>API Add School</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Add_School&amp;diff=711"/>
		<updated>2024-04-11T03:49:43Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Add Schools ==&lt;br /&gt;
You can use our api to add schools to your contest. To do this you need to POST a message to your site. Below is an example of what needs to be posted.&lt;br /&gt;
&lt;br /&gt;
 fetch(&#039;/api/data/school&#039;, {&lt;br /&gt;
 	method:&#039;POST&#039;,&lt;br /&gt;
 	headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
 	body: JSON.stringify({&lt;br /&gt;
 		ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
 		Body: {&lt;br /&gt;
 			Name: &#039;_ A Test School&#039;&lt;br /&gt;
 			,Address: &#039;1219 34th State&#039; //optional&lt;br /&gt;
 			,Address2: &#039;Apt 3&#039;          //optional&lt;br /&gt;
 			,City: &#039;Ogden&#039;              //optional&lt;br /&gt;
 			,State: &#039;Ut&#039;                //optional&lt;br /&gt;
 			,Zip: &#039;84403&#039;               //optional&lt;br /&gt;
 			,County: &#039;Weber&#039;            //optional&lt;br /&gt;
 			,Phone: &#039;801-252-0903&#039;      //optional&lt;br /&gt;
 			,WebsiteUrl: &#039;zfairs.com&#039;   //optional&lt;br /&gt;
 			,SchoolType: &#039;Public&#039;       //{ Public, Private, Charter, Home}  //optional&lt;br /&gt;
 			,PrincipalName: &#039;Mrs Bell&#039;                 //optional&lt;br /&gt;
 			,PrincipalPhone: &#039;801-252-0000&#039;            //optional&lt;br /&gt;
 			,PrincipalEmail: &#039;MrsBell@zfairs.com&#039;      //optional&lt;br /&gt;
 			,ContactFirstName: &#039;Joe&#039;                   //optional&lt;br /&gt;
 			,ContactLastName: &#039;Homes&#039;                  //optional&lt;br /&gt;
 			,ContactPhone: &#039;801-252-0001&#039;              //optional&lt;br /&gt;
 			,ContactEmail: &#039;jh@zfairs.com&#039;             //optional&lt;br /&gt;
 			,GradeLow: &#039;0&#039;                             //pre-k = -1, k = 0         //optional&lt;br /&gt;
 			,GradeHigh: &#039;12&#039;                           //optional&lt;br /&gt;
 			,Fax: &#039;801-252-0003&#039;                       //optional&lt;br /&gt;
 			,SchoolPaysFees: false,                    //optional values are true/false&lt;br /&gt;
 			,Id: 1234                                  //optional id of school, this will trigger an updated of that school&lt;br /&gt;
 			,SchoolCode: &#039;123&#039;                         //optional&lt;br /&gt;
 			,Affiliated: true                          //optional &lt;br /&gt;
 		}&lt;br /&gt;
 	})&lt;br /&gt;
 })&lt;br /&gt;
 .then(response =&amp;gt; response.json())&lt;br /&gt;
 .then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
 .catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Add_Round&amp;diff=710</id>
		<title>API Add Round</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Add_Round&amp;diff=710"/>
		<updated>2024-04-11T03:48:53Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Add Judging Round ==&lt;br /&gt;
You can use our api to add judging &#039;&#039;&#039;Rounds&#039;&#039;&#039; to your contest. To do this you need to POST a message to your site. Below is an example of what needs to be posted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/round&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {&lt;br /&gt;
				RoundName: &amp;quot;Round Name&amp;quot;,&lt;br /&gt;
				RoundValue: 100, //0-100&lt;br /&gt;
				IsSubRound: false, // false or true&lt;br /&gt;
				Id: 0 //0 to create a new round, or the round Id to update an existing round&lt;br /&gt;
            }&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Add_Project&amp;diff=709</id>
		<title>API Add Project</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Add_Project&amp;diff=709"/>
		<updated>2024-04-11T03:48:26Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Add Project==&lt;br /&gt;
You can use our api to add a project and it&#039;s participants To do this you need to POST a message to your site. Below is an example of what needs to be posted.&lt;br /&gt;
&lt;br /&gt;
If you only want to update a project see [[API Update Project]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/project&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
            ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
            FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
            Body: {&lt;br /&gt;
				Title:&#039;Project Title&#039; //Required&lt;br /&gt;
				,CategoryId: 123  //Required&lt;br /&gt;
				,SubCategoryId: 123 //optional&lt;br /&gt;
				,Plan: &#039;Project Plan&#039; // optional&lt;br /&gt;
				,Abstract: &#039;Project Abstract&#039;// optional&lt;br /&gt;
				,Description: &#039;Project Description&#039;// optional&lt;br /&gt;
				,ProjectKey: ’36 char GUID’//optional&lt;br /&gt;
				,EntryVideoLink: ‘video Link’ //optional&lt;br /&gt;
				,EntryVideoLink2: ‘video Link’ //optional&lt;br /&gt;
				,CategoryAwardId: 1 // optional&lt;br /&gt;
				,SpecialAwardsIds: [1, 2] //optional&lt;br /&gt;
				,EntryTypeId: 2 //optional value come from info api&lt;br /&gt;
				,Language:&#039;Spanish&#039; //optional - interpreter need for this language&lt;br /&gt;
				,InPerson:&#039;Yes&#039; //optional - &#039;yes&#039; or &#039;no&#039;&lt;br /&gt;
				,Participants : [{&lt;br /&gt;
					FirstName: &#039;Jane&#039; //Required&lt;br /&gt;
					,LastName: &#039;Doe&#039; //Required&lt;br /&gt;
					,Grade: 6 //Required&lt;br /&gt;
					,TeacherId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039; //Required&lt;br /&gt;
					,SchoolId: 24 //Required&lt;br /&gt;
					,Email: &#039;jane@example.com&#039;&lt;br /&gt;
					,Email1: &#039;Doe@example.com&#039;&lt;br /&gt;
					,Phone: &#039;800-000-0000&#039;&lt;br /&gt;
					,Phone1: &#039;800-123-1324&#039;&lt;br /&gt;
					,Address: &#039;1219 45th st&#039;&lt;br /&gt;
					,Address2: &#039;APT 3B&#039;&lt;br /&gt;
					,City: &#039;Ogden&#039;&lt;br /&gt;
					,State: &#039;VA&#039;&lt;br /&gt;
					,Zip: &#039;65951&#039;&lt;br /&gt;
					,Role: &#039;Student&#039; &lt;br /&gt;
                                        ,ID:  &#039;Student GUID ID&#039; //optional&lt;br /&gt;
                                        ,Username: &#039;Student User Name&#039; //optional&lt;br /&gt;
                                        ,Password:  &#039;Student Password&#039; //optional&lt;br /&gt;
					,Language:&#039;Spanish&#039; //optional - interpreter need for this language&lt;br /&gt;
					,ProfilePicture: { //Optional&lt;br /&gt;
						Base64String: &#039;base64 file string&#039;,&lt;br /&gt;
						&amp;quot;FileName&amp;quot;: &amp;quot;myAwesomeFileDude.png&amp;quot;,&lt;br /&gt;
						&amp;quot;Caption&amp;quot;: &amp;quot;indescribable profile Pic&amp;quot;&lt;br /&gt;
					}&lt;br /&gt;
&lt;br /&gt;
				}],&lt;br /&gt;
				&amp;quot;CustomQuestions&amp;quot; : //optional&lt;br /&gt;
					[{&lt;br /&gt;
						&amp;quot;Id&amp;quot;: 123,&lt;br /&gt;
						&amp;quot;Value&amp;quot;: &amp;quot;This is my answer&amp;quot;&lt;br /&gt;
					},...] &lt;br /&gt;
				&amp;quot;Files&amp;quot;: //optional&lt;br /&gt;
					[{ &lt;br /&gt;
           					&amp;quot;Base64String&amp;quot; : &amp;quot;iVBORw0KGgoAAAANSUhEUgAAAQIAA...&amp;quot;, //not required if you use DownloadFromUrl&lt;br /&gt;
           					&amp;quot;DownloadFromUrl&amp;quot;:&amp;quot;http://yoursite.com/somefile.png&amp;quot;,//optional can be used in stead of Base64String&lt;br /&gt;
         	  				&amp;quot;FileName&amp;quot;: &amp;quot;myAwesomeFile.png&amp;quot;,&lt;br /&gt;
           					&amp;quot;Caption&amp;quot;: &amp;quot;indescribable&amp;quot;&lt;br /&gt;
           					},&lt;br /&gt;
           					{&lt;br /&gt;
           					&amp;quot;Base64String&amp;quot; : &amp;quot;iVBORw0KGgoAAAANSUhEUgAAAQIAA...&amp;quot;,&lt;br /&gt;
           					&amp;quot;FileName&amp;quot;: &amp;quot;myAwesomeFile2.png&amp;quot;,&lt;br /&gt;
    		       				&amp;quot;Caption&amp;quot;: &amp;quot;indescribable also&amp;quot;&lt;br /&gt;
           					},&lt;br /&gt;
           					{&lt;br /&gt;
           					&amp;quot;DownloadFromUrl&amp;quot;:&amp;quot;http://yoursite.com/somefile.png&amp;quot;,&lt;br /&gt;
           					&amp;quot;FileName&amp;quot;: &amp;quot;myAwesomething.pdf&amp;quot;,&lt;br /&gt;
           					&amp;quot;Caption&amp;quot;: &amp;quot;indescribable pdf&amp;quot;&lt;br /&gt;
           				}]&lt;br /&gt;
			}&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where to get values ==&lt;br /&gt;
Various fields need id values such as &#039;&#039;&#039;CategoryId&#039;&#039;&#039;, &#039;&#039;&#039;CustomQuestion Ids&#039;&#039;&#039;, &#039;&#039;&#039;CategoryAwardId&#039;&#039;&#039;, and &#039;&#039;&#039;SpecialAwardIds&#039;&#039;&#039;. You can get these values from our API. Check out [[API Get Info]]&lt;br /&gt;
&lt;br /&gt;
A participant record is very similar to a teacher record see [[API Add Person]] for optional fields of participants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also add &#039;&#039;&#039;FixedProjectId&#039;&#039;&#039;, this allows you to upload the project Id you want to be used for your uploaded project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://wiki.zFairs.com/index.php?title=API_Add_Person&amp;diff=708</id>
		<title>API Add Person</title>
		<link rel="alternate" type="text/html" href="https://wiki.zFairs.com/index.php?title=API_Add_Person&amp;diff=708"/>
		<updated>2024-04-11T03:47:32Z</updated>

		<summary type="html">&lt;p&gt;Peter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Add Person==&lt;br /&gt;
You can use our api to add a teacher or judge to your contest. To do this you need to POST a message to your site. Below is an example of what needs to be posted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot; line&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fetch(&#039;/api/data/person&#039;, {&lt;br /&gt;
    method:&#039;POST&#039;,&lt;br /&gt;
    headers:{&#039;Content-Type&#039;: &#039;application/json&#039;},&lt;br /&gt;
    body: JSON.stringify({&lt;br /&gt;
		ApiKey:&#039;&amp;lt;Private key&amp;gt;&#039;,&lt;br /&gt;
		FairId: &#039;9df61f13-474b-442f-ac1f-edca7348ef71&#039;, //This value can be found in your url it&#039;s the value of f&lt;br /&gt;
		Body: {&lt;br /&gt;
			FirstName: &#039;Jane&#039;&lt;br /&gt;
			,LastName: &#039;Doe&#039;&lt;br /&gt;
			,Prefix: &#039;Dr&#039;&lt;br /&gt;
			,Email: &#039;jane@example.com&#039;&lt;br /&gt;
			,Email1: &#039;Doe@example.com&#039;&lt;br /&gt;
			,Phone: &#039;800-000-0000&#039;&lt;br /&gt;
			,Phone1: &#039;800-123-1324&#039;&lt;br /&gt;
			,Address: &#039;1219 45th st&#039;&lt;br /&gt;
			,Address2: &#039;APT 3B&#039;&lt;br /&gt;
			,City: &#039;Ogden&#039;&lt;br /&gt;
			,State: &#039;VA&#039;&lt;br /&gt;
			,Zip: &#039;65951&#039;&lt;br /&gt;
			,SchoolsTeachesAt: [1] // int array of school ids&lt;br /&gt;
			,Role: &#039;Teacher&#039; // { Teacher, Judge, Staff, Admin, Volunteer}&lt;br /&gt;
			,Language:&#039;Spanish&#039; //optional - interpreter need for this language&lt;br /&gt;
			,JudgesPreferences:{ //optional&lt;br /&gt;
			   Category1: 123,&lt;br /&gt;
			   ...&lt;br /&gt;
			}&lt;br /&gt;
            }&lt;br /&gt;
        })&lt;br /&gt;
})&lt;br /&gt;
.then(response =&amp;gt; response.json())&lt;br /&gt;
.then(data=&amp;gt;{console.log(&#039;Success: &#039;,data);})&lt;br /&gt;
.catch((error)=&amp;gt;{console.log(&#039;Error: &#039;, error);});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Additional Optional fields ===&lt;br /&gt;
All of these fields would be part of the body.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Username&#039;&#039;&#039; (string max length 25)&lt;br /&gt;
**If this username is not available one will be assigned&lt;br /&gt;
* &#039;&#039;&#039;Password&#039;&#039;&#039; (string max length 25)&lt;br /&gt;
* &#039;&#039;&#039;Middle Name&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;ExternalId&#039;&#039;&#039; (string: can be used to match to your records)&lt;br /&gt;
* &#039;&#039;&#039;Race&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Ethnicity&#039;&#039;&#039;&lt;br /&gt;
** African American&lt;br /&gt;
** Asian/Pacific Islander&lt;br /&gt;
** Caucasian&lt;br /&gt;
** Hispanic&lt;br /&gt;
** Indian/So. Asian&lt;br /&gt;
** Native American&lt;br /&gt;
** Unknown/Declined to state&lt;br /&gt;
* &#039;&#039;&#039;Gender&#039;&#039;&#039;&lt;br /&gt;
** F = Female&lt;br /&gt;
** M = Male&lt;br /&gt;
** O = Other&lt;br /&gt;
** N = Non-binary&lt;br /&gt;
** Z = Prefer not to answer&lt;br /&gt;
* &#039;&#039;&#039;HighestLevelOfEducation&#039;&#039;&#039;&lt;br /&gt;
**Less Than HS Graduate&lt;br /&gt;
**High School Diploma or Equivalent&lt;br /&gt;
**Some College&lt;br /&gt;
**Technical School&lt;br /&gt;
**2-Year College Degree&lt;br /&gt;
**4-Year College Degree&lt;br /&gt;
**Some Graduate School&lt;br /&gt;
**Master&#039;s Level Degree&lt;br /&gt;
**Doctorate (Academic)&lt;br /&gt;
**Doctorate (Professional)&lt;br /&gt;
**Not Indicated&lt;br /&gt;
*&#039;&#039;&#039;JobTitle&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;Employer&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;DateOfBirth&#039;&#039;&#039; (yyyy-mm-dd)&lt;br /&gt;
*&#039;&#039;&#039;FullLegalName&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;BackgroundcheckAtUtc&#039;&#039;&#039; (yyyy-mm-dd)&lt;br /&gt;
*&#039;&#039;&#039;BackgroundCheckStatus&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;JudgesPreferences&#039;&#039;&#039; (object)&lt;br /&gt;
**this is an object, which can be added to body. like JudgesPreferences: { /* add the following optional parameters below */}&lt;br /&gt;
**you need to provide the category id&#039;s in the category1-3&lt;br /&gt;
**you need to provide judging Session id&#039;s for judgingSessions array&lt;br /&gt;
**See [[API_Get_Info]] to get these id&#039;s&lt;br /&gt;
***&#039;&#039;&#039;Category1&#039;&#039;&#039; (int)&lt;br /&gt;
***&#039;&#039;&#039;Category2&#039;&#039;&#039; (int)&lt;br /&gt;
***&#039;&#039;&#039;Category3&#039;&#039;&#039; (int)&lt;br /&gt;
***&#039;&#039;&#039;PreviouslyJudged&#039;&#039;&#039; (boolean true/false)&lt;br /&gt;
***&#039;&#039;&#039;JudgingSessions&#039;&#039;&#039; (int array)&lt;br /&gt;
****Not provided will not update sessions, empty array will clear out sessions for that judge.&lt;br /&gt;
****example [] or [1,2,...]&lt;br /&gt;
*&#039;&#039;&#039;IsSpecialAwardJudge&#039;&#039;&#039; (boolean true/false)&lt;br /&gt;
*&#039;&#039;&#039;IsModerator&#039;&#039;&#039; (boolean true/false)&lt;br /&gt;
*&#039;&#039;&#039;IsInterpreter&#039;&#039;&#039; (boolean true/false)&lt;br /&gt;
*&#039;&#039;&#039;RequirePasswordChange&#039;&#039;&#039; (boolean true/false) requires user to change password on their first sign-in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
&lt;br /&gt;
When you call the /person API you can set the username, if the username you provided is not available we add a number to the end of it. Spaces are removed from the username.  &lt;br /&gt;
&lt;br /&gt;
If you do not provide a password when you call the /person api then none is set and the account will need to have a password set before you can login with this person. A user can use their name and email to reset the password.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Category: API]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
</feed>