Download OpenAPI specification:Download
This documentation describes how to retrieve, store and update news articles.
Retrieve a paginated response of news articles
include_own | boolean Example: include_own=false Include own news articles. If set to 'false' and user has 'view-all-news' permission, then all news articles will be returned. If set to 'true' only articles that the user has created, and the articles that are a part of the user's roles and teams will be shown. |
important | boolean Example: important=true Show only important news articles (set to 'homepage', latest 4 articles) |
active | boolean Example: active=true Show only active news articles |
view | string Example: view=my-news Show only active news articles |
q | string Example: q=Celebration Search by news article title, advert and body |
created_at | string <datetime> Example: created_at=2024-12-25 15:00:00 Filter where 'created_at' is more than or equal to the provided datetime (UTC) |
slug | string Example: slug=celebration Filter by URL slug |
o | string Default: "desc" Enum: "asc" "desc" Example: o=asc Order the results. 'asc' for ascending, 'desc' for descending |
s | string Enum: "created_at" "updated_at" "deleted_at" "expiry" "title" "featured" "home" Example: s=category Sort the results. Note - 'home' and 'featured' are interchangeable |
Array of objects (News article) | |
object |
{- "data": [
- {
- "id": 1243,
- "slug": "new-year-celebrations",
- "title": "New Year Celebrations 2024",
- "body": {
- "original": "string",
- "parsed": "string"
}, - "advert": {
- "original": "string",
- "parsed": "string"
}, - "featured": true,
- "home": false,
- "image_url": "string",
- "image_caption": "string",
- "thumbnails": {
}, - "expiry_date": "2024-02-01T00:00:00.000Z",
- "publish_date": "2023-12-28T17:00:00.000Z",
- "author": {
- "id": 46485,
- "display_name": "John Smith",
- "title": "Mr",
- "can_manage": true,
- "role_name": "Volunteer",
- "team_name": "Kent",
- "status": {
- "id": "1",
- "name": "Active",
- "contactable": true
}
}, - "created_at": "string",
- "updated_at": "string",
- "deleted_at": "string",
- "tags": { },
- "image": {
- "id": 45645,
- "original_name": "image-of-london.jpg",
- "file_size": 178441,
- "mime": "image/png",
- "description": "Image of London",
- "thumbnails": {
},
}, - "images": [
- {
- "id": 45645,
- "original_name": "image-of-london.jpg",
- "file_size": 178441,
- "mime": "image/png",
- "description": "Image of London",
- "thumbnails": {
},
}
]
}
], - "meta": {
- "pagination": {
- "total": "string",
- "count": "string",
- "per_page": "string",
- "current_page": "string",
- "total_pages": "string",
- "links": {
- "next": "string",
- "previous": "string"
}
}
}
}
Create a news article
title required | string News article title |
body required | string <date> News article body |
advert required | string <time> News article advert |
publish_date | string <datetime> Publish datetime |
tags | string Tags (comma separated) |
teams | string Only show news article to users within the provided team IDs (comma separated) |
roles | string Only show news article to users within the provided role IDs (comma separated) |
images | string Image IDs for images to show with the news article (comma separated) |
object |
object (News article) |
{- "title": "New Years celebrations 2024",
- "body": "2019-08-24",
- "advert": "14:15:22Z",
- "publish_date": "string",
- "tags": "animals,rescue",
- "teams": "14,15,250",
- "roles": "230",
- "images": "2041, 2044",
- "image": {
- "id": 2045
}
}
{- "data": {
- "id": 1243,
- "slug": "new-year-celebrations",
- "title": "New Year Celebrations 2024",
- "body": {
- "original": "string",
- "parsed": "string"
}, - "advert": {
- "original": "string",
- "parsed": "string"
}, - "featured": true,
- "home": false,
- "image_url": "string",
- "image_caption": "string",
- "thumbnails": {
}, - "expiry_date": "2024-02-01T00:00:00.000Z",
- "publish_date": "2023-12-28T17:00:00.000Z",
- "author": {
- "id": 46485,
- "display_name": "John Smith",
- "title": "Mr",
- "can_manage": true,
- "role_name": "Volunteer",
- "team_name": "Kent",
- "status": {
- "id": "1",
- "name": "Active",
- "contactable": true
}
}, - "created_at": "string",
- "updated_at": "string",
- "deleted_at": "string",
- "tags": { },
- "image": {
- "id": 45645,
- "original_name": "image-of-london.jpg",
- "file_size": 178441,
- "mime": "image/png",
- "description": "Image of London",
- "thumbnails": {
},
}, - "images": [
- {
- "id": 45645,
- "original_name": "image-of-london.jpg",
- "file_size": 178441,
- "mime": "image/png",
- "description": "Image of London",
- "thumbnails": {
},
}
]
}
}
Retrieve a specific news article
id required | string |
object (News article) |
{- "data": {
- "id": 1243,
- "slug": "new-year-celebrations",
- "title": "New Year Celebrations 2024",
- "body": {
- "original": "string",
- "parsed": "string"
}, - "advert": {
- "original": "string",
- "parsed": "string"
}, - "featured": true,
- "home": false,
- "image_url": "string",
- "image_caption": "string",
- "thumbnails": {
}, - "expiry_date": "2024-02-01T00:00:00.000Z",
- "publish_date": "2023-12-28T17:00:00.000Z",
- "author": {
- "id": 46485,
- "display_name": "John Smith",
- "title": "Mr",
- "can_manage": true,
- "role_name": "Volunteer",
- "team_name": "Kent",
- "status": {
- "id": "1",
- "name": "Active",
- "contactable": true
}
}, - "created_at": "string",
- "updated_at": "string",
- "deleted_at": "string",
- "tags": { },
- "image": {
- "id": 45645,
- "original_name": "image-of-london.jpg",
- "file_size": 178441,
- "mime": "image/png",
- "description": "Image of London",
- "thumbnails": {
},
}, - "images": [
- {
- "id": 45645,
- "original_name": "image-of-london.jpg",
- "file_size": 178441,
- "mime": "image/png",
- "description": "Image of London",
- "thumbnails": {
},
}
]
}
}
Update an existing news article details
id required | string |
title required | string News article title |
body required | string <date> News article body |
advert required | string <time> News article advert |
publish_date | string <datetime> Publish datetime |
tags | string Tags (comma separated) |
teams | string Only show news article to users within the provided team IDs (comma separated) |
roles | string Only show news article to users within the provided role IDs (comma separated) |
images | string Image IDs for images to show with the news article (comma separated) |
object |
object (News article) |
{- "title": "New Years celebrations 2024",
- "body": "2019-08-24",
- "advert": "14:15:22Z",
- "publish_date": "string",
- "tags": "animals,rescue",
- "teams": "14,15,250",
- "roles": "230",
- "images": "2041, 2044",
- "image": {
- "id": 2045
}
}
{- "data": {
- "id": 1243,
- "slug": "new-year-celebrations",
- "title": "New Year Celebrations 2024",
- "body": {
- "original": "string",
- "parsed": "string"
}, - "advert": {
- "original": "string",
- "parsed": "string"
}, - "featured": true,
- "home": false,
- "image_url": "string",
- "image_caption": "string",
- "thumbnails": {
}, - "expiry_date": "2024-02-01T00:00:00.000Z",
- "publish_date": "2023-12-28T17:00:00.000Z",
- "author": {
- "id": 46485,
- "display_name": "John Smith",
- "title": "Mr",
- "can_manage": true,
- "role_name": "Volunteer",
- "team_name": "Kent",
- "status": {
- "id": "1",
- "name": "Active",
- "contactable": true
}
}, - "created_at": "string",
- "updated_at": "string",
- "deleted_at": "string",
- "tags": { },
- "image": {
- "id": 45645,
- "original_name": "image-of-london.jpg",
- "file_size": 178441,
- "mime": "image/png",
- "description": "Image of London",
- "thumbnails": {
},
}, - "images": [
- {
- "id": 45645,
- "original_name": "image-of-london.jpg",
- "file_size": 178441,
- "mime": "image/png",
- "description": "Image of London",
- "thumbnails": {
},
}
]
}
}