List StoreLocator Points
GET
/storelocator/list.json
GET
/storelocator/list.json
$storeden = new Storeden\Storeden($config);
$point_list = $storeden->get('/storelocator/list.json');
[
{
"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 all details about a specific point
GET
/storelocator/point.json
id (StoredenID) | Specific Point ID |
$storeden = new Storeden\Storeden($config);
$point_details = $storeden->get('/storelocator/point.json?id=580e249c16f46ab6078baee2');
{
"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"
}
POST
/storelocator/point.json
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 |
$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);
{
"id": "607e8935d4029d937ef0a214"
}
PUT
/storelocator/point.json
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 |
$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);
{
"ok": 1,
"nModified": 1,
"err": null,
"updatedExisting": true
}
DELETE
/storelocator/point.json
id (StoredenID) | Specific Point ID to remove |
$storeden = new Storeden\Storeden($config);
$payload = array(
'id' => '607e8935d4029d937ef0a214',
);
$point_details = $storeden->delete('/storelocator/point.json', $payload);
{
"ok": 1,
"n": 1,
"err": null,
"errmsg": null
}