New in version 1.0.3
- Sorting list results by "published", "updated" or "created"
New in version 1.0.2
- List and show pressrooms in membership channels
New in version 1.0.1
- Two new types of material: news and blog posts
New in version 1.0
- The URL of all requests have changed, among other things to include version number. Changes to the API will be versioned from now on.
- List material from all your channels in one feed. Simply specify "all" instead of a channel ID.
- New feature to list your channels, including their ID.
- New XML tag, "channels", for every material listing which channel or channels the material is included in. See the complete XML structure for more information.
Links
Introduction – channel API
Our webservice for fetching material from the Partner channel service is built around simple GET/POST requests over HTTP. The response is XML and HTTP status codes.
In order to use the service, you need your unique key. You will use this key in all requests for authentication. You can find your unique key, and the ID of your respective channels when you log in at http://www.mynewsdesk.com/partner.
Create an account
If you don't have a partner account, you can register one here: http://www.mynewsdesk.com/partner/signup.
URL
To list your channels, including channel ID, this root URL is used:
http://www.mynewsdesk.com/partner/api/1_0/unique key/channel
To access material in a channel, the following URL is used:
http://www.mynewsdesk.com/partner/api/1_0/unique key/channel/channel ID/material/service/?parameter=value¶meter=value
Services
- material/list - List material
- material/view - View single material
- material/test_list - List test data
- material/test_view - View single test data
- pressroom/list - List pressrooms (only membership channels)
- pressroom/view - View single pressroom (only membership channels)
material/list - List material
http://www.mynewsdesk.com/partner/api/1_0/unique key/channel/channel ID|all*/material/list/?[type_of_media=pressreleases|news|blog_posts|events|images|videos|documents|contact_people]&[start_at=YYYY-MM-DD HH:MM]&[end_at=YYYY-MM-DD HH:MM]&[source_id=id|meta_key=id|organization_number=org-nr]&[limit=limit]&[offset=offset]&[format=rss|xml]&[order=published|updated|created]
Accepts
HTTP GET request.
Returns
XML over HTTP. Status code "200 OK" on successful request. Status code "400 Bad Request" if invalid parameters were used.
Required parameters
- None
Optional parameters
-
type_of_media (Default: all types)
Fetch material of this type only.
-
start_at (Format: YYYY-MM-DD HH:MM)
Only fetch material created after the given time.
-
end_at (Format: YYYY-MM-DD HH:MM)
Only fetch material created before the given time.
-
source_id**
Specify a Mynewsdesk company ID to list only material from that company.
-
meta_key**
Specify your meta key to list only material from the matching company.
-
organization_number**
Specify organization number to list only material from the matching company.
-
limit (Default: 20)
Set the maximum number of items in the response. This cannot be more than 100.
-
offset (Default: 0)
Specify which item (sequentially) should be first, skipping preceding items. Note! This must be used in combination with limit.
-
order (Default: published)
Specify the sort order of the result: publish date (published), latest update (updated) or creation date (created).
-
format (Default: xml)
Specify the format of the response: RSS 2.0 or full XML. The RSS feed contains fewer fields than the full XML feed, because of limitations of the format. Read more about RSS 2.0 on Wikipedia.
* Specify "all" instead of channel ID to list material from all your channels. New
** Only one parameter marked by two asterisks is allowed.
material/view - View single material
http://www.mynewsdesk.com/partner/api/1_0/unique key/channel/channel ID/material/view/?[item_id=id]&[type_of_media=pressrelease|news|blog_post|event|image|video|document|contact_person]
Accepts
HTTP GET request.
Returns
XML over HTTP. Status code "200 OK" on successful request. Status code "404 Not Found" if the material could not be found. Status code "400 Bad Request" if invalid parameters were used.
Required parameters
-
item_id
ID of the material to be fetched.
-
type_of_media
The type of material to be fetched.
Optional parameters
- None
material/test_list - List test data
http://www.mynewsdesk.com/partner/api/1_0/unique key/channel/channel ID|all/material/test_list/?[type_of_media=pressreleases|news|blog_posts|events|images|videos|documents|contact_people]&[limit=limit]&[format=rss|xml]&[order=published|updated|created]
Use this method to test your implementation, if your channel is empty. It returns recently published material on Mynewsdesk, independently of your channel.
Accepts
HTTP GET request.
Returns
XML over HTTP. Status code "200 OK" on successful request. Status code "404 Not Found" if the material could not be found. Status code "400 Bad Request" if invalid parameters were used.
Required parameters
- None
Optional parameters
-
type_of_media (Default: all types)
The type of material to be fetched.
-
limit (Default: 2 per material type)
Set the maximum number of items in the response. This cannot be more than 100.
-
format (Default: xml)
Specify the format of the response: RSS 2.0 or full XML. The RSS feed contains fewer fields than the full XML feed, because of limitations of the format. Read more about RSS 2.0 on Wikipedia.
material/test_view - View single test data
http://www.mynewsdesk.com/partner/api/1_0/unique key/channel/channel ID/material/test_view/?[type_of_media=pressrelease|news|blog_posts|event|image|video|document|contact_person]
Use this method to test your implementation, if your channel is empty. It returns recently published material on Mynewsdesk, independently of your channel.
Accepts
HTTP GET request.
Returns
XML over HTTP. Status code "200 OK" on successful request. Status code "404 Not Found" if the material could not be found. Status code "400 Bad Request" if invalid parameters were used.
Required parameters
- None
Optional parameters
-
item_id (Default: most recently published)
ID of the material to be fetched.
-
type_of_media (Default: pressrelease)
The type of material to be fetched.
pressroom/list - List pressrooms (only membership channels)
http://www.mynewsdesk.com/partner/api/1_0/unique key/channel/channel ID/pressroom/list/
Accepts
HTTP GET request.
Returns
XML over HTTP. Status code "200 OK" on successful request. Status code "400 Bad Request" if invalid parameters were used.
Parameters
- None
pressroom/view - View single pressroom (only membership channel)
http://www.mynewsdesk.com/partner/api/1_0/unique key/channel/channel ID/pressroom/view/?[pressroom_id=id]
Accepts
HTTP GET request.
Returns
XML over HTTP. Status code "200 OK" on successful request. Status code "404 Not Found" if the material could not be found. Status code "400 Bad Request" if invalid parameters were used.
Required parameters
-
pressroom_id
ID of the pressroom to be fetched.