Shopify API – Blog

top

Receive a list of all Blogs

Get a list of all blogs

GET /admin/blogs.xml

Get all blogs for a shop

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<blogs type="array">
  <blog>
    <commentable>no</commentable>
    <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
    <feedburner nil="true"></feedburner>
    <feedburner-location nil="true"></feedburner-location>
    <handle>bigcheese-blog</handle>
    <id type="integer">1314995009</id>
    <template-suffix nil="true"></template-suffix>
    <title>Mah Blog</title>
    <updated-at type="datetime">2006-02-01T19:00:00-05:00</updated-at>
  </blog>
</blogs>
top

Receive a count of all Blogs

Get a count of all blogs

GET /admin/blogs/count.xml

Get all blogs for a shop

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<count type="integer">1</count>
top

Receive a single Blog

Get a single blog by its ID

GET /admin/blogs/#{id}.xml

Get a single blog

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <commentable>no</commentable>
  <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
  <feedburner nil="true"></feedburner>
  <feedburner-location nil="true"></feedburner-location>
  <handle>bigcheese-blog</handle>
  <id type="integer">1314995009</id>
  <template-suffix nil="true"></template-suffix>
  <title>Mah Blog</title>
  <updated-at type="datetime">2006-02-01T19:00:00-05:00</updated-at>
</blog>
top

Create a new Blog

Create a new blog

POST /admin/blogs.xml

Create a new empty blog

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <title>Apple main blog</title>
</blog>      

Response

           
HTTP/1.1 201 Created
<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <commentable>no</commentable>
  <created-at type="datetime">2009-10-20T07:25:19-04:00</created-at>
  <feedburner nil="true"></feedburner>
  <feedburner-location nil="true"></feedburner-location>
  <handle>apple-main-blog</handle>
  <id type="integer">1314995014</id>
  <template-suffix nil="true"></template-suffix>
  <title>Apple main blog</title>
  <updated-at type="datetime">2009-10-20T07:25:19-04:00</updated-at>
</blog>
top

Modify an existing Blog

Update a blog

PUT /admin/blogs/#{id}.xml

Update an existing blog title

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <title>IPod Updates</title>
  <id type="integer">1314995009</id>
</blog>      

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <commentable>no</commentable>
  <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
  <feedburner nil="true"></feedburner>
  <feedburner-location nil="true"></feedburner-location>
  <handle>bigcheese-blog</handle>
  <id type="integer">1314995009</id>
  <template-suffix nil="true"></template-suffix>
  <title>IPod Updates</title>
  <updated-at type="datetime">2009-10-20T07:25:22-04:00</updated-at>
</blog>
PUT /admin/blogs/#{id}.xml

Update an existing blog title and handle and also activate comments

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <handle>ipod-updates</handle>
  <title>IPod Updates</title>
  <id type="integer">1314995009</id>
  <commentable>moderate</commentable>
</blog>      

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <commentable>moderate</commentable>
  <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
  <feedburner nil="true"></feedburner>
  <feedburner-location nil="true"></feedburner-location>
  <handle>ipod-updates</handle>
  <id type="integer">1314995009</id>
  <template-suffix nil="true"></template-suffix>
  <title>IPod Updates</title>
  <updated-at type="datetime">2009-10-20T07:25:22-04:00</updated-at>
</blog>
top

Remove a Blog from the database

Delete a blog

DELETE /admin/blogs/#{id}.xml

Remove an existing blog from a shop

Response

           
HTTP/1.1 200 OK
Last updated at Oct 2009 Oct:10 AM.