School

Access: This is a read-only resource managed directly by the school.

Permissions: A school level access token with the school scope is required to access the school details information.

Get School Detail

Returns details for the school associated with the provided access_token.

Request

GET /school
Headers
Accept: application/vnd.assembly+json; version=1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0sZZxr3r...

Response 200

Headers
Content-Type: application/json; charset=utf-8
Payload
{
  "object": "school",
  "name": "Test School",
  "urn": "123456",
  "la_code": 123,
  "la_name": "City of London",
  "establishment_number": 4321,
  "establishment_type": "Community School",
  "phase": "Secondary",
  "street": "High Street",
  "town": "London",
  "postcode": "SE1 1AA",
  "head_teacher": "Mrs A Smith"
}

Get School Details (Deprecated)

Deprecated: This functionality is now provided as /school.

Returns details for the school associated with the provided access_token.

Request

GET /school_details
Headers
Accept: application/vnd.assembly+json; version=1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0sZZxr3r...

Response 200

Headers
Content-Type: application/json; charset=utf-8
Payload
{
  "object": "school_details",
  "name": "Test School",
  "urn": "123456",
  "la_code": 123,
  "la_name": "City of London",
  "establishment_number": 4321,
  "establishment_type": "Community School",
  "phase": "Secondary",
  "street": "High Street",
  "town": "London",
  "postcode": "SE1 1AA",
  "head_teacher": "Mrs A Smith"
}

Get School Sync Status

Returns the status for the school associated with the provided access_token. The school’s status provides clues as to the ‘freshness’ of data returned from the API. Specifically, last_sync_at refers to the last time we attempted to export data from a school. last_sync_status can have the values success, no_change, or failure. last_changes_at refers to the last time school data was actually updated on the Assembly Platform.

Request

GET /school/status
Headers
Accept: application/vnd.assembly+json; version=1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0sZZxr3r...

Response 200

Headers
Content-Type: application/json; charset=utf-8
Payload
{
  "object": "sync_status",
  "last_sync_at": "2018-10-16T00:00:00+00:00",
  "last_sync_status": "no_changes",
  "last_changes_at": "2018-10-15T00:00:00+00:00"
}

List Dietary Needs

Returns a list of all the Dietary Needs defined by the school.

Request

GET /school/dietary_needs
Headers
Accept: application/vnd.assembly+json; version=1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0sZZxr3r...

Response 200

Headers
Content-Type: application/json; charset=utf-8
Payload
{
  "object": "dietary_need",
  "id": "2",
  "code": "GLUT",
  "name": "Gluten Free"
}

Get a Dietary Need

Returns a Dietary Need by its ID.

Request

GET /school/dietary_needs/{dietary_need_id}
Headers
Accept: application/vnd.assembly+json; version=1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0sZZxr3r...

Response 200

Headers
Content-Type: application/json; charset=utf-8
Payload
{
  "object": "dietary_need",
  "id": "2",
  "code": "GLUT",
  "name": "Gluten Free"
}

List Medical Conditions

Returns a list of all the Medical Conditions defined by the school.

Request

GET /school/medical_conditions
Headers
Accept: application/vnd.assembly+json; version=1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0sZZxr3r...

Response 200

Headers
Content-Type: application/json; charset=utf-8
Payload
{
  "object": "medical_condition",
  "id": "4",
  "code": "ASTH",
  "name": "Asthma"
}

Get a Medical Condition

Returns a Medical Condition by its ID.

Request

GET /school/medical_conditions/{medical_condition_id}
Headers
Accept: application/vnd.assembly+json; version=1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0sZZxr3r...

Response 200

Headers
Content-Type: application/json; charset=utf-8
Payload
{
  "object": "medical_condition",
  "id": "4",
  "code": "ASTH",
  "name": "Asthma"
}

Get School Registration

Access: This is a read-only resource managed directly by Assembly.

Permissions: An application level access token is required to access these routes.

Returns either a 204 HTTP status code if the URN/DfE number being searched for matches a school registered with Assembly. Otherwise a 404 error is returned. Only one URN or DfE number can be searched for at a time.

Request

GET /schools/registered
Headers
Accept: application/vnd.assembly+json; version=1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0sZZxr3r...
Parameter Default Example Description
urn 100001

URN of the school to check

dfe 123/1234

DfE number (with or without the '/') of the school to check

URI Template: /schools/registered{?urn,dfe}

Response 204

Headers
Content-Type: application/json; charset=utf-8