TS Commerce Developers

Permissions API

Current version: v1.1

List permissions

GET
/permissions/list.json
List permissions Request

$storeden = new Storeden\Storeden($config);
$list = $storeden->get('/permissions/list.json');
					
List permissions Response

{
    "total_users": 16,
    "confirmed": [
        {
            "email": "user-access-10023@dev.storeden.com",
            "uid": 49077,
            "fullname": "User Access 10023"
        },
		...
	],
	"pending": [
        {
            "email": "user-access-287652@dev.storeden.com",
            "waiting_for_registration": true
        },
        {
            "email": "user-access-282452@dev.storeden.com",
            "uid": 4906612,
            "fullname": "User Access 282452",
            "waiting_for_registration": false
        },
	]
}
					

Add User Access

POST
/permissions/access.json
email required (string) Email of the user to give access
Add User Access Request

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

$payload = array();
$payload['email'] = 'user-access-282452@dev.storeden.com';

$result = $storeden->post('/permissions/access.json', $payload);
					
Add User Access Response

{
    "status": "success",
    "waiting_for_registration": true
}
					

Remove User Access

DELETE
/permissions/access.json
userUID required (int) Unique User Id identifier
Remove User Access Request

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

$payload = array();
$payload['userUID'] = 49077;

$result = $storeden->delete('/permissions/access.json', $payload);
					
Remove User Access Response

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