Table of Contents style Square
...
Background and strategic fit
The purpose of this Integration is to pull over the Location information that . This data can be further used in while hitting other APIs)
(as request parameter). This document provides information on how to consume the API's by the end Users can consume the API.
Assumptions
- ProcessMAP system User permissions would not be considered while exposing the data
- Data will be shown in Readable JSON format
- User accessing this endpoint through a valid Token & ConsumerId, provided by ProcessMAP, will have access to complete data
User Interaction
Users can fetch all location information at once by hitting the endpoint. There is also an optional parameter LEVEL which can be passed to the API and only Location codes mapped to that LEVEL would be shown in the JSON response.
Location Details
Request
GET papi/v1/locationoutbound/LocationInfo or
GET papi/v1/imsoutboundLocationOutbound/nearmissincidentsLocationInfo?locationCode={locationCode}&dateFrom={dateFrom}&dateTo={dateTo}level=LevelName (PASSING level as OPTIONAL Parameter)
Ex: papi/v1/imsoutbound/nearmissincidents?locationCode=westlake&dateFrom=2019-07-01&dateTo=2019-07-30
URI Parameters
Location Code in string format, DateFrom & DateTo are to be passed as parameters.
...
Represents the unique code of location for which Incident records to return.
...
Required
...
Represents the starting date of Incident records to return.
...
Required
...
Represents the ending date of Incident records to return.
...
Required
locationoutbound/LocationInfo or
papi/v1/LocationOutbound/LocationInfo?level=LevelName
Headers
Name | Description | Sample |
---|---|---|
Authorization | Represents the value of the authentication token. Allow multiple values: no. | Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ... |
ConsumerId | Represents the value of the consumer id. Allow multiple values: no. | 2426 |
Response
Sample:
{
...
"Location Name": "sample string 2",
"Location Code": "sample string 3"
}
Location Field List and Mapping
Product Field Name | Description | Field Type and Size |
---|---|---|
Location Name | Represents location name | NVARCHAR(50) |
Location Code | Represents location code | NVARCHAR(50) |
Errors/Validation Messages
...
{
"HttpStatusCode": 401,
"HttpStatus": "Unauthorized",
"ErrorCode": 1030,
"ErrorMessage": "Invalid tenant."
}
If the location code given is invalid:
{
"Message": "Invalid Location Code"
}
If the dates were not properly passed, i.e, From Date is greater than To Date{
"Message": "Date From is greater than Date To"
}