Title: REST API
Last modified: March 8, 2018

---

# REST API

 *  Resolved [rowan84](https://wordpress.org/support/users/rowan84/)
 * (@rowan84)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/rest-api-33/)
 * Hey team,
 * Thanks so much for the great work that you do on the WP sermon manager plugin.
   It’s been working great for us. I want to try and automate sermon uploading based
   on mp3 uploads to Google Drive which syncs to a different server that we have.
 * I saw that the plugin now supports REST API. I assume that this is the standard
   WordPress REST API? Which I have no idea how to use at this point. Is there some
   documentation on how to create sermon entries using this plugin via the REST 
   API that is supported? Would really appreciate being pointed in any direction:).

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Thread Starter [rowan84](https://wordpress.org/support/users/rowan84/)
 * (@rowan84)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/rest-api-33/#post-10052512)
 * OK I found I can post to e.g. endpoint [https://<site-url>/wp-json/wp/v2/wpfc_sermon](https://<site-url>/wp-json/wp/v2/wpfc_sermon)
 * but not sure what to include in the POST body
 *  [Nikola](https://wordpress.org/support/users/nikolam/)
 * (@nikolam)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/rest-api-33/#post-10052601)
 * Hi,
 * We’d recommend you to read the [WordPress REST API Handbook](https://developer.wordpress.org/rest-api/),
   especially the part related to [creating posts](https://developer.wordpress.org/rest-api/reference/posts/#create-a-post).(`
   post` will have to be replaced to `wpfc_sermon` for Sermon Manager, of course)
 * Example request for Sermon Manager (with [Basic Authentication](https://github.com/WP-API/Basic-Auth)–**
   use it only for testing!**):
    `curl -X POST http://<site_url>/wp-json/wp/v2/wpfc_sermon-
   d '{"title": "Sermon Test Title", "status": "publish", "sermon_description": "
   The description", "sermon_audio": "<full_url_to_mp3_file>"}' -u <username>:<password
   >`
 * (you can get full list of fields by opening `http://<site_url>/wp-json/wp/v2/
   wpfc_sermon/<ID>` (replace `<ID>` with some sermon ID))
 * Let us know if you have more questions
 *  Thread Starter [rowan84](https://wordpress.org/support/users/rowan84/)
 * (@rowan84)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/rest-api-33/#post-10052765)
 * Thanks for the reply, however it doesn’t seem to work properly. I get a blank
   draft sermon in the wp-admin section once I post that request. And if I retrieve
   it via REST all the fields I set is also blank. Status is also set to draft even
   though I sent status as publish
 *  [Nikola](https://wordpress.org/support/users/nikolam/)
 * (@nikolam)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/rest-api-33/#post-10052880)
 * Oops, I forgot to include the header. Just append `-H 'Content-Type: application/
   json'` to the curl command. (or set the header some other way in your app)
 *  Thread Starter [rowan84](https://wordpress.org/support/users/rowan84/)
 * (@rowan84)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/rest-api-33/#post-10053011)
 * Cool Thanks Nikola. That should have been obvious to me :). It works now, except
   for one thing i.e.the featured image. But now I think I know, this is set by 
   the featured_media id.
 * Can you perhaps point me in the right direction on uploading featured media images?
 * From the plugin perspective is there any way you can take an external image url
   and make thumbnails etc etc. and upload as a featured image?
 *  Thread Starter [rowan84](https://wordpress.org/support/users/rowan84/)
 * (@rowan84)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/rest-api-33/#post-10053069)
 * OK so uploading an image via this: [https://<site-url>/wp-json/wp/v2/wpfc_sermon/](https://<site-url>/wp-json/wp/v2/wpfc_sermon/)
   enpoint works, and then saving the id returned in the response.
 * I was hoping there would be a way to just provide a link to an external url on
   wordpress.
 *  [Nikola](https://wordpress.org/support/users/nikolam/)
 * (@nikolam)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/rest-api-33/#post-10053204)
 * Seems like that’s the only way to do it.
 * Reference: [https://stackoverflow.com/a/38469742](https://stackoverflow.com/a/38469742)
 *  Thread Starter [rowan84](https://wordpress.org/support/users/rowan84/)
 * (@rowan84)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/rest-api-33/#post-10053244)
 * Ok, thanks again for all your help.
 *  [Nikola](https://wordpress.org/support/users/nikolam/)
 * (@nikolam)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/rest-api-33/#post-10053331)
 * You are very welcome. 🙂
 * Let us know if you have any other questions, or if you encounter any issues.
 * Sermon Manager’s REST API isn’t much used, as far as we could tell, so there 
   could be a random issue.
 *  Thread Starter [rowan84](https://wordpress.org/support/users/rowan84/)
 * (@rowan84)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/rest-api-33/#post-10053335)
 * OK cool, I’ve been testing with Postman, and seemed to work fine so far.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘REST API’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sermon-manager-for-wordpress_688896.
   svg)
 * [Sermon Manager](https://wordpress.org/plugins/sermon-manager-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sermon-manager-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [rowan84](https://wordpress.org/support/users/rowan84/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/rest-api-33/#post-10053335)
 * Status: resolved