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

Blog properties

commentable

"commentable": "no"

Indicates whether readers can post comments to the blog and if comments are moderated or not. Possible values are:

  • no (default): Readers cannot post comments to blog articles.
  • moderate: Readers can post comments to blog articles, but comments must be moderated before they appear.
  • yes: Readers can post comments to blog articles without moderation.

created_at

"created_at": "2021-05-13T07:29:20.1Z"

The date and time (ISO 8601 format) when the blog was created.

feedburner

"feedburner": null

Feedburner is a web feed management provider and can be enabled to provide custom RSS feeds for haravan bloggers. This property will default to blank or "null" unless Feedburner is enabled through the shop admin.

feedburner_location

"feedburner_location": null

URL to the FeedBurner location for blogs that have enabled FeedBurner through their store admin.

handle

"handle": "apple-blog"

A human-friendly unique string for a blog is automatically generated from its title. This handle is used by the Liquid templating language to refer to the blog.

id

"id": 241253187

A unique numeric identifier for the blog.

tags

"tags" : "tagged"

Tags are additional short descriptors formatted as a string of comma-separated values. For example, if an article has three tags: tag1, tag2, tag3.

template_suffix

"template_suffix": null

States the name of the template a blog is using if it is using an alternate template. If a blog is using the default blog.liquid template, the value returned is "null".

title

"title": "my blog"

The title of the blog.

updated_at

"updated_at": "2021-05-13T07:29:20.808Z"

The date and time (ISO 8601 format) when the blog was last updated.

Endpoints

GET https://apis.haravan.com/web/blogs.json

Retrieves a list of all blogs.

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

View response

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

View response

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"
        }
    ]
}
GET https://apis.haravan.com/com/blogs/count.json

Retrieves a count of the blogs.

Retrieves a count of the blogs.

GET https://apis.haravan.com/web/blogs/count.json

View response

HTTP/1.1 200 OK
{
    "count": 570
}
GET https://apis.haravan.com/web/blogs/{id}.json

Retrieves single the blog.

Retrieves single the blog.

GET https://apis.haravan.com/web/blogs/241253187.json

View response

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"
  }
}

View response

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"
  }
}

View response

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 https://apis.haravan.com/web/blogs/{id}.json

Delete an existing blog.


Delete an existing blog.

DELETE https://apis.haravan.com/web/blogs/241253187.json

{}

View response

HTTP/1.1 200 OK
{}