TS Commerce Developers

Legal API

Current version: v1.1

Get Privacy policy content

GET
/legal/privacy.json
Get Privacy policy content Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/legal/privacy.json');
					
Get Privacy policy content Response

{
    "type": "privacy"
    "content": < html content of privacy policy >,
}
					

Set Privacy policy content

PUT
/legal/privacy.json
content (string) Full html content of privacy policy
Set Privacy policy content Request

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

$payload = array();
$payload['content'] = '< html content of privacy policy >';

$result = $storeden->put('/legal/privacy.json', $payload);
					
Set Privacy policy content Response

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

Get T&C policy content

GET
/legal/terms.json
Get T&C policy content Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/legal/terms.json');
					
Get T&C policy content Response

{
    "type": "privacy"
    "content": < html content of t&c policy >,
}
					

Set T&C policy content

PUT
/legal/terms.json
content (string) Full html content of t&c policy
Set T&C policy content Request

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

$payload = array();
$payload['content'] = '< html content of t&c policy >';

$result = $storeden->put('/legal/terms.json', $payload);
					
Set T&C policy content Response

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

Get Cookies policy content

GET
/legal/cookies.json
Get Cookies policy content Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/legal/cookies.json');
					
Get Cookies policy content Response

{
    "type": "privacy"
    "content": < html content of cookies policy >,
}
					

Set Cookies policy content

PUT
/legal/cookies.json
content (string) Full html content of cookies policy
Set Cookies policy content Request

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

$payload = array();
$payload['content'] = '< html content of cookies policy >';

$result = $storeden->put('/legal/cookies.json', $payload);
					
Set Cookies policy content Response

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