API Get Schools: Difference between revisions

From zFairs Contest Management
No edit summary
No edit summary
Line 11: Line 11:
             FairId: '9df61f13-474b-442f-ac1f-edca7348ef71', //This value can be found in your url it's the value of f
             FairId: '9df61f13-474b-442f-ac1f-edca7348ef71', //This value can be found in your url it's the value of f
             Body: {
             Body: {
                 includePreloadedSchools: false, //true or false, This field is optional, when true it will return preloaded schools if enabled on your event.
                 includePreloadedSchools: false, //true or false, This field is optional.
             }
             }
         })
         })
Line 22: Line 22:




Notes:
*includePreloadedSchools - when true it will return preloaded schools if enabled on your event.


<br/><br/><br/><br/>
<br/><br/><br/><br/>
[[Category: API]]
[[Category: API]]

Revision as of 14:29, 16 August 2024

Get Schools

Get a list of schools from our API.

fetch('/api/data/schools', {
    method:'POST',
    headers:{'Content-Type': 'application/json'},
    body: JSON.stringify({
            ApiKey:'<Private key>',
            FairId: '9df61f13-474b-442f-ac1f-edca7348ef71', //This value can be found in your url it's the value of f
            Body: {
                includePreloadedSchools: false, //true or false, This field is optional.
            }
        })
})
.then(response => response.json())
.then(data=>{console.log('Success: ',data);})
.catch((error)=>{console.log('Error: ', error);});


Notes:

  • includePreloadedSchools - when true it will return preloaded schools if enabled on your event.