Download OpenAPI specification:Download
ParentTV's REST API provides access to our catalogue of videos, courses and blog posts.
For license details, terms and conditions, please refer to your organisation's contract with ParentTV.
curl -X POST\ -H "Authorization: Basic [[basicHash]]"\ -H "Accept: application/json"\ "http://api.production.parenttv.com/ptv/auth"
{- "status": "ok",
- "user": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJub3QiOiJyZWxldmFudCIsIm1lc3NhZ2UiOiJuaWNlIGludmVzdGlnYXRpb24gdGhvdWdoLiJ9.5jV_S60gSgK3bDvxxXsPqjAFXVO0L2_nG4DHzMEhdeg",
- "errors": [
- "string"
]
}
Note: if your token is not valid or does not contain appropriate permissions, videos will still be listed but will not contain a valid video ID for embedding. These records will also be marked restricted.
videos
) page | integer Default: 1 Example: page=1 Current page of the collection. |
per_page | integer Default: 10 Example: per_page=10 Maximum number of items to be returned in result set. |
s | string Example: s=some search phrase Limit response to results which match a full text search of this value. |
after | string <datetime> Limit response to results published after a given ISO8601 compliant date. |
before | string <datetime> Limit response to results published before a given ISO8601 compliant date. |
exclude | string Ensure result set excludes specific IDs. |
include | Array of strings Limit result set to specific IDs. |
include_type | Array of strings Include other types of content in the resultset which meet the same criteria. |
offset | integer Offset the result set by a specific number of items. |
order | string Default: "desc" Order sort attribute ascending or descending. ['asc' | 'desc'] |
orderby | string Default: "date" Sort collection by object attribute. [ 'author' | 'date' | 'id' | 'include' | 'modified' | 'parent' | 'relevance' | 'slug' | 'include_slugs' | 'title' ] |
slug | string Limit result set to a single match with a specific slug value. |
status | string Default: "publish" Enum: "publish" "draft" Limit result set to results assigned one or more statuses. |
topic | string Limit result set to items assigned to the given topic slug. |
categories_exclude | Array of strings Limit result set to all items except those that have the specified term assigned in the categories taxonomy. |
tags | Array of integers Limit result set to all items that have the specified tag ids assigned. |
curl -X GET\ -H "Authorization: Bearer [[accessToken]]"\ -H "Accept: application/json"\ "http://api.production.parenttv.com/ptv/videos?slug=some-title-slug"
{- "data": [
- {
- "id": 120,
- "content": "<p>In this video...",
- "experts": [
- {
- "id": 0,
- "name": "Maggie Dent",
- "portrait_original": "app/uploads/maggie-logo-1.png",
- "portrait_cropped": "app/uploads/maggie-logo-1_400x400.png",
- "slug": "maggie-dent",
- "subtitle": "string"
}
], - "featured": false,
- "menu_order": 100,
- "created": "2020-01-01 01:00:00",
- "modified": "2020-01-01 01:00:00",
- "type": "videos",
- "slug": "when-kids-say-no-constantly",
- "thumbnail": {
- "alt": "string",
- "title": "some-splash-graphic",
- "mime_type": "image/jpeg",
- "width": "500",
- "height": "500"
}, - "title": "When kids say no. Constantly.",
- "video_id": 123456789,
- "categories": [
- {
- "id": 1,
- "name": "Behaviour",
- "slug": "behaviour"
}
], - "zoho_video_id": 11200000003001502,
- "courses": [
- {
- "id": 0,
- "content": "string",
- "slug": "string",
- "title": "string",
- "thumbnail": {
- "alt": "string",
- "title": "some-splash-graphic",
- "mime_type": "image/jpeg",
- "width": "500",
- "height": "500"
}, - "menu_order": 0,
- "categories": [
- {
- "id": 1,
- "name": "Behaviour",
- "slug": "behaviour"
}
]
}
]
}
], - "end": 0,
- "start": 0,
- "data_type": "string",
- "status": "ok"
}
tags | Array of integers Limit result set to all items that have the specified tag ids assigned. |
curl -X GET\ -H "Authorization: Bearer [[accessToken]]"\ -H "Accept: application/json"\ "http://api.production.parenttv.com/ptv/videos/topics?terms[]=2&terms[]=1324"
{- "data": [
- {
- "term_id": 1,
- "name": "Covid 19",
- "taxonomy_slug": "covid-19",
- "taxonomy": "category"
}
], - "data_type": "videos",
- "end": 10,
- "start": 0,
- "total": 26,
- "status": "ok"
}
videos
) id required | integer Example: 1 The ID of the item being requested |
curl -X GET\ -H "Authorization: Bearer [[accessToken]]"\ -H "Accept: application/json"\ "http://api.production.parenttv.com/ptv/videos/1234"
{- "data": [
- {
- "id": 120,
- "content": "<p>In this video...",
- "experts": [
- {
- "id": 0,
- "name": "Maggie Dent",
- "portrait_original": "app/uploads/maggie-logo-1.png",
- "portrait_cropped": "app/uploads/maggie-logo-1_400x400.png",
- "slug": "maggie-dent",
- "subtitle": "string"
}
], - "featured": false,
- "menu_order": 100,
- "created": "2020-01-01 01:00:00",
- "modified": "2020-01-01 01:00:00",
- "type": "videos",
- "slug": "when-kids-say-no-constantly",
- "thumbnail": {
- "alt": "string",
- "title": "some-splash-graphic",
- "mime_type": "image/jpeg",
- "width": "500",
- "height": "500"
}, - "title": "When kids say no. Constantly.",
- "video_id": 123456789,
- "categories": [
- {
- "id": 1,
- "name": "Behaviour",
- "slug": "behaviour"
}
], - "zoho_video_id": 11200000003001502,