In addition to an online storefront, haravan shops come with a built-in blogging engine, allowing a shop to have one or more blogs.
Shop owners are encouraged to use blogs to:
- Make announcements
- Talk about their products in more detail
- Show off their expertise
- Connect with their customers and
- Boost their shop's search engine rankings
Haravan blogs are like most other blogs: a content management system for articles posted in reverse chronological order. Articles can be posted under one or more user-defined categories and tagged with one or more user-defined tags, with an option to allow readers to post comments to articles. An Atom feed is automatically generated for each blog, allowing for syndication. The search functionality built into every shop also searches the text in blog articles.
Blogs are meant to be used as a type of magazine or newsletter for the shop, with content that changes over time. If your shop needs a static page (such as an "About Us" page), we recommend that you use a Page instead.
Authenticated access scopes: com.read_contents, com.write_contents
What you can do with Blog
The Haravan API lets you do the following with the Blog resource.
- GET https://apis.haravan.com/web/blogs.json Retrieves a list of blogs.
- GET https://apis.haravan.com/web/blogs/count.json Retrieves a count of blogs.
- GET https://apis.haravan.com/web/blogs/{id}.json Retrieves single the blog.
- POST https://apis.haravan.com/web/blogs.json Create a new blog.
- PUT https://apis.haravan.com/web/blogs.json Modify an existing blog.
- DELETE https://apis.haravan.com/web/blogs/{id}.json Delete an existing blog.
Blog properties
Endpoints
limit | Limit of the result. |
page | Page to show the result. |
since_id | Restrict results to after the specified ID |
handle | Filter by Blog handle. |
fields | comma-separated list of fields to include in the response. |
Retrieves a list of all blogs by page number. By default, the number of resources on the page is 50.
GET https://apis.haravan.com/web/blogs.json?page=1
HTTP/1.1 200 OK { "blogs": [ { "commentable": "no", "created_at": "2015-03-28T13:26:28-04:00", "feedburner": null, "feedburner_location": null, "handle": "banana-blog", "id": 382285388, "template_suffix": null, "title": "A Gnu Blog", "updated_at": "2006-02-02T19:00:00-05:00", "tags": "" }, { "commentable": "no", "created_at": "2015-03-28T13:26:28-04:00", "feedburner": null, "feedburner_location": null, "handle": "apple-blog", "id": 241253187, "template_suffix": null, "title": "Mah Blog", "updated_at": "2006-02-01T19:00:00-05:00", "tags": "Announcing, Mystery" } ] }
Retrieves a list of by handle.
GET https://apis.haravan.com/web/blogs.json?handle=apple-blog
HTTP/1.1 200 OK { "blogs": [ { "commentable": "no", "created_at": "2015-03-28T13:26:28-04:00", "feedburner": null, "feedburner_location": null, "handle": "apple-blog", "id": 241253187, "template_suffix": null, "title": "Mah Blog", "updated_at": "2006-02-01T19:00:00-05:00", "tags": "Announcing, Mystery" } ] }
Retrieves a count of the blogs.
GET https://apis.haravan.com/web/blogs/count.json
HTTP/1.1 200 OK { "count": 570 }
Retrieves single the blog.
GET https://apis.haravan.com/web/blogs/241253187.json
HTTP/1.1 200 OK { "blogs": [ { "commentable": "no", "created_at": "2015-03-28T13:26:28-04:00", "feedburner": null, "feedburner_location": null, "handle": "apple-blog", "id": 241253187, "template_suffix": null, "title": "Mah Blog", "updated_at": "2006-02-01T19:00:00-05:00", "tags": "Announcing, Mystery" } ] }
Create a new empty blog.
POST https://apis.haravan.com/web/blogs.json
{ "blog": { "title": "Apple main blog", "tags" : "apple-blog" } }
HTTP/1.1 201 Created { "blog": { "commentable": "no", "created_at": "2015-03-28T13:27:02-04:00", "feedburner": null, "feedburner_location": null, "handle": "apple-main-blog", "id": 1008414249, "template_suffix": null, "title": "Apple main blog", "updated_at": "2015-03-28T13:27:02-04:00", "tags": "apple-blog" } }
Update an existing blog.
PUT https://apis.haravan.com/web/blogs/241253187.json
{ "blog": { "title": "IPod Updates", "handle": "apple-blog", "tags": "Announcing, Mystery" } }
HTTP/1.1 200 OK { "blog": { "commentable": "no", "created_at": "2015-03-28T13:26:28-04:00", "feedburner": null, "feedburner_location": null, "handle": "apple-blog", "id": 241253187, "template_suffix": null, "title": "IPod Updates", "updated_at": "2015-03-28T13:27:03-04:00", "tags": "Announcing, Mystery" } }
Delete an existing blog.
DELETE https://apis.haravan.com/web/blogs/241253187.json
{}
HTTP/1.1 200 OK {}