medusa-plugin-blog
Provides a basic blog backend for Medusa.
- Posts can be tagged with products, collections, and/or custom tag values.
- Posts can be queried by tag, category, product, or collection.
This plugin is under development and should be considered experimental.
Installation
Configuration
API Endpoints
Copy to clipboardGET /store/blog/posts
Copy to clipboard
GET /store/blog/posts
return jsons object containing an array of all blog post objects
Copy to clipboardGET /store/blog/posts/:handle
Copy to clipboard
GET /store/blog/posts/:handle
return json object containing a single blog post object
Copy to clipboardGET /store/blog/categories
Copy to clipboard
GET /store/blog/categories
return json object containing an array of all blog category objects
Copy to clipboardGET /store/blog/categories/:handle
Copy to clipboard
GET /store/blog/categories/:handle
return json object containing a single blog category object
Copy to clipboardGET /store/blog/categories/:handle/posts
Copy to clipboard
GET /store/blog/categories/:handle/posts
return json object containing an array of all blog post objects for a given category
Copy to clipboardGET /store/blog/tags
Copy to clipboard
GET /store/blog/tags
return json object containing an array of all blog tag objects
Copy to clipboardGET /store/blog/tags/posts
Copy to clipboard
GET /store/blog/tags/posts
return json object containing an array of all blog post objects for a given tag or array of tags
Example:
etcCopy to clipboard/store/blog/tags/posts?tag=tag1&tag=tag2&tag=tag3
Copy to clipboardGET /store/blog/products/:id
Copy to clipboard
GET /store/blog/products/:id
return json object containing an array of all blog post objects for a product with given id
Copy to clipboardGET /store/blog/collections/:id
Copy to clipboard
GET /store/blog/collections/:id
return json object containing an array of all blog post objects for a collection with given id
Copy to clipboardPOST /admin/blog/categories
Copy to clipboard
POST /admin/blog/categories
create a new blog category object
Expects body with:
Copy to clipboardjs { handle: string!, title: string!, description: string, keywords: string[], metadata: jsonb }
Copy to clipboardPOST /admin/blog/categories/:id
Copy to clipboard
POST /admin/blog/categories/:id
update an existing blog category object with given id
Expects body with:
Copy to clipboardjs { handle: string!, title: string!, description: string, keywords: string[], metadata: jsonb }
Copy to clipboardDELETE /admin/blog/categories/:id
Copy to clipboard
DELETE /admin/blog/categories/:id
delete an existing blog category object with given id
Copy to clipboardPOST /admin/blog/posts
Copy to clipboard
POST /admin/blog/posts
create a new blog post object
Expects body with:
Copy to clipboardjs { handle: string!, title: string!, author: string, published: boolean, content: string, description: string, keywords: string[], category_id: string, tag_ids: string[], product_ids: string[], collection_ids: string[], metadata: jsonb }
Copy to clipboardPOST /admin/blog/posts/:id
Copy to clipboard
POST /admin/blog/posts/:id
update an existing blog post object with given id
Expects body with:
Copy to clipboardjs { handle: string!, title: string!, author: string, published: boolean, content: string, description: string, keywords: string[], category_id: string, tag_ids: string[], product_ids: string[], collection_ids: string[], metadata: jsonb }
Copy to clipboardDELETE /admin/blog/posts/:id
Copy to clipboard
DELETE /admin/blog/posts/:id
delete an existing blog post object with given id
Copy to clipboardPOST /admin/blog/tags
Copy to clipboard
POST /admin/blog/tags
create a new blog tag object
Expects body with:
Copy to clipboardjs { value: string! }
Copy to clipboardPOST /admin/blog/tags/:id
Copy to clipboard
POST /admin/blog/tags/:id
update an existing blog tag object with given id
Expects body with:
Copy to clipboardjs { value: string! }
Copy to clipboardDELETE /admin/blog/tags/:id
Copy to clipboard
DELETE /admin/blog/tags/:id
delete an existing blog tag object with given id
Objects
BlogPost
BlogTag
BlogCategory
Product
Default Medusa Product object
Collection
Default Medusa Collection object

Build your own plugins
Develop your own plugins with our API to speed up your processes.
Make your plugin available via npm for it to be shared in our Plugin Library with the broader Medusa community.
.png)