Shopify API – Comment

top

Receive a list of all Comments

Get a list of all comments for an article

Available URL Query parameters:

  • limit — Amount of results (default: 50) (maximum: 250)
  • page — Page to show (default: 1)
  • created_at_min — Show comments created after date (format: 2008-01-01 03:00)
  • created_at_max — Show comments created before date (format: 2008-01-01 03:00)
  • updated_at_min — Show comments last updated after date (format: 2008-01-01 03:00)
  • updated_at_max — Show comments last updated before date (format: 2008-01-01 03:00)
  • published_at_min — Show comments published after date (format: 2008-01-01 03:00)
  • published_at_max — Show comments published before date (format: 2008-01-01 03:00)
  • published_status
    • published - Show only published comments
    • unpublished - Show only unpublished comments
    • any - Show all comments (default)
  • status
    • pending - All pending comments
    • published - Show only published comments
    • unapproved - Show only unapproved comments
GET /admin/comments.xml?article_id=1208387130&blog_id=1314995009

Get all the comments for a certain article of a blog

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<comments type="array">
  <comment>
    <article-id type="integer">1208387130</article-id>
    <author>Soleone</author>
    <blog-id type="integer">1314995009</blog-id>
    <body>Hi author, I really _like_ what you're doing there.</body>
    <body-html>&lt;p&gt;Hi author, I really &lt;em&gt;like&lt;/em&gt; what you're doing there.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
    <email>sole@one.de</email>
    <id type="integer">653537639</id>
    <ip>127.0.0.1</ip>
    <published-at type="datetime" nil="true"></published-at>
    <status>unapproved</status>
    <updated-at type="datetime">2009-10-20T07:24:53-04:00</updated-at>
    <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
  </comment>
  <comment>
    <article-id type="integer">1208387130</article-id>
    <author>Casino deluxe</author>
    <blog-id type="integer">1314995009</blog-id>
    <body>Check my casino at ...</body>
    <body-html>&lt;p&gt;Check my casino at ...&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
    <email>register@mycasino.com</email>
    <id type="integer">1202072468</id>
    <ip>127.0.0.1</ip>
    <published-at type="datetime" nil="true"></published-at>
    <status>removed</status>
    <updated-at type="datetime">2009-10-20T07:24:53-04:00</updated-at>
    <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
  </comment>
  <comment>
    <article-id type="integer">1208387130</article-id>
    <author>Soleone</author>
    <blog-id type="integer">1314995009</blog-id>
    <body>Hi author, I really _like_ what you're doing there.</body>
    <body-html>&lt;p&gt;Hi author, I really &lt;em&gt;like&lt;/em&gt; what you're doing there.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
    <email>sole@one.de</email>
    <id type="integer">1192115357</id>
    <ip>127.0.0.1</ip>
    <published-at type="datetime" nil="true"></published-at>
    <status>published</status>
    <updated-at type="datetime">2009-10-20T07:24:53-04:00</updated-at>
    <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
  </comment>
</comments>
GET /admin/comments.xml?blog_id=1314995009

Get all the comments for all the articles of a certain blog

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<comments type="array">
  <comment>
    <article-id type="integer">1208387130</article-id>
    <author>Soleone</author>
    <blog-id type="integer">1314995009</blog-id>
    <body>Hi author, I really _like_ what you're doing there.</body>
    <body-html>&lt;p&gt;Hi author, I really &lt;em&gt;like&lt;/em&gt; what you're doing there.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
    <email>sole@one.de</email>
    <id type="integer">653537639</id>
    <ip>127.0.0.1</ip>
    <published-at type="datetime" nil="true"></published-at>
    <status>unapproved</status>
    <updated-at type="datetime">2009-10-20T07:24:53-04:00</updated-at>
    <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
  </comment>
  <comment>
    <article-id type="integer">1208387130</article-id>
    <author>Casino deluxe</author>
    <blog-id type="integer">1314995009</blog-id>
    <body>Check my casino at ...</body>
    <body-html>&lt;p&gt;Check my casino at ...&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
    <email>register@mycasino.com</email>
    <id type="integer">1202072468</id>
    <ip>127.0.0.1</ip>
    <published-at type="datetime" nil="true"></published-at>
    <status>removed</status>
    <updated-at type="datetime">2009-10-20T07:24:53-04:00</updated-at>
    <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
  </comment>
  <comment>
    <article-id type="integer">1208387130</article-id>
    <author>Soleone</author>
    <blog-id type="integer">1314995009</blog-id>
    <body>Hi author, I really _like_ what you're doing there.</body>
    <body-html>&lt;p&gt;Hi author, I really &lt;em&gt;like&lt;/em&gt; what you're doing there.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
    <email>sole@one.de</email>
    <id type="integer">1192115357</id>
    <ip>127.0.0.1</ip>
    <published-at type="datetime" nil="true"></published-at>
    <status>published</status>
    <updated-at type="datetime">2009-10-20T07:24:53-04:00</updated-at>
    <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
  </comment>
</comments>
GET /admin/comments.xml

Get all the comments for this shop

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<comments type="array">
  <comment>
    <article-id type="integer">1208387130</article-id>
    <author>Soleone</author>
    <blog-id type="integer">1314995009</blog-id>
    <body>Hi author, I really _like_ what you're doing there.</body>
    <body-html>&lt;p&gt;Hi author, I really &lt;em&gt;like&lt;/em&gt; what you're doing there.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
    <email>sole@one.de</email>
    <id type="integer">653537639</id>
    <ip>127.0.0.1</ip>
    <published-at type="datetime" nil="true"></published-at>
    <status>unapproved</status>
    <updated-at type="datetime">2009-10-20T07:24:53-04:00</updated-at>
    <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
  </comment>
  <comment>
    <article-id type="integer">1208387130</article-id>
    <author>Casino deluxe</author>
    <blog-id type="integer">1314995009</blog-id>
    <body>Check my casino at ...</body>
    <body-html>&lt;p&gt;Check my casino at ...&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
    <email>register@mycasino.com</email>
    <id type="integer">1202072468</id>
    <ip>127.0.0.1</ip>
    <published-at type="datetime" nil="true"></published-at>
    <status>removed</status>
    <updated-at type="datetime">2009-10-20T07:24:53-04:00</updated-at>
    <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
  </comment>
  <comment>
    <article-id type="integer">1208387130</article-id>
    <author>Soleone</author>
    <blog-id type="integer">1314995009</blog-id>
    <body>Hi author, I really _like_ what you're doing there.</body>
    <body-html>&lt;p&gt;Hi author, I really &lt;em&gt;like&lt;/em&gt; what you're doing there.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
    <email>sole@one.de</email>
    <id type="integer">1192115357</id>
    <ip>127.0.0.1</ip>
    <published-at type="datetime" nil="true"></published-at>
    <status>published</status>
    <updated-at type="datetime">2009-10-20T07:24:53-04:00</updated-at>
    <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
  </comment>
</comments>
top

Receive a count of all Comments

Get a count of all comments for an article

Available URL Query parameters:

  • created_at_min — Count comments created after date (format: 2008-01-01 03:00)
  • created_at_max — Count comments created before date (format: 2008-01-01 03:00)
  • updated_at_min — Count comments last updated after date (format: 2008-01-01 03:00)
  • updated_at_max — Count comments last updated before date (format: 2008-01-01 03:00)
  • published_at_min — Count comments published after date (format: 2008-01-01 03:00)
  • published_at_max — Count comments published before date (format: 2008-01-01 03:00)
  • published_status
    • published - Count only published comments
    • unpublished - Count only unpublished comments
    • any - Count all comments (default)
  • status
    • pending - All pending comments
    • published - Count only published comments
    • unapproved - Count only unapproved comments
GET /admin/comments/count.xml?article_id=1208387130&blog_id=1314995009

Count all comments for a certain article of a blog

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<count type="integer">3</count>
GET /admin/comments/count.xml?blog_id=1314995009

Get a count of all the comments for all the articles of a certain blog

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<count type="integer">3</count>
GET /admin/comments/count.xml

Get a count of all the comments for this shop

Response

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

Receive a single Comment

Get a single comment by its ID

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

Get a single comment

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<comment>
  <article-id type="integer">1208387130</article-id>
  <author>Soleone</author>
  <blog-id type="integer">1314995009</blog-id>
  <body>Hi author, I really _like_ what you're doing there.</body>
  <body-html>&lt;p&gt;Hi author, I really &lt;em&gt;like&lt;/em&gt; what you're doing there.&lt;/p&gt;</body-html>
  <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
  <email>sole@one.de</email>
  <id type="integer">1192115357</id>
  <ip>127.0.0.1</ip>
  <published-at type="datetime" nil="true"></published-at>
  <status>published</status>
  <updated-at type="datetime">2009-10-20T07:24:53-04:00</updated-at>
  <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
</comment>
top

Create a new Comment

Create a new comment for an article

POST /admin/comments.xml

Create a new comment with basic textile markup for a certain article of a blog

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<comment>
  <body>I like comments
And I like posting them *RESTfully*.</body>
  <author>Your name</author>
  <blog-id type="integer">1314995009</blog-id>
  <article-id type="integer">1208387130</article-id>
  <email>your@email.com</email>
</comment>      

Response

           
HTTP/1.1 201 Created
<?xml version="1.0" encoding="UTF-8"?>
<comment>
  <article-id type="integer">1208387130</article-id>
  <author>Your name</author>
  <blog-id type="integer">1314995009</blog-id>
  <body>I like comments
And I like posting them *RESTfully*.</body>
  <body-html>&lt;p&gt;I like comments&lt;br /&gt;
And I like posting them &lt;strong&gt;RESTfully&lt;/strong&gt;.&lt;/p&gt;</body-html>
  <created-at type="datetime">2009-10-20T07:25:35-04:00</created-at>
  <email>your@email.com</email>
  <id type="integer">1202072473</id>
  <ip nil="true"></ip>
  <published-at type="datetime">2009-10-20T07:25:35-04:00</published-at>
  <status>pending</status>
  <updated-at type="datetime">2009-10-20T07:25:35-04:00</updated-at>
  <user-agent nil="true"></user-agent>
</comment>
top

Modify an existing Comment

Update a comment of an article within a blog

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

Update an existing comment body

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<comment>
  <author>Your new name</author>
  <body>You can even update through a web service.</body>
  <id type="integer">1192115357</id>
  <published-at type="datetime">2009-10-20T11:25:41Z</published-at>
  <email>your@updated-email.com</email>
</comment>      

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<comment>
  <article-id type="integer">1208387130</article-id>
  <author>Your new name</author>
  <blog-id type="integer">1314995009</blog-id>
  <body>You can even update through a web service.</body>
  <body-html>&lt;p&gt;You can even update through a web service.&lt;/p&gt;</body-html>
  <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
  <email>your@updated-email.com</email>
  <id type="integer">1192115357</id>
  <ip>127.0.0.1</ip>
  <published-at type="datetime">2009-10-20T07:25:41-04:00</published-at>
  <status>published</status>
  <updated-at type="datetime">2009-10-20T07:25:41-04:00</updated-at>
  <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
</comment>
top

Mark a Comment as spam

POST /admin/comments/#{id}/spam.xml

Mark a comment as spam, helping to train our spam detection as well as remove the comment sometime soon

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<comment>
  <body-html>&lt;p&gt;Hi author, I really &lt;em&gt;like&lt;/em&gt; what you're doing there.&lt;/p&gt;</body-html>
  <created-at type="datetime">2009-10-20T11:24:53Z</created-at>
  <body>Hi author, I really _like_ what you're doing there.</body>
  <author>Soleone</author>
  <updated-at type="datetime">2009-10-20T11:24:53Z</updated-at>
  <blog-id type="integer">1314995009</blog-id>
  <id type="integer">653537639</id>
  <article-id type="integer">1208387130</article-id>
  <ip>127.0.0.1</ip>
  <published-at nil="true"></published-at>
  <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
  <status>unapproved</status>
  <email>sole@one.de</email>
</comment>      

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<comment>
  <article-id type="integer">1208387130</article-id>
  <author>Soleone</author>
  <blog-id type="integer">1314995009</blog-id>
  <body>Hi author, I really _like_ what you're doing there.</body>
  <body-html>&lt;p&gt;Hi author, I really &lt;em&gt;like&lt;/em&gt; what you're doing there.&lt;/p&gt;</body-html>
  <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
  <email>sole@one.de</email>
  <id type="integer">653537639</id>
  <ip>127.0.0.1</ip>
  <published-at type="datetime">2009-10-20T07:25:40-04:00</published-at>
  <status>spam</status>
  <updated-at type="datetime">2009-10-20T07:25:40-04:00</updated-at>
  <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
</comment>
top

Approve a Comment

POST /admin/comments/#{id}/approve.xml

Approve a comment that is currently pending unapproved so that it will be published on the site

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<comment>
  <body-html>&lt;p&gt;Hi author, I really &lt;em&gt;like&lt;/em&gt; what you're doing there.&lt;/p&gt;</body-html>
  <created-at type="datetime">2009-10-20T11:24:53Z</created-at>
  <body>Hi author, I really _like_ what you're doing there.</body>
  <author>Soleone</author>
  <updated-at type="datetime">2009-10-20T11:24:53Z</updated-at>
  <blog-id type="integer">1314995009</blog-id>
  <id type="integer">653537639</id>
  <article-id type="integer">1208387130</article-id>
  <ip>127.0.0.1</ip>
  <published-at nil="true"></published-at>
  <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
  <status>unapproved</status>
  <email>sole@one.de</email>
</comment>      

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<comment>
  <article-id type="integer">1208387130</article-id>
  <author>Soleone</author>
  <blog-id type="integer">1314995009</blog-id>
  <body>Hi author, I really _like_ what you're doing there.</body>
  <body-html>&lt;p&gt;Hi author, I really &lt;em&gt;like&lt;/em&gt; what you're doing there.&lt;/p&gt;</body-html>
  <created-at type="datetime">2009-10-20T07:24:53-04:00</created-at>
  <email>sole@one.de</email>
  <id type="integer">653537639</id>
  <ip>127.0.0.1</ip>
  <published-at type="datetime">2009-10-20T07:25:32-04:00</published-at>
  <status>published</status>
  <updated-at type="datetime">2009-10-20T07:25:32-04:00</updated-at>
  <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1</user-agent>
</comment>
Last updated at Oct 2009 Oct:10 AM.