- PMP-79546Getting issue details... STATUS
Background and strategic fit
The purpose of this Integration is to pull the Location information. This data can be further used while hitting other APIs)
(as request parameter). This document provides information on how the 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
- The "Level" property in the output JSON will have the levels and sublevels separated by a "/" till the last level where the location belongs to.
- If the user does not pass any Level Name as the parameter then all locations of the system will be displayed with the "Level" property as NULL.
- If the user passes any level name as the parameter, then all locations under that level will be displayed.
- If any level available in multiple categories and mapped to a single location, display anyone mapping enterprise heiarchy of the location.
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/LocationOutbound/LocationInfo?level=LevelName (PASSING level as OPTIONAL Parameter)
Ex: papi/v1/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 for the API Call without RootName as parameter
Sample:
{
"Level: : "By Geography/By Country",
"LocationId": "1234",
"LocationCode": "Test",
"LocationName": "Test",
"Address": "Test",
"City": "Test",
"State": "Test",
"Country": "Test",
"Zip": "765432"
}
{
"Level: : "By Geography/By Country",
"LocationId": "6789",
"LocationCode": "Test1",
"LocationName": "Test1",
"Address": "Test1",
"City": "Test1",
"State": "Test1",
"Country": "Test1",
"Zip": "765432"
}
Response for the API Call with RootName as parameter
Sample:
{
"Level" : "By Geography/SL1/SL2",
"LocationId": "1234",
"LocationCode": "TrainingLocation",
"LocationName": "TrainingLocation",
"Address": "Test",
"City": "Test",
"State": "Test",
"Country": "Test",
"Zip": "765432"
}
{
"Level" : "By Geography/SL1/SL2/SL3",
"LocationId": "4567",
"LocationCode": "TrainingLocation1",
"LocationName": "TrainingLocation1",
"Address": "Test",
"City": "Test",
"State": "Test",
"Country": "Test",
"Zip": "765432"
}
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) |
LocationId | Represents Database LocationId | |
Address | Represents Location Address | |
City | Represents Location City | |
State | Represents Location State | |
Country | Represents Location Country | |
Zip | Represents Location Zip | |
Level | Represents the Level Hierarchy in flat format[when rootname is passed in parameter] |
Errors/Validation Messages
Generic Error codes are given below.
HTTP ERROR 401
{
"HttpStatusCode": 401,
"HttpStatus": "Unauthorized",
"ErrorCode": 1030,
"ErrorMessage": "Invalid tenant."
}