Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
...
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
Org API will give the complete Enterprise hierarchy in a flat format. The location API will provide all location details in a flat format. The linkage between two APIs is the ImmediateLevelID field in the Location API. Using that the complete hierarchy can be achieved.
- Only Level information is shown with ID. No location information. For mapping to location, we need to call location API which has ImmediateLevelID that can be mapped with the LevelID in this API & further self-joined to retrieve the complete hierarchy
User Interaction
Location
...
API
Request Endpoint :
GET papi/v1/locationoutbound/LocationInfo or
...
papi/v1/LocationOutbound/LocationInfo?level=LevelName
Note - {level} is an optional paramater for the API Call. If a Level is passed, may be rootlevel or any intermediate level, then all locations under it are retrieved.
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 |
...
Enhancement to the existing Location API. :
The previous version of the Location Outbound API returned us the below fields -
Wiki Markup |
---|
[
{
"Location Id": 11999,
"Location Name": "Koma Kulshan",
"Location Code": "Koma Kulshan"
}
] |
The existing Location API is being enhanced to include additional fields.
Enhanced Output with the new changes:
Wiki Markup |
---|
{
"LocationDetails": [
{
"ImmediateLevelID": [
1003,
8804
],
"Location Id": 8731,
"Location Name": "Research Park",
"Location Code": "Research Park",
"Company Code": "",
"Address": "120 1st Ave",
"Country": "Algeria",
"State/Province": "",
"City": "Melville",
"County": "Green",
"Postal/Zip": "58388",
"LocationStatus": "Active",
"BusinessType": "",
"OperationType": "",
"IndustryDescription": "",
"Comments": ""
},
{
"ImmediateLevelID": [
8773,
11359
],
"Location Id": 8789,
"Location Name": "Troy",
"Location Code": "Troy",
"Company Code": "",
"Address": "Salisbury Industrial Park\r4005 Queens Avenue",
"Country": "United States",
"State/Province": "Michigan",
"City": "Troy",
"County": "",
"Postal/Zip": "",
"LocationStatus": "Active",
"BusinessType": "",
"OperationType": "",
"IndustryDescription": "",
"Comments": ""
}
]} |
2. Org API :
This API will extract the Level Hierarchy from the system..
Request Endpoint-
GET papi/v1/leveloutbound/LevelInfo or
GET papi/v1/leveloutbound/LevelInfo?level={level}
(PASSING level as OPTIONAL Parameter)
Note - {level} is an optional paramater for the API Call. If a Level is passed, may be rootlevel or any intermediate level, then all levels under it are retrieved.
This API produces below output.
Wiki Markup |
---|
{
"LevelDetails": [
{
"LevelName": "By Division",
"LevelId": 1003,
"ParentLevelId": "1003",
"ParentLevel": "By Division",
"Depth": "0"
},
{
"LevelName": "Shared Services",
"LevelId": 8703,
"ParentLevelId": "1003",
"ParentLevel": "By Division",
"Depth": "1"
},
{
"LevelName": "Sales",
"LevelId": 8768,
"ParentLevelId": "1003",
"ParentLevel": "By Division",
"Depth": "1"
},
{
"LevelName": "EnterpriseStructureDetails_Demo1",
"LevelId": 11506,
"ParentLevelId": "1003",
"ParentLevel": "By Division",
"Depth": "1"
},
{
"LevelName": "Test1234",
"LevelId": 11593,
"ParentLevelId": "1003",
"ParentLevel": "By Division",
"Depth": "1"
},
{
"LevelName": "Division 1",
"LevelId": 8811,
"ParentLevelId": "8810",
"ParentLevel": "Pipe Fabrication",
"Depth": "2"
},
{
"LevelName": "Division 2",
"LevelId": 8812,
"ParentLevelId": "8810",
"ParentLevel": "Pipe Fabrication",
"Depth": "2"
},
{
"LevelName": "test move Level",
"LevelId": 11439,
"ParentLevelId": "8818",
"ParentLevel": "Mechanical Contracting & Services",
"Depth": "3"
},
{
"LevelName": "Testting",
"LevelId": 11442,
"ParentLevelId": "8823",
"ParentLevel": "Commercial Vehicle",
"Depth": "4"
},
{
"LevelName": "DX",
"LevelId": 11519,
"ParentLevelId": "11518",
"ParentLevel": "CX",
"Depth": "4"
},
{
"LevelName": "EX",
"LevelId": 11520,
"ParentLevelId": "11519",
"ParentLevel": "DX",
"Depth": "5"
}
]
} |
Please find the Field Level Mapping below.
Org Structure
Product Field Name | Description | Field Type and Size |
---|---|---|
Level Name | ||
ID | ||
Parent ID | ||
Parent Name | ||
Depth |
Location Field List and Mapping
Product Field Name | Description | Field Type and Size |
---|---|---|
Immediate Level IdImmediateLevelId | Array of Immediate LevelIds | |
Location Name | ||
Location Code | ||
Location Id | ||
Company Code | ||
Address | ||
Country | ||
State/Province | ||
City | ||
County | ||
Postal/Zip Code | ||
Location Status | ||
Business Type | ||
Operation Type | ||
Industry Description | ||
Comments |
, View file
View file | ||||
---|---|---|---|---|
|
Errors/Validation Messages
...
{
"HttpStatusCode": 401,
"HttpStatus": "Unauthorized",
"ErrorCode": 1030,
"ErrorMessage": "Invalid tenant."
}
View file name LocationAPI-JSON.txt height 250 View file name OrgAPI-JSON.txt height 250