Table of Contents¶
- Introduction
- Input URL
- Input Method
- Request Parameters
- Request Headers
- 1. Security Type
- Response Parameters
- Claim Request Parameters
- Sample Response
Place Details API¶
Introduction¶
The Place detail API is to extract the details of a place with the help of its eLoc i.e. a 6 character code. Since a place may or may not have additional attributes associated with it, the response from the place details may be different for each record. However the response will be an extract from an existing set of master key-value pairs grouped as objects.
Getting Access¶
Before using the API in the your solution, please ensure that the related access is enabled in the Mappls Console, within your app - be it for Mobile OR Web or Cloud integration.
- Copy and paste the key from your
credentials
section from your API keys into theaccess_token
query parameter.- Your static key can be secured by whitelisting its usage for particular IPs (in case of cloud app usage) OR a set of domains (in case of a web app)
- Your static key obtained from your Console is to be passed as a query parameter:
access_token
.
Authentication Object - access_token
mandatory query parameter.¶
access_token
: "hklmgbwzrxncdyavtsuojqpiefrbhqplnm".
Live Demo¶
Click here to visit live demonstration page
Input URL¶
https://place.mappls.com/O2O/entity/place-details/{eLoc}
Input Method¶
GET
Request Parameters¶
a. Mandatory Parameters¶
eLoc
: eLoc of the place whose details are required. The 6-digit alphanumeric code for any location.
1.1 Response Type¶
- JSON
1.2 Response Codes {as HTTP response codes}¶
Success¶
- 200: To denote a successful API call.
- 204: To denote the API was a success but no results we’re found.
Client-Side Issues¶
- 400: Bad Request, User made an error while creating a valid request.
- 401: Unauthorized, Developer’s key is not allowed to send a request.
- 403: Forbidden, Developer’s key has hit its daily/hourly limit
Server-Side Issues¶
- 500: Internal Server Error, the request caused an error in our systems.
- 503: Service Unavailable, during our maintenance break or server downtimes.
1.3 Response Messages (as HTTP response messages)¶
- 200: Success.
- 204: No matches we’re found for the provided query.
- 400: Something’s just not right with the request.
- 401: Access Denied.
- 403: Services for this key has been suspended due to daily/hourly transactions limit.
- 500: Something went wrong.
- 503: Maintenance Break.
Place Detail with Sub Template based Configuration¶
The API is highly configurable to configuration enables to provide the required set of attributes to the user on the basis of assigned sub templates.
The default configuration with available with basic pay-as-you-go rates is that of General Details
subtemplate.
Response Parameters for Place Details - Sub Templates¶
The parameters are group in sub templates. Here is the list of attributes with sub template information.
Subtemplate 1 : General Details¶
- eloc (string) : 6 characters alphanumeric unique identifier
- name (string) : Name of the place
- address (string) : address of the place
- type: defines the type of location matched (HOUSE_NUMBER, HOUSE_NAME, POI, STREET, SUB_LOCALITY, LOCALITY, VILLAGE, DISTRICT, SUB_DISTRICT, CITY, STATE, SUBSUBLOCALITY, PINCODE)
Subtemplate 2 : Admin Tokens (PREMIUM OFFERING)¶
- city (string): The name of the city in which the location exists.
- district (string): The name of the district in which the location exists.
- pincode (string): The pin code of the location area.
- subDistrict (string): The name of the sub-district in which the location exists.
- state (string): The name of the state in which the location exists.
Subtemplate 3 : Address Tokens (PREMIUM OFFERING)¶
- houseNumber (string): The house number of the location.
- houseName (string): The name of the location.
- locality (string): The name of the locality where the location exists.
- street (string): The name of the street of the location.
- subSubLocality (string): The name of the sub-sub-locality where the location exists.
- subLocality (string): The name of the sub-locality where the location exists.
- village (string): The name of the village if the location exists in a village.
- poi (string): The name of the POI if the location is a place of interest (POI).
Subtemplate 4 : Contact Details (PREMIUM OFFERING)¶
- mobile
- telephone
- website
Subtemplate 5 : Location Coordinates (PREMIUM OFFERING)¶
- latitude(double): The latitude of the location.
- longitude(double): The longitude of the location.
Subtemplate 6 : E/E Coordinates (PREMIUM OFFERING)¶
- entry_lat(double):The entry latitude of the location.
- entry_lon(double):The entry longitude of the location.
Subtemplate 7 : Category details of place (PREMIUM OFFERING)¶
- placeCategory(onject): Category of place
- placeType(string): Type of place
Subtemplate 8 : Category details of place (PREMIUM OFFERING)¶
Adds applicable values
within an array of objects available within the keyInfo
array of object, which itself is within richInfo
object.
richInfo
(object)keyInfo
(array of objects) - a generic object array containing a wide list of response properties available asheading
(string) - the value of this property represents the type of details available.icon
(string) - the icon url applicable for this heading.values
(array of objects) - each containing key-value pairs of applicable details.icon
(string) - icon applicable to this detail.title
(string) - the name of this detail.value
(string) - the value of this detail.
Subtemplate 9 : EV details of place (PREMIUM OFFERING)¶
Adds applicable values
within an array of objects available within the evInformation
object, which itself is within richInfo
object.
richInfo
(object)evInformation
(object) - a generic ev information object containing a wide list of response properties available within it.evses
(array of objects) containing ev charging machine details within it per evse.powerType
(string): power type of machine/evseId possible values AC & DCevseId
(string): Unique machine/evse idconnectors
(array of objects): contains details of connectors:plugTyp
(string): type of pluglevel
(string): Level of plugpower
(string): Power of connector in KWconnectorId
(string): Unique id of connector
Subtemplate 10 : EV Machine details of place (PREMIUM OFFERING)¶
Adds applicable values
within an array of objects available within the evInformation
object, which itself is within richInfo
object.
richInfo
(object)evInformation
(object) - a generic ev information object containing a wide list of response properties available within it.evses
(array of objects) containing ev charging machine details within it per evse.powerType
(string): power type of machine/evseId possible values AC & DCevseId
(string): Unique machine/evse id
Subtemplate 11 : EV details with tariff of place (PREMIUM OFFERING)¶
Adds applicable values
within an array of objects available within the evInformation
object, which itself is within richInfo
object.
richInfo
(object)evInformation
(object) - a generic ev information object containing a wide list of response properties available within it.evses
(array of objects) containing ev charging machine details within it per evse.powerType
(string): power type of machine/evseId possible values AC & DCevseId
(string): Unique machine/evse idconnectors
(array of objects): contains details of connectors:plugTyp
(string): type of pluglevel
(string): Level of plugpower
(string): Power of connector in KWconnectorId
(string): Unique id of connector5.payMode
(string) : Mode of paymentpayDuration
(string): Price/cost/tariff in time based systempriceUnit
(string): Price/cost/tariff perUnit
of electricity consumed
Sample Response¶
1.Subtemplate Claim set
subTemplates = Admin Tokens, Address Tokens, General Details
Input URL:
https://place.mappls.com/O2O/entity/place-details/3F45CB
Response:
{
"type": "POI",
"poi": "The Lalit New Delhi",
"locality": "Connaught Place",
"district": "New Delhi District",
"subDistrict": "Connaught Place",
"city": "New Delhi",
"state": "Delhi",
"pincode": "110001",
"address": "15, Barakhamba Avenue, Connaught Place, New Delhi, Delhi, 110001",
"name": "The Lalit New Delhi",
"eloc": "3F45CB"
}
2. Provider with subtemplate claim set:
subTemplates = General Details, Location Coordinates
<Input URL:
https://place.mappls.com/O2O/entity/place-details/3F45CB
Response:
{
"type": "POI",
"address": "15, Barakhamba Avenue, Connaught Place, New Delhi, Delhi, 110001",
"name": "The Lalit New Delhi",
"eloc": "3F45CB",
"latitude": RESTRICTED,
"longitude": RESTRICTED
}
For any queries and support, please contact:
Email us at apisupport@mappls.com
Support
Need support? contact us!