TS Commerce Developers

Pages API

Current version: v1.1 Release Candidate

List pages

GET
/pages/list.json
List pages Request

$storeden = new Storeden\Storeden($config);

$pages_list = $storeden->get('/pages/list.json');
					
List pages Response

[
    {
        "id": "54e43f0816f46a467c7b23c6",
        "url_path": "test-page-1",
        "title": "Test Page 1"
    },
    {
        "id": "555d9f9e16f46acf1bdd486a",
        "url_path": "test-shipping-page",
        "title": "[TEST] Shipping Page"
    },
	...
]
						

Get Page

GET
/pages/page.json?id={page-id}
Get page Request

$storeden = new Storeden\Storeden($config);

$page = $storeden->get('/pages/page.json?id=54e43f0816f46a467c7b23c6');
					
List pages Response

{
    "title": "Test page 1",
    "url_path": "test-page-1",
    "content": "HTML Content",
    "parentPage": null,
    "id": "54e43f0816f46a467c7b23c6"
}
						

Create Page

POST
/pages/page.json
PARAMETERS LIST
title required (string) page title
content required (string) You page content ( HTML supported )
Create page Request

$storeden = new Storeden\Storeden($config);

$page = array();
$page['title'] = 'Test page 1';
$page['content'] = 'HTML content';

$page_response = $storeden->post('/pages/page.json', $page);
					
List pages Response

{
    "id": "54e43f0816f46a467c7b23c6",
}
						

Delete Page

DELETE
/pages/page.json
PARAMETERS LIST
id required (StoredenID) Unique identifier for page
Create page Request

$storeden = new Storeden\Storeden($config);

$page = array();
$page['id'] = '54e43f0816f46a467c7b23c6';

$page_response = $storeden->delete('/pages/page.json', $page);
					
List pages Response

{
    "ok": "1",
	"err": null
}