Shopify API – Page

top

Receive a list of all Pages

Get a list of all pages

Available URL Query parameters:

  • limit — Amount of results (default: 50) (maximum: 250)
  • page — Page to show (default: 1)
  • title — Show pages by Title
  • created_at_min — Show pages created after date (format: 2008-01-01)
  • created_at_max — Show pages created before date (format: 2008-01-01)
  • updated_at_min — Show pages last updated after date (format: 2008-01-01)
  • updated_at_max — Show pages last updated before date (format: 2008-01-01)
  • published_status
    • published - Show only published pages
    • unpublished - Show only unpublished pages
    • any - Show all pages (default)
GET /admin/pages.xml

Get all pages for a shop

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<pages type="array">
  <page>
    <author>Dennis</author>
    <body>This is a sample page</body>
    <body-html>&lt;p&gt;this is a &lt;strong&gt;sample&lt;/strong&gt; page.&lt;/p&gt;</body-html>
    <created-at type="datetime">2008-07-15T20:00:00-04:00</created-at>
    <handle>sample</handle>
    <id type="integer">1182570132</id>
    <published-at type="datetime" nil="true"></published-at>
    <shop-id type="integer">690933841</shop-id>
    <template-suffix nil="true"></template-suffix>
    <title>Sample Page</title>
    <updated-at type="datetime">2008-07-16T20:00:00-04:00</updated-at>
  </page>
  <page>
    <author>Dennis</author>
    <body>We make *perfect* stuff, we don't need a warranty.</body>
    <body-html>&lt;p&gt;We make &lt;strong&gt;perfect&lt;/strong&gt; stuff, we don't need a warranty.&lt;/p&gt;</body-html>
    <created-at type="datetime">2008-07-15T20:00:00-04:00</created-at>
    <handle>tos</handle>
    <id type="integer">131092081</id>
    <published-at type="datetime">2008-07-15T20:00:00-04:00</published-at>
    <shop-id type="integer">690933841</shop-id>
    <template-suffix nil="true"></template-suffix>
    <title>Terms of Services</title>
    <updated-at type="datetime">2008-07-16T20:00:00-04:00</updated-at>
  </page>
</pages>
top

Receive a count of all Pages

Get a count of all pages

Available URL Query parameters:

  • title — Pages with a given title
  • created_at_min — Pages created after date (format: 2008-01-01)
  • created_at_max — Pages created before date (format: 2008-01-01)
  • updated_at_min — Pages last updated after date (format: 2008-01-01)
  • updated_at_max — Pages last updated before date (format: 2008-01-01)
  • published_status
    • published - Only published pages
    • unpublished - Only unpublished pages
    • any - All pages (default)
GET /admin/pages/count.xml

Count all pages for a shop

Response

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

Receive a single Page

Get a single page by its ID

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

Get a single page

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<page>
  <author>Dennis</author>
  <body>We make *perfect* stuff, we don't need a warranty.</body>
  <body-html>&lt;p&gt;We make &lt;strong&gt;perfect&lt;/strong&gt; stuff, we don't need a warranty.&lt;/p&gt;</body-html>
  <created-at type="datetime">2008-07-15T20:00:00-04:00</created-at>
  <handle>tos</handle>
  <id type="integer">131092081</id>
  <published-at type="datetime">2008-07-15T20:00:00-04:00</published-at>
  <shop-id type="integer">690933841</shop-id>
  <template-suffix nil="true"></template-suffix>
  <title>Terms of Services</title>
  <updated-at type="datetime">2008-07-16T20:00:00-04:00</updated-at>
</page>
top

Create a new Page

Create a new page

POST /admin/pages.xml

Create a new page with textile markup and upload it to the shop

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<page>
  <title>Warranty information</title>
  <body>h1. Warranty

*Forget it*, we aint giving you nothing</body>
</page>      

Response

           
HTTP/1.1 201 Created
<?xml version="1.0" encoding="UTF-8"?>
<page>
  <author> Shopify API</author>
  <body>h1. Warranty

*Forget it*, we aint giving you nothing</body>
  <body-html>&lt;h1&gt;Warranty&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Forget it&lt;/strong&gt;, we aint giving you nothing&lt;/p&gt;</body-html>
  <created-at type="datetime">2009-10-20T07:26:45-04:00</created-at>
  <handle>warranty-information</handle>
  <id type="integer">1182570137</id>
  <published-at type="datetime">2009-10-20T07:26:45-04:00</published-at>
  <shop-id type="integer">690933841</shop-id>
  <template-suffix nil="true"></template-suffix>
  <title>Warranty information</title>
  <updated-at type="datetime">2009-10-20T07:26:45-04:00</updated-at>
</page>
top

Modify an existing Page

Update a page

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

Update an exisiting page body

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<page>
  <body>Okay, maybe we will give you a warranty.</body>
  <id type="integer">131092081</id>
</page>      

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<page>
  <author>Dennis</author>
  <body>Okay, maybe we will give you a warranty.</body>
  <body-html>&lt;p&gt;Okay, maybe we will give you a warranty.&lt;/p&gt;</body-html>
  <created-at type="datetime">2008-07-15T20:00:00-04:00</created-at>
  <handle>tos</handle>
  <id type="integer">131092081</id>
  <published-at type="datetime">2008-07-15T20:00:00-04:00</published-at>
  <shop-id type="integer">690933841</shop-id>
  <template-suffix nil="true"></template-suffix>
  <title>Terms of Services</title>
  <updated-at type="datetime">2009-10-20T07:26:53-04:00</updated-at>
</page>
top

Modify an existing Page

Update a page

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

Update an exisiting page completely

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<page>
  <handle>new-title</handle>
  <title>My new Title</title>
  <author>Your name</author>
  <body>Okay, maybe we will give you a warranty.</body>
  <id type="integer">131092081</id>
</page>      

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<page>
  <author>Your name</author>
  <body>Okay, maybe we will give you a warranty.</body>
  <body-html>&lt;p&gt;Okay, maybe we will give you a warranty.&lt;/p&gt;</body-html>
  <created-at type="datetime">2008-07-15T20:00:00-04:00</created-at>
  <handle>new-title</handle>
  <id type="integer">131092081</id>
  <published-at type="datetime">2008-07-15T20:00:00-04:00</published-at>
  <shop-id type="integer">690933841</shop-id>
  <template-suffix nil="true"></template-suffix>
  <title>My new Title</title>
  <updated-at type="datetime">2009-10-20T07:26:55-04:00</updated-at>
</page>
top

Remove a Page from the database

Delete a page

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

Remove an exisiting page from a shop

Response

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