TS Commerce Developers

StoreLocator API

Current version: v1.1

List StoreLocator Points

GET
/storelocator/list.json
List StoreLocator Points Request

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

$point_list = $storeden->get('/storelocator/list.json');
					
List StoreLocator Points Response

[
    {
        "name": "Test Point",
        "address": "Pacific Ocean",
        "geo": {
            "long": 46.49295144130766,
            "lat": -30.352008969380787
        },
        "data": {
            "code": "S-200381-4",
            "contactname": "Test Point 1",
            "email": "test@storelocator.dummy.com",
            "website": "http://www.dummystore.com/",
            "phone": "+39 (00) 00000000 "
        },
        "tags": [
            "store"
        ],
        "custom": {
            "1": "Custom Field",
        },
        "is_disabled": 0,
        "id": "580e249c16f46ab6078baee2"
    },
	...
]
						

Get Point Data

Get all details about a specific point

GET
/storelocator/point.json
PARAMETERS LIST
id (StoredenID) Specific Point ID
Get Point Data Request

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

$point_details = $storeden->get('/storelocator/point.json?id=580e249c16f46ab6078baee2');
					
Shop available languages Response

{
	"name": "Test Point",
	"address": "Pacific Ocean",
	"geo": {
		"long": 46.49295144130766,
		"lat": -30.352008969380787
	},
	"data": {
		"code": "S-200381-4",
		"contactname": "Test Point 1",
		"email": "test@storelocator.dummy.com",
		"website": "http://www.dummystore.com/",
		"phone": "+39 (00) 00000000 "
	},
	"tags": [
		"store"
	],
	"custom": {
		"1": "Custom Field",
	},
	"is_disabled": 0,
	"id": "580e249c16f46ab6078baee2"
}
						

Create new Point

POST
/storelocator/point.json
PARAMETERS LIST
name required (string) Point Name
address required (string) text full address
geo[lat] required (float)
geo[long] required (float)
disabled (int) 1 => Point disabled , 0 (default) => Point available
tags (string) list of tags separated by , (comma)
contact_name (string) Specific point info ( name )
contact_email (string) Specific point info ( email )
contact_website (string) Specific point info ( website )
contact_phone (string) Specific point info ( phone )
contact_code (string) Specific point info ( code )
custom[] (string) repeatable Custom text for point, up to 50 elements
Create new Point Request

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

$payload = array(
  'name' => 'Test Point',
  'address' => 'Pacific Ocean',
  'geo' array (
     'lat' => -30.352008969380787,
     'long' => 46.49295144130766
  ),
  'disabled' => '1',
  'tags' => 'test-point,selling-point',
  'contact_name' => 'Test Point 1',
  'contact_email' => 'test@storelocator.dummy.com',
  'contact_website' => 'http://www.dummystore.com/',
  'contact_phone' => '+39 (00) 00000000',
  'contact_code' => 'S-200381-4',
  'custom' array(
    '1' => 'dymmy text'
  )
);

$point_details = $storeden->post('/storelocator/point.json', $payload);
					
Create new Point Response

{
    "id": "607e8935d4029d937ef0a214"
}
						

Update Point

PUT
/storelocator/point.json
PARAMETERS LIST
id required (StoredenID) StoreLocation Point to update
name required (string) Point Name
address required (string) text full address
geo[lat] required (float)
geo[long] required (float)
disabled (int) 1 => Point disabled , 0 (default) => Point available
tags (string) list of tags separated by , (comma)
contact_name (string) Specific point info ( name )
contact_email (string) Specific point info ( email )
contact_website (string) Specific point info ( website )
contact_phone (string) Specific point info ( phone )
contact_code (string) Specific point info ( code )
custom[] (string) repeatable Custom text for point, up to 50 elements
Update Point Request

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

$payload = array(
  'id' => '607e8935d4029d937ef0a214',
  'name' => 'Test Point',
  'address' => 'Pacific Ocean',
  'geo' array (
     'lat' => -30.352008969380787,
     'long' => 46.49295144130766
  ),
  'disabled' => '1',
  'tags' => 'test-point,selling-point',
  'contact_name' => 'Test Point 1',
  'contact_email' => 'test@storelocator.dummy.com',
  'contact_website' => 'http://www.dummystore.com/',
  'contact_phone' => '+39 (00) 00000000',
  'contact_code' => 'S-200381-4',
  'custom' array(
    '1' => 'dymmy text'
  )
);

$point_details = $storeden->put('/storelocator/point.json', $payload);
					
Update Point Response

{
    "ok": 1,
    "nModified": 1,
    "err": null,
    "updatedExisting": true
}
						

Remove Point

DELETE
/storelocator/point.json
PARAMETERS LIST
id (StoredenID) Specific Point ID to remove
Remove Point Request

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

$payload = array(
  'id' => '607e8935d4029d937ef0a214',
);

$point_details = $storeden->delete('/storelocator/point.json', $payload);
					
Remove Point Response

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