location.location

Management of individual Location.

SUPPORTED METHODS:

GET

Parameters

Type

Description

token (required)

Valid token

id (required)

integer

Location id

CREATE

Parameters

Type

Description

token (required)

Valid token

name (required)

varchar

Name

type (required)

enum (1, 2)

1: for Location
2: for Remote Site

country (accepted)

varchar

Country

address (accepted)

varchar

Address

lat (accepted)

varchar

Latitude

lon (accepted)

varchar

Longitude

timezone_id (accepted)

integer

Time zone id

UPDATE

Parameters

Type

Description

token

Valid token

id (required)

integer

Location id

name (accepted)

varchar

Location name

country (accepted)

varchar

Location country

address (accepted)

varchar

Location address

lat (accepted)

varchar

Latitude

lon (accepted)

varchar

Longitude

timezone_id (accepted)

integer

Time zone id

notes (accepted)

varchar

Notes

phone_number (accepted)

varchar

Phone number

DELETE

Parameters

Type

Description

token (required)

Valid token

id (required)

integer

Location id

DOCUMENTATION

GET
Retrieves an individual location specified by id.
Level 5 is required

--

Example Request:

{
   "module":"location.location",
   "method":"GET",
   "request":{
      "id":"613062"
   }
}

Example Response:

{
    "status": 1,
    "data": {
        "id": 613062,
        "name": "Abraco",
        "country": "",
        "address": "86 East 7th Street, New York, NY 10003, USA",
        "lat": 0,
        "lon": 0,
        "store": 202039,
        "type": 1,
        "notes": "",
        "timezone_id": null,
        "map": "https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=86+East+7th+Street%2C+New+York%2C+NY+10003%2C+USA%2C+",
        "directions": "https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=86+East+7th+Street%2C+New+York%2C+NY+10003%2C+USA%2C+"
    },
    "token": "xxxxxxxx"
}

CREATE
Creates new location.
Level 5 is required

--
Example Request:

{
   "module":"location.location",
   "method":"CREATE",
   "request":{
      "name":"newLocation",
      "type":"1"
   }
}

Example Response:

{
   "status":1,
   "data":{
      "id":"40828",
      "name":"newLocation",
      "country":"",
      "address":"",
      "lat":"",
      "lon":"",
      "type":"1",
      "notes":"",
      "map":"http:\/\/maps.google.com\/maps?f=q&source=s_q&hl=en&geocode=&q=%2C+",
      "directions":"http:\/\/maps.google.com\/maps?f=q&source=s_q&hl=en&geocode=&q=%2C+"
   },
   "token":"xxxxxxx"
}

UPDATE
Updates location.
Level 5 is required

--

Example request:

{
   "module":"location.location",
   "method":"UPDATE",
   "request":{
      "id":"40828",
      "country":"PlanetFederation"
   }
}

Example Response:

{
   "status":1,
   "data":{
      "id":"40828",
      "name":"newLocation",
      "country":"PlanetFederation",
      "address":"",
      "lat":"",
      "lon":"",
      "type":"1",
      "notes":"",
      "map":"http:\/\/maps.google.com\/maps?f=q&source=s_q&hl=en&geocode=&q=%2C+",
      "directions":"http:\/\/maps.google.com\/maps?f=q&source=s_q&hl=en&geocode=&q=%2C+"
   },
   "token":"f25a14018a61920589d1e04bd812ee95b8956d24"
}

DELETE
Deletes location.
Level 5 is required

--

Example Request:

{
   "module":"location.location",
   "method":"DELETE",
   "request":{
      "id":"40828"
   }
}

Example Response:

{
   "status":1,
   "data":"Location Removed",
   "token":"xxxxxxx"
}