Using the OneCMS School Closings API

Base API Call

<your-domain>.com/wp-json/wpb/v2/closing

Do not use the API call without the parameters below. You will not receive all of the data.

Example:

https://anthonyp.onecmsdev.com/wp-json/wpb/v2/closing?

Parameters

limit

The limit parameters allows you to limit the number of entities returned.

Enter the maximum number of entities you want returned per API call.


Example:

limit=20

page

The page parameter allows you to paginate your API calls.

In most cases,  you can keep this to 1.  However, if you have a lot of schools and you want to make multiple calls, you can call page 1 first, then page 2, etc…


Example:

page=1

type

The type parameter allows you to filter your API call to include all of only specific types of entities.

The value “all” would include all entity types (unfiltered).  You can use the various parameter values to filter the list to only certain entity types.

  • all
  • school
  • business
  • civic-groups
  • college-university
  • day-care
  • government
  • medical
  • other
  • sporting-event

Example:

type=all

status

The status parameter allows you to filter your API call to include all of only specific types of closing reasons.

The value “show-all” would include all closing reasons (unfiltered).  You can use the various parameter values to filter the list to only certain entity closing reasons.

  • show-all
  • canceled
  • close
  • postponed
  • delay
  • open
  • closing-early

Example:

status=show-all

Sample API Calls

Show ALL Entities, no filtering

type=all&status=show-all

Return only schools, but all closing statuses

type=school&status=show-all

Return only businesses, but all closing statuses

type=business&status=show-all

Return all entity types, but only delayed status

type=all&status=delay

Return all entity types, but only closed status

type=all&status=closed
Loading...