TS Commerce Developers

Sitemap API

Current version: v1.1 Release Candidate

Get info about sitemap.xml

GET
/sitemap/sitemap.json
Get sitemap info Request

$storeden = new Storeden\Storeden($config);
$sitemap_info = $storeden->get('/sitemap/sitemap.json');
					
Get sitemap info Response

{
    "location": "https://www.my-domain.tld/sitemap.xml",
    "last_update": "2019-01-03T08:25:49+01:00"
}
						

Add url to sitemap

Add url to current sitemap. Url must be formed as: DOMAIN/PATH ( es: www.my-domain.tld/my-custom-page) without protocol

POST
/sitemap/sitemap_url.json
Add url to sitemap Request

$storeden = new Storeden\Storeden($config);
$add_sitemap_response = $storeden->post('/sitemap/sitemap_url.json', ['url' => 'www.my-domain.tld/my-custom-page']);
					
Add url to sitemap Response

{
    "ok": 1,
    "n": 1,
    "err": 0,
    "errmsg": null
}
						

Remove url to sitemap

Remove url to current sitemap. Url must be formed as: DOMAIN/PATH ( es: www.my-domain.tld/my-custom-page) without protocol. If url was previously added as add-url-to-sitemap, those record will be removed

DELETE
/sitemap/sitemap_url.json
Remove url to sitemap Request

$storeden = new Storeden\Storeden($config);
$add_sitemap_response = $storeden->delete('/sitemap/sitemap_url.json', ['url' => 'www.my-domain.tld/my-custom-page']);
					
Remove url to sitemap Response

{
    "ok": 1,
    "n": 1,
    "err": 0,
    "errmsg": null
}