On this page
article
Step 6 – Bind Universities to the Property
This is for associating the property with universities for order documentation
SearchUniversities
Search for valid universities published on Student.com.
Arguments:
-
API: searchUniversities
-
Purpose & Use Cases: Search for valid universities published on Student.com by city
-
Request:
| Attribute Name | Data Type | Required | Details |
|---|---|---|---|
| citySlug | String | No | Slug of the city |
| sort | String | No | Indicate how to sort the city |
| name | String | No | Name of the university |
| pageNumber | Int | No | The number of the page |
| pageSize | Int | No | The size of the page |
QUERY
query SearchUniversities($citySlug: String, $sort: String, $name: String, $pageNumber: Int, $pageSize: Int) {
searchUniversities(citySlug: $citySlug, sort: $sort, name: $name, pageNumber: $pageNumber, pageSize: $pageSize) {
universities {
id
slug
name
originalName
latitude
longitude
rank
citySlug
}
}
}
GRAPHQL VARIABLES
{
"citySlug": null,
"sort": null,
"name": null,
"pageNumber": 1,
"pageSize": 10
}
- Response:
{
"data": {
"searchUniversities": {
"universities": [
{
"id": "eyJ0eXBlIjoiVW5pdmVyc2l0eSIsImlkIjoiNzQzIn0=",
"slug": "lehman-college-cuny",
"name": "Lehman College",
"originalName": "Lehman College",
"latitude": 40.7305,
"longitude": -73.9995,
"rank": 2,
"citySlug": "new-york-city"
},
{
"id": "eyJ0eXBlIjoiVW5pdmVyc2l0eSIsImlkIjoiNzM2In0=",
"slug": "william-e-macaulay-honors-college-cuny",
"name": "William E. Macaulay Honors College",
"originalName": "William E. Macaulay Honors College",
"latitude": 40.7629,
"longitude": -73.9558,
"rank": 1,
"citySlug": "new-york-city"
},
{
"id": "eyJ0eXBlIjoiVW5pdmVyc2l0eSIsImlkIjoiMjk0In0=",
"slug": "new-york-university",
"name": "New York University",
"originalName": "New York University",
"latitude": 40.7686,
"longitude": -73.965,
"rank": 0,
"citySlug": "new-york-city"
},
{
"id": "eyJ0eXBlIjoiVW5pdmVyc2l0eSIsImlkIjoiMjkyIn0=",
"slug": "columbia-university",
"name": "Columbia University",
"originalName": "Columbia University",
"latitude": 40.7187,
"longitude": -74.0119,
"rank": 0,
"citySlug": "new-york-city"
},
{
"id": "eyJ0eXBlIjoiVW5pdmVyc2l0eSIsImlkIjoiODA5In0=",
"slug": "new-york-institute-of-technology",
"name": "New York Institute of Technology",
"originalName": "New York Institute of Technology",
"latitude": 40.7071,
"longitude": -74.0021,
"rank": 0,
"citySlug": "new-york-city"
},
{
"id": "eyJ0eXBlIjoiVW5pdmVyc2l0eSIsImlkIjoiMTQ4In0=",
"slug": "hult-international-business-school-boston-campus",
"name": "Hult International Business School (Boston Campus)",
"originalName": "Hult International Business School (Boston Campus)",
"latitude": 42.3401,
"longitude": -71.167,
"rank": 0,
"citySlug": "boston"
},
{
"id": "eyJ0eXBlIjoiVW5pdmVyc2l0eSIsImlkIjoiNDI5In0=",
"slug": "pace-university",
"name": "Pace University",
"originalName": "Pace University",
"latitude": 40.8099,
"longitude": -73.963,
"rank": 0,
"citySlug": "new-york-city"
},
{
"id": "eyJ0eXBlIjoiVW5pdmVyc2l0eSIsImlkIjoiMTAxIn0=",
"slug": "northeastern-university",
"name": "Northeastern University",
"originalName": "Northeastern University",
"latitude": 42.3522,
"longitude": -71.0658,
"rank": 0,
"citySlug": "boston"
},
{
"id": "eyJ0eXBlIjoiVW5pdmVyc2l0eSIsImlkIjoiMzAzIn0=",
"slug": "baruch-college",
"name": "Baruch College",
"originalName": "Baruch College",
"latitude": 40.7052,
"longitude": -74.016,
"rank": 0,
"citySlug": "new-york-city"
},
{
"id": "eyJ0eXBlIjoiVW5pdmVyc2l0eSIsImlkIjoiNTA0In0=",
"slug": "university-of-southern-california",
"name": "University of Southern California",
"originalName": "University of Southern California",
"latitude": 33.9886,
"longitude": -118.385,
"rank": 0,
"citySlug": "los-angeles"
}
]
}
}
}
Bind Universities to the Property
-
API: setPropertyUniversities
-
Purpose & Use Cases: Set recommended or destination universities for the property based on the isDestinationUniversity field.
- If isDestinationUniversity is not provided or is set to
false, field universities which is for the recommended universities of the property will be applied. You can select up to 3 universities for the property. - If isDestinationUniversity is set to
true, the destinationUniversities field will be applied, and your property will only accept students from the selected university. You can select only one university for this setting.
- If isDestinationUniversity is not provided or is set to
-
Request:
| Attribute Name | Data Type | Required | Details |
|---|---|---|---|
| propertyId | DecodedPropertyID | Yes | Unique identifier for the property |
| universityIds | ID[] | Yes | List of universityId to bind |
| isDestinationUniversity | Boolean | No | Indicate whether to apply universities or destinationUniversities |
QUERY
mutation SetPropertyUniversities($input: SetPropertyUniversitiesInput!) {
setPropertyUniversities(input: $input) {
result
}
}
GRAPHQL VARIABLES
{
"input": {
"isDestinationUniversity": true,
"propertyId": "eyJ0eXBlIjoiUHJvcGVydHkiLCJpZCI6MTA0NDc3M30",
"universityIds": ["eyJ0eXBlIjoiVW5pdmVyc2l0eSIsImlkIjoiNzQzIn0"]
}
}
- Response:
{
"data": {
"setPropertyUniversities": {
"result": true
}
}
}
- Error Message:
| Error Message | Description |
|---|---|
| property has a destination university already | Unable to bind a university to the property because the property is already associated with a destination university |