List posts
Get a list of your blog posts.
GET
/blog/list.json
Get a list of your blog posts.
GET
/blog/list.json
$storeden = new Storeden\Storeden($config);
$posts_list = $storeden->get('/blog/list.json');
[
{
"title": "Welcome to my-company.com",
"id": "54c22f6516f46a490699c248"
},
{
"title": "Launching a new Rocket (just-for-fun)",
"id": "54c64e0416f46a5d047b23c8"
},
...
]
Get all details about your post.
GET
/blog/post.json?id={post-id}
id required (StoredenId) | Unique id of your post |
$storeden = new Storeden\Storeden($config);
$post_data = $storeden->get('/blog/post.json?id=54c.....c8');
{
"author": 1,
"title": "Launching a new Rocket (just-for-fun)",
"content": "Seriously, this is only a joke.",
"extract": "Read more inside :)",
"ext_img": "https://static-cdn.storeden.com/secache/111111",
"tags": [
"1st April", "rocket"
],
"seo": [],
"visible": true,
"social": false,
"data": {
"y": "2015",
"m": "04",
"d": "01"
},
"ts": {
"sec": 1422012261,
"usec": 764000
},
"languages": ["en_US"],
"id": "54c64e0416f46a5d047b23c8",
"iso": {
"updateAt": "2019-03-11T23:31:18+01:00",
"createAt": "2019-03-11T22:17:22+01:00"
}
}
Create a new post for e-commerce blog.
POST
/blog/post.json
title required (string) | Post title |
content required (html) | Post content. Html is accepted |
post_locale required (string) | Post strings locale. Accept: en_US, it_IT, de_DE, fr_FR, es_ES |
content_preview (string) | Small preview content ( extract ) |
seo_title (string) | Seo Title, used into head > title tag |
seo_description (string) | Seo Title, used into head > meta tag |
seo_keywords (string) | Seo Title, used into head > meta tag |
visible (int) | 1 => Post are visible in the store-front, 0 => Post are not visible in the store-front |
tags (string) | Comma separated tags |
timestamp (unixtimestamp) July 4th, 2019 | |
category_id (StoredenId) July 17th, 2019 | |
image_id (StoredenId) June 23th, 2020 | Upload the new image through the Gallery API first to get the ID |
post_slug (string) June 23th, 2020 | Slug string ended with ".html". Es: "launching-new-rocket.html" |
$storeden = new Storeden\Storeden($config);
$payload = array();
$payload['title'] = 'Launching a new Rocket (just-for-fun)';
$payload['content'] = 'Seriously, this is only a joke.';
$payload['post_locale'] = 'en_US';
// etc...
$result = $storeden->post('/blog/post.json', $payload);
{
"id": "5c86d57416f46af87eec40a2",
"web_urls": {
"edit_url": "https://132-backoffice.storeden.com/blog/edit/5c86d57416f46af87eec40a2"
}
}
Update an existing post for e-commerce blog.
PUT
/blog/post.json
id required (Storeden ID) | Post ID |
title required (string) | Post title |
content required (html) | Post content. Html is accepted |
post_locale required (string) | Post strings locale. Accept: en_US, it_IT, de_DE, fr_FR, es_ES |
content_preview (string) | Small preview content ( extract ) |
seo_title (string) | Seo Title, used into head > title tag |
seo_description (string) | Seo Title, used into head > meta tag |
seo_keywords (string) | Seo Title, used into head > meta tag |
visible (int) | 1 => Post are visible in the store-front, 0 => Post are not visible in the store-front |
tags (string) | Comma separated tags |
timestamp (unixtimestamp) July 4th, 2019 | |
category_id (StoredenId) July 17th, 2019 | |
image_id (StoredenId) June 23th, 2020 | Upload the new image through the Gallery API first to get the ID |
post_slug (string) June 23th, 2020 | Slug string ended with ".html". Es: "launching-new-rocket.html" |
$storeden = new Storeden\Storeden($config);
$payload = array();
$payload['title'] = 'Launching a new Rocket (just-for-fun)';
$payload['content'] = 'Seriously, this is only a joke.';
$payload['post_locale'] = 'en_US';
// etc...
$result = $storeden->put('/blog/post.json', $payload);
{
"ok": 1,
"nModified": 1,
"n": 1,
"err": null,
"errmsg": null,
"updatedExisting": true
}
Patch an existing post for e-commerce blog.
PUT
/blog/patchPost.json
id required (Storeden ID) | Post ID |
title (string) | Post title |
content (html) | Post content. Html is accepted |
post_locale (string) | Post strings locale. Accept: en_US, it_IT, de_DE, fr_FR, es_ES |
content_preview (string) | Small preview content ( extract ) |
seo_title (string) | Seo Title, used into head > title tag |
seo_description (string) | Seo Title, used into head > meta tag |
seo_keywords (string) | Seo Title, used into head > meta tag |
visible (int) | 1 => Post are visible in the store-front, 0 => Post are not visible in the store-front |
tags (string) | Comma separated tags |
timestamp (unixtimestamp) July 4th, 2019 | |
category_id (StoredenId) July 17th, 2019 | |
image_id (StoredenId) June 23th, 2020 | Upload the new image through the Gallery API first to get the ID |
post_slug (string) June 23th, 2020 | Slug string ended with ".html". Es: "launching-new-rocket.html" |
$storeden = new Storeden\Storeden($config);
$payload = array();
$payload['title'] = 'Launching a new Rocket (just-for-fun)';
$payload['content'] = 'Seriously, this is only a joke.';
$payload['post_locale'] = 'en_US';
// etc...
$result = $storeden->put('/blog/patchPost.json', $payload);
{
"ok": 1,
"nModified": 1,
"n": 1,
"err": null,
"errmsg": null,
"updatedExisting": true
}
Remove post from your blog.
DELETE
/blog/post.json
id required (StoredenId) | Unique id of your post |
$storeden = new Storeden\Storeden($config);
$result = $storeden->delete('/blog/post.json', ['id' => '5c86d57416f46af87eec40a2']);
{
"ok": 1,
"err": null,
}
GET
/blog/categories/list.json
$storeden = new Storeden\Storeden($config);
$blog_categories_list = $storeden->get('/blog/categories/list.json');
[
{
"name": "Test Name",
"parent": "",
"description": "Test Description",
"locale": "it_IT",
"slug": "test-name",
"active": true,
"connected": [],
"seo": {
"title": "Seo title",
"description": null,
"keywords": null
},
"id": "5d2f70ba16f46a1b2072fb9e"
},
...
]
GET
/blog/categories/category.json
id required (StoredenId) | Unique id of your blog category |
$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/blog/categories/category.json?id=5d2.....b9e');
[
{
"name": "Test Name",
"parent": "",
"description": "Test Description",
"locale": "it_IT",
"slug": "test-name",
"active": true,
"connected": [],
"seo": {
"title": "Seo title",
"description": null,
"keywords": null
},
"id": "5d2f70ba16f46a1b2072fb9e"
},
...
]
POST
/blog/categories/category.json
name required (string) | |
description (string) | |
locale required (string) | |
active required (int) [default = 0] | 1 => Category available, 0 => Category disabled |
seo_title (string) | |
seo_description (string) | |
seo_keywords (string) |
$storeden = new Storeden\Storeden($config);
$payload = array();
$payload['name'] = 'Test Name';
$payload['description'] = 'Test Description';
$payload['locale'] = 'it_IT';
$payload['active'] = 1;
$payload['Seo title'] = 'Seo title';
$result = $storeden->post('/blog/categories/category.json', $payload);
[
{
"name": "Test Name",
"parent": "",
"description": "Test Description",
"locale": "it_IT",
"slug": "test-name",
"active": true,
"connected": [],
"seo": {
"title": "Seo title",
"description": null,
"keywords": null
},
"id": "5d2f70ba16f46a1b2072fb9e"
},
...
]
PUT
/blog/categories/category.json
id required (StoredenID) | |
name required (string) | |
description (string) | |
locale required (string) | |
active required (int) [default = 0] | 1 => Category available, 0 => Category disabled |
seo_title (string) | |
seo_description (string) | |
seo_keywords (string) |
$storeden = new Storeden\Storeden($config);
$payload = array();
$payload['id'] = '5d2f70ba16f46a1b2072fb9e';
$payload['name'] = 'Test Name';
$payload['description'] = 'Test Description';
$payload['locale'] = 'it_IT';
$payload['active'] = 1;
$payload['Seo title'] = 'Seo title';
$result = $storeden->put('/blog/categories/category.json', $payload);
{
"ok": 1,
"nModified": 1,
"n": 1,
"err": null,
"errmsg": null,
"updatedExisting": true
}
PUT
/blog/categories/patchCategory.json
id required (StoredenID) | |
name (string) | |
description (string) | |
locale (string) | |
active (int) [default = 0] | 1 => Category available, 0 => Category disabled |
seo_title (string) | |
seo_description (string) | |
seo_keywords (string) |
$storeden = new Storeden\Storeden($config);
$payload = array();
$payload['id'] = '5d2f70ba16f46a1b2072fb9e';
$payload['name'] = 'Test Name';
$payload['locale'] = 'it_IT';
$result = $storeden->put('/blog/categories/patchCategory.json', $payload);
{
"ok": 1,
"nModified": 1,
"n": 1,
"err": null,
"errmsg": null,
"updatedExisting": true
}